generated-configure.sh revision 1044:87acde3de1cc
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
667X_EXTRA_LIBS
668X_LIBS
669X_PRE_LIBS
670X_CFLAGS
671XMKMF
672FIXPATH
673ZIP_DEBUGINFO_FILES
674ENABLE_DEBUG_SYMBOLS
675CFLAGS_WARNINGS_ARE_ERRORS
676COMPILER_SUPPORTS_TARGET_BITS_FLAG
677ZERO_ARCHFLAG
678LDFLAGS_CXX_JDK
679LDFLAGS_JDKEXE_SUFFIX
680LDFLAGS_JDKLIB_SUFFIX
681LDFLAGS_JDKEXE
682LDFLAGS_JDKLIB
683CXXFLAGS_JDKEXE
684CXXFLAGS_JDKLIB
685CFLAGS_JDKEXE
686CFLAGS_JDKLIB
687MACOSX_VERSION_MIN
688LEGACY_EXTRA_LDFLAGS
689LEGACY_EXTRA_CXXFLAGS
690LEGACY_EXTRA_CFLAGS
691CXX_O_FLAG_NONE
692CXX_O_FLAG_NORM
693CXX_O_FLAG_HI
694CXX_O_FLAG_HIGHEST
695C_O_FLAG_NONE
696C_O_FLAG_NORM
697C_O_FLAG_HI
698C_O_FLAG_HIGHEST
699CXXFLAGS_DEBUG_SYMBOLS
700CFLAGS_DEBUG_SYMBOLS
701CXX_FLAG_DEPS
702C_FLAG_DEPS
703SET_SHARED_LIBRARY_MAPFILE
704SET_SHARED_LIBRARY_NAME
705SET_SHARED_LIBRARY_ORIGIN
706SET_EXECUTABLE_ORIGIN
707SHARED_LIBRARY_FLAGS
708CXX_FLAG_REORDER
709C_FLAG_REORDER
710SYSROOT_LDFLAGS
711SYSROOT_CFLAGS
712RC_FLAGS
713AR_OUT_OPTION
714LD_OUT_OPTION
715EXE_OUT_OPTION
716CC_OUT_OPTION
717POST_MCS_CMD
718POST_STRIP_CMD
719ARFLAGS
720COMPILER_TARGET_BITS_FLAG
721JT_HOME
722JTREGEXE
723USING_BROKEN_SUSE_LD
724PACKAGE_PATH
725LDEXECXX
726LDEXE
727USE_CLANG
728HOTSPOT_LD
729HOTSPOT_CXX
730HOTSPOT_RC
731HOTSPOT_MT
732BUILD_LD
733BUILD_CXX
734BUILD_CC
735ac_ct_OBJDUMP
736OBJDUMP
737ac_ct_OBJCOPY
738OBJCOPY
739ac_ct_NM
740ac_ct_STRIP
741MCS
742GNM
743NM
744STRIP
745DUMPBIN
746RC
747MT
748LIPO
749ac_ct_OBJC
750OBJCFLAGS
751OBJC
752ac_ct_AR
753AR
754AS
755LDCXX
756LD
757CXXCPP
758CPP
759ac_ct_CXX
760CXXFLAGS
761CXX
762ac_ct_PROPER_COMPILER_CXX
763PROPER_COMPILER_CXX
764TOOLCHAIN_PATH_CXX
765POTENTIAL_CXX
766OBJEXT
767EXEEXT
768ac_ct_CC
769CPPFLAGS
770LDFLAGS
771CFLAGS
772CC
773ac_ct_PROPER_COMPILER_CC
774PROPER_COMPILER_CC
775TOOLCHAIN_PATH_CC
776POTENTIAL_CC
777VS_LIB
778VS_INCLUDE
779VS_PATH
780CYGWIN_LINK
781EXE_SUFFIX
782OBJ_SUFFIX
783STATIC_LIBRARY
784SHARED_LIBRARY
785STATIC_LIBRARY_SUFFIX
786SHARED_LIBRARY_SUFFIX
787LIBRARY_PREFIX
788TOOLCHAIN_TYPE
789BUILD_HOTSPOT
790HOTSPOT_DIST
791BUILD_OUTPUT
792OVERRIDE_SRC_ROOT
793ADD_SRC_ROOT
794JDK_TOPDIR
795NASHORN_TOPDIR
796HOTSPOT_TOPDIR
797JAXWS_TOPDIR
798JAXP_TOPDIR
799CORBA_TOPDIR
800LANGTOOLS_TOPDIR
801JAVA_FLAGS_SMALL
802JAVA_FLAGS_BIG
803JAVA_FLAGS
804JAVAC_FLAGS
805BOOT_JDK_SOURCETARGET
806JARSIGNER
807NATIVE2ASCII
808JAR
809JAVAH
810JAVAC
811JAVA
812BOOT_JDK
813BOOT_TOOLSJAR
814BOOT_RTJAR
815JAVA_CHECK
816JAVAC_CHECK
817COOKED_BUILD_NUMBER
818JDK_VERSION
819COPYRIGHT_YEAR
820MACOSX_BUNDLE_ID_BASE
821MACOSX_BUNDLE_NAME_BASE
822COMPANY_NAME
823JDK_RC_PLATFORM_NAME
824PRODUCT_SUFFIX
825PRODUCT_NAME
826LAUNCHER_NAME
827MILESTONE
828JDK_BUILD_NUMBER
829JDK_UPDATE_VERSION
830JDK_MICRO_VERSION
831JDK_MINOR_VERSION
832JDK_MAJOR_VERSION
833USER_RELEASE_SUFFIX
834COMPRESS_JARS
835RMICONNECTOR_IIOP
836UNLIMITED_CRYPTO
837CACERTS_FILE
838TEST_IN_BUILD
839BUILD_HEADLESS
840SUPPORT_HEADFUL
841SUPPORT_HEADLESS
842BDEPS_FTP
843BDEPS_UNZIP
844OS_VERSION_MICRO
845OS_VERSION_MINOR
846OS_VERSION_MAJOR
847PKG_CONFIG
848CODESIGN
849XATTR
850DSYMUTIL
851IS_GNU_TIME
852TIME
853STAT
854HG
855READELF
856OTOOL
857LDD
858ZIP
859UNZIP
860FIND_DELETE
861MAKE
862CHECK_TOOLSDIR_MAKE
863CHECK_TOOLSDIR_GMAKE
864CHECK_MAKE
865CHECK_GMAKE
866PKGHANDLER
867OUTPUT_ROOT
868CONF_NAME
869SPEC
870BUILD_VARIANT_RELEASE
871DEBUG_CLASSFILES
872FASTDEBUG
873VARIANT
874DEBUG_LEVEL
875MACOSX_UNIVERSAL
876INCLUDE_SA
877JVM_VARIANT_CORE
878JVM_VARIANT_ZEROSHARK
879JVM_VARIANT_ZERO
880JVM_VARIANT_KERNEL
881JVM_VARIANT_MINIMAL1
882JVM_VARIANT_CLIENT
883JVM_VARIANT_SERVER
884JVM_VARIANTS
885JVM_INTERPRETER
886JDK_VARIANT
887SET_OPENJDK
888BUILD_LOG_WRAPPER
889BUILD_LOG_PREVIOUS
890BUILD_LOG
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
1023enable_openjdk_only
1024with_custom_make_dir
1025with_jdk_variant
1026with_jvm_interpreter
1027with_jvm_variants
1028enable_debug
1029with_debug_level
1030with_devkit
1031with_sys_root
1032with_sysroot
1033with_tools_dir
1034with_toolchain_path
1035with_extra_path
1036with_conf_name
1037with_builddeps_conf
1038with_builddeps_server
1039with_builddeps_dir
1040with_builddeps_group
1041enable_headful
1042enable_hotspot_test_in_build
1043with_cacerts_file
1044enable_unlimited_crypto
1045enable_rmiconnector_iiop
1046with_milestone
1047with_update_version
1048with_user_release_suffix
1049with_build_number
1050with_boot_jdk
1051with_boot_jdk_jvmargs
1052with_add_source_root
1053with_override_source_root
1054with_adds_and_overrides
1055with_override_langtools
1056with_override_corba
1057with_override_jaxp
1058with_override_jaxws
1059with_override_hotspot
1060with_override_nashorn
1061with_override_jdk
1062with_import_hotspot
1063with_toolchain_type
1064with_jtreg
1065with_extra_cflags
1066with_extra_cxxflags
1067with_extra_ldflags
1068enable_debug_symbols
1069enable_zip_debug_info
1070enable_macosx_runtime_support
1071with_x
1072with_cups
1073with_cups_include
1074with_freetype
1075with_freetype_include
1076with_freetype_lib
1077enable_freetype_bundling
1078with_alsa
1079with_alsa_include
1080with_alsa_lib
1081with_giflib
1082with_libpng
1083with_zlib
1084with_stdc__lib
1085with_msvcr_dll
1086with_dxsdk
1087with_dxsdk_lib
1088with_dxsdk_include
1089with_num_cores
1090with_memory_size
1091with_jobs
1092with_sjavac_server_java
1093enable_sjavac
1094enable_precompiled_headers
1095enable_ccache
1096with_ccache_dir
1097'
1098      ac_precious_vars='build_alias
1099host_alias
1100target_alias
1101BASENAME
1102BASH
1103CAT
1104CHMOD
1105CMP
1106COMM
1107CP
1108CPIO
1109CUT
1110DATE
1111DIFF
1112DIRNAME
1113ECHO
1114EXPR
1115FILE
1116FIND
1117HEAD
1118LN
1119LS
1120MKDIR
1121MKTEMP
1122MV
1123NAWK
1124PRINTF
1125RM
1126SH
1127SORT
1128TAIL
1129TAR
1130TEE
1131TOUCH
1132TR
1133UNAME
1134UNIQ
1135WC
1136WHICH
1137XARGS
1138AWK
1139GREP
1140EGREP
1141FGREP
1142SED
1143CYGPATH
1144READLINK
1145DF
1146SETFILE
1147UNZIP
1148ZIP
1149LDD
1150OTOOL
1151READELF
1152HG
1153STAT
1154TIME
1155DSYMUTIL
1156XATTR
1157CODESIGN
1158PKG_CONFIG
1159JAVA
1160JAVAC
1161JAVAH
1162JAR
1163NATIVE2ASCII
1164JARSIGNER
1165CC
1166CFLAGS
1167LDFLAGS
1168LIBS
1169CPPFLAGS
1170CXX
1171CXXFLAGS
1172CCC
1173CPP
1174CXXCPP
1175AS
1176AR
1177OBJC
1178OBJCFLAGS
1179LIPO
1180STRIP
1181NM
1182GNM
1183MCS
1184OBJCOPY
1185OBJDUMP
1186BUILD_CC
1187BUILD_CXX
1188BUILD_LD
1189JTREGEXE
1190XMKMF
1191FREETYPE_CFLAGS
1192FREETYPE_LIBS
1193ALSA_CFLAGS
1194ALSA_LIBS
1195PNG_CFLAGS
1196PNG_LIBS
1197LIBFFI_CFLAGS
1198LIBFFI_LIBS
1199CCACHE'
1200
1201
1202# Initialize some variables set by options.
1203ac_init_help=
1204ac_init_version=false
1205ac_unrecognized_opts=
1206ac_unrecognized_sep=
1207# The variables have the same names as the options, with
1208# dashes changed to underlines.
1209cache_file=/dev/null
1210exec_prefix=NONE
1211no_create=
1212no_recursion=
1213prefix=NONE
1214program_prefix=NONE
1215program_suffix=NONE
1216program_transform_name=s,x,x,
1217silent=
1218site=
1219srcdir=
1220verbose=
1221x_includes=NONE
1222x_libraries=NONE
1223
1224# Installation directory options.
1225# These are left unexpanded so users can "make install exec_prefix=/foo"
1226# and all the variables that are supposed to be based on exec_prefix
1227# by default will actually change.
1228# Use braces instead of parens because sh, perl, etc. also accept them.
1229# (The list follows the same order as the GNU Coding Standards.)
1230bindir='${exec_prefix}/bin'
1231sbindir='${exec_prefix}/sbin'
1232libexecdir='${exec_prefix}/libexec'
1233datarootdir='${prefix}/share'
1234datadir='${datarootdir}'
1235sysconfdir='${prefix}/etc'
1236sharedstatedir='${prefix}/com'
1237localstatedir='${prefix}/var'
1238includedir='${prefix}/include'
1239oldincludedir='/usr/include'
1240docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1241infodir='${datarootdir}/info'
1242htmldir='${docdir}'
1243dvidir='${docdir}'
1244pdfdir='${docdir}'
1245psdir='${docdir}'
1246libdir='${exec_prefix}/lib'
1247localedir='${datarootdir}/locale'
1248mandir='${datarootdir}/man'
1249
1250ac_prev=
1251ac_dashdash=
1252for ac_option
1253do
1254  # If the previous option needs an argument, assign it.
1255  if test -n "$ac_prev"; then
1256    eval $ac_prev=\$ac_option
1257    ac_prev=
1258    continue
1259  fi
1260
1261  case $ac_option in
1262  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1263  *=)   ac_optarg= ;;
1264  *)    ac_optarg=yes ;;
1265  esac
1266
1267  # Accept the important Cygnus configure options, so we can diagnose typos.
1268
1269  case $ac_dashdash$ac_option in
1270  --)
1271    ac_dashdash=yes ;;
1272
1273  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1274    ac_prev=bindir ;;
1275  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1276    bindir=$ac_optarg ;;
1277
1278  -build | --build | --buil | --bui | --bu)
1279    ac_prev=build_alias ;;
1280  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1281    build_alias=$ac_optarg ;;
1282
1283  -cache-file | --cache-file | --cache-fil | --cache-fi \
1284  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1285    ac_prev=cache_file ;;
1286  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1287  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1288    cache_file=$ac_optarg ;;
1289
1290  --config-cache | -C)
1291    cache_file=config.cache ;;
1292
1293  -datadir | --datadir | --datadi | --datad)
1294    ac_prev=datadir ;;
1295  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1296    datadir=$ac_optarg ;;
1297
1298  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1299  | --dataroo | --dataro | --datar)
1300    ac_prev=datarootdir ;;
1301  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1302  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1303    datarootdir=$ac_optarg ;;
1304
1305  -disable-* | --disable-*)
1306    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1307    # Reject names that are not valid shell variable names.
1308    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1309      as_fn_error $? "invalid feature name: $ac_useropt"
1310    ac_useropt_orig=$ac_useropt
1311    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1312    case $ac_user_opts in
1313      *"
1314"enable_$ac_useropt"
1315"*) ;;
1316      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1317	 ac_unrecognized_sep=', ';;
1318    esac
1319    eval enable_$ac_useropt=no ;;
1320
1321  -docdir | --docdir | --docdi | --doc | --do)
1322    ac_prev=docdir ;;
1323  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1324    docdir=$ac_optarg ;;
1325
1326  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1327    ac_prev=dvidir ;;
1328  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1329    dvidir=$ac_optarg ;;
1330
1331  -enable-* | --enable-*)
1332    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1333    # Reject names that are not valid shell variable names.
1334    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1335      as_fn_error $? "invalid feature name: $ac_useropt"
1336    ac_useropt_orig=$ac_useropt
1337    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1338    case $ac_user_opts in
1339      *"
1340"enable_$ac_useropt"
1341"*) ;;
1342      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1343	 ac_unrecognized_sep=', ';;
1344    esac
1345    eval enable_$ac_useropt=\$ac_optarg ;;
1346
1347  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1348  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1349  | --exec | --exe | --ex)
1350    ac_prev=exec_prefix ;;
1351  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1352  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1353  | --exec=* | --exe=* | --ex=*)
1354    exec_prefix=$ac_optarg ;;
1355
1356  -gas | --gas | --ga | --g)
1357    # Obsolete; use --with-gas.
1358    with_gas=yes ;;
1359
1360  -help | --help | --hel | --he | -h)
1361    ac_init_help=long ;;
1362  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1363    ac_init_help=recursive ;;
1364  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1365    ac_init_help=short ;;
1366
1367  -host | --host | --hos | --ho)
1368    ac_prev=host_alias ;;
1369  -host=* | --host=* | --hos=* | --ho=*)
1370    host_alias=$ac_optarg ;;
1371
1372  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1373    ac_prev=htmldir ;;
1374  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1375  | --ht=*)
1376    htmldir=$ac_optarg ;;
1377
1378  -includedir | --includedir | --includedi | --included | --include \
1379  | --includ | --inclu | --incl | --inc)
1380    ac_prev=includedir ;;
1381  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1382  | --includ=* | --inclu=* | --incl=* | --inc=*)
1383    includedir=$ac_optarg ;;
1384
1385  -infodir | --infodir | --infodi | --infod | --info | --inf)
1386    ac_prev=infodir ;;
1387  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1388    infodir=$ac_optarg ;;
1389
1390  -libdir | --libdir | --libdi | --libd)
1391    ac_prev=libdir ;;
1392  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1393    libdir=$ac_optarg ;;
1394
1395  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1396  | --libexe | --libex | --libe)
1397    ac_prev=libexecdir ;;
1398  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1399  | --libexe=* | --libex=* | --libe=*)
1400    libexecdir=$ac_optarg ;;
1401
1402  -localedir | --localedir | --localedi | --localed | --locale)
1403    ac_prev=localedir ;;
1404  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1405    localedir=$ac_optarg ;;
1406
1407  -localstatedir | --localstatedir | --localstatedi | --localstated \
1408  | --localstate | --localstat | --localsta | --localst | --locals)
1409    ac_prev=localstatedir ;;
1410  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1411  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1412    localstatedir=$ac_optarg ;;
1413
1414  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1415    ac_prev=mandir ;;
1416  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1417    mandir=$ac_optarg ;;
1418
1419  -nfp | --nfp | --nf)
1420    # Obsolete; use --without-fp.
1421    with_fp=no ;;
1422
1423  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1424  | --no-cr | --no-c | -n)
1425    no_create=yes ;;
1426
1427  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1428  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1429    no_recursion=yes ;;
1430
1431  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1432  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1433  | --oldin | --oldi | --old | --ol | --o)
1434    ac_prev=oldincludedir ;;
1435  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1436  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1437  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1438    oldincludedir=$ac_optarg ;;
1439
1440  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1441    ac_prev=prefix ;;
1442  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1443    prefix=$ac_optarg ;;
1444
1445  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1446  | --program-pre | --program-pr | --program-p)
1447    ac_prev=program_prefix ;;
1448  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1449  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1450    program_prefix=$ac_optarg ;;
1451
1452  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1453  | --program-suf | --program-su | --program-s)
1454    ac_prev=program_suffix ;;
1455  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1456  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1457    program_suffix=$ac_optarg ;;
1458
1459  -program-transform-name | --program-transform-name \
1460  | --program-transform-nam | --program-transform-na \
1461  | --program-transform-n | --program-transform- \
1462  | --program-transform | --program-transfor \
1463  | --program-transfo | --program-transf \
1464  | --program-trans | --program-tran \
1465  | --progr-tra | --program-tr | --program-t)
1466    ac_prev=program_transform_name ;;
1467  -program-transform-name=* | --program-transform-name=* \
1468  | --program-transform-nam=* | --program-transform-na=* \
1469  | --program-transform-n=* | --program-transform-=* \
1470  | --program-transform=* | --program-transfor=* \
1471  | --program-transfo=* | --program-transf=* \
1472  | --program-trans=* | --program-tran=* \
1473  | --progr-tra=* | --program-tr=* | --program-t=*)
1474    program_transform_name=$ac_optarg ;;
1475
1476  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1477    ac_prev=pdfdir ;;
1478  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1479    pdfdir=$ac_optarg ;;
1480
1481  -psdir | --psdir | --psdi | --psd | --ps)
1482    ac_prev=psdir ;;
1483  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1484    psdir=$ac_optarg ;;
1485
1486  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1487  | -silent | --silent | --silen | --sile | --sil)
1488    silent=yes ;;
1489
1490  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1491    ac_prev=sbindir ;;
1492  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1493  | --sbi=* | --sb=*)
1494    sbindir=$ac_optarg ;;
1495
1496  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1497  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1498  | --sharedst | --shareds | --shared | --share | --shar \
1499  | --sha | --sh)
1500    ac_prev=sharedstatedir ;;
1501  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1502  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1503  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1504  | --sha=* | --sh=*)
1505    sharedstatedir=$ac_optarg ;;
1506
1507  -site | --site | --sit)
1508    ac_prev=site ;;
1509  -site=* | --site=* | --sit=*)
1510    site=$ac_optarg ;;
1511
1512  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1513    ac_prev=srcdir ;;
1514  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1515    srcdir=$ac_optarg ;;
1516
1517  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1518  | --syscon | --sysco | --sysc | --sys | --sy)
1519    ac_prev=sysconfdir ;;
1520  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1521  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1522    sysconfdir=$ac_optarg ;;
1523
1524  -target | --target | --targe | --targ | --tar | --ta | --t)
1525    ac_prev=target_alias ;;
1526  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1527    target_alias=$ac_optarg ;;
1528
1529  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1530    verbose=yes ;;
1531
1532  -version | --version | --versio | --versi | --vers | -V)
1533    ac_init_version=: ;;
1534
1535  -with-* | --with-*)
1536    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1537    # Reject names that are not valid shell variable names.
1538    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1539      as_fn_error $? "invalid package name: $ac_useropt"
1540    ac_useropt_orig=$ac_useropt
1541    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1542    case $ac_user_opts in
1543      *"
1544"with_$ac_useropt"
1545"*) ;;
1546      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1547	 ac_unrecognized_sep=', ';;
1548    esac
1549    eval with_$ac_useropt=\$ac_optarg ;;
1550
1551  -without-* | --without-*)
1552    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1553    # Reject names that are not valid shell variable names.
1554    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1555      as_fn_error $? "invalid package name: $ac_useropt"
1556    ac_useropt_orig=$ac_useropt
1557    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1558    case $ac_user_opts in
1559      *"
1560"with_$ac_useropt"
1561"*) ;;
1562      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1563	 ac_unrecognized_sep=', ';;
1564    esac
1565    eval with_$ac_useropt=no ;;
1566
1567  --x)
1568    # Obsolete; use --with-x.
1569    with_x=yes ;;
1570
1571  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1572  | --x-incl | --x-inc | --x-in | --x-i)
1573    ac_prev=x_includes ;;
1574  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1575  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1576    x_includes=$ac_optarg ;;
1577
1578  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1579  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1580    ac_prev=x_libraries ;;
1581  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1582  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1583    x_libraries=$ac_optarg ;;
1584
1585  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1586Try \`$0 --help' for more information"
1587    ;;
1588
1589  *=*)
1590    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1591    # Reject names that are not valid shell variable names.
1592    case $ac_envvar in #(
1593      '' | [0-9]* | *[!_$as_cr_alnum]* )
1594      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1595    esac
1596    eval $ac_envvar=\$ac_optarg
1597    export $ac_envvar ;;
1598
1599  *)
1600    # FIXME: should be removed in autoconf 3.0.
1601    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1602    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1603      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1604    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1605    ;;
1606
1607  esac
1608done
1609
1610if test -n "$ac_prev"; then
1611  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1612  as_fn_error $? "missing argument to $ac_option"
1613fi
1614
1615if test -n "$ac_unrecognized_opts"; then
1616  case $enable_option_checking in
1617    no) ;;
1618    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1619    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1620  esac
1621fi
1622
1623# Check all directory arguments for consistency.
1624for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1625		datadir sysconfdir sharedstatedir localstatedir includedir \
1626		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1627		libdir localedir mandir
1628do
1629  eval ac_val=\$$ac_var
1630  # Remove trailing slashes.
1631  case $ac_val in
1632    */ )
1633      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1634      eval $ac_var=\$ac_val;;
1635  esac
1636  # Be sure to have absolute directory names.
1637  case $ac_val in
1638    [\\/$]* | ?:[\\/]* )  continue;;
1639    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1640  esac
1641  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1642done
1643
1644# There might be people who depend on the old broken behavior: `$host'
1645# used to hold the argument of --host etc.
1646# FIXME: To remove some day.
1647build=$build_alias
1648host=$host_alias
1649target=$target_alias
1650
1651# FIXME: To remove some day.
1652if test "x$host_alias" != x; then
1653  if test "x$build_alias" = x; then
1654    cross_compiling=maybe
1655  elif test "x$build_alias" != "x$host_alias"; then
1656    cross_compiling=yes
1657  fi
1658fi
1659
1660ac_tool_prefix=
1661test -n "$host_alias" && ac_tool_prefix=$host_alias-
1662
1663test "$silent" = yes && exec 6>/dev/null
1664
1665
1666ac_pwd=`pwd` && test -n "$ac_pwd" &&
1667ac_ls_di=`ls -di .` &&
1668ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1669  as_fn_error $? "working directory cannot be determined"
1670test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1671  as_fn_error $? "pwd does not report name of working directory"
1672
1673
1674# Find the source files, if location was not specified.
1675if test -z "$srcdir"; then
1676  ac_srcdir_defaulted=yes
1677  # Try the directory containing this script, then the parent directory.
1678  ac_confdir=`$as_dirname -- "$as_myself" ||
1679$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1680	 X"$as_myself" : 'X\(//\)[^/]' \| \
1681	 X"$as_myself" : 'X\(//\)$' \| \
1682	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1683$as_echo X"$as_myself" |
1684    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1685	    s//\1/
1686	    q
1687	  }
1688	  /^X\(\/\/\)[^/].*/{
1689	    s//\1/
1690	    q
1691	  }
1692	  /^X\(\/\/\)$/{
1693	    s//\1/
1694	    q
1695	  }
1696	  /^X\(\/\).*/{
1697	    s//\1/
1698	    q
1699	  }
1700	  s/.*/./; q'`
1701  srcdir=$ac_confdir
1702  if test ! -r "$srcdir/$ac_unique_file"; then
1703    srcdir=..
1704  fi
1705else
1706  ac_srcdir_defaulted=no
1707fi
1708if test ! -r "$srcdir/$ac_unique_file"; then
1709  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1710  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1711fi
1712ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1713ac_abs_confdir=`(
1714	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1715	pwd)`
1716# When building in place, set srcdir=.
1717if test "$ac_abs_confdir" = "$ac_pwd"; then
1718  srcdir=.
1719fi
1720# Remove unnecessary trailing slashes from srcdir.
1721# Double slashes in file names in object file debugging info
1722# mess up M-x gdb in Emacs.
1723case $srcdir in
1724*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1725esac
1726for ac_var in $ac_precious_vars; do
1727  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1728  eval ac_env_${ac_var}_value=\$${ac_var}
1729  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1730  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1731done
1732
1733#
1734# Report the --help message.
1735#
1736if test "$ac_init_help" = "long"; then
1737  # Omit some internal or obsolete options to make the list less imposing.
1738  # This message is too long to be a string in the A/UX 3.1 sh.
1739  cat <<_ACEOF
1740\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1741
1742Usage: $0 [OPTION]... [VAR=VALUE]...
1743
1744To assign environment variables (e.g., CC, CFLAGS...), specify them as
1745VAR=VALUE.  See below for descriptions of some of the useful variables.
1746
1747Defaults for the options are specified in brackets.
1748
1749Configuration:
1750  -h, --help              display this help and exit
1751      --help=short        display options specific to this package
1752      --help=recursive    display the short help of all the included packages
1753  -V, --version           display version information and exit
1754  -q, --quiet, --silent   do not print \`checking ...' messages
1755      --cache-file=FILE   cache test results in FILE [disabled]
1756  -C, --config-cache      alias for \`--cache-file=config.cache'
1757  -n, --no-create         do not create output files
1758      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1759
1760Installation directories:
1761  --prefix=PREFIX         install architecture-independent files in PREFIX
1762                          [$ac_default_prefix]
1763  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1764                          [PREFIX]
1765
1766By default, \`make install' will install all the files in
1767\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1768an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1769for instance \`--prefix=\$HOME'.
1770
1771For better control, use the options below.
1772
1773Fine tuning of the installation directories:
1774  --bindir=DIR            user executables [EPREFIX/bin]
1775  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1776  --libexecdir=DIR        program executables [EPREFIX/libexec]
1777  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1778  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1779  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1780  --libdir=DIR            object code libraries [EPREFIX/lib]
1781  --includedir=DIR        C header files [PREFIX/include]
1782  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1783  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1784  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1785  --infodir=DIR           info documentation [DATAROOTDIR/info]
1786  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1787  --mandir=DIR            man documentation [DATAROOTDIR/man]
1788  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1789  --htmldir=DIR           html documentation [DOCDIR]
1790  --dvidir=DIR            dvi documentation [DOCDIR]
1791  --pdfdir=DIR            pdf documentation [DOCDIR]
1792  --psdir=DIR             ps documentation [DOCDIR]
1793_ACEOF
1794
1795  cat <<\_ACEOF
1796
1797X features:
1798  --x-includes=DIR    X include files are in DIR
1799  --x-libraries=DIR   X library files are in DIR
1800
1801System types:
1802  --build=BUILD     configure for building on BUILD [guessed]
1803  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1804  --target=TARGET   configure for building compilers for TARGET [HOST]
1805_ACEOF
1806fi
1807
1808if test -n "$ac_init_help"; then
1809  case $ac_init_help in
1810     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1811   esac
1812  cat <<\_ACEOF
1813
1814Optional Features:
1815  --disable-option-checking  ignore unrecognized --enable/--with options
1816  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1817  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1818  --enable-openjdk-only   suppress building custom source even if present
1819                          [disabled]
1820  --enable-debug          set the debug level to fastdebug (shorthand for
1821                          --with-debug-level=fastdebug) [disabled]
1822  --disable-headful       disable building headful support (graphical UI
1823                          support) [enabled]
1824  --enable-hotspot-test-in-build
1825                          run the Queens test after Hotspot build [disabled]
1826  --enable-unlimited-crypto
1827                          Enable unlimited crypto policy [disabled]
1828  --enable-rmiconnector-iiop
1829                          enable the JMX RMIConnector iiop transport
1830                          [disabled]
1831  --disable-debug-symbols disable generation of debug symbols [enabled]
1832  --disable-zip-debug-info
1833                          disable zipping of debug-info files [enabled]
1834  --enable-macosx-runtime-support
1835                          Deprecated. Option is kept for backwards
1836                          compatibility and is ignored
1837  --disable-freetype-bundling
1838                          disable bundling of the freetype library with the
1839                          build result [enabled on Windows or when using
1840                          --with-freetype, disabled otherwise]
1841  --enable-sjavac         use sjavac to do fast incremental compiles
1842                          [disabled]
1843  --disable-precompiled-headers
1844                          disable using precompiled headers when compiling C++
1845                          [enabled]
1846  --enable-ccache         enable using ccache to speed up recompilations
1847                          [disabled]
1848
1849Optional Packages:
1850  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1851  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1852  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1853                          support it), e.g. --with-target-bits=32 [guessed]
1854  --with-custom-make-dir  Deprecated. Option is kept for backwards
1855                          compatibility and is ignored
1856  --with-jdk-variant      JDK variant to build (normal) [normal]
1857  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1858  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1859                          client, minimal1, kernel, zero, zeroshark, core)
1860                          [server]
1861  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1862                          optimized (HotSpot build only)) [release]
1863  --with-devkit           use this devkit for compilers, tools and resources
1864  --with-sys-root         alias for --with-sysroot for backwards compatability
1865  --with-sysroot          use this directory as sysroot)
1866  --with-tools-dir        alias for --with-toolchain-path for backwards
1867                          compatibility
1868  --with-toolchain-path   prepend these directories when searching for
1869                          toolchain binaries (compilers etc)
1870  --with-extra-path       prepend these directories to the default path
1871  --with-conf-name        use this as the name of the configuration [generated
1872                          from important configuration options]
1873  --with-builddeps-conf   use this configuration file for the builddeps
1874  --with-builddeps-server download and use build dependencies from this server
1875                          url
1876  --with-builddeps-dir    store downloaded build dependencies here
1877                          [/localhome/builddeps]
1878  --with-builddeps-group  chgrp the downloaded build dependencies to this
1879                          group
1880  --with-cacerts-file     specify alternative cacerts file
1881  --with-milestone        Set milestone value for build [internal]
1882  --with-update-version   Set update version value for build [b00]
1883  --with-user-release-suffix
1884                          Add a custom string to the version string if build
1885                          number is not set.[username_builddateb00]
1886  --with-build-number     Set build number value for build [b00]
1887  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1888  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1889                          invocations of boot JDK, overriding the default
1890                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1891                          -enableassertions"
1892  --with-add-source-root  for each and every source directory, look in this
1893                          additional source root for the same directory; if it
1894                          exists and have files in it, include it in the build
1895  --with-override-source-root
1896                          for each and every source directory, look in this
1897                          override source root for the same directory; if it
1898                          exists, use that directory instead and ignore the
1899                          directory in the original source root
1900  --with-adds-and-overrides
1901                          use the subdirs 'adds' and 'overrides' in the
1902                          specified directory as add-source-root and
1903                          override-source-root
1904  --with-override-langtools
1905                          use this langtools dir for the build
1906  --with-override-corba   use this corba dir for the build
1907  --with-override-jaxp    use this jaxp dir for the build
1908  --with-override-jaxws   use this jaxws dir for the build
1909  --with-override-hotspot use this hotspot dir for the build
1910  --with-override-nashorn use this nashorn dir for the build
1911  --with-override-jdk     use this jdk dir for the build
1912  --with-import-hotspot   import hotspot binaries from this jdk image or
1913                          hotspot build dist dir instead of building from
1914                          source
1915  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1916                          to show possible values [platform dependent]
1917  --with-jtreg            Regression Test Harness [probed]
1918  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1919  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1920  --with-extra-ldflags    extra flags to be used when linking jdk
1921  --with-x                use the X Window System
1922  --with-cups             specify prefix directory for the cups package
1923                          (expecting the headers under PATH/include)
1924  --with-cups-include     specify directory for the cups include files
1925  --with-freetype         specify prefix directory for the freetype package
1926                          (expecting the libraries under PATH/lib and the
1927                          headers under PATH/include)
1928  --with-freetype-include specify directory for the freetype include files
1929  --with-freetype-lib     specify directory for the freetype library
1930  --with-alsa             specify prefix directory for the alsa package
1931                          (expecting the libraries under PATH/lib and the
1932                          headers under PATH/include)
1933  --with-alsa-include     specify directory for the alsa include files
1934  --with-alsa-lib         specify directory for the alsa library
1935  --with-giflib           use giflib from build system or OpenJDK source
1936                          (system, bundled) [bundled]
1937  --with-libpng           use libpng from build system or OpenJDK source
1938                          (system, bundled) [bundled]
1939  --with-zlib             use zlib from build system or OpenJDK source
1940                          (system, bundled) [bundled]
1941  --with-stdc++lib=<static>,<dynamic>,<default>
1942                          force linking of the C++ runtime on Linux to either
1943                          static or dynamic, default is static with dynamic as
1944                          fallback
1945  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1946                          only) [probed]
1947  --with-dxsdk            Deprecated. Option is kept for backwards
1948                          compatibility and is ignored
1949  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1950                          compatibility and is ignored
1951  --with-dxsdk-include    Deprecated. Option is kept for backwards
1952                          compatibility and is ignored
1953  --with-num-cores        number of cores in the build system, e.g.
1954                          --with-num-cores=8 [probed]
1955  --with-memory-size      memory (in MB) available in the build system, e.g.
1956                          --with-memory-size=1024 [probed]
1957  --with-jobs             number of parallel jobs to let make run [calculated
1958                          based on cores and memory]
1959  --with-sjavac-server-java
1960                          use this java binary for running the sjavac
1961                          background server [Boot JDK java]
1962  --with-ccache-dir       where to store ccache files [~/.ccache]
1963
1964Some influential environment variables:
1965  BASENAME    Override default value for BASENAME
1966  BASH        Override default value for BASH
1967  CAT         Override default value for CAT
1968  CHMOD       Override default value for CHMOD
1969  CMP         Override default value for CMP
1970  COMM        Override default value for COMM
1971  CP          Override default value for CP
1972  CPIO        Override default value for CPIO
1973  CUT         Override default value for CUT
1974  DATE        Override default value for DATE
1975  DIFF        Override default value for DIFF
1976  DIRNAME     Override default value for DIRNAME
1977  ECHO        Override default value for ECHO
1978  EXPR        Override default value for EXPR
1979  FILE        Override default value for FILE
1980  FIND        Override default value for FIND
1981  HEAD        Override default value for HEAD
1982  LN          Override default value for LN
1983  LS          Override default value for LS
1984  MKDIR       Override default value for MKDIR
1985  MKTEMP      Override default value for MKTEMP
1986  MV          Override default value for MV
1987  NAWK        Override default value for NAWK
1988  PRINTF      Override default value for PRINTF
1989  RM          Override default value for RM
1990  SH          Override default value for SH
1991  SORT        Override default value for SORT
1992  TAIL        Override default value for TAIL
1993  TAR         Override default value for TAR
1994  TEE         Override default value for TEE
1995  TOUCH       Override default value for TOUCH
1996  TR          Override default value for TR
1997  UNAME       Override default value for UNAME
1998  UNIQ        Override default value for UNIQ
1999  WC          Override default value for WC
2000  WHICH       Override default value for WHICH
2001  XARGS       Override default value for XARGS
2002  AWK         Override default value for AWK
2003  GREP        Override default value for GREP
2004  EGREP       Override default value for EGREP
2005  FGREP       Override default value for FGREP
2006  SED         Override default value for SED
2007  CYGPATH     Override default value for CYGPATH
2008  READLINK    Override default value for READLINK
2009  DF          Override default value for DF
2010  SETFILE     Override default value for SETFILE
2011  UNZIP       Override default value for UNZIP
2012  ZIP         Override default value for ZIP
2013  LDD         Override default value for LDD
2014  OTOOL       Override default value for OTOOL
2015  READELF     Override default value for READELF
2016  HG          Override default value for HG
2017  STAT        Override default value for STAT
2018  TIME        Override default value for TIME
2019  DSYMUTIL    Override default value for DSYMUTIL
2020  XATTR       Override default value for XATTR
2021  CODESIGN    Override default value for CODESIGN
2022  PKG_CONFIG  path to pkg-config utility
2023  JAVA        Override default value for JAVA
2024  JAVAC       Override default value for JAVAC
2025  JAVAH       Override default value for JAVAH
2026  JAR         Override default value for JAR
2027  NATIVE2ASCII
2028              Override default value for NATIVE2ASCII
2029  JARSIGNER   Override default value for JARSIGNER
2030  CC          C compiler command
2031  CFLAGS      C compiler flags
2032  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2033              nonstandard directory <lib dir>
2034  LIBS        libraries to pass to the linker, e.g. -l<library>
2035  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2036              you have headers in a nonstandard directory <include dir>
2037  CXX         C++ compiler command
2038  CXXFLAGS    C++ compiler flags
2039  CPP         C preprocessor
2040  CXXCPP      C++ preprocessor
2041  AS          Override default value for AS
2042  AR          Override default value for AR
2043  OBJC        Objective C compiler command
2044  OBJCFLAGS   Objective C compiler flags
2045  LIPO        Override default value for LIPO
2046  STRIP       Override default value for STRIP
2047  NM          Override default value for NM
2048  GNM         Override default value for GNM
2049  MCS         Override default value for MCS
2050  OBJCOPY     Override default value for OBJCOPY
2051  OBJDUMP     Override default value for OBJDUMP
2052  BUILD_CC    Override default value for BUILD_CC
2053  BUILD_CXX   Override default value for BUILD_CXX
2054  BUILD_LD    Override default value for BUILD_LD
2055  JTREGEXE    Override default value for JTREGEXE
2056  XMKMF       Path to xmkmf, Makefile generator for X Window System
2057  FREETYPE_CFLAGS
2058              C compiler flags for FREETYPE, overriding pkg-config
2059  FREETYPE_LIBS
2060              linker flags for FREETYPE, overriding pkg-config
2061  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2062  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2063  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2064  PNG_LIBS    linker flags for PNG, overriding pkg-config
2065  LIBFFI_CFLAGS
2066              C compiler flags for LIBFFI, overriding pkg-config
2067  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2068  CCACHE      Override default value for CCACHE
2069
2070Use these variables to override the choices made by `configure' or to help
2071it to find libraries and programs with nonstandard names/locations.
2072
2073Report bugs to <build-dev@openjdk.java.net>.
2074OpenJDK home page: <http://openjdk.java.net>.
2075_ACEOF
2076ac_status=$?
2077fi
2078
2079if test "$ac_init_help" = "recursive"; then
2080  # If there are subdirs, report their specific --help.
2081  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2082    test -d "$ac_dir" ||
2083      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2084      continue
2085    ac_builddir=.
2086
2087case "$ac_dir" in
2088.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2089*)
2090  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2091  # A ".." for each directory in $ac_dir_suffix.
2092  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2093  case $ac_top_builddir_sub in
2094  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2095  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2096  esac ;;
2097esac
2098ac_abs_top_builddir=$ac_pwd
2099ac_abs_builddir=$ac_pwd$ac_dir_suffix
2100# for backward compatibility:
2101ac_top_builddir=$ac_top_build_prefix
2102
2103case $srcdir in
2104  .)  # We are building in place.
2105    ac_srcdir=.
2106    ac_top_srcdir=$ac_top_builddir_sub
2107    ac_abs_top_srcdir=$ac_pwd ;;
2108  [\\/]* | ?:[\\/]* )  # Absolute name.
2109    ac_srcdir=$srcdir$ac_dir_suffix;
2110    ac_top_srcdir=$srcdir
2111    ac_abs_top_srcdir=$srcdir ;;
2112  *) # Relative name.
2113    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2114    ac_top_srcdir=$ac_top_build_prefix$srcdir
2115    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2116esac
2117ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2118
2119    cd "$ac_dir" || { ac_status=$?; continue; }
2120    # Check for guested configure.
2121    if test -f "$ac_srcdir/configure.gnu"; then
2122      echo &&
2123      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2124    elif test -f "$ac_srcdir/configure"; then
2125      echo &&
2126      $SHELL "$ac_srcdir/configure" --help=recursive
2127    else
2128      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2129    fi || ac_status=$?
2130    cd "$ac_pwd" || { ac_status=$?; break; }
2131  done
2132fi
2133
2134test -n "$ac_init_help" && exit $ac_status
2135if $ac_init_version; then
2136  cat <<\_ACEOF
2137OpenJDK configure jdk9
2138generated by GNU Autoconf 2.69
2139
2140Copyright (C) 2012 Free Software Foundation, Inc.
2141This configure script is free software; the Free Software Foundation
2142gives unlimited permission to copy, distribute and modify it.
2143_ACEOF
2144  exit
2145fi
2146
2147## ------------------------ ##
2148## Autoconf initialization. ##
2149## ------------------------ ##
2150
2151# ac_fn_c_try_compile LINENO
2152# --------------------------
2153# Try to compile conftest.$ac_ext, and return whether this succeeded.
2154ac_fn_c_try_compile ()
2155{
2156  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2157  rm -f conftest.$ac_objext
2158  if { { ac_try="$ac_compile"
2159case "(($ac_try" in
2160  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2161  *) ac_try_echo=$ac_try;;
2162esac
2163eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2164$as_echo "$ac_try_echo"; } >&5
2165  (eval "$ac_compile") 2>conftest.err
2166  ac_status=$?
2167  if test -s conftest.err; then
2168    grep -v '^ *+' conftest.err >conftest.er1
2169    cat conftest.er1 >&5
2170    mv -f conftest.er1 conftest.err
2171  fi
2172  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2173  test $ac_status = 0; } && {
2174	 test -z "$ac_c_werror_flag" ||
2175	 test ! -s conftest.err
2176       } && test -s conftest.$ac_objext; then :
2177  ac_retval=0
2178else
2179  $as_echo "$as_me: failed program was:" >&5
2180sed 's/^/| /' conftest.$ac_ext >&5
2181
2182	ac_retval=1
2183fi
2184  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2185  as_fn_set_status $ac_retval
2186
2187} # ac_fn_c_try_compile
2188
2189# ac_fn_cxx_try_compile LINENO
2190# ----------------------------
2191# Try to compile conftest.$ac_ext, and return whether this succeeded.
2192ac_fn_cxx_try_compile ()
2193{
2194  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2195  rm -f conftest.$ac_objext
2196  if { { ac_try="$ac_compile"
2197case "(($ac_try" in
2198  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2199  *) ac_try_echo=$ac_try;;
2200esac
2201eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2202$as_echo "$ac_try_echo"; } >&5
2203  (eval "$ac_compile") 2>conftest.err
2204  ac_status=$?
2205  if test -s conftest.err; then
2206    grep -v '^ *+' conftest.err >conftest.er1
2207    cat conftest.er1 >&5
2208    mv -f conftest.er1 conftest.err
2209  fi
2210  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2211  test $ac_status = 0; } && {
2212	 test -z "$ac_cxx_werror_flag" ||
2213	 test ! -s conftest.err
2214       } && test -s conftest.$ac_objext; then :
2215  ac_retval=0
2216else
2217  $as_echo "$as_me: failed program was:" >&5
2218sed 's/^/| /' conftest.$ac_ext >&5
2219
2220	ac_retval=1
2221fi
2222  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2223  as_fn_set_status $ac_retval
2224
2225} # ac_fn_cxx_try_compile
2226
2227# ac_fn_c_try_cpp LINENO
2228# ----------------------
2229# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2230ac_fn_c_try_cpp ()
2231{
2232  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233  if { { ac_try="$ac_cpp conftest.$ac_ext"
2234case "(($ac_try" in
2235  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2236  *) ac_try_echo=$ac_try;;
2237esac
2238eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2239$as_echo "$ac_try_echo"; } >&5
2240  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2241  ac_status=$?
2242  if test -s conftest.err; then
2243    grep -v '^ *+' conftest.err >conftest.er1
2244    cat conftest.er1 >&5
2245    mv -f conftest.er1 conftest.err
2246  fi
2247  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2248  test $ac_status = 0; } > conftest.i && {
2249	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2250	 test ! -s conftest.err
2251       }; then :
2252  ac_retval=0
2253else
2254  $as_echo "$as_me: failed program was:" >&5
2255sed 's/^/| /' conftest.$ac_ext >&5
2256
2257    ac_retval=1
2258fi
2259  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2260  as_fn_set_status $ac_retval
2261
2262} # ac_fn_c_try_cpp
2263
2264# ac_fn_cxx_try_cpp LINENO
2265# ------------------------
2266# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2267ac_fn_cxx_try_cpp ()
2268{
2269  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2270  if { { ac_try="$ac_cpp conftest.$ac_ext"
2271case "(($ac_try" in
2272  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2273  *) ac_try_echo=$ac_try;;
2274esac
2275eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2276$as_echo "$ac_try_echo"; } >&5
2277  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2278  ac_status=$?
2279  if test -s conftest.err; then
2280    grep -v '^ *+' conftest.err >conftest.er1
2281    cat conftest.er1 >&5
2282    mv -f conftest.er1 conftest.err
2283  fi
2284  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2285  test $ac_status = 0; } > conftest.i && {
2286	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2287	 test ! -s conftest.err
2288       }; then :
2289  ac_retval=0
2290else
2291  $as_echo "$as_me: failed program was:" >&5
2292sed 's/^/| /' conftest.$ac_ext >&5
2293
2294    ac_retval=1
2295fi
2296  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2297  as_fn_set_status $ac_retval
2298
2299} # ac_fn_cxx_try_cpp
2300
2301# ac_fn_objc_try_compile LINENO
2302# -----------------------------
2303# Try to compile conftest.$ac_ext, and return whether this succeeded.
2304ac_fn_objc_try_compile ()
2305{
2306  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2307  rm -f conftest.$ac_objext
2308  if { { ac_try="$ac_compile"
2309case "(($ac_try" in
2310  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2311  *) ac_try_echo=$ac_try;;
2312esac
2313eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2314$as_echo "$ac_try_echo"; } >&5
2315  (eval "$ac_compile") 2>conftest.err
2316  ac_status=$?
2317  if test -s conftest.err; then
2318    grep -v '^ *+' conftest.err >conftest.er1
2319    cat conftest.er1 >&5
2320    mv -f conftest.er1 conftest.err
2321  fi
2322  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2323  test $ac_status = 0; } && {
2324	 test -z "$ac_objc_werror_flag" ||
2325	 test ! -s conftest.err
2326       } && test -s conftest.$ac_objext; then :
2327  ac_retval=0
2328else
2329  $as_echo "$as_me: failed program was:" >&5
2330sed 's/^/| /' conftest.$ac_ext >&5
2331
2332	ac_retval=1
2333fi
2334  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2335  as_fn_set_status $ac_retval
2336
2337} # ac_fn_objc_try_compile
2338
2339# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2340# ---------------------------------------------------------
2341# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2342# the include files in INCLUDES and setting the cache variable VAR
2343# accordingly.
2344ac_fn_cxx_check_header_mongrel ()
2345{
2346  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2347  if eval \${$3+:} false; then :
2348  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2349$as_echo_n "checking for $2... " >&6; }
2350if eval \${$3+:} false; then :
2351  $as_echo_n "(cached) " >&6
2352fi
2353eval ac_res=\$$3
2354	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2355$as_echo "$ac_res" >&6; }
2356else
2357  # Is the header compilable?
2358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2359$as_echo_n "checking $2 usability... " >&6; }
2360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361/* end confdefs.h.  */
2362$4
2363#include <$2>
2364_ACEOF
2365if ac_fn_cxx_try_compile "$LINENO"; then :
2366  ac_header_compiler=yes
2367else
2368  ac_header_compiler=no
2369fi
2370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2372$as_echo "$ac_header_compiler" >&6; }
2373
2374# Is the header present?
2375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2376$as_echo_n "checking $2 presence... " >&6; }
2377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2378/* end confdefs.h.  */
2379#include <$2>
2380_ACEOF
2381if ac_fn_cxx_try_cpp "$LINENO"; then :
2382  ac_header_preproc=yes
2383else
2384  ac_header_preproc=no
2385fi
2386rm -f conftest.err conftest.i conftest.$ac_ext
2387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2388$as_echo "$ac_header_preproc" >&6; }
2389
2390# So?  What about this header?
2391case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2392  yes:no: )
2393    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2394$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2395    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2396$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2397    ;;
2398  no:yes:* )
2399    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2400$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2401    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2402$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2403    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2404$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2405    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2406$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2407    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2408$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2409( $as_echo "## ----------------------------------------- ##
2410## Report this to build-dev@openjdk.java.net ##
2411## ----------------------------------------- ##"
2412     ) | sed "s/^/$as_me: WARNING:     /" >&2
2413    ;;
2414esac
2415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2416$as_echo_n "checking for $2... " >&6; }
2417if eval \${$3+:} false; then :
2418  $as_echo_n "(cached) " >&6
2419else
2420  eval "$3=\$ac_header_compiler"
2421fi
2422eval ac_res=\$$3
2423	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2424$as_echo "$ac_res" >&6; }
2425fi
2426  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2427
2428} # ac_fn_cxx_check_header_mongrel
2429
2430# ac_fn_cxx_try_run LINENO
2431# ------------------------
2432# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2433# that executables *can* be run.
2434ac_fn_cxx_try_run ()
2435{
2436  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2437  if { { ac_try="$ac_link"
2438case "(($ac_try" in
2439  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2440  *) ac_try_echo=$ac_try;;
2441esac
2442eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2443$as_echo "$ac_try_echo"; } >&5
2444  (eval "$ac_link") 2>&5
2445  ac_status=$?
2446  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2447  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2448  { { case "(($ac_try" in
2449  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2450  *) ac_try_echo=$ac_try;;
2451esac
2452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2453$as_echo "$ac_try_echo"; } >&5
2454  (eval "$ac_try") 2>&5
2455  ac_status=$?
2456  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2457  test $ac_status = 0; }; }; then :
2458  ac_retval=0
2459else
2460  $as_echo "$as_me: program exited with status $ac_status" >&5
2461       $as_echo "$as_me: failed program was:" >&5
2462sed 's/^/| /' conftest.$ac_ext >&5
2463
2464       ac_retval=$ac_status
2465fi
2466  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2467  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2468  as_fn_set_status $ac_retval
2469
2470} # ac_fn_cxx_try_run
2471
2472# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2473# ---------------------------------------------------------
2474# Tests whether HEADER exists and can be compiled using the include files in
2475# INCLUDES, setting the cache variable VAR accordingly.
2476ac_fn_cxx_check_header_compile ()
2477{
2478  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2480$as_echo_n "checking for $2... " >&6; }
2481if eval \${$3+:} false; then :
2482  $as_echo_n "(cached) " >&6
2483else
2484  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2485/* end confdefs.h.  */
2486$4
2487#include <$2>
2488_ACEOF
2489if ac_fn_cxx_try_compile "$LINENO"; then :
2490  eval "$3=yes"
2491else
2492  eval "$3=no"
2493fi
2494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2495fi
2496eval ac_res=\$$3
2497	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2498$as_echo "$ac_res" >&6; }
2499  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2500
2501} # ac_fn_cxx_check_header_compile
2502
2503# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2504# ----------------------------------------------
2505# Tries to find the compile-time value of EXPR in a program that includes
2506# INCLUDES, setting VAR accordingly. Returns whether the value could be
2507# computed
2508ac_fn_cxx_compute_int ()
2509{
2510  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2511  if test "$cross_compiling" = yes; then
2512    # Depending upon the size, compute the lo and hi bounds.
2513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2514/* end confdefs.h.  */
2515$4
2516int
2517main ()
2518{
2519static int test_array [1 - 2 * !(($2) >= 0)];
2520test_array [0] = 0;
2521return test_array [0];
2522
2523  ;
2524  return 0;
2525}
2526_ACEOF
2527if ac_fn_cxx_try_compile "$LINENO"; then :
2528  ac_lo=0 ac_mid=0
2529  while :; do
2530    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2531/* end confdefs.h.  */
2532$4
2533int
2534main ()
2535{
2536static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2537test_array [0] = 0;
2538return test_array [0];
2539
2540  ;
2541  return 0;
2542}
2543_ACEOF
2544if ac_fn_cxx_try_compile "$LINENO"; then :
2545  ac_hi=$ac_mid; break
2546else
2547  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2548			if test $ac_lo -le $ac_mid; then
2549			  ac_lo= ac_hi=
2550			  break
2551			fi
2552			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2553fi
2554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2555  done
2556else
2557  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2558/* end confdefs.h.  */
2559$4
2560int
2561main ()
2562{
2563static int test_array [1 - 2 * !(($2) < 0)];
2564test_array [0] = 0;
2565return test_array [0];
2566
2567  ;
2568  return 0;
2569}
2570_ACEOF
2571if ac_fn_cxx_try_compile "$LINENO"; then :
2572  ac_hi=-1 ac_mid=-1
2573  while :; do
2574    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2575/* end confdefs.h.  */
2576$4
2577int
2578main ()
2579{
2580static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2581test_array [0] = 0;
2582return test_array [0];
2583
2584  ;
2585  return 0;
2586}
2587_ACEOF
2588if ac_fn_cxx_try_compile "$LINENO"; then :
2589  ac_lo=$ac_mid; break
2590else
2591  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2592			if test $ac_mid -le $ac_hi; then
2593			  ac_lo= ac_hi=
2594			  break
2595			fi
2596			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2597fi
2598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2599  done
2600else
2601  ac_lo= ac_hi=
2602fi
2603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2604fi
2605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2606# Binary search between lo and hi bounds.
2607while test "x$ac_lo" != "x$ac_hi"; do
2608  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2609  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2610/* end confdefs.h.  */
2611$4
2612int
2613main ()
2614{
2615static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2616test_array [0] = 0;
2617return test_array [0];
2618
2619  ;
2620  return 0;
2621}
2622_ACEOF
2623if ac_fn_cxx_try_compile "$LINENO"; then :
2624  ac_hi=$ac_mid
2625else
2626  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2627fi
2628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2629done
2630case $ac_lo in #((
2631?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2632'') ac_retval=1 ;;
2633esac
2634  else
2635    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2636/* end confdefs.h.  */
2637$4
2638static long int longval () { return $2; }
2639static unsigned long int ulongval () { return $2; }
2640#include <stdio.h>
2641#include <stdlib.h>
2642int
2643main ()
2644{
2645
2646  FILE *f = fopen ("conftest.val", "w");
2647  if (! f)
2648    return 1;
2649  if (($2) < 0)
2650    {
2651      long int i = longval ();
2652      if (i != ($2))
2653	return 1;
2654      fprintf (f, "%ld", i);
2655    }
2656  else
2657    {
2658      unsigned long int i = ulongval ();
2659      if (i != ($2))
2660	return 1;
2661      fprintf (f, "%lu", i);
2662    }
2663  /* Do not output a trailing newline, as this causes \r\n confusion
2664     on some platforms.  */
2665  return ferror (f) || fclose (f) != 0;
2666
2667  ;
2668  return 0;
2669}
2670_ACEOF
2671if ac_fn_cxx_try_run "$LINENO"; then :
2672  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2673else
2674  ac_retval=1
2675fi
2676rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2677  conftest.$ac_objext conftest.beam conftest.$ac_ext
2678rm -f conftest.val
2679
2680  fi
2681  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2682  as_fn_set_status $ac_retval
2683
2684} # ac_fn_cxx_compute_int
2685
2686# ac_fn_cxx_try_link LINENO
2687# -------------------------
2688# Try to link conftest.$ac_ext, and return whether this succeeded.
2689ac_fn_cxx_try_link ()
2690{
2691  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2692  rm -f conftest.$ac_objext conftest$ac_exeext
2693  if { { ac_try="$ac_link"
2694case "(($ac_try" in
2695  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2696  *) ac_try_echo=$ac_try;;
2697esac
2698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2699$as_echo "$ac_try_echo"; } >&5
2700  (eval "$ac_link") 2>conftest.err
2701  ac_status=$?
2702  if test -s conftest.err; then
2703    grep -v '^ *+' conftest.err >conftest.er1
2704    cat conftest.er1 >&5
2705    mv -f conftest.er1 conftest.err
2706  fi
2707  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2708  test $ac_status = 0; } && {
2709	 test -z "$ac_cxx_werror_flag" ||
2710	 test ! -s conftest.err
2711       } && test -s conftest$ac_exeext && {
2712	 test "$cross_compiling" = yes ||
2713	 test -x conftest$ac_exeext
2714       }; then :
2715  ac_retval=0
2716else
2717  $as_echo "$as_me: failed program was:" >&5
2718sed 's/^/| /' conftest.$ac_ext >&5
2719
2720	ac_retval=1
2721fi
2722  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2723  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2724  # interfere with the next link command; also delete a directory that is
2725  # left behind by Apple's compiler.  We do this before executing the actions.
2726  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2727  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2728  as_fn_set_status $ac_retval
2729
2730} # ac_fn_cxx_try_link
2731
2732# ac_fn_cxx_check_func LINENO FUNC VAR
2733# ------------------------------------
2734# Tests whether FUNC exists, setting the cache variable VAR accordingly
2735ac_fn_cxx_check_func ()
2736{
2737  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2738  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2739$as_echo_n "checking for $2... " >&6; }
2740if eval \${$3+:} false; then :
2741  $as_echo_n "(cached) " >&6
2742else
2743  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2744/* end confdefs.h.  */
2745/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2746   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2747#define $2 innocuous_$2
2748
2749/* System header to define __stub macros and hopefully few prototypes,
2750    which can conflict with char $2 (); below.
2751    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2752    <limits.h> exists even on freestanding compilers.  */
2753
2754#ifdef __STDC__
2755# include <limits.h>
2756#else
2757# include <assert.h>
2758#endif
2759
2760#undef $2
2761
2762/* Override any GCC internal prototype to avoid an error.
2763   Use char because int might match the return type of a GCC
2764   builtin and then its argument prototype would still apply.  */
2765#ifdef __cplusplus
2766extern "C"
2767#endif
2768char $2 ();
2769/* The GNU C library defines this for functions which it implements
2770    to always fail with ENOSYS.  Some functions are actually named
2771    something starting with __ and the normal name is an alias.  */
2772#if defined __stub_$2 || defined __stub___$2
2773choke me
2774#endif
2775
2776int
2777main ()
2778{
2779return $2 ();
2780  ;
2781  return 0;
2782}
2783_ACEOF
2784if ac_fn_cxx_try_link "$LINENO"; then :
2785  eval "$3=yes"
2786else
2787  eval "$3=no"
2788fi
2789rm -f core conftest.err conftest.$ac_objext \
2790    conftest$ac_exeext conftest.$ac_ext
2791fi
2792eval ac_res=\$$3
2793	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2794$as_echo "$ac_res" >&6; }
2795  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2796
2797} # ac_fn_cxx_check_func
2798
2799# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2800# -------------------------------------------------------
2801# Tests whether HEADER exists and can be compiled using the include files in
2802# INCLUDES, setting the cache variable VAR accordingly.
2803ac_fn_c_check_header_compile ()
2804{
2805  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2807$as_echo_n "checking for $2... " >&6; }
2808if eval \${$3+:} false; then :
2809  $as_echo_n "(cached) " >&6
2810else
2811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2812/* end confdefs.h.  */
2813$4
2814#include <$2>
2815_ACEOF
2816if ac_fn_c_try_compile "$LINENO"; then :
2817  eval "$3=yes"
2818else
2819  eval "$3=no"
2820fi
2821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2822fi
2823eval ac_res=\$$3
2824	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2825$as_echo "$ac_res" >&6; }
2826  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2827
2828} # ac_fn_c_check_header_compile
2829cat >config.log <<_ACEOF
2830This file contains any messages produced by compilers while
2831running configure, to aid debugging if configure makes a mistake.
2832
2833It was created by OpenJDK $as_me jdk9, which was
2834generated by GNU Autoconf 2.69.  Invocation command line was
2835
2836  $ $0 $@
2837
2838_ACEOF
2839exec 5>>config.log
2840{
2841cat <<_ASUNAME
2842## --------- ##
2843## Platform. ##
2844## --------- ##
2845
2846hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2847uname -m = `(uname -m) 2>/dev/null || echo unknown`
2848uname -r = `(uname -r) 2>/dev/null || echo unknown`
2849uname -s = `(uname -s) 2>/dev/null || echo unknown`
2850uname -v = `(uname -v) 2>/dev/null || echo unknown`
2851
2852/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2853/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2854
2855/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2856/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2857/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2858/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2859/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2860/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2861/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2862
2863_ASUNAME
2864
2865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2866for as_dir in $PATH
2867do
2868  IFS=$as_save_IFS
2869  test -z "$as_dir" && as_dir=.
2870    $as_echo "PATH: $as_dir"
2871  done
2872IFS=$as_save_IFS
2873
2874} >&5
2875
2876cat >&5 <<_ACEOF
2877
2878
2879## ----------- ##
2880## Core tests. ##
2881## ----------- ##
2882
2883_ACEOF
2884
2885
2886# Keep a trace of the command line.
2887# Strip out --no-create and --no-recursion so they do not pile up.
2888# Strip out --silent because we don't want to record it for future runs.
2889# Also quote any args containing shell meta-characters.
2890# Make two passes to allow for proper duplicate-argument suppression.
2891ac_configure_args=
2892ac_configure_args0=
2893ac_configure_args1=
2894ac_must_keep_next=false
2895for ac_pass in 1 2
2896do
2897  for ac_arg
2898  do
2899    case $ac_arg in
2900    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2901    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2902    | -silent | --silent | --silen | --sile | --sil)
2903      continue ;;
2904    *\'*)
2905      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2906    esac
2907    case $ac_pass in
2908    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2909    2)
2910      as_fn_append ac_configure_args1 " '$ac_arg'"
2911      if test $ac_must_keep_next = true; then
2912	ac_must_keep_next=false # Got value, back to normal.
2913      else
2914	case $ac_arg in
2915	  *=* | --config-cache | -C | -disable-* | --disable-* \
2916	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2917	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2918	  | -with-* | --with-* | -without-* | --without-* | --x)
2919	    case "$ac_configure_args0 " in
2920	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2921	    esac
2922	    ;;
2923	  -* ) ac_must_keep_next=true ;;
2924	esac
2925      fi
2926      as_fn_append ac_configure_args " '$ac_arg'"
2927      ;;
2928    esac
2929  done
2930done
2931{ ac_configure_args0=; unset ac_configure_args0;}
2932{ ac_configure_args1=; unset ac_configure_args1;}
2933
2934# When interrupted or exit'd, cleanup temporary files, and complete
2935# config.log.  We remove comments because anyway the quotes in there
2936# would cause problems or look ugly.
2937# WARNING: Use '\'' to represent an apostrophe within the trap.
2938# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2939trap 'exit_status=$?
2940  # Save into config.log some information that might help in debugging.
2941  {
2942    echo
2943
2944    $as_echo "## ---------------- ##
2945## Cache variables. ##
2946## ---------------- ##"
2947    echo
2948    # The following way of writing the cache mishandles newlines in values,
2949(
2950  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2951    eval ac_val=\$$ac_var
2952    case $ac_val in #(
2953    *${as_nl}*)
2954      case $ac_var in #(
2955      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2956$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2957      esac
2958      case $ac_var in #(
2959      _ | IFS | as_nl) ;; #(
2960      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2961      *) { eval $ac_var=; unset $ac_var;} ;;
2962      esac ;;
2963    esac
2964  done
2965  (set) 2>&1 |
2966    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2967    *${as_nl}ac_space=\ *)
2968      sed -n \
2969	"s/'\''/'\''\\\\'\'''\''/g;
2970	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2971      ;; #(
2972    *)
2973      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2974      ;;
2975    esac |
2976    sort
2977)
2978    echo
2979
2980    $as_echo "## ----------------- ##
2981## Output variables. ##
2982## ----------------- ##"
2983    echo
2984    for ac_var in $ac_subst_vars
2985    do
2986      eval ac_val=\$$ac_var
2987      case $ac_val in
2988      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2989      esac
2990      $as_echo "$ac_var='\''$ac_val'\''"
2991    done | sort
2992    echo
2993
2994    if test -n "$ac_subst_files"; then
2995      $as_echo "## ------------------- ##
2996## File substitutions. ##
2997## ------------------- ##"
2998      echo
2999      for ac_var in $ac_subst_files
3000      do
3001	eval ac_val=\$$ac_var
3002	case $ac_val in
3003	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3004	esac
3005	$as_echo "$ac_var='\''$ac_val'\''"
3006      done | sort
3007      echo
3008    fi
3009
3010    if test -s confdefs.h; then
3011      $as_echo "## ----------- ##
3012## confdefs.h. ##
3013## ----------- ##"
3014      echo
3015      cat confdefs.h
3016      echo
3017    fi
3018    test "$ac_signal" != 0 &&
3019      $as_echo "$as_me: caught signal $ac_signal"
3020    $as_echo "$as_me: exit $exit_status"
3021  } >&5
3022  rm -f core *.core core.conftest.* &&
3023    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3024    exit $exit_status
3025' 0
3026for ac_signal in 1 2 13 15; do
3027  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3028done
3029ac_signal=0
3030
3031# confdefs.h avoids OS command line length limits that DEFS can exceed.
3032rm -f -r conftest* confdefs.h
3033
3034$as_echo "/* confdefs.h */" > confdefs.h
3035
3036# Predefined preprocessor variables.
3037
3038cat >>confdefs.h <<_ACEOF
3039#define PACKAGE_NAME "$PACKAGE_NAME"
3040_ACEOF
3041
3042cat >>confdefs.h <<_ACEOF
3043#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3044_ACEOF
3045
3046cat >>confdefs.h <<_ACEOF
3047#define PACKAGE_VERSION "$PACKAGE_VERSION"
3048_ACEOF
3049
3050cat >>confdefs.h <<_ACEOF
3051#define PACKAGE_STRING "$PACKAGE_STRING"
3052_ACEOF
3053
3054cat >>confdefs.h <<_ACEOF
3055#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3056_ACEOF
3057
3058cat >>confdefs.h <<_ACEOF
3059#define PACKAGE_URL "$PACKAGE_URL"
3060_ACEOF
3061
3062
3063# Let the site file select an alternate cache file if it wants to.
3064# Prefer an explicitly selected file to automatically selected ones.
3065ac_site_file1=NONE
3066ac_site_file2=NONE
3067if test -n "$CONFIG_SITE"; then
3068  # We do not want a PATH search for config.site.
3069  case $CONFIG_SITE in #((
3070    -*)  ac_site_file1=./$CONFIG_SITE;;
3071    */*) ac_site_file1=$CONFIG_SITE;;
3072    *)   ac_site_file1=./$CONFIG_SITE;;
3073  esac
3074elif test "x$prefix" != xNONE; then
3075  ac_site_file1=$prefix/share/config.site
3076  ac_site_file2=$prefix/etc/config.site
3077else
3078  ac_site_file1=$ac_default_prefix/share/config.site
3079  ac_site_file2=$ac_default_prefix/etc/config.site
3080fi
3081for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3082do
3083  test "x$ac_site_file" = xNONE && continue
3084  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3085    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3086$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3087    sed 's/^/| /' "$ac_site_file" >&5
3088    . "$ac_site_file" \
3089      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3090$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3091as_fn_error $? "failed to load site script $ac_site_file
3092See \`config.log' for more details" "$LINENO" 5; }
3093  fi
3094done
3095
3096if test -r "$cache_file"; then
3097  # Some versions of bash will fail to source /dev/null (special files
3098  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3099  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3100    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3101$as_echo "$as_me: loading cache $cache_file" >&6;}
3102    case $cache_file in
3103      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3104      *)                      . "./$cache_file";;
3105    esac
3106  fi
3107else
3108  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3109$as_echo "$as_me: creating cache $cache_file" >&6;}
3110  >$cache_file
3111fi
3112
3113# Check that the precious variables saved in the cache have kept the same
3114# value.
3115ac_cache_corrupted=false
3116for ac_var in $ac_precious_vars; do
3117  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3118  eval ac_new_set=\$ac_env_${ac_var}_set
3119  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3120  eval ac_new_val=\$ac_env_${ac_var}_value
3121  case $ac_old_set,$ac_new_set in
3122    set,)
3123      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3124$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3125      ac_cache_corrupted=: ;;
3126    ,set)
3127      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3128$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3129      ac_cache_corrupted=: ;;
3130    ,);;
3131    *)
3132      if test "x$ac_old_val" != "x$ac_new_val"; then
3133	# differences in whitespace do not lead to failure.
3134	ac_old_val_w=`echo x $ac_old_val`
3135	ac_new_val_w=`echo x $ac_new_val`
3136	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3137	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3138$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3139	  ac_cache_corrupted=:
3140	else
3141	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3142$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3143	  eval $ac_var=\$ac_old_val
3144	fi
3145	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3146$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3147	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3148$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3149      fi;;
3150  esac
3151  # Pass precious variables to config.status.
3152  if test "$ac_new_set" = set; then
3153    case $ac_new_val in
3154    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3155    *) ac_arg=$ac_var=$ac_new_val ;;
3156    esac
3157    case " $ac_configure_args " in
3158      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3159      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3160    esac
3161  fi
3162done
3163if $ac_cache_corrupted; then
3164  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3165$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3166  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3167$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3168  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3169fi
3170## -------------------- ##
3171## Main body of script. ##
3172## -------------------- ##
3173
3174ac_ext=c
3175ac_cpp='$CPP $CPPFLAGS'
3176ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3177ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3178ac_compiler_gnu=$ac_cv_c_compiler_gnu
3179
3180
3181
3182ac_aux_dir=
3183for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3184  if test -f "$ac_dir/install-sh"; then
3185    ac_aux_dir=$ac_dir
3186    ac_install_sh="$ac_aux_dir/install-sh -c"
3187    break
3188  elif test -f "$ac_dir/install.sh"; then
3189    ac_aux_dir=$ac_dir
3190    ac_install_sh="$ac_aux_dir/install.sh -c"
3191    break
3192  elif test -f "$ac_dir/shtool"; then
3193    ac_aux_dir=$ac_dir
3194    ac_install_sh="$ac_aux_dir/shtool install -c"
3195    break
3196  fi
3197done
3198if test -z "$ac_aux_dir"; then
3199  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
3200fi
3201
3202# These three variables are undocumented and unsupported,
3203# and are intended to be withdrawn in a future Autoconf release.
3204# They can cause serious problems if a builder's source tree is in a directory
3205# whose full name contains unusual characters.
3206ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3207ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3208ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3209
3210
3211# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3212
3213#
3214# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3215# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3216#
3217# This code is free software; you can redistribute it and/or modify it
3218# under the terms of the GNU General Public License version 2 only, as
3219# published by the Free Software Foundation.  Oracle designates this
3220# particular file as subject to the "Classpath" exception as provided
3221# by Oracle in the LICENSE file that accompanied this code.
3222#
3223# This code is distributed in the hope that it will be useful, but WITHOUT
3224# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3225# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3226# version 2 for more details (a copy is included in the LICENSE file that
3227# accompanied this code).
3228#
3229# You should have received a copy of the GNU General Public License version
3230# 2 along with this work; if not, write to the Free Software Foundation,
3231# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3232#
3233# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3234# or visit www.oracle.com if you need additional information or have any
3235# questions.
3236#
3237
3238#
3239# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3240#
3241# This program is free software; you can redistribute it and/or modify
3242# it under the terms of the GNU General Public License as published by
3243# the Free Software Foundation; either version 2 of the License, or
3244# (at your option) any later version.
3245#
3246# This program is distributed in the hope that it will be useful, but
3247# WITHOUT ANY WARRANTY; without even the implied warranty of
3248# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3249# General Public License for more details.
3250#
3251# You should have received a copy of the GNU General Public License
3252# along with this program; if not, write to the Free Software
3253# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3254#
3255# As a special exception to the GNU General Public License, if you
3256# distribute this file as part of a program that contains a
3257# configuration script generated by Autoconf, you may include it under
3258# the same distribution terms that you use for the rest of that program.
3259
3260# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3261# ----------------------------------
3262# PKG_PROG_PKG_CONFIG
3263
3264# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3265#
3266# Check to see whether a particular set of modules exists.  Similar
3267# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3268#
3269#
3270# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3271# this or PKG_CHECK_MODULES is called, or make sure to call
3272# PKG_CHECK_EXISTS manually
3273# --------------------------------------------------------------
3274
3275
3276
3277# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3278# ---------------------------------------------
3279# _PKG_CONFIG
3280
3281# _PKG_SHORT_ERRORS_SUPPORTED
3282# -----------------------------
3283# _PKG_SHORT_ERRORS_SUPPORTED
3284
3285
3286# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3287# [ACTION-IF-NOT-FOUND])
3288#
3289#
3290# Note that if there is a possibility the first call to
3291# PKG_CHECK_MODULES might not happen, you should be sure to include an
3292# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3293#
3294#
3295# --------------------------------------------------------------
3296# PKG_CHECK_MODULES
3297
3298
3299# Include these first...
3300#
3301# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3302# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3303#
3304# This code is free software; you can redistribute it and/or modify it
3305# under the terms of the GNU General Public License version 2 only, as
3306# published by the Free Software Foundation.  Oracle designates this
3307# particular file as subject to the "Classpath" exception as provided
3308# by Oracle in the LICENSE file that accompanied this code.
3309#
3310# This code is distributed in the hope that it will be useful, but WITHOUT
3311# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3312# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3313# version 2 for more details (a copy is included in the LICENSE file that
3314# accompanied this code).
3315#
3316# You should have received a copy of the GNU General Public License version
3317# 2 along with this work; if not, write to the Free Software Foundation,
3318# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3319#
3320# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3321# or visit www.oracle.com if you need additional information or have any
3322# questions.
3323#
3324
3325# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3326# If so, then append $1 to $2 \
3327# Also set JVM_ARG_OK to true/false depending on outcome.
3328
3329
3330# Appends a string to a path variable, only adding the : when needed.
3331
3332
3333# Prepends a string to a path variable, only adding the : when needed.
3334
3335
3336# This will make sure the given variable points to a full and proper
3337# path. This means:
3338# 1) There will be no spaces in the path. On posix platforms,
3339#    spaces in the path will result in an error. On Windows,
3340#    the path will be rewritten using short-style to be space-free.
3341# 2) The path will be absolute, and it will be in unix-style (on
3342#     cygwin).
3343# $1: The name of the variable to fix
3344
3345
3346# This will make sure the given variable points to a executable
3347# with a full and proper path. This means:
3348# 1) There will be no spaces in the path. On posix platforms,
3349#    spaces in the path will result in an error. On Windows,
3350#    the path will be rewritten using short-style to be space-free.
3351# 2) The path will be absolute, and it will be in unix-style (on
3352#     cygwin).
3353# Any arguments given to the executable is preserved.
3354# If the input variable does not have a directory specification, then
3355# it need to be in the PATH.
3356# $1: The name of the variable to fix
3357
3358
3359
3360
3361# Register a --with argument but mark it as deprecated
3362# $1: The name of the with argument to deprecate, not including --with-
3363
3364
3365# Register a --enable argument but mark it as deprecated
3366# $1: The name of the with argument to deprecate, not including --enable-
3367# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3368
3369
3370
3371
3372# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3373# $1: variable to check
3374
3375
3376# Check that there are no unprocessed overridden variables left.
3377# If so, they are an incorrect argument and we will exit with an error.
3378
3379
3380# Setup a tool for the given variable. If correctly specified by the user,
3381# use that value, otherwise search for the tool using the supplied code snippet.
3382# $1: variable to set
3383# $2: code snippet to call to look for the tool
3384
3385
3386# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3387# $1: variable to set
3388# $2: executable name (or list of names) to look for
3389
3390
3391# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3392# $1: variable to set
3393# $2: executable name (or list of names) to look for
3394
3395
3396# Like BASIC_PATH_PROGS but fails if no tool was found.
3397# $1: variable to set
3398# $2: executable name (or list of names) to look for
3399
3400
3401# Like BASIC_SETUP_TOOL but fails if no tool was found.
3402# $1: variable to set
3403# $2: autoconf macro to call to look for the special tool
3404
3405
3406# Setup the most fundamental tools that relies on not much else to set up,
3407# but is used by much of the early bootstrap code.
3408
3409
3410# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420#%%% Simple tools %%%
3421
3422# Check if we have found a usable version of make
3423# $1: the path to a potential make binary (or empty)
3424# $2: the description on how we found this
3425
3426
3427# Goes looking for a usable version of GNU make.
3428
3429
3430
3431
3432
3433
3434# Check if build directory is on local disk. If not possible to determine,
3435# we prefer to claim it's local.
3436# Argument 1: directory to test
3437# Argument 2: what to do if it is on local disk
3438# Argument 3: what to do otherwise (remote disk or failure)
3439
3440
3441# Check that source files have basic read permissions set. This might
3442# not be the case in cygwin in certain conditions.
3443
3444
3445
3446
3447#
3448# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3449# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3450#
3451# This code is free software; you can redistribute it and/or modify it
3452# under the terms of the GNU General Public License version 2 only, as
3453# published by the Free Software Foundation.  Oracle designates this
3454# particular file as subject to the "Classpath" exception as provided
3455# by Oracle in the LICENSE file that accompanied this code.
3456#
3457# This code is distributed in the hope that it will be useful, but WITHOUT
3458# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3459# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3460# version 2 for more details (a copy is included in the LICENSE file that
3461# accompanied this code).
3462#
3463# You should have received a copy of the GNU General Public License version
3464# 2 along with this work; if not, write to the Free Software Foundation,
3465# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3466#
3467# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3468# or visit www.oracle.com if you need additional information or have any
3469# questions.
3470#
3471
3472
3473
3474
3475
3476# Helper function which possibly converts a path using DOS-style short mode.
3477# If so, the updated path is stored in $new_path.
3478# $1: The path to check
3479
3480
3481# Helper function which possibly converts a path using DOS-style short mode.
3482# If so, the updated path is stored in $new_path.
3483# $1: The path to check
3484
3485
3486# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3487# and could probably be heavily simplified. However, all changes in this
3488# area tend to need lot of testing in different scenarios, and in lack of
3489# proper unit testing, cleaning this up has not been deemed worth the effort
3490# at the moment.
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3501
3502
3503
3504
3505#
3506# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3507# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3508#
3509# This code is free software; you can redistribute it and/or modify it
3510# under the terms of the GNU General Public License version 2 only, as
3511# published by the Free Software Foundation.  Oracle designates this
3512# particular file as subject to the "Classpath" exception as provided
3513# by Oracle in the LICENSE file that accompanied this code.
3514#
3515# This code is distributed in the hope that it will be useful, but WITHOUT
3516# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3517# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3518# version 2 for more details (a copy is included in the LICENSE file that
3519# accompanied this code).
3520#
3521# You should have received a copy of the GNU General Public License version
3522# 2 along with this work; if not, write to the Free Software Foundation,
3523# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3524#
3525# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3526# or visit www.oracle.com if you need additional information or have any
3527# questions.
3528#
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540# ... then the rest
3541#
3542# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3543# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3544#
3545# This code is free software; you can redistribute it and/or modify it
3546# under the terms of the GNU General Public License version 2 only, as
3547# published by the Free Software Foundation.  Oracle designates this
3548# particular file as subject to the "Classpath" exception as provided
3549# by Oracle in the LICENSE file that accompanied this code.
3550#
3551# This code is distributed in the hope that it will be useful, but WITHOUT
3552# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3553# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3554# version 2 for more details (a copy is included in the LICENSE file that
3555# accompanied this code).
3556#
3557# You should have received a copy of the GNU General Public License version
3558# 2 along with this work; if not, write to the Free Software Foundation,
3559# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3560#
3561# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3562# or visit www.oracle.com if you need additional information or have any
3563# questions.
3564#
3565
3566########################################################################
3567# This file handles detection of the Boot JDK. The Boot JDK detection
3568# process has been developed as a response to solve a complex real-world
3569# problem. Initially, it was simple, but it has grown as platform after
3570# platform, idiosyncracy after idiosyncracy has been supported.
3571#
3572# The basic idea is this:
3573# 1) You need an acceptable *) JDK to use as a Boot JDK
3574# 2) There are several ways to locate a JDK, that are mostly platform
3575#    dependent **)
3576# 3) You can have multiple JDKs installed
3577# 4) If possible, configure should try to dig out an acceptable JDK
3578#    automatically, without having to resort to command-line options
3579#
3580# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3581#     javac) and not a JRE, etc.
3582#
3583# **) On Windows we typically use a well-known path.
3584#     On MacOSX we typically use the tool java_home.
3585#     On Linux we typically find javac in the $PATH, and then follow a
3586#     chain of symlinks that often ends up in a real JDK.
3587#
3588# This leads to the code where we check in different ways to locate a
3589# JDK, and if one is found, check if it is acceptable. If not, we print
3590# our reasons for rejecting it (useful when debugging non-working
3591# configure situations) and continue checking the next one.
3592########################################################################
3593
3594# Execute the check given as argument, and verify the result
3595# If the Boot JDK was previously found, do nothing
3596# $1 A command line (typically autoconf macro) to execute
3597
3598
3599# Test: Is bootjdk explicitely set by command line arguments?
3600
3601
3602# Test: Is bootjdk available from builddeps?
3603
3604
3605# Test: Is $JAVA_HOME set?
3606
3607
3608# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3609
3610
3611# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3612# $1: Argument to the java_home binary (optional)
3613
3614
3615# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3616
3617
3618# Look for a jdk in the given path. If there are multiple, try to select the newest.
3619# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3620# $1 = Path to directory containing jdk installations.
3621# $2 = String to append to the found JDK directory to get the proper JDK home
3622
3623
3624# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3625# environmental variable as base for where to look.
3626# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3627
3628
3629# Test: Is there a JDK installed in default, well-known locations?
3630
3631
3632# Check that a command-line tool in the Boot JDK is correct
3633# $1 = name of variable to assign
3634# $2 = name of binary
3635
3636
3637###############################################################################
3638#
3639# We need a Boot JDK to bootstrap the build.
3640#
3641
3642
3643
3644
3645
3646#
3647# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3648# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3649#
3650# This code is free software; you can redistribute it and/or modify it
3651# under the terms of the GNU General Public License version 2 only, as
3652# published by the Free Software Foundation.  Oracle designates this
3653# particular file as subject to the "Classpath" exception as provided
3654# by Oracle in the LICENSE file that accompanied this code.
3655#
3656# This code is distributed in the hope that it will be useful, but WITHOUT
3657# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3658# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3659# version 2 for more details (a copy is included in the LICENSE file that
3660# accompanied this code).
3661#
3662# You should have received a copy of the GNU General Public License version
3663# 2 along with this work; if not, write to the Free Software Foundation,
3664# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3665#
3666# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3667# or visit www.oracle.com if you need additional information or have any
3668# questions.
3669#
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690#
3691# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3692# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3693#
3694# This code is free software; you can redistribute it and/or modify it
3695# under the terms of the GNU General Public License version 2 only, as
3696# published by the Free Software Foundation.  Oracle designates this
3697# particular file as subject to the "Classpath" exception as provided
3698# by Oracle in the LICENSE file that accompanied this code.
3699#
3700# This code is distributed in the hope that it will be useful, but WITHOUT
3701# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3702# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3703# version 2 for more details (a copy is included in the LICENSE file that
3704# accompanied this code).
3705#
3706# You should have received a copy of the GNU General Public License version
3707# 2 along with this work; if not, write to the Free Software Foundation,
3708# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3709#
3710# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3711# or visit www.oracle.com if you need additional information or have any
3712# questions.
3713#
3714
3715
3716
3717
3718
3719# Documentation on common flags used for solstudio in HIGHEST.
3720#
3721# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3722#          done with care, there are some assumptions below that need to
3723#          be understood about the use of pointers, and IEEE behavior.
3724#
3725# -fns: Use non-standard floating point mode (not IEEE 754)
3726# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3727# -fsingle: Use single precision floating point with 'float'
3728# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3729#   (Source with excessing pointer casting and data access with mixed
3730#    pointer types are not recommended)
3731# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3732#   (If you expect perfect errno behavior, do not use this)
3733# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3734# -xrestrict: Pointer parameters to functions do not overlap
3735#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3736#    If you pass in multiple pointers to the same data, do not use this)
3737# -xlibmil: Inline some library routines
3738#   (If you expect perfect errno behavior, do not use this)
3739# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3740#   (If you expect perfect errno behavior, do not use this)
3741#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3742
3743    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3744    # Bug?
3745    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3746    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3747    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3748    #fi
3749
3750
3751
3752
3753
3754
3755# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3756#                                   [RUN-IF-FALSE])
3757# ------------------------------------------------------------
3758# Check that the c and c++ compilers support an argument
3759
3760
3761
3762
3763#
3764# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3765# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3766#
3767# This code is free software; you can redistribute it and/or modify it
3768# under the terms of the GNU General Public License version 2 only, as
3769# published by the Free Software Foundation.  Oracle designates this
3770# particular file as subject to the "Classpath" exception as provided
3771# by Oracle in the LICENSE file that accompanied this code.
3772#
3773# This code is distributed in the hope that it will be useful, but WITHOUT
3774# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3775# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3776# version 2 for more details (a copy is included in the LICENSE file that
3777# accompanied this code).
3778#
3779# You should have received a copy of the GNU General Public License version
3780# 2 along with this work; if not, write to the Free Software Foundation,
3781# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3782#
3783# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3784# or visit www.oracle.com if you need additional information or have any
3785# questions.
3786#
3787
3788
3789
3790
3791
3792cygwin_help() {
3793  case $1 in
3794    unzip)
3795      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3796      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3797      ;;
3798    zip)
3799      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3800      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3801      ;;
3802    make)
3803      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3804      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3805      ;;
3806    freetype)
3807      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3808        HELP_MSG="To install freetype, run:
3809wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3810chmod +x /tmp/freetype-setup.exe
3811/tmp/freetype-setup.exe
3812Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3813After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3814      else
3815        HELP_MSG="You need to build a 64-bit version of freetype.
3816This is not readily available.
3817You can find source code and build instructions on
3818http://www.freetype.org/
3819If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3820      fi
3821      ;;
3822  esac
3823}
3824
3825msys_help() {
3826  PKGHANDLER_COMMAND=""
3827}
3828
3829apt_help() {
3830  case $1 in
3831    devkit)
3832      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3833    openjdk)
3834      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3835    alsa)
3836      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3837    cups)
3838      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3839    freetype)
3840      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3841    pulse)
3842      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3843    x11)
3844      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3845    ccache)
3846      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3847  esac
3848}
3849
3850yum_help() {
3851  case $1 in
3852    devkit)
3853      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3854    openjdk)
3855      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3856    alsa)
3857      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3858    cups)
3859      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3860    freetype)
3861      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3862    pulse)
3863      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3864    x11)
3865      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3866    ccache)
3867      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3868  esac
3869}
3870
3871port_help() {
3872  PKGHANDLER_COMMAND=""
3873}
3874
3875pkgutil_help() {
3876  PKGHANDLER_COMMAND=""
3877}
3878
3879pkgadd_help() {
3880  PKGHANDLER_COMMAND=""
3881}
3882
3883# This function will check if we're called from the "configure" wrapper while
3884# printing --help. If so, we will print out additional information that can
3885# only be extracted within the autoconf script, and then exit. This must be
3886# called at the very beginning in configure.ac.
3887
3888
3889
3890
3891#
3892# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3893# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3894#
3895# This code is free software; you can redistribute it and/or modify it
3896# under the terms of the GNU General Public License version 2 only, as
3897# published by the Free Software Foundation.  Oracle designates this
3898# particular file as subject to the "Classpath" exception as provided
3899# by Oracle in the LICENSE file that accompanied this code.
3900#
3901# This code is distributed in the hope that it will be useful, but WITHOUT
3902# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3903# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3904# version 2 for more details (a copy is included in the LICENSE file that
3905# accompanied this code).
3906#
3907# You should have received a copy of the GNU General Public License version
3908# 2 along with this work; if not, write to the Free Software Foundation,
3909# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3910#
3911# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3912# or visit www.oracle.com if you need additional information or have any
3913# questions.
3914#
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925###############################################################################
3926#
3927# Should we build only OpenJDK even if closed sources are present?
3928#
3929
3930
3931
3932
3933###############################################################################
3934#
3935# Setup version numbers
3936#
3937
3938
3939
3940
3941
3942
3943#
3944# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3945# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3946#
3947# This code is free software; you can redistribute it and/or modify it
3948# under the terms of the GNU General Public License version 2 only, as
3949# published by the Free Software Foundation.  Oracle designates this
3950# particular file as subject to the "Classpath" exception as provided
3951# by Oracle in the LICENSE file that accompanied this code.
3952#
3953# This code is distributed in the hope that it will be useful, but WITHOUT
3954# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3955# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3956# version 2 for more details (a copy is included in the LICENSE file that
3957# accompanied this code).
3958#
3959# You should have received a copy of the GNU General Public License version
3960# 2 along with this work; if not, write to the Free Software Foundation,
3961# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3962#
3963# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3964# or visit www.oracle.com if you need additional information or have any
3965# questions.
3966#
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986#
3987# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3988# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3989#
3990# This code is free software; you can redistribute it and/or modify it
3991# under the terms of the GNU General Public License version 2 only, as
3992# published by the Free Software Foundation.  Oracle designates this
3993# particular file as subject to the "Classpath" exception as provided
3994# by Oracle in the LICENSE file that accompanied this code.
3995#
3996# This code is distributed in the hope that it will be useful, but WITHOUT
3997# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3998# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3999# version 2 for more details (a copy is included in the LICENSE file that
4000# accompanied this code).
4001#
4002# You should have received a copy of the GNU General Public License version
4003# 2 along with this work; if not, write to the Free Software Foundation,
4004# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4005#
4006# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4007# or visit www.oracle.com if you need additional information or have any
4008# questions.
4009#
4010
4011# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4012# Converts autoconf style CPU name to OpenJDK style, into
4013# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4014
4015
4016# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4017# Converts autoconf style OS name to OpenJDK style, into
4018# VAR_OS and VAR_OS_API.
4019
4020
4021# Expects $host_os $host_cpu $build_os and $build_cpu
4022# and $with_target_bits to have been setup!
4023#
4024# Translate the standard triplet(quadruplet) definition
4025# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4026# OPENJDK_BUILD_OS, etc.
4027
4028
4029# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4030# accordingly. Must be done after setting up build and target system, but before
4031# doing anything else with these values.
4032
4033
4034# Setup the legacy variables, for controlling the old makefiles.
4035#
4036
4037
4038
4039
4040#%%% Build and target systems %%%
4041
4042
4043
4044
4045# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4046# Add -mX to various FLAGS variables.
4047
4048
4049
4050
4051
4052
4053#
4054# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4055# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4056#
4057# This code is free software; you can redistribute it and/or modify it
4058# under the terms of the GNU General Public License version 2 only, as
4059# published by the Free Software Foundation.  Oracle designates this
4060# particular file as subject to the "Classpath" exception as provided
4061# by Oracle in the LICENSE file that accompanied this code.
4062#
4063# This code is distributed in the hope that it will be useful, but WITHOUT
4064# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4065# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4066# version 2 for more details (a copy is included in the LICENSE file that
4067# accompanied this code).
4068#
4069# You should have received a copy of the GNU General Public License version
4070# 2 along with this work; if not, write to the Free Software Foundation,
4071# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4072#
4073# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4074# or visit www.oracle.com if you need additional information or have any
4075# questions.
4076#
4077
4078
4079
4080
4081
4082
4083
4084
4085#
4086# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4087# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4088#
4089# This code is free software; you can redistribute it and/or modify it
4090# under the terms of the GNU General Public License version 2 only, as
4091# published by the Free Software Foundation.  Oracle designates this
4092# particular file as subject to the "Classpath" exception as provided
4093# by Oracle in the LICENSE file that accompanied this code.
4094#
4095# This code is distributed in the hope that it will be useful, but WITHOUT
4096# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4097# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4098# version 2 for more details (a copy is included in the LICENSE file that
4099# accompanied this code).
4100#
4101# You should have received a copy of the GNU General Public License version
4102# 2 along with this work; if not, write to the Free Software Foundation,
4103# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4104#
4105# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4106# or visit www.oracle.com if you need additional information or have any
4107# questions.
4108#
4109
4110########################################################################
4111# This file is responsible for detecting, verifying and setting up the
4112# toolchain, i.e. the compiler, linker and related utilities. It will setup
4113# proper paths to the binaries, but it will not setup any flags.
4114#
4115# The binaries used is determined by the toolchain type, which is the family of
4116# compilers and related tools that are used.
4117########################################################################
4118
4119
4120# All valid toolchains, regardless of platform (used by help.m4)
4121VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4122
4123# These toolchains are valid on different platforms
4124VALID_TOOLCHAINS_linux="gcc clang"
4125VALID_TOOLCHAINS_solaris="solstudio"
4126VALID_TOOLCHAINS_macosx="gcc clang"
4127VALID_TOOLCHAINS_aix="xlc"
4128VALID_TOOLCHAINS_windows="microsoft"
4129
4130# Toolchain descriptions
4131TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4132TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4133TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4134TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4135TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4136
4137# Setup a number of variables describing how native output files are
4138# named on this platform/toolchain.
4139
4140
4141# Determine which toolchain type to use, and make sure it is valid for this
4142# platform. Setup various information about the selected toolchain.
4143
4144
4145# Before we start detecting the toolchain executables, we might need some
4146# special setup, e.g. additional paths etc.
4147
4148
4149# Restore path, etc
4150
4151
4152# Check if a compiler is of the toolchain type we expect, and save the version
4153# information from it. If the compiler does not match the expected type,
4154# this function will abort using AC_MSG_ERROR. If it matches, the version will
4155# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4156# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4157#
4158# $1 = compiler to test (CC or CXX)
4159# $2 = human readable name of compiler (C or C++)
4160
4161
4162# Try to locate the given C or C++ compiler in the path, or otherwise.
4163#
4164# $1 = compiler to test (CC or CXX)
4165# $2 = human readable name of compiler (C or C++)
4166# $3 = list of compiler names to search for
4167
4168
4169# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4170# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4171# archiver (AR). Verify that the compilers are correct according to the
4172# toolchain type.
4173
4174
4175# Setup additional tools that is considered a part of the toolchain, but not the
4176# core part. Many of these are highly platform-specific and do not exist,
4177# and/or are not needed on all platforms.
4178
4179
4180# Setup the build tools (i.e, the compiler and linker used to build programs
4181# that should be run on the build platform, not the target platform, as a build
4182# helper). Since the non-cross-compile case uses the normal, target compilers
4183# for this, we can only do this after these have been setup.
4184
4185
4186# Setup legacy variables that are still needed as alternative ways to refer to
4187# parts of the toolchain.
4188
4189
4190# Do some additional checks on the detected tools.
4191
4192
4193# Setup the JTReg Regression Test Harness.
4194
4195
4196#
4197# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4198# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4199#
4200# This code is free software; you can redistribute it and/or modify it
4201# under the terms of the GNU General Public License version 2 only, as
4202# published by the Free Software Foundation.  Oracle designates this
4203# particular file as subject to the "Classpath" exception as provided
4204# by Oracle in the LICENSE file that accompanied this code.
4205#
4206# This code is distributed in the hope that it will be useful, but WITHOUT
4207# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4208# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4209# version 2 for more details (a copy is included in the LICENSE file that
4210# accompanied this code).
4211#
4212# You should have received a copy of the GNU General Public License version
4213# 2 along with this work; if not, write to the Free Software Foundation,
4214# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4215#
4216# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4217# or visit www.oracle.com if you need additional information or have any
4218# questions.
4219#
4220
4221
4222
4223
4224
4225
4226
4227# Check if the VS env variables were setup prior to running configure.
4228# If not, then find vcvarsall.bat and run it automatically, and integrate
4229# the set env variables into the spec file.
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240# This line needs to be here, verbatim, after all includes and the dummy hook
4241# definitions. It is replaced with custom functionality when building
4242# custom sources.
4243#CUSTOM_AUTOCONF_INCLUDE
4244
4245# Do not change or remove the following line, it is needed for consistency checks:
4246DATE_WHEN_GENERATED=1399969244
4247
4248###############################################################################
4249#
4250# Initialization / Boot-strapping
4251#
4252# The bootstrapping process needs to solve the "chicken or the egg" problem,
4253# thus it jumps back and forth, each time gaining something needed later on.
4254#
4255###############################################################################
4256
4257# If we are requested to print additional help, do that and then exit.
4258# This must be the very first call.
4259
4260  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4261    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4262    $PRINTF "Which are valid to use depends on the build platform.\n"
4263    for toolchain in $VALID_TOOLCHAINS_all; do
4264      # Use indirect variable referencing
4265      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4266      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4267      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4268    done
4269
4270    # And now exit directly
4271    exit 0
4272  fi
4273
4274
4275# Basic initialization that must happen first of all in the normal process.
4276
4277  # Save the original command line. This is passed to us by the wrapper configure script.
4278
4279  DATE_WHEN_CONFIGURED=`LANG=C date`
4280
4281  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4282$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4283  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4284$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4285
4286
4287  # Start with tools that do not need have cross compilation support
4288  # and can be expected to be found in the default PATH. These tools are
4289  # used by configure. Nor are these tools expected to be found in the
4290  # devkit from the builddeps server either, since they are
4291  # needed to download the devkit.
4292
4293  # First are all the simple required tools.
4294
4295
4296
4297  # Publish this variable in the help.
4298
4299
4300  if test "x$BASENAME" = x; then
4301    # The variable is not set by user, try to locate tool using the code snippet
4302    for ac_prog in basename
4303do
4304  # Extract the first word of "$ac_prog", so it can be a program name with args.
4305set dummy $ac_prog; ac_word=$2
4306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4307$as_echo_n "checking for $ac_word... " >&6; }
4308if ${ac_cv_path_BASENAME+:} false; then :
4309  $as_echo_n "(cached) " >&6
4310else
4311  case $BASENAME in
4312  [\\/]* | ?:[\\/]*)
4313  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4314  ;;
4315  *)
4316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4317for as_dir in $PATH
4318do
4319  IFS=$as_save_IFS
4320  test -z "$as_dir" && as_dir=.
4321    for ac_exec_ext in '' $ac_executable_extensions; do
4322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4323    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4325    break 2
4326  fi
4327done
4328  done
4329IFS=$as_save_IFS
4330
4331  ;;
4332esac
4333fi
4334BASENAME=$ac_cv_path_BASENAME
4335if test -n "$BASENAME"; then
4336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4337$as_echo "$BASENAME" >&6; }
4338else
4339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4340$as_echo "no" >&6; }
4341fi
4342
4343
4344  test -n "$BASENAME" && break
4345done
4346
4347  else
4348    # The variable is set, but is it from the command line or the environment?
4349
4350    # Try to remove the string !BASENAME! from our list.
4351    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4352    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4353      # If it failed, the variable was not from the command line. Ignore it,
4354      # but warn the user (except for BASH, which is always set by the calling BASH).
4355      if test "xBASENAME" != xBASH; then
4356        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4357$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4358      fi
4359      # Try to locate tool using the code snippet
4360      for ac_prog in basename
4361do
4362  # Extract the first word of "$ac_prog", so it can be a program name with args.
4363set dummy $ac_prog; ac_word=$2
4364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4365$as_echo_n "checking for $ac_word... " >&6; }
4366if ${ac_cv_path_BASENAME+:} false; then :
4367  $as_echo_n "(cached) " >&6
4368else
4369  case $BASENAME in
4370  [\\/]* | ?:[\\/]*)
4371  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4372  ;;
4373  *)
4374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4375for as_dir in $PATH
4376do
4377  IFS=$as_save_IFS
4378  test -z "$as_dir" && as_dir=.
4379    for ac_exec_ext in '' $ac_executable_extensions; do
4380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4381    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4383    break 2
4384  fi
4385done
4386  done
4387IFS=$as_save_IFS
4388
4389  ;;
4390esac
4391fi
4392BASENAME=$ac_cv_path_BASENAME
4393if test -n "$BASENAME"; then
4394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4395$as_echo "$BASENAME" >&6; }
4396else
4397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4398$as_echo "no" >&6; }
4399fi
4400
4401
4402  test -n "$BASENAME" && break
4403done
4404
4405    else
4406      # If it succeeded, then it was overridden by the user. We will use it
4407      # for the tool.
4408
4409      # First remove it from the list of overridden variables, so we can test
4410      # for unknown variables in the end.
4411      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4412
4413      # Check if the provided tool contains a complete path.
4414      tool_specified="$BASENAME"
4415      tool_basename="${tool_specified##*/}"
4416      if test "x$tool_basename" = "x$tool_specified"; then
4417        # A command without a complete path is provided, search $PATH.
4418        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4419$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4420        # Extract the first word of "$tool_basename", so it can be a program name with args.
4421set dummy $tool_basename; ac_word=$2
4422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4423$as_echo_n "checking for $ac_word... " >&6; }
4424if ${ac_cv_path_BASENAME+:} false; then :
4425  $as_echo_n "(cached) " >&6
4426else
4427  case $BASENAME in
4428  [\\/]* | ?:[\\/]*)
4429  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4430  ;;
4431  *)
4432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4433for as_dir in $PATH
4434do
4435  IFS=$as_save_IFS
4436  test -z "$as_dir" && as_dir=.
4437    for ac_exec_ext in '' $ac_executable_extensions; do
4438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4439    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4441    break 2
4442  fi
4443done
4444  done
4445IFS=$as_save_IFS
4446
4447  ;;
4448esac
4449fi
4450BASENAME=$ac_cv_path_BASENAME
4451if test -n "$BASENAME"; then
4452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4453$as_echo "$BASENAME" >&6; }
4454else
4455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4456$as_echo "no" >&6; }
4457fi
4458
4459
4460        if test "x$BASENAME" = x; then
4461          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4462        fi
4463      else
4464        # Otherwise we believe it is a complete path. Use it as it is.
4465        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4466$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4467        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4468$as_echo_n "checking for BASENAME... " >&6; }
4469        if test ! -x "$tool_specified"; then
4470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4471$as_echo "not found" >&6; }
4472          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4473        fi
4474        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4475$as_echo "$tool_specified" >&6; }
4476      fi
4477    fi
4478  fi
4479
4480
4481
4482  if test "x$BASENAME" = x; then
4483    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4484  fi
4485
4486
4487
4488
4489
4490  # Publish this variable in the help.
4491
4492
4493  if test "x$BASH" = x; then
4494    # The variable is not set by user, try to locate tool using the code snippet
4495    for ac_prog in bash
4496do
4497  # Extract the first word of "$ac_prog", so it can be a program name with args.
4498set dummy $ac_prog; ac_word=$2
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4500$as_echo_n "checking for $ac_word... " >&6; }
4501if ${ac_cv_path_BASH+:} false; then :
4502  $as_echo_n "(cached) " >&6
4503else
4504  case $BASH in
4505  [\\/]* | ?:[\\/]*)
4506  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4507  ;;
4508  *)
4509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4510for as_dir in $PATH
4511do
4512  IFS=$as_save_IFS
4513  test -z "$as_dir" && as_dir=.
4514    for ac_exec_ext in '' $ac_executable_extensions; do
4515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4516    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4518    break 2
4519  fi
4520done
4521  done
4522IFS=$as_save_IFS
4523
4524  ;;
4525esac
4526fi
4527BASH=$ac_cv_path_BASH
4528if test -n "$BASH"; then
4529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4530$as_echo "$BASH" >&6; }
4531else
4532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4533$as_echo "no" >&6; }
4534fi
4535
4536
4537  test -n "$BASH" && break
4538done
4539
4540  else
4541    # The variable is set, but is it from the command line or the environment?
4542
4543    # Try to remove the string !BASH! from our list.
4544    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4545    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4546      # If it failed, the variable was not from the command line. Ignore it,
4547      # but warn the user (except for BASH, which is always set by the calling BASH).
4548      if test "xBASH" != xBASH; then
4549        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4550$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4551      fi
4552      # Try to locate tool using the code snippet
4553      for ac_prog in bash
4554do
4555  # Extract the first word of "$ac_prog", so it can be a program name with args.
4556set dummy $ac_prog; ac_word=$2
4557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4558$as_echo_n "checking for $ac_word... " >&6; }
4559if ${ac_cv_path_BASH+:} false; then :
4560  $as_echo_n "(cached) " >&6
4561else
4562  case $BASH in
4563  [\\/]* | ?:[\\/]*)
4564  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4565  ;;
4566  *)
4567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4568for as_dir in $PATH
4569do
4570  IFS=$as_save_IFS
4571  test -z "$as_dir" && as_dir=.
4572    for ac_exec_ext in '' $ac_executable_extensions; do
4573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4574    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4576    break 2
4577  fi
4578done
4579  done
4580IFS=$as_save_IFS
4581
4582  ;;
4583esac
4584fi
4585BASH=$ac_cv_path_BASH
4586if test -n "$BASH"; then
4587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4588$as_echo "$BASH" >&6; }
4589else
4590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4591$as_echo "no" >&6; }
4592fi
4593
4594
4595  test -n "$BASH" && break
4596done
4597
4598    else
4599      # If it succeeded, then it was overridden by the user. We will use it
4600      # for the tool.
4601
4602      # First remove it from the list of overridden variables, so we can test
4603      # for unknown variables in the end.
4604      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4605
4606      # Check if the provided tool contains a complete path.
4607      tool_specified="$BASH"
4608      tool_basename="${tool_specified##*/}"
4609      if test "x$tool_basename" = "x$tool_specified"; then
4610        # A command without a complete path is provided, search $PATH.
4611        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4612$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4613        # Extract the first word of "$tool_basename", so it can be a program name with args.
4614set dummy $tool_basename; ac_word=$2
4615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4616$as_echo_n "checking for $ac_word... " >&6; }
4617if ${ac_cv_path_BASH+:} false; then :
4618  $as_echo_n "(cached) " >&6
4619else
4620  case $BASH in
4621  [\\/]* | ?:[\\/]*)
4622  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4623  ;;
4624  *)
4625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4626for as_dir in $PATH
4627do
4628  IFS=$as_save_IFS
4629  test -z "$as_dir" && as_dir=.
4630    for ac_exec_ext in '' $ac_executable_extensions; do
4631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4632    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4634    break 2
4635  fi
4636done
4637  done
4638IFS=$as_save_IFS
4639
4640  ;;
4641esac
4642fi
4643BASH=$ac_cv_path_BASH
4644if test -n "$BASH"; then
4645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4646$as_echo "$BASH" >&6; }
4647else
4648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4649$as_echo "no" >&6; }
4650fi
4651
4652
4653        if test "x$BASH" = x; then
4654          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4655        fi
4656      else
4657        # Otherwise we believe it is a complete path. Use it as it is.
4658        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4659$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4660        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4661$as_echo_n "checking for BASH... " >&6; }
4662        if test ! -x "$tool_specified"; then
4663          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4664$as_echo "not found" >&6; }
4665          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4666        fi
4667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4668$as_echo "$tool_specified" >&6; }
4669      fi
4670    fi
4671  fi
4672
4673
4674
4675  if test "x$BASH" = x; then
4676    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4677  fi
4678
4679
4680
4681
4682
4683  # Publish this variable in the help.
4684
4685
4686  if test "x$CAT" = x; then
4687    # The variable is not set by user, try to locate tool using the code snippet
4688    for ac_prog in cat
4689do
4690  # Extract the first word of "$ac_prog", so it can be a program name with args.
4691set dummy $ac_prog; ac_word=$2
4692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4693$as_echo_n "checking for $ac_word... " >&6; }
4694if ${ac_cv_path_CAT+:} false; then :
4695  $as_echo_n "(cached) " >&6
4696else
4697  case $CAT in
4698  [\\/]* | ?:[\\/]*)
4699  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4700  ;;
4701  *)
4702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4703for as_dir in $PATH
4704do
4705  IFS=$as_save_IFS
4706  test -z "$as_dir" && as_dir=.
4707    for ac_exec_ext in '' $ac_executable_extensions; do
4708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4709    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4711    break 2
4712  fi
4713done
4714  done
4715IFS=$as_save_IFS
4716
4717  ;;
4718esac
4719fi
4720CAT=$ac_cv_path_CAT
4721if test -n "$CAT"; then
4722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4723$as_echo "$CAT" >&6; }
4724else
4725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4726$as_echo "no" >&6; }
4727fi
4728
4729
4730  test -n "$CAT" && break
4731done
4732
4733  else
4734    # The variable is set, but is it from the command line or the environment?
4735
4736    # Try to remove the string !CAT! from our list.
4737    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4738    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4739      # If it failed, the variable was not from the command line. Ignore it,
4740      # but warn the user (except for BASH, which is always set by the calling BASH).
4741      if test "xCAT" != xBASH; then
4742        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4743$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4744      fi
4745      # Try to locate tool using the code snippet
4746      for ac_prog in cat
4747do
4748  # Extract the first word of "$ac_prog", so it can be a program name with args.
4749set dummy $ac_prog; ac_word=$2
4750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4751$as_echo_n "checking for $ac_word... " >&6; }
4752if ${ac_cv_path_CAT+:} false; then :
4753  $as_echo_n "(cached) " >&6
4754else
4755  case $CAT in
4756  [\\/]* | ?:[\\/]*)
4757  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4758  ;;
4759  *)
4760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4761for as_dir in $PATH
4762do
4763  IFS=$as_save_IFS
4764  test -z "$as_dir" && as_dir=.
4765    for ac_exec_ext in '' $ac_executable_extensions; do
4766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4767    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4769    break 2
4770  fi
4771done
4772  done
4773IFS=$as_save_IFS
4774
4775  ;;
4776esac
4777fi
4778CAT=$ac_cv_path_CAT
4779if test -n "$CAT"; then
4780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4781$as_echo "$CAT" >&6; }
4782else
4783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4784$as_echo "no" >&6; }
4785fi
4786
4787
4788  test -n "$CAT" && break
4789done
4790
4791    else
4792      # If it succeeded, then it was overridden by the user. We will use it
4793      # for the tool.
4794
4795      # First remove it from the list of overridden variables, so we can test
4796      # for unknown variables in the end.
4797      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4798
4799      # Check if the provided tool contains a complete path.
4800      tool_specified="$CAT"
4801      tool_basename="${tool_specified##*/}"
4802      if test "x$tool_basename" = "x$tool_specified"; then
4803        # A command without a complete path is provided, search $PATH.
4804        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4805$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4806        # Extract the first word of "$tool_basename", so it can be a program name with args.
4807set dummy $tool_basename; ac_word=$2
4808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4809$as_echo_n "checking for $ac_word... " >&6; }
4810if ${ac_cv_path_CAT+:} false; then :
4811  $as_echo_n "(cached) " >&6
4812else
4813  case $CAT in
4814  [\\/]* | ?:[\\/]*)
4815  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4816  ;;
4817  *)
4818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4819for as_dir in $PATH
4820do
4821  IFS=$as_save_IFS
4822  test -z "$as_dir" && as_dir=.
4823    for ac_exec_ext in '' $ac_executable_extensions; do
4824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4825    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4827    break 2
4828  fi
4829done
4830  done
4831IFS=$as_save_IFS
4832
4833  ;;
4834esac
4835fi
4836CAT=$ac_cv_path_CAT
4837if test -n "$CAT"; then
4838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4839$as_echo "$CAT" >&6; }
4840else
4841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4842$as_echo "no" >&6; }
4843fi
4844
4845
4846        if test "x$CAT" = x; then
4847          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4848        fi
4849      else
4850        # Otherwise we believe it is a complete path. Use it as it is.
4851        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4852$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4854$as_echo_n "checking for CAT... " >&6; }
4855        if test ! -x "$tool_specified"; then
4856          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4857$as_echo "not found" >&6; }
4858          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4859        fi
4860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4861$as_echo "$tool_specified" >&6; }
4862      fi
4863    fi
4864  fi
4865
4866
4867
4868  if test "x$CAT" = x; then
4869    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4870  fi
4871
4872
4873
4874
4875
4876  # Publish this variable in the help.
4877
4878
4879  if test "x$CHMOD" = x; then
4880    # The variable is not set by user, try to locate tool using the code snippet
4881    for ac_prog in chmod
4882do
4883  # Extract the first word of "$ac_prog", so it can be a program name with args.
4884set dummy $ac_prog; ac_word=$2
4885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4886$as_echo_n "checking for $ac_word... " >&6; }
4887if ${ac_cv_path_CHMOD+:} false; then :
4888  $as_echo_n "(cached) " >&6
4889else
4890  case $CHMOD in
4891  [\\/]* | ?:[\\/]*)
4892  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4893  ;;
4894  *)
4895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4896for as_dir in $PATH
4897do
4898  IFS=$as_save_IFS
4899  test -z "$as_dir" && as_dir=.
4900    for ac_exec_ext in '' $ac_executable_extensions; do
4901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4902    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4904    break 2
4905  fi
4906done
4907  done
4908IFS=$as_save_IFS
4909
4910  ;;
4911esac
4912fi
4913CHMOD=$ac_cv_path_CHMOD
4914if test -n "$CHMOD"; then
4915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4916$as_echo "$CHMOD" >&6; }
4917else
4918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4919$as_echo "no" >&6; }
4920fi
4921
4922
4923  test -n "$CHMOD" && break
4924done
4925
4926  else
4927    # The variable is set, but is it from the command line or the environment?
4928
4929    # Try to remove the string !CHMOD! from our list.
4930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4932      # If it failed, the variable was not from the command line. Ignore it,
4933      # but warn the user (except for BASH, which is always set by the calling BASH).
4934      if test "xCHMOD" != xBASH; then
4935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4936$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4937      fi
4938      # Try to locate tool using the code snippet
4939      for ac_prog in chmod
4940do
4941  # Extract the first word of "$ac_prog", so it can be a program name with args.
4942set dummy $ac_prog; ac_word=$2
4943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4944$as_echo_n "checking for $ac_word... " >&6; }
4945if ${ac_cv_path_CHMOD+:} false; then :
4946  $as_echo_n "(cached) " >&6
4947else
4948  case $CHMOD in
4949  [\\/]* | ?:[\\/]*)
4950  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4951  ;;
4952  *)
4953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4954for as_dir in $PATH
4955do
4956  IFS=$as_save_IFS
4957  test -z "$as_dir" && as_dir=.
4958    for ac_exec_ext in '' $ac_executable_extensions; do
4959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4960    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4962    break 2
4963  fi
4964done
4965  done
4966IFS=$as_save_IFS
4967
4968  ;;
4969esac
4970fi
4971CHMOD=$ac_cv_path_CHMOD
4972if test -n "$CHMOD"; then
4973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4974$as_echo "$CHMOD" >&6; }
4975else
4976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977$as_echo "no" >&6; }
4978fi
4979
4980
4981  test -n "$CHMOD" && break
4982done
4983
4984    else
4985      # If it succeeded, then it was overridden by the user. We will use it
4986      # for the tool.
4987
4988      # First remove it from the list of overridden variables, so we can test
4989      # for unknown variables in the end.
4990      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4991
4992      # Check if the provided tool contains a complete path.
4993      tool_specified="$CHMOD"
4994      tool_basename="${tool_specified##*/}"
4995      if test "x$tool_basename" = "x$tool_specified"; then
4996        # A command without a complete path is provided, search $PATH.
4997        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4998$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4999        # Extract the first word of "$tool_basename", so it can be a program name with args.
5000set dummy $tool_basename; ac_word=$2
5001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
5003if ${ac_cv_path_CHMOD+:} false; then :
5004  $as_echo_n "(cached) " >&6
5005else
5006  case $CHMOD in
5007  [\\/]* | ?:[\\/]*)
5008  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5009  ;;
5010  *)
5011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012for as_dir in $PATH
5013do
5014  IFS=$as_save_IFS
5015  test -z "$as_dir" && as_dir=.
5016    for ac_exec_ext in '' $ac_executable_extensions; do
5017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5018    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020    break 2
5021  fi
5022done
5023  done
5024IFS=$as_save_IFS
5025
5026  ;;
5027esac
5028fi
5029CHMOD=$ac_cv_path_CHMOD
5030if test -n "$CHMOD"; then
5031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5032$as_echo "$CHMOD" >&6; }
5033else
5034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
5036fi
5037
5038
5039        if test "x$CHMOD" = x; then
5040          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5041        fi
5042      else
5043        # Otherwise we believe it is a complete path. Use it as it is.
5044        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5045$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5047$as_echo_n "checking for CHMOD... " >&6; }
5048        if test ! -x "$tool_specified"; then
5049          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5050$as_echo "not found" >&6; }
5051          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5052        fi
5053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5054$as_echo "$tool_specified" >&6; }
5055      fi
5056    fi
5057  fi
5058
5059
5060
5061  if test "x$CHMOD" = x; then
5062    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5063  fi
5064
5065
5066
5067
5068
5069  # Publish this variable in the help.
5070
5071
5072  if test "x$CMP" = x; then
5073    # The variable is not set by user, try to locate tool using the code snippet
5074    for ac_prog in cmp
5075do
5076  # Extract the first word of "$ac_prog", so it can be a program name with args.
5077set dummy $ac_prog; ac_word=$2
5078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5079$as_echo_n "checking for $ac_word... " >&6; }
5080if ${ac_cv_path_CMP+:} false; then :
5081  $as_echo_n "(cached) " >&6
5082else
5083  case $CMP in
5084  [\\/]* | ?:[\\/]*)
5085  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5086  ;;
5087  *)
5088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5089for as_dir in $PATH
5090do
5091  IFS=$as_save_IFS
5092  test -z "$as_dir" && as_dir=.
5093    for ac_exec_ext in '' $ac_executable_extensions; do
5094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5095    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5097    break 2
5098  fi
5099done
5100  done
5101IFS=$as_save_IFS
5102
5103  ;;
5104esac
5105fi
5106CMP=$ac_cv_path_CMP
5107if test -n "$CMP"; then
5108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5109$as_echo "$CMP" >&6; }
5110else
5111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5112$as_echo "no" >&6; }
5113fi
5114
5115
5116  test -n "$CMP" && break
5117done
5118
5119  else
5120    # The variable is set, but is it from the command line or the environment?
5121
5122    # Try to remove the string !CMP! from our list.
5123    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5124    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5125      # If it failed, the variable was not from the command line. Ignore it,
5126      # but warn the user (except for BASH, which is always set by the calling BASH).
5127      if test "xCMP" != xBASH; then
5128        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5129$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5130      fi
5131      # Try to locate tool using the code snippet
5132      for ac_prog in cmp
5133do
5134  # Extract the first word of "$ac_prog", so it can be a program name with args.
5135set dummy $ac_prog; ac_word=$2
5136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5137$as_echo_n "checking for $ac_word... " >&6; }
5138if ${ac_cv_path_CMP+:} false; then :
5139  $as_echo_n "(cached) " >&6
5140else
5141  case $CMP in
5142  [\\/]* | ?:[\\/]*)
5143  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5144  ;;
5145  *)
5146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5147for as_dir in $PATH
5148do
5149  IFS=$as_save_IFS
5150  test -z "$as_dir" && as_dir=.
5151    for ac_exec_ext in '' $ac_executable_extensions; do
5152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5153    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5155    break 2
5156  fi
5157done
5158  done
5159IFS=$as_save_IFS
5160
5161  ;;
5162esac
5163fi
5164CMP=$ac_cv_path_CMP
5165if test -n "$CMP"; then
5166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5167$as_echo "$CMP" >&6; }
5168else
5169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5170$as_echo "no" >&6; }
5171fi
5172
5173
5174  test -n "$CMP" && break
5175done
5176
5177    else
5178      # If it succeeded, then it was overridden by the user. We will use it
5179      # for the tool.
5180
5181      # First remove it from the list of overridden variables, so we can test
5182      # for unknown variables in the end.
5183      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5184
5185      # Check if the provided tool contains a complete path.
5186      tool_specified="$CMP"
5187      tool_basename="${tool_specified##*/}"
5188      if test "x$tool_basename" = "x$tool_specified"; then
5189        # A command without a complete path is provided, search $PATH.
5190        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5191$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5192        # Extract the first word of "$tool_basename", so it can be a program name with args.
5193set dummy $tool_basename; ac_word=$2
5194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5195$as_echo_n "checking for $ac_word... " >&6; }
5196if ${ac_cv_path_CMP+:} false; then :
5197  $as_echo_n "(cached) " >&6
5198else
5199  case $CMP in
5200  [\\/]* | ?:[\\/]*)
5201  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5202  ;;
5203  *)
5204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5205for as_dir in $PATH
5206do
5207  IFS=$as_save_IFS
5208  test -z "$as_dir" && as_dir=.
5209    for ac_exec_ext in '' $ac_executable_extensions; do
5210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5211    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5213    break 2
5214  fi
5215done
5216  done
5217IFS=$as_save_IFS
5218
5219  ;;
5220esac
5221fi
5222CMP=$ac_cv_path_CMP
5223if test -n "$CMP"; then
5224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5225$as_echo "$CMP" >&6; }
5226else
5227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5228$as_echo "no" >&6; }
5229fi
5230
5231
5232        if test "x$CMP" = x; then
5233          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5234        fi
5235      else
5236        # Otherwise we believe it is a complete path. Use it as it is.
5237        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5238$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5239        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5240$as_echo_n "checking for CMP... " >&6; }
5241        if test ! -x "$tool_specified"; then
5242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5243$as_echo "not found" >&6; }
5244          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5245        fi
5246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5247$as_echo "$tool_specified" >&6; }
5248      fi
5249    fi
5250  fi
5251
5252
5253
5254  if test "x$CMP" = x; then
5255    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5256  fi
5257
5258
5259
5260
5261
5262  # Publish this variable in the help.
5263
5264
5265  if test "x$COMM" = x; then
5266    # The variable is not set by user, try to locate tool using the code snippet
5267    for ac_prog in comm
5268do
5269  # Extract the first word of "$ac_prog", so it can be a program name with args.
5270set dummy $ac_prog; ac_word=$2
5271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5272$as_echo_n "checking for $ac_word... " >&6; }
5273if ${ac_cv_path_COMM+:} false; then :
5274  $as_echo_n "(cached) " >&6
5275else
5276  case $COMM in
5277  [\\/]* | ?:[\\/]*)
5278  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5279  ;;
5280  *)
5281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5282for as_dir in $PATH
5283do
5284  IFS=$as_save_IFS
5285  test -z "$as_dir" && as_dir=.
5286    for ac_exec_ext in '' $ac_executable_extensions; do
5287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5288    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5290    break 2
5291  fi
5292done
5293  done
5294IFS=$as_save_IFS
5295
5296  ;;
5297esac
5298fi
5299COMM=$ac_cv_path_COMM
5300if test -n "$COMM"; then
5301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5302$as_echo "$COMM" >&6; }
5303else
5304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5305$as_echo "no" >&6; }
5306fi
5307
5308
5309  test -n "$COMM" && break
5310done
5311
5312  else
5313    # The variable is set, but is it from the command line or the environment?
5314
5315    # Try to remove the string !COMM! from our list.
5316    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5317    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5318      # If it failed, the variable was not from the command line. Ignore it,
5319      # but warn the user (except for BASH, which is always set by the calling BASH).
5320      if test "xCOMM" != xBASH; then
5321        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5322$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5323      fi
5324      # Try to locate tool using the code snippet
5325      for ac_prog in comm
5326do
5327  # Extract the first word of "$ac_prog", so it can be a program name with args.
5328set dummy $ac_prog; ac_word=$2
5329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5330$as_echo_n "checking for $ac_word... " >&6; }
5331if ${ac_cv_path_COMM+:} false; then :
5332  $as_echo_n "(cached) " >&6
5333else
5334  case $COMM in
5335  [\\/]* | ?:[\\/]*)
5336  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5337  ;;
5338  *)
5339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5340for as_dir in $PATH
5341do
5342  IFS=$as_save_IFS
5343  test -z "$as_dir" && as_dir=.
5344    for ac_exec_ext in '' $ac_executable_extensions; do
5345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5346    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5348    break 2
5349  fi
5350done
5351  done
5352IFS=$as_save_IFS
5353
5354  ;;
5355esac
5356fi
5357COMM=$ac_cv_path_COMM
5358if test -n "$COMM"; then
5359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5360$as_echo "$COMM" >&6; }
5361else
5362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5363$as_echo "no" >&6; }
5364fi
5365
5366
5367  test -n "$COMM" && break
5368done
5369
5370    else
5371      # If it succeeded, then it was overridden by the user. We will use it
5372      # for the tool.
5373
5374      # First remove it from the list of overridden variables, so we can test
5375      # for unknown variables in the end.
5376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5377
5378      # Check if the provided tool contains a complete path.
5379      tool_specified="$COMM"
5380      tool_basename="${tool_specified##*/}"
5381      if test "x$tool_basename" = "x$tool_specified"; then
5382        # A command without a complete path is provided, search $PATH.
5383        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5384$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5385        # Extract the first word of "$tool_basename", so it can be a program name with args.
5386set dummy $tool_basename; ac_word=$2
5387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5388$as_echo_n "checking for $ac_word... " >&6; }
5389if ${ac_cv_path_COMM+:} false; then :
5390  $as_echo_n "(cached) " >&6
5391else
5392  case $COMM in
5393  [\\/]* | ?:[\\/]*)
5394  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5395  ;;
5396  *)
5397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5398for as_dir in $PATH
5399do
5400  IFS=$as_save_IFS
5401  test -z "$as_dir" && as_dir=.
5402    for ac_exec_ext in '' $ac_executable_extensions; do
5403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5404    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5406    break 2
5407  fi
5408done
5409  done
5410IFS=$as_save_IFS
5411
5412  ;;
5413esac
5414fi
5415COMM=$ac_cv_path_COMM
5416if test -n "$COMM"; then
5417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5418$as_echo "$COMM" >&6; }
5419else
5420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5421$as_echo "no" >&6; }
5422fi
5423
5424
5425        if test "x$COMM" = x; then
5426          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5427        fi
5428      else
5429        # Otherwise we believe it is a complete path. Use it as it is.
5430        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5431$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5432        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5433$as_echo_n "checking for COMM... " >&6; }
5434        if test ! -x "$tool_specified"; then
5435          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5436$as_echo "not found" >&6; }
5437          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5438        fi
5439        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5440$as_echo "$tool_specified" >&6; }
5441      fi
5442    fi
5443  fi
5444
5445
5446
5447  if test "x$COMM" = x; then
5448    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5449  fi
5450
5451
5452
5453
5454
5455  # Publish this variable in the help.
5456
5457
5458  if test "x$CP" = x; then
5459    # The variable is not set by user, try to locate tool using the code snippet
5460    for ac_prog in cp
5461do
5462  # Extract the first word of "$ac_prog", so it can be a program name with args.
5463set dummy $ac_prog; ac_word=$2
5464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5465$as_echo_n "checking for $ac_word... " >&6; }
5466if ${ac_cv_path_CP+:} false; then :
5467  $as_echo_n "(cached) " >&6
5468else
5469  case $CP in
5470  [\\/]* | ?:[\\/]*)
5471  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5472  ;;
5473  *)
5474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5475for as_dir in $PATH
5476do
5477  IFS=$as_save_IFS
5478  test -z "$as_dir" && as_dir=.
5479    for ac_exec_ext in '' $ac_executable_extensions; do
5480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5481    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5483    break 2
5484  fi
5485done
5486  done
5487IFS=$as_save_IFS
5488
5489  ;;
5490esac
5491fi
5492CP=$ac_cv_path_CP
5493if test -n "$CP"; then
5494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5495$as_echo "$CP" >&6; }
5496else
5497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5498$as_echo "no" >&6; }
5499fi
5500
5501
5502  test -n "$CP" && break
5503done
5504
5505  else
5506    # The variable is set, but is it from the command line or the environment?
5507
5508    # Try to remove the string !CP! from our list.
5509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5511      # If it failed, the variable was not from the command line. Ignore it,
5512      # but warn the user (except for BASH, which is always set by the calling BASH).
5513      if test "xCP" != xBASH; then
5514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5515$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5516      fi
5517      # Try to locate tool using the code snippet
5518      for ac_prog in cp
5519do
5520  # Extract the first word of "$ac_prog", so it can be a program name with args.
5521set dummy $ac_prog; ac_word=$2
5522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5523$as_echo_n "checking for $ac_word... " >&6; }
5524if ${ac_cv_path_CP+:} false; then :
5525  $as_echo_n "(cached) " >&6
5526else
5527  case $CP in
5528  [\\/]* | ?:[\\/]*)
5529  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5530  ;;
5531  *)
5532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5533for as_dir in $PATH
5534do
5535  IFS=$as_save_IFS
5536  test -z "$as_dir" && as_dir=.
5537    for ac_exec_ext in '' $ac_executable_extensions; do
5538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5539    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5541    break 2
5542  fi
5543done
5544  done
5545IFS=$as_save_IFS
5546
5547  ;;
5548esac
5549fi
5550CP=$ac_cv_path_CP
5551if test -n "$CP"; then
5552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5553$as_echo "$CP" >&6; }
5554else
5555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5556$as_echo "no" >&6; }
5557fi
5558
5559
5560  test -n "$CP" && break
5561done
5562
5563    else
5564      # If it succeeded, then it was overridden by the user. We will use it
5565      # for the tool.
5566
5567      # First remove it from the list of overridden variables, so we can test
5568      # for unknown variables in the end.
5569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5570
5571      # Check if the provided tool contains a complete path.
5572      tool_specified="$CP"
5573      tool_basename="${tool_specified##*/}"
5574      if test "x$tool_basename" = "x$tool_specified"; then
5575        # A command without a complete path is provided, search $PATH.
5576        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5577$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5578        # Extract the first word of "$tool_basename", so it can be a program name with args.
5579set dummy $tool_basename; ac_word=$2
5580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5581$as_echo_n "checking for $ac_word... " >&6; }
5582if ${ac_cv_path_CP+:} false; then :
5583  $as_echo_n "(cached) " >&6
5584else
5585  case $CP in
5586  [\\/]* | ?:[\\/]*)
5587  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5588  ;;
5589  *)
5590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5591for as_dir in $PATH
5592do
5593  IFS=$as_save_IFS
5594  test -z "$as_dir" && as_dir=.
5595    for ac_exec_ext in '' $ac_executable_extensions; do
5596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5597    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5599    break 2
5600  fi
5601done
5602  done
5603IFS=$as_save_IFS
5604
5605  ;;
5606esac
5607fi
5608CP=$ac_cv_path_CP
5609if test -n "$CP"; then
5610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5611$as_echo "$CP" >&6; }
5612else
5613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5614$as_echo "no" >&6; }
5615fi
5616
5617
5618        if test "x$CP" = x; then
5619          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5620        fi
5621      else
5622        # Otherwise we believe it is a complete path. Use it as it is.
5623        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5624$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5625        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5626$as_echo_n "checking for CP... " >&6; }
5627        if test ! -x "$tool_specified"; then
5628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5629$as_echo "not found" >&6; }
5630          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5631        fi
5632        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5633$as_echo "$tool_specified" >&6; }
5634      fi
5635    fi
5636  fi
5637
5638
5639
5640  if test "x$CP" = x; then
5641    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5642  fi
5643
5644
5645
5646
5647
5648  # Publish this variable in the help.
5649
5650
5651  if test "x$CPIO" = x; then
5652    # The variable is not set by user, try to locate tool using the code snippet
5653    for ac_prog in cpio
5654do
5655  # Extract the first word of "$ac_prog", so it can be a program name with args.
5656set dummy $ac_prog; ac_word=$2
5657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5658$as_echo_n "checking for $ac_word... " >&6; }
5659if ${ac_cv_path_CPIO+:} false; then :
5660  $as_echo_n "(cached) " >&6
5661else
5662  case $CPIO in
5663  [\\/]* | ?:[\\/]*)
5664  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5665  ;;
5666  *)
5667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5668for as_dir in $PATH
5669do
5670  IFS=$as_save_IFS
5671  test -z "$as_dir" && as_dir=.
5672    for ac_exec_ext in '' $ac_executable_extensions; do
5673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5674    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5676    break 2
5677  fi
5678done
5679  done
5680IFS=$as_save_IFS
5681
5682  ;;
5683esac
5684fi
5685CPIO=$ac_cv_path_CPIO
5686if test -n "$CPIO"; then
5687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5688$as_echo "$CPIO" >&6; }
5689else
5690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5691$as_echo "no" >&6; }
5692fi
5693
5694
5695  test -n "$CPIO" && break
5696done
5697
5698  else
5699    # The variable is set, but is it from the command line or the environment?
5700
5701    # Try to remove the string !CPIO! from our list.
5702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5704      # If it failed, the variable was not from the command line. Ignore it,
5705      # but warn the user (except for BASH, which is always set by the calling BASH).
5706      if test "xCPIO" != xBASH; then
5707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5708$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5709      fi
5710      # Try to locate tool using the code snippet
5711      for ac_prog in cpio
5712do
5713  # Extract the first word of "$ac_prog", so it can be a program name with args.
5714set dummy $ac_prog; ac_word=$2
5715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5716$as_echo_n "checking for $ac_word... " >&6; }
5717if ${ac_cv_path_CPIO+:} false; then :
5718  $as_echo_n "(cached) " >&6
5719else
5720  case $CPIO in
5721  [\\/]* | ?:[\\/]*)
5722  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5723  ;;
5724  *)
5725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5726for as_dir in $PATH
5727do
5728  IFS=$as_save_IFS
5729  test -z "$as_dir" && as_dir=.
5730    for ac_exec_ext in '' $ac_executable_extensions; do
5731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5732    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5734    break 2
5735  fi
5736done
5737  done
5738IFS=$as_save_IFS
5739
5740  ;;
5741esac
5742fi
5743CPIO=$ac_cv_path_CPIO
5744if test -n "$CPIO"; then
5745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5746$as_echo "$CPIO" >&6; }
5747else
5748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5749$as_echo "no" >&6; }
5750fi
5751
5752
5753  test -n "$CPIO" && break
5754done
5755
5756    else
5757      # If it succeeded, then it was overridden by the user. We will use it
5758      # for the tool.
5759
5760      # First remove it from the list of overridden variables, so we can test
5761      # for unknown variables in the end.
5762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5763
5764      # Check if the provided tool contains a complete path.
5765      tool_specified="$CPIO"
5766      tool_basename="${tool_specified##*/}"
5767      if test "x$tool_basename" = "x$tool_specified"; then
5768        # A command without a complete path is provided, search $PATH.
5769        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5770$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5771        # Extract the first word of "$tool_basename", so it can be a program name with args.
5772set dummy $tool_basename; ac_word=$2
5773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5774$as_echo_n "checking for $ac_word... " >&6; }
5775if ${ac_cv_path_CPIO+:} false; then :
5776  $as_echo_n "(cached) " >&6
5777else
5778  case $CPIO in
5779  [\\/]* | ?:[\\/]*)
5780  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5781  ;;
5782  *)
5783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5784for as_dir in $PATH
5785do
5786  IFS=$as_save_IFS
5787  test -z "$as_dir" && as_dir=.
5788    for ac_exec_ext in '' $ac_executable_extensions; do
5789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5790    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5792    break 2
5793  fi
5794done
5795  done
5796IFS=$as_save_IFS
5797
5798  ;;
5799esac
5800fi
5801CPIO=$ac_cv_path_CPIO
5802if test -n "$CPIO"; then
5803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5804$as_echo "$CPIO" >&6; }
5805else
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5807$as_echo "no" >&6; }
5808fi
5809
5810
5811        if test "x$CPIO" = x; then
5812          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5813        fi
5814      else
5815        # Otherwise we believe it is a complete path. Use it as it is.
5816        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5817$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5819$as_echo_n "checking for CPIO... " >&6; }
5820        if test ! -x "$tool_specified"; then
5821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5822$as_echo "not found" >&6; }
5823          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5824        fi
5825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5826$as_echo "$tool_specified" >&6; }
5827      fi
5828    fi
5829  fi
5830
5831
5832
5833  if test "x$CPIO" = x; then
5834    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5835  fi
5836
5837
5838
5839
5840
5841  # Publish this variable in the help.
5842
5843
5844  if test "x$CUT" = x; then
5845    # The variable is not set by user, try to locate tool using the code snippet
5846    for ac_prog in cut
5847do
5848  # Extract the first word of "$ac_prog", so it can be a program name with args.
5849set dummy $ac_prog; ac_word=$2
5850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5851$as_echo_n "checking for $ac_word... " >&6; }
5852if ${ac_cv_path_CUT+:} false; then :
5853  $as_echo_n "(cached) " >&6
5854else
5855  case $CUT in
5856  [\\/]* | ?:[\\/]*)
5857  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5858  ;;
5859  *)
5860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5861for as_dir in $PATH
5862do
5863  IFS=$as_save_IFS
5864  test -z "$as_dir" && as_dir=.
5865    for ac_exec_ext in '' $ac_executable_extensions; do
5866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5867    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5869    break 2
5870  fi
5871done
5872  done
5873IFS=$as_save_IFS
5874
5875  ;;
5876esac
5877fi
5878CUT=$ac_cv_path_CUT
5879if test -n "$CUT"; then
5880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5881$as_echo "$CUT" >&6; }
5882else
5883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5884$as_echo "no" >&6; }
5885fi
5886
5887
5888  test -n "$CUT" && break
5889done
5890
5891  else
5892    # The variable is set, but is it from the command line or the environment?
5893
5894    # Try to remove the string !CUT! from our list.
5895    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5896    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5897      # If it failed, the variable was not from the command line. Ignore it,
5898      # but warn the user (except for BASH, which is always set by the calling BASH).
5899      if test "xCUT" != xBASH; then
5900        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5901$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5902      fi
5903      # Try to locate tool using the code snippet
5904      for ac_prog in cut
5905do
5906  # Extract the first word of "$ac_prog", so it can be a program name with args.
5907set dummy $ac_prog; ac_word=$2
5908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5909$as_echo_n "checking for $ac_word... " >&6; }
5910if ${ac_cv_path_CUT+:} false; then :
5911  $as_echo_n "(cached) " >&6
5912else
5913  case $CUT in
5914  [\\/]* | ?:[\\/]*)
5915  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5916  ;;
5917  *)
5918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5919for as_dir in $PATH
5920do
5921  IFS=$as_save_IFS
5922  test -z "$as_dir" && as_dir=.
5923    for ac_exec_ext in '' $ac_executable_extensions; do
5924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5925    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5927    break 2
5928  fi
5929done
5930  done
5931IFS=$as_save_IFS
5932
5933  ;;
5934esac
5935fi
5936CUT=$ac_cv_path_CUT
5937if test -n "$CUT"; then
5938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5939$as_echo "$CUT" >&6; }
5940else
5941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5942$as_echo "no" >&6; }
5943fi
5944
5945
5946  test -n "$CUT" && break
5947done
5948
5949    else
5950      # If it succeeded, then it was overridden by the user. We will use it
5951      # for the tool.
5952
5953      # First remove it from the list of overridden variables, so we can test
5954      # for unknown variables in the end.
5955      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5956
5957      # Check if the provided tool contains a complete path.
5958      tool_specified="$CUT"
5959      tool_basename="${tool_specified##*/}"
5960      if test "x$tool_basename" = "x$tool_specified"; then
5961        # A command without a complete path is provided, search $PATH.
5962        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5963$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5964        # Extract the first word of "$tool_basename", so it can be a program name with args.
5965set dummy $tool_basename; ac_word=$2
5966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5967$as_echo_n "checking for $ac_word... " >&6; }
5968if ${ac_cv_path_CUT+:} false; then :
5969  $as_echo_n "(cached) " >&6
5970else
5971  case $CUT in
5972  [\\/]* | ?:[\\/]*)
5973  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5974  ;;
5975  *)
5976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5977for as_dir in $PATH
5978do
5979  IFS=$as_save_IFS
5980  test -z "$as_dir" && as_dir=.
5981    for ac_exec_ext in '' $ac_executable_extensions; do
5982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5983    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5985    break 2
5986  fi
5987done
5988  done
5989IFS=$as_save_IFS
5990
5991  ;;
5992esac
5993fi
5994CUT=$ac_cv_path_CUT
5995if test -n "$CUT"; then
5996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5997$as_echo "$CUT" >&6; }
5998else
5999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6000$as_echo "no" >&6; }
6001fi
6002
6003
6004        if test "x$CUT" = x; then
6005          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6006        fi
6007      else
6008        # Otherwise we believe it is a complete path. Use it as it is.
6009        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6010$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6012$as_echo_n "checking for CUT... " >&6; }
6013        if test ! -x "$tool_specified"; then
6014          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6015$as_echo "not found" >&6; }
6016          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6017        fi
6018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6019$as_echo "$tool_specified" >&6; }
6020      fi
6021    fi
6022  fi
6023
6024
6025
6026  if test "x$CUT" = x; then
6027    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6028  fi
6029
6030
6031
6032
6033
6034  # Publish this variable in the help.
6035
6036
6037  if test "x$DATE" = x; then
6038    # The variable is not set by user, try to locate tool using the code snippet
6039    for ac_prog in date
6040do
6041  # Extract the first word of "$ac_prog", so it can be a program name with args.
6042set dummy $ac_prog; ac_word=$2
6043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6044$as_echo_n "checking for $ac_word... " >&6; }
6045if ${ac_cv_path_DATE+:} false; then :
6046  $as_echo_n "(cached) " >&6
6047else
6048  case $DATE in
6049  [\\/]* | ?:[\\/]*)
6050  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6051  ;;
6052  *)
6053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6054for as_dir in $PATH
6055do
6056  IFS=$as_save_IFS
6057  test -z "$as_dir" && as_dir=.
6058    for ac_exec_ext in '' $ac_executable_extensions; do
6059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6060    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6062    break 2
6063  fi
6064done
6065  done
6066IFS=$as_save_IFS
6067
6068  ;;
6069esac
6070fi
6071DATE=$ac_cv_path_DATE
6072if test -n "$DATE"; then
6073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6074$as_echo "$DATE" >&6; }
6075else
6076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6077$as_echo "no" >&6; }
6078fi
6079
6080
6081  test -n "$DATE" && break
6082done
6083
6084  else
6085    # The variable is set, but is it from the command line or the environment?
6086
6087    # Try to remove the string !DATE! from our list.
6088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6090      # If it failed, the variable was not from the command line. Ignore it,
6091      # but warn the user (except for BASH, which is always set by the calling BASH).
6092      if test "xDATE" != xBASH; then
6093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6094$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6095      fi
6096      # Try to locate tool using the code snippet
6097      for ac_prog in date
6098do
6099  # Extract the first word of "$ac_prog", so it can be a program name with args.
6100set dummy $ac_prog; ac_word=$2
6101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6102$as_echo_n "checking for $ac_word... " >&6; }
6103if ${ac_cv_path_DATE+:} false; then :
6104  $as_echo_n "(cached) " >&6
6105else
6106  case $DATE in
6107  [\\/]* | ?:[\\/]*)
6108  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6109  ;;
6110  *)
6111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112for as_dir in $PATH
6113do
6114  IFS=$as_save_IFS
6115  test -z "$as_dir" && as_dir=.
6116    for ac_exec_ext in '' $ac_executable_extensions; do
6117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6118    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6120    break 2
6121  fi
6122done
6123  done
6124IFS=$as_save_IFS
6125
6126  ;;
6127esac
6128fi
6129DATE=$ac_cv_path_DATE
6130if test -n "$DATE"; then
6131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6132$as_echo "$DATE" >&6; }
6133else
6134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6135$as_echo "no" >&6; }
6136fi
6137
6138
6139  test -n "$DATE" && break
6140done
6141
6142    else
6143      # If it succeeded, then it was overridden by the user. We will use it
6144      # for the tool.
6145
6146      # First remove it from the list of overridden variables, so we can test
6147      # for unknown variables in the end.
6148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6149
6150      # Check if the provided tool contains a complete path.
6151      tool_specified="$DATE"
6152      tool_basename="${tool_specified##*/}"
6153      if test "x$tool_basename" = "x$tool_specified"; then
6154        # A command without a complete path is provided, search $PATH.
6155        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6156$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6157        # Extract the first word of "$tool_basename", so it can be a program name with args.
6158set dummy $tool_basename; ac_word=$2
6159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6160$as_echo_n "checking for $ac_word... " >&6; }
6161if ${ac_cv_path_DATE+:} false; then :
6162  $as_echo_n "(cached) " >&6
6163else
6164  case $DATE in
6165  [\\/]* | ?:[\\/]*)
6166  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6167  ;;
6168  *)
6169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6170for as_dir in $PATH
6171do
6172  IFS=$as_save_IFS
6173  test -z "$as_dir" && as_dir=.
6174    for ac_exec_ext in '' $ac_executable_extensions; do
6175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6176    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6178    break 2
6179  fi
6180done
6181  done
6182IFS=$as_save_IFS
6183
6184  ;;
6185esac
6186fi
6187DATE=$ac_cv_path_DATE
6188if test -n "$DATE"; then
6189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6190$as_echo "$DATE" >&6; }
6191else
6192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6193$as_echo "no" >&6; }
6194fi
6195
6196
6197        if test "x$DATE" = x; then
6198          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6199        fi
6200      else
6201        # Otherwise we believe it is a complete path. Use it as it is.
6202        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6203$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6204        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6205$as_echo_n "checking for DATE... " >&6; }
6206        if test ! -x "$tool_specified"; then
6207          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6208$as_echo "not found" >&6; }
6209          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6210        fi
6211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6212$as_echo "$tool_specified" >&6; }
6213      fi
6214    fi
6215  fi
6216
6217
6218
6219  if test "x$DATE" = x; then
6220    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6221  fi
6222
6223
6224
6225
6226
6227  # Publish this variable in the help.
6228
6229
6230  if test "x$DIFF" = x; then
6231    # The variable is not set by user, try to locate tool using the code snippet
6232    for ac_prog in gdiff diff
6233do
6234  # Extract the first word of "$ac_prog", so it can be a program name with args.
6235set dummy $ac_prog; ac_word=$2
6236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6237$as_echo_n "checking for $ac_word... " >&6; }
6238if ${ac_cv_path_DIFF+:} false; then :
6239  $as_echo_n "(cached) " >&6
6240else
6241  case $DIFF in
6242  [\\/]* | ?:[\\/]*)
6243  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6244  ;;
6245  *)
6246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6247for as_dir in $PATH
6248do
6249  IFS=$as_save_IFS
6250  test -z "$as_dir" && as_dir=.
6251    for ac_exec_ext in '' $ac_executable_extensions; do
6252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6253    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6255    break 2
6256  fi
6257done
6258  done
6259IFS=$as_save_IFS
6260
6261  ;;
6262esac
6263fi
6264DIFF=$ac_cv_path_DIFF
6265if test -n "$DIFF"; then
6266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6267$as_echo "$DIFF" >&6; }
6268else
6269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6270$as_echo "no" >&6; }
6271fi
6272
6273
6274  test -n "$DIFF" && break
6275done
6276
6277  else
6278    # The variable is set, but is it from the command line or the environment?
6279
6280    # Try to remove the string !DIFF! from our list.
6281    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6282    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6283      # If it failed, the variable was not from the command line. Ignore it,
6284      # but warn the user (except for BASH, which is always set by the calling BASH).
6285      if test "xDIFF" != xBASH; then
6286        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6287$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6288      fi
6289      # Try to locate tool using the code snippet
6290      for ac_prog in gdiff diff
6291do
6292  # Extract the first word of "$ac_prog", so it can be a program name with args.
6293set dummy $ac_prog; ac_word=$2
6294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6295$as_echo_n "checking for $ac_word... " >&6; }
6296if ${ac_cv_path_DIFF+:} false; then :
6297  $as_echo_n "(cached) " >&6
6298else
6299  case $DIFF in
6300  [\\/]* | ?:[\\/]*)
6301  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6302  ;;
6303  *)
6304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6305for as_dir in $PATH
6306do
6307  IFS=$as_save_IFS
6308  test -z "$as_dir" && as_dir=.
6309    for ac_exec_ext in '' $ac_executable_extensions; do
6310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6311    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6313    break 2
6314  fi
6315done
6316  done
6317IFS=$as_save_IFS
6318
6319  ;;
6320esac
6321fi
6322DIFF=$ac_cv_path_DIFF
6323if test -n "$DIFF"; then
6324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6325$as_echo "$DIFF" >&6; }
6326else
6327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6328$as_echo "no" >&6; }
6329fi
6330
6331
6332  test -n "$DIFF" && break
6333done
6334
6335    else
6336      # If it succeeded, then it was overridden by the user. We will use it
6337      # for the tool.
6338
6339      # First remove it from the list of overridden variables, so we can test
6340      # for unknown variables in the end.
6341      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6342
6343      # Check if the provided tool contains a complete path.
6344      tool_specified="$DIFF"
6345      tool_basename="${tool_specified##*/}"
6346      if test "x$tool_basename" = "x$tool_specified"; then
6347        # A command without a complete path is provided, search $PATH.
6348        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6349$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6350        # Extract the first word of "$tool_basename", so it can be a program name with args.
6351set dummy $tool_basename; ac_word=$2
6352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6353$as_echo_n "checking for $ac_word... " >&6; }
6354if ${ac_cv_path_DIFF+:} false; then :
6355  $as_echo_n "(cached) " >&6
6356else
6357  case $DIFF in
6358  [\\/]* | ?:[\\/]*)
6359  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6360  ;;
6361  *)
6362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6363for as_dir in $PATH
6364do
6365  IFS=$as_save_IFS
6366  test -z "$as_dir" && as_dir=.
6367    for ac_exec_ext in '' $ac_executable_extensions; do
6368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6369    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6371    break 2
6372  fi
6373done
6374  done
6375IFS=$as_save_IFS
6376
6377  ;;
6378esac
6379fi
6380DIFF=$ac_cv_path_DIFF
6381if test -n "$DIFF"; then
6382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6383$as_echo "$DIFF" >&6; }
6384else
6385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6386$as_echo "no" >&6; }
6387fi
6388
6389
6390        if test "x$DIFF" = x; then
6391          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6392        fi
6393      else
6394        # Otherwise we believe it is a complete path. Use it as it is.
6395        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6396$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6397        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6398$as_echo_n "checking for DIFF... " >&6; }
6399        if test ! -x "$tool_specified"; then
6400          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6401$as_echo "not found" >&6; }
6402          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6403        fi
6404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6405$as_echo "$tool_specified" >&6; }
6406      fi
6407    fi
6408  fi
6409
6410
6411
6412  if test "x$DIFF" = x; then
6413    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6414  fi
6415
6416
6417
6418
6419
6420  # Publish this variable in the help.
6421
6422
6423  if test "x$DIRNAME" = x; then
6424    # The variable is not set by user, try to locate tool using the code snippet
6425    for ac_prog in dirname
6426do
6427  # Extract the first word of "$ac_prog", so it can be a program name with args.
6428set dummy $ac_prog; ac_word=$2
6429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6430$as_echo_n "checking for $ac_word... " >&6; }
6431if ${ac_cv_path_DIRNAME+:} false; then :
6432  $as_echo_n "(cached) " >&6
6433else
6434  case $DIRNAME in
6435  [\\/]* | ?:[\\/]*)
6436  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6437  ;;
6438  *)
6439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6440for as_dir in $PATH
6441do
6442  IFS=$as_save_IFS
6443  test -z "$as_dir" && as_dir=.
6444    for ac_exec_ext in '' $ac_executable_extensions; do
6445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6446    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6448    break 2
6449  fi
6450done
6451  done
6452IFS=$as_save_IFS
6453
6454  ;;
6455esac
6456fi
6457DIRNAME=$ac_cv_path_DIRNAME
6458if test -n "$DIRNAME"; then
6459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6460$as_echo "$DIRNAME" >&6; }
6461else
6462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6463$as_echo "no" >&6; }
6464fi
6465
6466
6467  test -n "$DIRNAME" && break
6468done
6469
6470  else
6471    # The variable is set, but is it from the command line or the environment?
6472
6473    # Try to remove the string !DIRNAME! from our list.
6474    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6475    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6476      # If it failed, the variable was not from the command line. Ignore it,
6477      # but warn the user (except for BASH, which is always set by the calling BASH).
6478      if test "xDIRNAME" != xBASH; then
6479        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6480$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6481      fi
6482      # Try to locate tool using the code snippet
6483      for ac_prog in dirname
6484do
6485  # Extract the first word of "$ac_prog", so it can be a program name with args.
6486set dummy $ac_prog; ac_word=$2
6487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6488$as_echo_n "checking for $ac_word... " >&6; }
6489if ${ac_cv_path_DIRNAME+:} false; then :
6490  $as_echo_n "(cached) " >&6
6491else
6492  case $DIRNAME in
6493  [\\/]* | ?:[\\/]*)
6494  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6495  ;;
6496  *)
6497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6498for as_dir in $PATH
6499do
6500  IFS=$as_save_IFS
6501  test -z "$as_dir" && as_dir=.
6502    for ac_exec_ext in '' $ac_executable_extensions; do
6503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6504    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6506    break 2
6507  fi
6508done
6509  done
6510IFS=$as_save_IFS
6511
6512  ;;
6513esac
6514fi
6515DIRNAME=$ac_cv_path_DIRNAME
6516if test -n "$DIRNAME"; then
6517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6518$as_echo "$DIRNAME" >&6; }
6519else
6520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521$as_echo "no" >&6; }
6522fi
6523
6524
6525  test -n "$DIRNAME" && break
6526done
6527
6528    else
6529      # If it succeeded, then it was overridden by the user. We will use it
6530      # for the tool.
6531
6532      # First remove it from the list of overridden variables, so we can test
6533      # for unknown variables in the end.
6534      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6535
6536      # Check if the provided tool contains a complete path.
6537      tool_specified="$DIRNAME"
6538      tool_basename="${tool_specified##*/}"
6539      if test "x$tool_basename" = "x$tool_specified"; then
6540        # A command without a complete path is provided, search $PATH.
6541        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6542$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6543        # Extract the first word of "$tool_basename", so it can be a program name with args.
6544set dummy $tool_basename; ac_word=$2
6545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6546$as_echo_n "checking for $ac_word... " >&6; }
6547if ${ac_cv_path_DIRNAME+:} false; then :
6548  $as_echo_n "(cached) " >&6
6549else
6550  case $DIRNAME in
6551  [\\/]* | ?:[\\/]*)
6552  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6553  ;;
6554  *)
6555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6556for as_dir in $PATH
6557do
6558  IFS=$as_save_IFS
6559  test -z "$as_dir" && as_dir=.
6560    for ac_exec_ext in '' $ac_executable_extensions; do
6561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6562    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6564    break 2
6565  fi
6566done
6567  done
6568IFS=$as_save_IFS
6569
6570  ;;
6571esac
6572fi
6573DIRNAME=$ac_cv_path_DIRNAME
6574if test -n "$DIRNAME"; then
6575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6576$as_echo "$DIRNAME" >&6; }
6577else
6578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6579$as_echo "no" >&6; }
6580fi
6581
6582
6583        if test "x$DIRNAME" = x; then
6584          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6585        fi
6586      else
6587        # Otherwise we believe it is a complete path. Use it as it is.
6588        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6589$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6590        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6591$as_echo_n "checking for DIRNAME... " >&6; }
6592        if test ! -x "$tool_specified"; then
6593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6594$as_echo "not found" >&6; }
6595          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6596        fi
6597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6598$as_echo "$tool_specified" >&6; }
6599      fi
6600    fi
6601  fi
6602
6603
6604
6605  if test "x$DIRNAME" = x; then
6606    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6607  fi
6608
6609
6610
6611
6612
6613  # Publish this variable in the help.
6614
6615
6616  if test "x$ECHO" = x; then
6617    # The variable is not set by user, try to locate tool using the code snippet
6618    for ac_prog in echo
6619do
6620  # Extract the first word of "$ac_prog", so it can be a program name with args.
6621set dummy $ac_prog; ac_word=$2
6622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6623$as_echo_n "checking for $ac_word... " >&6; }
6624if ${ac_cv_path_ECHO+:} false; then :
6625  $as_echo_n "(cached) " >&6
6626else
6627  case $ECHO in
6628  [\\/]* | ?:[\\/]*)
6629  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6630  ;;
6631  *)
6632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6633for as_dir in $PATH
6634do
6635  IFS=$as_save_IFS
6636  test -z "$as_dir" && as_dir=.
6637    for ac_exec_ext in '' $ac_executable_extensions; do
6638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6639    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6641    break 2
6642  fi
6643done
6644  done
6645IFS=$as_save_IFS
6646
6647  ;;
6648esac
6649fi
6650ECHO=$ac_cv_path_ECHO
6651if test -n "$ECHO"; then
6652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6653$as_echo "$ECHO" >&6; }
6654else
6655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6656$as_echo "no" >&6; }
6657fi
6658
6659
6660  test -n "$ECHO" && break
6661done
6662
6663  else
6664    # The variable is set, but is it from the command line or the environment?
6665
6666    # Try to remove the string !ECHO! from our list.
6667    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6668    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6669      # If it failed, the variable was not from the command line. Ignore it,
6670      # but warn the user (except for BASH, which is always set by the calling BASH).
6671      if test "xECHO" != xBASH; then
6672        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6673$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6674      fi
6675      # Try to locate tool using the code snippet
6676      for ac_prog in echo
6677do
6678  # Extract the first word of "$ac_prog", so it can be a program name with args.
6679set dummy $ac_prog; ac_word=$2
6680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6681$as_echo_n "checking for $ac_word... " >&6; }
6682if ${ac_cv_path_ECHO+:} false; then :
6683  $as_echo_n "(cached) " >&6
6684else
6685  case $ECHO in
6686  [\\/]* | ?:[\\/]*)
6687  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6688  ;;
6689  *)
6690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6691for as_dir in $PATH
6692do
6693  IFS=$as_save_IFS
6694  test -z "$as_dir" && as_dir=.
6695    for ac_exec_ext in '' $ac_executable_extensions; do
6696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6697    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6699    break 2
6700  fi
6701done
6702  done
6703IFS=$as_save_IFS
6704
6705  ;;
6706esac
6707fi
6708ECHO=$ac_cv_path_ECHO
6709if test -n "$ECHO"; then
6710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6711$as_echo "$ECHO" >&6; }
6712else
6713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6714$as_echo "no" >&6; }
6715fi
6716
6717
6718  test -n "$ECHO" && break
6719done
6720
6721    else
6722      # If it succeeded, then it was overridden by the user. We will use it
6723      # for the tool.
6724
6725      # First remove it from the list of overridden variables, so we can test
6726      # for unknown variables in the end.
6727      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6728
6729      # Check if the provided tool contains a complete path.
6730      tool_specified="$ECHO"
6731      tool_basename="${tool_specified##*/}"
6732      if test "x$tool_basename" = "x$tool_specified"; then
6733        # A command without a complete path is provided, search $PATH.
6734        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6735$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6736        # Extract the first word of "$tool_basename", so it can be a program name with args.
6737set dummy $tool_basename; ac_word=$2
6738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6739$as_echo_n "checking for $ac_word... " >&6; }
6740if ${ac_cv_path_ECHO+:} false; then :
6741  $as_echo_n "(cached) " >&6
6742else
6743  case $ECHO in
6744  [\\/]* | ?:[\\/]*)
6745  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6746  ;;
6747  *)
6748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6749for as_dir in $PATH
6750do
6751  IFS=$as_save_IFS
6752  test -z "$as_dir" && as_dir=.
6753    for ac_exec_ext in '' $ac_executable_extensions; do
6754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6755    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6757    break 2
6758  fi
6759done
6760  done
6761IFS=$as_save_IFS
6762
6763  ;;
6764esac
6765fi
6766ECHO=$ac_cv_path_ECHO
6767if test -n "$ECHO"; then
6768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6769$as_echo "$ECHO" >&6; }
6770else
6771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6772$as_echo "no" >&6; }
6773fi
6774
6775
6776        if test "x$ECHO" = x; then
6777          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6778        fi
6779      else
6780        # Otherwise we believe it is a complete path. Use it as it is.
6781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6782$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6784$as_echo_n "checking for ECHO... " >&6; }
6785        if test ! -x "$tool_specified"; then
6786          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6787$as_echo "not found" >&6; }
6788          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6789        fi
6790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6791$as_echo "$tool_specified" >&6; }
6792      fi
6793    fi
6794  fi
6795
6796
6797
6798  if test "x$ECHO" = x; then
6799    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6800  fi
6801
6802
6803
6804
6805
6806  # Publish this variable in the help.
6807
6808
6809  if test "x$EXPR" = x; then
6810    # The variable is not set by user, try to locate tool using the code snippet
6811    for ac_prog in expr
6812do
6813  # Extract the first word of "$ac_prog", so it can be a program name with args.
6814set dummy $ac_prog; ac_word=$2
6815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6816$as_echo_n "checking for $ac_word... " >&6; }
6817if ${ac_cv_path_EXPR+:} false; then :
6818  $as_echo_n "(cached) " >&6
6819else
6820  case $EXPR in
6821  [\\/]* | ?:[\\/]*)
6822  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6823  ;;
6824  *)
6825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6826for as_dir in $PATH
6827do
6828  IFS=$as_save_IFS
6829  test -z "$as_dir" && as_dir=.
6830    for ac_exec_ext in '' $ac_executable_extensions; do
6831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6832    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6834    break 2
6835  fi
6836done
6837  done
6838IFS=$as_save_IFS
6839
6840  ;;
6841esac
6842fi
6843EXPR=$ac_cv_path_EXPR
6844if test -n "$EXPR"; then
6845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6846$as_echo "$EXPR" >&6; }
6847else
6848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6849$as_echo "no" >&6; }
6850fi
6851
6852
6853  test -n "$EXPR" && break
6854done
6855
6856  else
6857    # The variable is set, but is it from the command line or the environment?
6858
6859    # Try to remove the string !EXPR! from our list.
6860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6862      # If it failed, the variable was not from the command line. Ignore it,
6863      # but warn the user (except for BASH, which is always set by the calling BASH).
6864      if test "xEXPR" != xBASH; then
6865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6866$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6867      fi
6868      # Try to locate tool using the code snippet
6869      for ac_prog in expr
6870do
6871  # Extract the first word of "$ac_prog", so it can be a program name with args.
6872set dummy $ac_prog; ac_word=$2
6873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6874$as_echo_n "checking for $ac_word... " >&6; }
6875if ${ac_cv_path_EXPR+:} false; then :
6876  $as_echo_n "(cached) " >&6
6877else
6878  case $EXPR in
6879  [\\/]* | ?:[\\/]*)
6880  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6881  ;;
6882  *)
6883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6884for as_dir in $PATH
6885do
6886  IFS=$as_save_IFS
6887  test -z "$as_dir" && as_dir=.
6888    for ac_exec_ext in '' $ac_executable_extensions; do
6889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6890    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6892    break 2
6893  fi
6894done
6895  done
6896IFS=$as_save_IFS
6897
6898  ;;
6899esac
6900fi
6901EXPR=$ac_cv_path_EXPR
6902if test -n "$EXPR"; then
6903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6904$as_echo "$EXPR" >&6; }
6905else
6906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6907$as_echo "no" >&6; }
6908fi
6909
6910
6911  test -n "$EXPR" && break
6912done
6913
6914    else
6915      # If it succeeded, then it was overridden by the user. We will use it
6916      # for the tool.
6917
6918      # First remove it from the list of overridden variables, so we can test
6919      # for unknown variables in the end.
6920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6921
6922      # Check if the provided tool contains a complete path.
6923      tool_specified="$EXPR"
6924      tool_basename="${tool_specified##*/}"
6925      if test "x$tool_basename" = "x$tool_specified"; then
6926        # A command without a complete path is provided, search $PATH.
6927        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6928$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6929        # Extract the first word of "$tool_basename", so it can be a program name with args.
6930set dummy $tool_basename; ac_word=$2
6931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6932$as_echo_n "checking for $ac_word... " >&6; }
6933if ${ac_cv_path_EXPR+:} false; then :
6934  $as_echo_n "(cached) " >&6
6935else
6936  case $EXPR in
6937  [\\/]* | ?:[\\/]*)
6938  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6939  ;;
6940  *)
6941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6942for as_dir in $PATH
6943do
6944  IFS=$as_save_IFS
6945  test -z "$as_dir" && as_dir=.
6946    for ac_exec_ext in '' $ac_executable_extensions; do
6947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6948    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6950    break 2
6951  fi
6952done
6953  done
6954IFS=$as_save_IFS
6955
6956  ;;
6957esac
6958fi
6959EXPR=$ac_cv_path_EXPR
6960if test -n "$EXPR"; then
6961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6962$as_echo "$EXPR" >&6; }
6963else
6964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6965$as_echo "no" >&6; }
6966fi
6967
6968
6969        if test "x$EXPR" = x; then
6970          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6971        fi
6972      else
6973        # Otherwise we believe it is a complete path. Use it as it is.
6974        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6975$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6977$as_echo_n "checking for EXPR... " >&6; }
6978        if test ! -x "$tool_specified"; then
6979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6980$as_echo "not found" >&6; }
6981          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6982        fi
6983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6984$as_echo "$tool_specified" >&6; }
6985      fi
6986    fi
6987  fi
6988
6989
6990
6991  if test "x$EXPR" = x; then
6992    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6993  fi
6994
6995
6996
6997
6998
6999  # Publish this variable in the help.
7000
7001
7002  if test "x$FILE" = x; then
7003    # The variable is not set by user, try to locate tool using the code snippet
7004    for ac_prog in file
7005do
7006  # Extract the first word of "$ac_prog", so it can be a program name with args.
7007set dummy $ac_prog; ac_word=$2
7008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7009$as_echo_n "checking for $ac_word... " >&6; }
7010if ${ac_cv_path_FILE+:} false; then :
7011  $as_echo_n "(cached) " >&6
7012else
7013  case $FILE in
7014  [\\/]* | ?:[\\/]*)
7015  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7016  ;;
7017  *)
7018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7019for as_dir in $PATH
7020do
7021  IFS=$as_save_IFS
7022  test -z "$as_dir" && as_dir=.
7023    for ac_exec_ext in '' $ac_executable_extensions; do
7024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7025    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7027    break 2
7028  fi
7029done
7030  done
7031IFS=$as_save_IFS
7032
7033  ;;
7034esac
7035fi
7036FILE=$ac_cv_path_FILE
7037if test -n "$FILE"; then
7038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7039$as_echo "$FILE" >&6; }
7040else
7041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7042$as_echo "no" >&6; }
7043fi
7044
7045
7046  test -n "$FILE" && break
7047done
7048
7049  else
7050    # The variable is set, but is it from the command line or the environment?
7051
7052    # Try to remove the string !FILE! from our list.
7053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7055      # If it failed, the variable was not from the command line. Ignore it,
7056      # but warn the user (except for BASH, which is always set by the calling BASH).
7057      if test "xFILE" != xBASH; then
7058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7059$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7060      fi
7061      # Try to locate tool using the code snippet
7062      for ac_prog in file
7063do
7064  # Extract the first word of "$ac_prog", so it can be a program name with args.
7065set dummy $ac_prog; ac_word=$2
7066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7067$as_echo_n "checking for $ac_word... " >&6; }
7068if ${ac_cv_path_FILE+:} false; then :
7069  $as_echo_n "(cached) " >&6
7070else
7071  case $FILE in
7072  [\\/]* | ?:[\\/]*)
7073  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7074  ;;
7075  *)
7076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7077for as_dir in $PATH
7078do
7079  IFS=$as_save_IFS
7080  test -z "$as_dir" && as_dir=.
7081    for ac_exec_ext in '' $ac_executable_extensions; do
7082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7083    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7085    break 2
7086  fi
7087done
7088  done
7089IFS=$as_save_IFS
7090
7091  ;;
7092esac
7093fi
7094FILE=$ac_cv_path_FILE
7095if test -n "$FILE"; then
7096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7097$as_echo "$FILE" >&6; }
7098else
7099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7100$as_echo "no" >&6; }
7101fi
7102
7103
7104  test -n "$FILE" && break
7105done
7106
7107    else
7108      # If it succeeded, then it was overridden by the user. We will use it
7109      # for the tool.
7110
7111      # First remove it from the list of overridden variables, so we can test
7112      # for unknown variables in the end.
7113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7114
7115      # Check if the provided tool contains a complete path.
7116      tool_specified="$FILE"
7117      tool_basename="${tool_specified##*/}"
7118      if test "x$tool_basename" = "x$tool_specified"; then
7119        # A command without a complete path is provided, search $PATH.
7120        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7121$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7122        # Extract the first word of "$tool_basename", so it can be a program name with args.
7123set dummy $tool_basename; ac_word=$2
7124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7125$as_echo_n "checking for $ac_word... " >&6; }
7126if ${ac_cv_path_FILE+:} false; then :
7127  $as_echo_n "(cached) " >&6
7128else
7129  case $FILE in
7130  [\\/]* | ?:[\\/]*)
7131  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7132  ;;
7133  *)
7134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7135for as_dir in $PATH
7136do
7137  IFS=$as_save_IFS
7138  test -z "$as_dir" && as_dir=.
7139    for ac_exec_ext in '' $ac_executable_extensions; do
7140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7141    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7143    break 2
7144  fi
7145done
7146  done
7147IFS=$as_save_IFS
7148
7149  ;;
7150esac
7151fi
7152FILE=$ac_cv_path_FILE
7153if test -n "$FILE"; then
7154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7155$as_echo "$FILE" >&6; }
7156else
7157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7158$as_echo "no" >&6; }
7159fi
7160
7161
7162        if test "x$FILE" = x; then
7163          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7164        fi
7165      else
7166        # Otherwise we believe it is a complete path. Use it as it is.
7167        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7168$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7169        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7170$as_echo_n "checking for FILE... " >&6; }
7171        if test ! -x "$tool_specified"; then
7172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7173$as_echo "not found" >&6; }
7174          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7175        fi
7176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7177$as_echo "$tool_specified" >&6; }
7178      fi
7179    fi
7180  fi
7181
7182
7183
7184  if test "x$FILE" = x; then
7185    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7186  fi
7187
7188
7189
7190
7191
7192  # Publish this variable in the help.
7193
7194
7195  if test "x$FIND" = x; then
7196    # The variable is not set by user, try to locate tool using the code snippet
7197    for ac_prog in find
7198do
7199  # Extract the first word of "$ac_prog", so it can be a program name with args.
7200set dummy $ac_prog; ac_word=$2
7201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7202$as_echo_n "checking for $ac_word... " >&6; }
7203if ${ac_cv_path_FIND+:} false; then :
7204  $as_echo_n "(cached) " >&6
7205else
7206  case $FIND in
7207  [\\/]* | ?:[\\/]*)
7208  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7209  ;;
7210  *)
7211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7212for as_dir in $PATH
7213do
7214  IFS=$as_save_IFS
7215  test -z "$as_dir" && as_dir=.
7216    for ac_exec_ext in '' $ac_executable_extensions; do
7217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7218    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7220    break 2
7221  fi
7222done
7223  done
7224IFS=$as_save_IFS
7225
7226  ;;
7227esac
7228fi
7229FIND=$ac_cv_path_FIND
7230if test -n "$FIND"; then
7231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7232$as_echo "$FIND" >&6; }
7233else
7234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7235$as_echo "no" >&6; }
7236fi
7237
7238
7239  test -n "$FIND" && break
7240done
7241
7242  else
7243    # The variable is set, but is it from the command line or the environment?
7244
7245    # Try to remove the string !FIND! from our list.
7246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7248      # If it failed, the variable was not from the command line. Ignore it,
7249      # but warn the user (except for BASH, which is always set by the calling BASH).
7250      if test "xFIND" != xBASH; then
7251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7252$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7253      fi
7254      # Try to locate tool using the code snippet
7255      for ac_prog in find
7256do
7257  # Extract the first word of "$ac_prog", so it can be a program name with args.
7258set dummy $ac_prog; ac_word=$2
7259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7260$as_echo_n "checking for $ac_word... " >&6; }
7261if ${ac_cv_path_FIND+:} false; then :
7262  $as_echo_n "(cached) " >&6
7263else
7264  case $FIND in
7265  [\\/]* | ?:[\\/]*)
7266  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7267  ;;
7268  *)
7269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7270for as_dir in $PATH
7271do
7272  IFS=$as_save_IFS
7273  test -z "$as_dir" && as_dir=.
7274    for ac_exec_ext in '' $ac_executable_extensions; do
7275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7276    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7278    break 2
7279  fi
7280done
7281  done
7282IFS=$as_save_IFS
7283
7284  ;;
7285esac
7286fi
7287FIND=$ac_cv_path_FIND
7288if test -n "$FIND"; then
7289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7290$as_echo "$FIND" >&6; }
7291else
7292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7293$as_echo "no" >&6; }
7294fi
7295
7296
7297  test -n "$FIND" && break
7298done
7299
7300    else
7301      # If it succeeded, then it was overridden by the user. We will use it
7302      # for the tool.
7303
7304      # First remove it from the list of overridden variables, so we can test
7305      # for unknown variables in the end.
7306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7307
7308      # Check if the provided tool contains a complete path.
7309      tool_specified="$FIND"
7310      tool_basename="${tool_specified##*/}"
7311      if test "x$tool_basename" = "x$tool_specified"; then
7312        # A command without a complete path is provided, search $PATH.
7313        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7314$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7315        # Extract the first word of "$tool_basename", so it can be a program name with args.
7316set dummy $tool_basename; ac_word=$2
7317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7318$as_echo_n "checking for $ac_word... " >&6; }
7319if ${ac_cv_path_FIND+:} false; then :
7320  $as_echo_n "(cached) " >&6
7321else
7322  case $FIND in
7323  [\\/]* | ?:[\\/]*)
7324  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7325  ;;
7326  *)
7327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7328for as_dir in $PATH
7329do
7330  IFS=$as_save_IFS
7331  test -z "$as_dir" && as_dir=.
7332    for ac_exec_ext in '' $ac_executable_extensions; do
7333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7334    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7336    break 2
7337  fi
7338done
7339  done
7340IFS=$as_save_IFS
7341
7342  ;;
7343esac
7344fi
7345FIND=$ac_cv_path_FIND
7346if test -n "$FIND"; then
7347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7348$as_echo "$FIND" >&6; }
7349else
7350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7351$as_echo "no" >&6; }
7352fi
7353
7354
7355        if test "x$FIND" = x; then
7356          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7357        fi
7358      else
7359        # Otherwise we believe it is a complete path. Use it as it is.
7360        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7361$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7363$as_echo_n "checking for FIND... " >&6; }
7364        if test ! -x "$tool_specified"; then
7365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7366$as_echo "not found" >&6; }
7367          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7368        fi
7369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7370$as_echo "$tool_specified" >&6; }
7371      fi
7372    fi
7373  fi
7374
7375
7376
7377  if test "x$FIND" = x; then
7378    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7379  fi
7380
7381
7382
7383
7384
7385  # Publish this variable in the help.
7386
7387
7388  if test "x$HEAD" = x; then
7389    # The variable is not set by user, try to locate tool using the code snippet
7390    for ac_prog in head
7391do
7392  # Extract the first word of "$ac_prog", so it can be a program name with args.
7393set dummy $ac_prog; ac_word=$2
7394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7395$as_echo_n "checking for $ac_word... " >&6; }
7396if ${ac_cv_path_HEAD+:} false; then :
7397  $as_echo_n "(cached) " >&6
7398else
7399  case $HEAD in
7400  [\\/]* | ?:[\\/]*)
7401  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7402  ;;
7403  *)
7404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7405for as_dir in $PATH
7406do
7407  IFS=$as_save_IFS
7408  test -z "$as_dir" && as_dir=.
7409    for ac_exec_ext in '' $ac_executable_extensions; do
7410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7411    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7413    break 2
7414  fi
7415done
7416  done
7417IFS=$as_save_IFS
7418
7419  ;;
7420esac
7421fi
7422HEAD=$ac_cv_path_HEAD
7423if test -n "$HEAD"; then
7424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7425$as_echo "$HEAD" >&6; }
7426else
7427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7428$as_echo "no" >&6; }
7429fi
7430
7431
7432  test -n "$HEAD" && break
7433done
7434
7435  else
7436    # The variable is set, but is it from the command line or the environment?
7437
7438    # Try to remove the string !HEAD! from our list.
7439    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7440    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7441      # If it failed, the variable was not from the command line. Ignore it,
7442      # but warn the user (except for BASH, which is always set by the calling BASH).
7443      if test "xHEAD" != xBASH; then
7444        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7445$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7446      fi
7447      # Try to locate tool using the code snippet
7448      for ac_prog in head
7449do
7450  # Extract the first word of "$ac_prog", so it can be a program name with args.
7451set dummy $ac_prog; ac_word=$2
7452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7453$as_echo_n "checking for $ac_word... " >&6; }
7454if ${ac_cv_path_HEAD+:} false; then :
7455  $as_echo_n "(cached) " >&6
7456else
7457  case $HEAD in
7458  [\\/]* | ?:[\\/]*)
7459  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7460  ;;
7461  *)
7462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7463for as_dir in $PATH
7464do
7465  IFS=$as_save_IFS
7466  test -z "$as_dir" && as_dir=.
7467    for ac_exec_ext in '' $ac_executable_extensions; do
7468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7469    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7471    break 2
7472  fi
7473done
7474  done
7475IFS=$as_save_IFS
7476
7477  ;;
7478esac
7479fi
7480HEAD=$ac_cv_path_HEAD
7481if test -n "$HEAD"; then
7482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7483$as_echo "$HEAD" >&6; }
7484else
7485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7486$as_echo "no" >&6; }
7487fi
7488
7489
7490  test -n "$HEAD" && break
7491done
7492
7493    else
7494      # If it succeeded, then it was overridden by the user. We will use it
7495      # for the tool.
7496
7497      # First remove it from the list of overridden variables, so we can test
7498      # for unknown variables in the end.
7499      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7500
7501      # Check if the provided tool contains a complete path.
7502      tool_specified="$HEAD"
7503      tool_basename="${tool_specified##*/}"
7504      if test "x$tool_basename" = "x$tool_specified"; then
7505        # A command without a complete path is provided, search $PATH.
7506        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7507$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7508        # Extract the first word of "$tool_basename", so it can be a program name with args.
7509set dummy $tool_basename; ac_word=$2
7510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7511$as_echo_n "checking for $ac_word... " >&6; }
7512if ${ac_cv_path_HEAD+:} false; then :
7513  $as_echo_n "(cached) " >&6
7514else
7515  case $HEAD in
7516  [\\/]* | ?:[\\/]*)
7517  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7518  ;;
7519  *)
7520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7521for as_dir in $PATH
7522do
7523  IFS=$as_save_IFS
7524  test -z "$as_dir" && as_dir=.
7525    for ac_exec_ext in '' $ac_executable_extensions; do
7526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7527    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7529    break 2
7530  fi
7531done
7532  done
7533IFS=$as_save_IFS
7534
7535  ;;
7536esac
7537fi
7538HEAD=$ac_cv_path_HEAD
7539if test -n "$HEAD"; then
7540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7541$as_echo "$HEAD" >&6; }
7542else
7543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7544$as_echo "no" >&6; }
7545fi
7546
7547
7548        if test "x$HEAD" = x; then
7549          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7550        fi
7551      else
7552        # Otherwise we believe it is a complete path. Use it as it is.
7553        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7554$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7555        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7556$as_echo_n "checking for HEAD... " >&6; }
7557        if test ! -x "$tool_specified"; then
7558          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7559$as_echo "not found" >&6; }
7560          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7561        fi
7562        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7563$as_echo "$tool_specified" >&6; }
7564      fi
7565    fi
7566  fi
7567
7568
7569
7570  if test "x$HEAD" = x; then
7571    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7572  fi
7573
7574
7575
7576
7577
7578  # Publish this variable in the help.
7579
7580
7581  if test "x$LN" = x; then
7582    # The variable is not set by user, try to locate tool using the code snippet
7583    for ac_prog in ln
7584do
7585  # Extract the first word of "$ac_prog", so it can be a program name with args.
7586set dummy $ac_prog; ac_word=$2
7587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7588$as_echo_n "checking for $ac_word... " >&6; }
7589if ${ac_cv_path_LN+:} false; then :
7590  $as_echo_n "(cached) " >&6
7591else
7592  case $LN in
7593  [\\/]* | ?:[\\/]*)
7594  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7595  ;;
7596  *)
7597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7598for as_dir in $PATH
7599do
7600  IFS=$as_save_IFS
7601  test -z "$as_dir" && as_dir=.
7602    for ac_exec_ext in '' $ac_executable_extensions; do
7603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7604    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7606    break 2
7607  fi
7608done
7609  done
7610IFS=$as_save_IFS
7611
7612  ;;
7613esac
7614fi
7615LN=$ac_cv_path_LN
7616if test -n "$LN"; then
7617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7618$as_echo "$LN" >&6; }
7619else
7620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7621$as_echo "no" >&6; }
7622fi
7623
7624
7625  test -n "$LN" && break
7626done
7627
7628  else
7629    # The variable is set, but is it from the command line or the environment?
7630
7631    # Try to remove the string !LN! from our list.
7632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7634      # If it failed, the variable was not from the command line. Ignore it,
7635      # but warn the user (except for BASH, which is always set by the calling BASH).
7636      if test "xLN" != xBASH; then
7637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7638$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7639      fi
7640      # Try to locate tool using the code snippet
7641      for ac_prog in ln
7642do
7643  # Extract the first word of "$ac_prog", so it can be a program name with args.
7644set dummy $ac_prog; ac_word=$2
7645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7646$as_echo_n "checking for $ac_word... " >&6; }
7647if ${ac_cv_path_LN+:} false; then :
7648  $as_echo_n "(cached) " >&6
7649else
7650  case $LN in
7651  [\\/]* | ?:[\\/]*)
7652  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7653  ;;
7654  *)
7655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7656for as_dir in $PATH
7657do
7658  IFS=$as_save_IFS
7659  test -z "$as_dir" && as_dir=.
7660    for ac_exec_ext in '' $ac_executable_extensions; do
7661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7662    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7664    break 2
7665  fi
7666done
7667  done
7668IFS=$as_save_IFS
7669
7670  ;;
7671esac
7672fi
7673LN=$ac_cv_path_LN
7674if test -n "$LN"; then
7675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7676$as_echo "$LN" >&6; }
7677else
7678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7679$as_echo "no" >&6; }
7680fi
7681
7682
7683  test -n "$LN" && break
7684done
7685
7686    else
7687      # If it succeeded, then it was overridden by the user. We will use it
7688      # for the tool.
7689
7690      # First remove it from the list of overridden variables, so we can test
7691      # for unknown variables in the end.
7692      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7693
7694      # Check if the provided tool contains a complete path.
7695      tool_specified="$LN"
7696      tool_basename="${tool_specified##*/}"
7697      if test "x$tool_basename" = "x$tool_specified"; then
7698        # A command without a complete path is provided, search $PATH.
7699        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7700$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7701        # Extract the first word of "$tool_basename", so it can be a program name with args.
7702set dummy $tool_basename; ac_word=$2
7703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7704$as_echo_n "checking for $ac_word... " >&6; }
7705if ${ac_cv_path_LN+:} false; then :
7706  $as_echo_n "(cached) " >&6
7707else
7708  case $LN in
7709  [\\/]* | ?:[\\/]*)
7710  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7711  ;;
7712  *)
7713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7714for as_dir in $PATH
7715do
7716  IFS=$as_save_IFS
7717  test -z "$as_dir" && as_dir=.
7718    for ac_exec_ext in '' $ac_executable_extensions; do
7719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7720    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7722    break 2
7723  fi
7724done
7725  done
7726IFS=$as_save_IFS
7727
7728  ;;
7729esac
7730fi
7731LN=$ac_cv_path_LN
7732if test -n "$LN"; then
7733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7734$as_echo "$LN" >&6; }
7735else
7736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7737$as_echo "no" >&6; }
7738fi
7739
7740
7741        if test "x$LN" = x; then
7742          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7743        fi
7744      else
7745        # Otherwise we believe it is a complete path. Use it as it is.
7746        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7747$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7749$as_echo_n "checking for LN... " >&6; }
7750        if test ! -x "$tool_specified"; then
7751          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7752$as_echo "not found" >&6; }
7753          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7754        fi
7755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7756$as_echo "$tool_specified" >&6; }
7757      fi
7758    fi
7759  fi
7760
7761
7762
7763  if test "x$LN" = x; then
7764    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7765  fi
7766
7767
7768
7769
7770
7771  # Publish this variable in the help.
7772
7773
7774  if test "x$LS" = x; then
7775    # The variable is not set by user, try to locate tool using the code snippet
7776    for ac_prog in ls
7777do
7778  # Extract the first word of "$ac_prog", so it can be a program name with args.
7779set dummy $ac_prog; ac_word=$2
7780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7781$as_echo_n "checking for $ac_word... " >&6; }
7782if ${ac_cv_path_LS+:} false; then :
7783  $as_echo_n "(cached) " >&6
7784else
7785  case $LS in
7786  [\\/]* | ?:[\\/]*)
7787  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7788  ;;
7789  *)
7790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7791for as_dir in $PATH
7792do
7793  IFS=$as_save_IFS
7794  test -z "$as_dir" && as_dir=.
7795    for ac_exec_ext in '' $ac_executable_extensions; do
7796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7797    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7799    break 2
7800  fi
7801done
7802  done
7803IFS=$as_save_IFS
7804
7805  ;;
7806esac
7807fi
7808LS=$ac_cv_path_LS
7809if test -n "$LS"; then
7810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7811$as_echo "$LS" >&6; }
7812else
7813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7814$as_echo "no" >&6; }
7815fi
7816
7817
7818  test -n "$LS" && break
7819done
7820
7821  else
7822    # The variable is set, but is it from the command line or the environment?
7823
7824    # Try to remove the string !LS! from our list.
7825    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7826    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7827      # If it failed, the variable was not from the command line. Ignore it,
7828      # but warn the user (except for BASH, which is always set by the calling BASH).
7829      if test "xLS" != xBASH; then
7830        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7831$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7832      fi
7833      # Try to locate tool using the code snippet
7834      for ac_prog in ls
7835do
7836  # Extract the first word of "$ac_prog", so it can be a program name with args.
7837set dummy $ac_prog; ac_word=$2
7838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7839$as_echo_n "checking for $ac_word... " >&6; }
7840if ${ac_cv_path_LS+:} false; then :
7841  $as_echo_n "(cached) " >&6
7842else
7843  case $LS in
7844  [\\/]* | ?:[\\/]*)
7845  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7846  ;;
7847  *)
7848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7849for as_dir in $PATH
7850do
7851  IFS=$as_save_IFS
7852  test -z "$as_dir" && as_dir=.
7853    for ac_exec_ext in '' $ac_executable_extensions; do
7854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7855    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7857    break 2
7858  fi
7859done
7860  done
7861IFS=$as_save_IFS
7862
7863  ;;
7864esac
7865fi
7866LS=$ac_cv_path_LS
7867if test -n "$LS"; then
7868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7869$as_echo "$LS" >&6; }
7870else
7871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7872$as_echo "no" >&6; }
7873fi
7874
7875
7876  test -n "$LS" && break
7877done
7878
7879    else
7880      # If it succeeded, then it was overridden by the user. We will use it
7881      # for the tool.
7882
7883      # First remove it from the list of overridden variables, so we can test
7884      # for unknown variables in the end.
7885      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7886
7887      # Check if the provided tool contains a complete path.
7888      tool_specified="$LS"
7889      tool_basename="${tool_specified##*/}"
7890      if test "x$tool_basename" = "x$tool_specified"; then
7891        # A command without a complete path is provided, search $PATH.
7892        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7893$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7894        # Extract the first word of "$tool_basename", so it can be a program name with args.
7895set dummy $tool_basename; ac_word=$2
7896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7897$as_echo_n "checking for $ac_word... " >&6; }
7898if ${ac_cv_path_LS+:} false; then :
7899  $as_echo_n "(cached) " >&6
7900else
7901  case $LS in
7902  [\\/]* | ?:[\\/]*)
7903  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7904  ;;
7905  *)
7906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7907for as_dir in $PATH
7908do
7909  IFS=$as_save_IFS
7910  test -z "$as_dir" && as_dir=.
7911    for ac_exec_ext in '' $ac_executable_extensions; do
7912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7913    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7915    break 2
7916  fi
7917done
7918  done
7919IFS=$as_save_IFS
7920
7921  ;;
7922esac
7923fi
7924LS=$ac_cv_path_LS
7925if test -n "$LS"; then
7926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7927$as_echo "$LS" >&6; }
7928else
7929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7930$as_echo "no" >&6; }
7931fi
7932
7933
7934        if test "x$LS" = x; then
7935          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7936        fi
7937      else
7938        # Otherwise we believe it is a complete path. Use it as it is.
7939        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7940$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7941        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7942$as_echo_n "checking for LS... " >&6; }
7943        if test ! -x "$tool_specified"; then
7944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7945$as_echo "not found" >&6; }
7946          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7947        fi
7948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7949$as_echo "$tool_specified" >&6; }
7950      fi
7951    fi
7952  fi
7953
7954
7955
7956  if test "x$LS" = x; then
7957    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7958  fi
7959
7960
7961
7962
7963
7964  # Publish this variable in the help.
7965
7966
7967  if test "x$MKDIR" = x; then
7968    # The variable is not set by user, try to locate tool using the code snippet
7969    for ac_prog in mkdir
7970do
7971  # Extract the first word of "$ac_prog", so it can be a program name with args.
7972set dummy $ac_prog; ac_word=$2
7973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7974$as_echo_n "checking for $ac_word... " >&6; }
7975if ${ac_cv_path_MKDIR+:} false; then :
7976  $as_echo_n "(cached) " >&6
7977else
7978  case $MKDIR in
7979  [\\/]* | ?:[\\/]*)
7980  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7981  ;;
7982  *)
7983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7984for as_dir in $PATH
7985do
7986  IFS=$as_save_IFS
7987  test -z "$as_dir" && as_dir=.
7988    for ac_exec_ext in '' $ac_executable_extensions; do
7989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7990    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7992    break 2
7993  fi
7994done
7995  done
7996IFS=$as_save_IFS
7997
7998  ;;
7999esac
8000fi
8001MKDIR=$ac_cv_path_MKDIR
8002if test -n "$MKDIR"; then
8003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8004$as_echo "$MKDIR" >&6; }
8005else
8006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8007$as_echo "no" >&6; }
8008fi
8009
8010
8011  test -n "$MKDIR" && break
8012done
8013
8014  else
8015    # The variable is set, but is it from the command line or the environment?
8016
8017    # Try to remove the string !MKDIR! from our list.
8018    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8019    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8020      # If it failed, the variable was not from the command line. Ignore it,
8021      # but warn the user (except for BASH, which is always set by the calling BASH).
8022      if test "xMKDIR" != xBASH; then
8023        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8024$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8025      fi
8026      # Try to locate tool using the code snippet
8027      for ac_prog in mkdir
8028do
8029  # Extract the first word of "$ac_prog", so it can be a program name with args.
8030set dummy $ac_prog; ac_word=$2
8031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8032$as_echo_n "checking for $ac_word... " >&6; }
8033if ${ac_cv_path_MKDIR+:} false; then :
8034  $as_echo_n "(cached) " >&6
8035else
8036  case $MKDIR in
8037  [\\/]* | ?:[\\/]*)
8038  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8039  ;;
8040  *)
8041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8042for as_dir in $PATH
8043do
8044  IFS=$as_save_IFS
8045  test -z "$as_dir" && as_dir=.
8046    for ac_exec_ext in '' $ac_executable_extensions; do
8047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8048    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8050    break 2
8051  fi
8052done
8053  done
8054IFS=$as_save_IFS
8055
8056  ;;
8057esac
8058fi
8059MKDIR=$ac_cv_path_MKDIR
8060if test -n "$MKDIR"; then
8061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8062$as_echo "$MKDIR" >&6; }
8063else
8064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8065$as_echo "no" >&6; }
8066fi
8067
8068
8069  test -n "$MKDIR" && break
8070done
8071
8072    else
8073      # If it succeeded, then it was overridden by the user. We will use it
8074      # for the tool.
8075
8076      # First remove it from the list of overridden variables, so we can test
8077      # for unknown variables in the end.
8078      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8079
8080      # Check if the provided tool contains a complete path.
8081      tool_specified="$MKDIR"
8082      tool_basename="${tool_specified##*/}"
8083      if test "x$tool_basename" = "x$tool_specified"; then
8084        # A command without a complete path is provided, search $PATH.
8085        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8086$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8087        # Extract the first word of "$tool_basename", so it can be a program name with args.
8088set dummy $tool_basename; ac_word=$2
8089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8090$as_echo_n "checking for $ac_word... " >&6; }
8091if ${ac_cv_path_MKDIR+:} false; then :
8092  $as_echo_n "(cached) " >&6
8093else
8094  case $MKDIR in
8095  [\\/]* | ?:[\\/]*)
8096  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8097  ;;
8098  *)
8099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8100for as_dir in $PATH
8101do
8102  IFS=$as_save_IFS
8103  test -z "$as_dir" && as_dir=.
8104    for ac_exec_ext in '' $ac_executable_extensions; do
8105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8106    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8108    break 2
8109  fi
8110done
8111  done
8112IFS=$as_save_IFS
8113
8114  ;;
8115esac
8116fi
8117MKDIR=$ac_cv_path_MKDIR
8118if test -n "$MKDIR"; then
8119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8120$as_echo "$MKDIR" >&6; }
8121else
8122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8123$as_echo "no" >&6; }
8124fi
8125
8126
8127        if test "x$MKDIR" = x; then
8128          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8129        fi
8130      else
8131        # Otherwise we believe it is a complete path. Use it as it is.
8132        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8133$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8135$as_echo_n "checking for MKDIR... " >&6; }
8136        if test ! -x "$tool_specified"; then
8137          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8138$as_echo "not found" >&6; }
8139          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8140        fi
8141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8142$as_echo "$tool_specified" >&6; }
8143      fi
8144    fi
8145  fi
8146
8147
8148
8149  if test "x$MKDIR" = x; then
8150    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8151  fi
8152
8153
8154
8155
8156
8157  # Publish this variable in the help.
8158
8159
8160  if test "x$MKTEMP" = x; then
8161    # The variable is not set by user, try to locate tool using the code snippet
8162    for ac_prog in mktemp
8163do
8164  # Extract the first word of "$ac_prog", so it can be a program name with args.
8165set dummy $ac_prog; ac_word=$2
8166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8167$as_echo_n "checking for $ac_word... " >&6; }
8168if ${ac_cv_path_MKTEMP+:} false; then :
8169  $as_echo_n "(cached) " >&6
8170else
8171  case $MKTEMP in
8172  [\\/]* | ?:[\\/]*)
8173  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8174  ;;
8175  *)
8176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8177for as_dir in $PATH
8178do
8179  IFS=$as_save_IFS
8180  test -z "$as_dir" && as_dir=.
8181    for ac_exec_ext in '' $ac_executable_extensions; do
8182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8183    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8185    break 2
8186  fi
8187done
8188  done
8189IFS=$as_save_IFS
8190
8191  ;;
8192esac
8193fi
8194MKTEMP=$ac_cv_path_MKTEMP
8195if test -n "$MKTEMP"; then
8196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8197$as_echo "$MKTEMP" >&6; }
8198else
8199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8200$as_echo "no" >&6; }
8201fi
8202
8203
8204  test -n "$MKTEMP" && break
8205done
8206
8207  else
8208    # The variable is set, but is it from the command line or the environment?
8209
8210    # Try to remove the string !MKTEMP! from our list.
8211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8213      # If it failed, the variable was not from the command line. Ignore it,
8214      # but warn the user (except for BASH, which is always set by the calling BASH).
8215      if test "xMKTEMP" != xBASH; then
8216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8217$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8218      fi
8219      # Try to locate tool using the code snippet
8220      for ac_prog in mktemp
8221do
8222  # Extract the first word of "$ac_prog", so it can be a program name with args.
8223set dummy $ac_prog; ac_word=$2
8224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8225$as_echo_n "checking for $ac_word... " >&6; }
8226if ${ac_cv_path_MKTEMP+:} false; then :
8227  $as_echo_n "(cached) " >&6
8228else
8229  case $MKTEMP in
8230  [\\/]* | ?:[\\/]*)
8231  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8232  ;;
8233  *)
8234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8235for as_dir in $PATH
8236do
8237  IFS=$as_save_IFS
8238  test -z "$as_dir" && as_dir=.
8239    for ac_exec_ext in '' $ac_executable_extensions; do
8240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8241    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8243    break 2
8244  fi
8245done
8246  done
8247IFS=$as_save_IFS
8248
8249  ;;
8250esac
8251fi
8252MKTEMP=$ac_cv_path_MKTEMP
8253if test -n "$MKTEMP"; then
8254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8255$as_echo "$MKTEMP" >&6; }
8256else
8257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8258$as_echo "no" >&6; }
8259fi
8260
8261
8262  test -n "$MKTEMP" && break
8263done
8264
8265    else
8266      # If it succeeded, then it was overridden by the user. We will use it
8267      # for the tool.
8268
8269      # First remove it from the list of overridden variables, so we can test
8270      # for unknown variables in the end.
8271      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8272
8273      # Check if the provided tool contains a complete path.
8274      tool_specified="$MKTEMP"
8275      tool_basename="${tool_specified##*/}"
8276      if test "x$tool_basename" = "x$tool_specified"; then
8277        # A command without a complete path is provided, search $PATH.
8278        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8279$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8280        # Extract the first word of "$tool_basename", so it can be a program name with args.
8281set dummy $tool_basename; ac_word=$2
8282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8283$as_echo_n "checking for $ac_word... " >&6; }
8284if ${ac_cv_path_MKTEMP+:} false; then :
8285  $as_echo_n "(cached) " >&6
8286else
8287  case $MKTEMP in
8288  [\\/]* | ?:[\\/]*)
8289  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8290  ;;
8291  *)
8292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8293for as_dir in $PATH
8294do
8295  IFS=$as_save_IFS
8296  test -z "$as_dir" && as_dir=.
8297    for ac_exec_ext in '' $ac_executable_extensions; do
8298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8299    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8301    break 2
8302  fi
8303done
8304  done
8305IFS=$as_save_IFS
8306
8307  ;;
8308esac
8309fi
8310MKTEMP=$ac_cv_path_MKTEMP
8311if test -n "$MKTEMP"; then
8312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8313$as_echo "$MKTEMP" >&6; }
8314else
8315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8316$as_echo "no" >&6; }
8317fi
8318
8319
8320        if test "x$MKTEMP" = x; then
8321          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8322        fi
8323      else
8324        # Otherwise we believe it is a complete path. Use it as it is.
8325        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8326$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8327        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8328$as_echo_n "checking for MKTEMP... " >&6; }
8329        if test ! -x "$tool_specified"; then
8330          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8331$as_echo "not found" >&6; }
8332          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8333        fi
8334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8335$as_echo "$tool_specified" >&6; }
8336      fi
8337    fi
8338  fi
8339
8340
8341
8342  if test "x$MKTEMP" = x; then
8343    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8344  fi
8345
8346
8347
8348
8349
8350  # Publish this variable in the help.
8351
8352
8353  if test "x$MV" = x; then
8354    # The variable is not set by user, try to locate tool using the code snippet
8355    for ac_prog in mv
8356do
8357  # Extract the first word of "$ac_prog", so it can be a program name with args.
8358set dummy $ac_prog; ac_word=$2
8359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8360$as_echo_n "checking for $ac_word... " >&6; }
8361if ${ac_cv_path_MV+:} false; then :
8362  $as_echo_n "(cached) " >&6
8363else
8364  case $MV in
8365  [\\/]* | ?:[\\/]*)
8366  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8367  ;;
8368  *)
8369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8370for as_dir in $PATH
8371do
8372  IFS=$as_save_IFS
8373  test -z "$as_dir" && as_dir=.
8374    for ac_exec_ext in '' $ac_executable_extensions; do
8375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8376    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8378    break 2
8379  fi
8380done
8381  done
8382IFS=$as_save_IFS
8383
8384  ;;
8385esac
8386fi
8387MV=$ac_cv_path_MV
8388if test -n "$MV"; then
8389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8390$as_echo "$MV" >&6; }
8391else
8392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8393$as_echo "no" >&6; }
8394fi
8395
8396
8397  test -n "$MV" && break
8398done
8399
8400  else
8401    # The variable is set, but is it from the command line or the environment?
8402
8403    # Try to remove the string !MV! from our list.
8404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8406      # If it failed, the variable was not from the command line. Ignore it,
8407      # but warn the user (except for BASH, which is always set by the calling BASH).
8408      if test "xMV" != xBASH; then
8409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8410$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8411      fi
8412      # Try to locate tool using the code snippet
8413      for ac_prog in mv
8414do
8415  # Extract the first word of "$ac_prog", so it can be a program name with args.
8416set dummy $ac_prog; ac_word=$2
8417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8418$as_echo_n "checking for $ac_word... " >&6; }
8419if ${ac_cv_path_MV+:} false; then :
8420  $as_echo_n "(cached) " >&6
8421else
8422  case $MV in
8423  [\\/]* | ?:[\\/]*)
8424  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8425  ;;
8426  *)
8427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8428for as_dir in $PATH
8429do
8430  IFS=$as_save_IFS
8431  test -z "$as_dir" && as_dir=.
8432    for ac_exec_ext in '' $ac_executable_extensions; do
8433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8434    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8436    break 2
8437  fi
8438done
8439  done
8440IFS=$as_save_IFS
8441
8442  ;;
8443esac
8444fi
8445MV=$ac_cv_path_MV
8446if test -n "$MV"; then
8447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8448$as_echo "$MV" >&6; }
8449else
8450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8451$as_echo "no" >&6; }
8452fi
8453
8454
8455  test -n "$MV" && break
8456done
8457
8458    else
8459      # If it succeeded, then it was overridden by the user. We will use it
8460      # for the tool.
8461
8462      # First remove it from the list of overridden variables, so we can test
8463      # for unknown variables in the end.
8464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8465
8466      # Check if the provided tool contains a complete path.
8467      tool_specified="$MV"
8468      tool_basename="${tool_specified##*/}"
8469      if test "x$tool_basename" = "x$tool_specified"; then
8470        # A command without a complete path is provided, search $PATH.
8471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8472$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8473        # Extract the first word of "$tool_basename", so it can be a program name with args.
8474set dummy $tool_basename; ac_word=$2
8475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8476$as_echo_n "checking for $ac_word... " >&6; }
8477if ${ac_cv_path_MV+:} false; then :
8478  $as_echo_n "(cached) " >&6
8479else
8480  case $MV in
8481  [\\/]* | ?:[\\/]*)
8482  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8483  ;;
8484  *)
8485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8486for as_dir in $PATH
8487do
8488  IFS=$as_save_IFS
8489  test -z "$as_dir" && as_dir=.
8490    for ac_exec_ext in '' $ac_executable_extensions; do
8491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8492    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8494    break 2
8495  fi
8496done
8497  done
8498IFS=$as_save_IFS
8499
8500  ;;
8501esac
8502fi
8503MV=$ac_cv_path_MV
8504if test -n "$MV"; then
8505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8506$as_echo "$MV" >&6; }
8507else
8508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8509$as_echo "no" >&6; }
8510fi
8511
8512
8513        if test "x$MV" = x; then
8514          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8515        fi
8516      else
8517        # Otherwise we believe it is a complete path. Use it as it is.
8518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8519$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8521$as_echo_n "checking for MV... " >&6; }
8522        if test ! -x "$tool_specified"; then
8523          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8524$as_echo "not found" >&6; }
8525          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8526        fi
8527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8528$as_echo "$tool_specified" >&6; }
8529      fi
8530    fi
8531  fi
8532
8533
8534
8535  if test "x$MV" = x; then
8536    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8537  fi
8538
8539
8540
8541
8542
8543  # Publish this variable in the help.
8544
8545
8546  if test "x$NAWK" = x; then
8547    # The variable is not set by user, try to locate tool using the code snippet
8548    for ac_prog in nawk gawk awk
8549do
8550  # Extract the first word of "$ac_prog", so it can be a program name with args.
8551set dummy $ac_prog; ac_word=$2
8552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8553$as_echo_n "checking for $ac_word... " >&6; }
8554if ${ac_cv_path_NAWK+:} false; then :
8555  $as_echo_n "(cached) " >&6
8556else
8557  case $NAWK in
8558  [\\/]* | ?:[\\/]*)
8559  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8560  ;;
8561  *)
8562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8563for as_dir in $PATH
8564do
8565  IFS=$as_save_IFS
8566  test -z "$as_dir" && as_dir=.
8567    for ac_exec_ext in '' $ac_executable_extensions; do
8568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8569    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8571    break 2
8572  fi
8573done
8574  done
8575IFS=$as_save_IFS
8576
8577  ;;
8578esac
8579fi
8580NAWK=$ac_cv_path_NAWK
8581if test -n "$NAWK"; then
8582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8583$as_echo "$NAWK" >&6; }
8584else
8585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8586$as_echo "no" >&6; }
8587fi
8588
8589
8590  test -n "$NAWK" && break
8591done
8592
8593  else
8594    # The variable is set, but is it from the command line or the environment?
8595
8596    # Try to remove the string !NAWK! from our list.
8597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8599      # If it failed, the variable was not from the command line. Ignore it,
8600      # but warn the user (except for BASH, which is always set by the calling BASH).
8601      if test "xNAWK" != xBASH; then
8602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8603$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8604      fi
8605      # Try to locate tool using the code snippet
8606      for ac_prog in nawk gawk awk
8607do
8608  # Extract the first word of "$ac_prog", so it can be a program name with args.
8609set dummy $ac_prog; ac_word=$2
8610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8611$as_echo_n "checking for $ac_word... " >&6; }
8612if ${ac_cv_path_NAWK+:} false; then :
8613  $as_echo_n "(cached) " >&6
8614else
8615  case $NAWK in
8616  [\\/]* | ?:[\\/]*)
8617  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8618  ;;
8619  *)
8620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8621for as_dir in $PATH
8622do
8623  IFS=$as_save_IFS
8624  test -z "$as_dir" && as_dir=.
8625    for ac_exec_ext in '' $ac_executable_extensions; do
8626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8627    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8629    break 2
8630  fi
8631done
8632  done
8633IFS=$as_save_IFS
8634
8635  ;;
8636esac
8637fi
8638NAWK=$ac_cv_path_NAWK
8639if test -n "$NAWK"; then
8640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8641$as_echo "$NAWK" >&6; }
8642else
8643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8644$as_echo "no" >&6; }
8645fi
8646
8647
8648  test -n "$NAWK" && break
8649done
8650
8651    else
8652      # If it succeeded, then it was overridden by the user. We will use it
8653      # for the tool.
8654
8655      # First remove it from the list of overridden variables, so we can test
8656      # for unknown variables in the end.
8657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8658
8659      # Check if the provided tool contains a complete path.
8660      tool_specified="$NAWK"
8661      tool_basename="${tool_specified##*/}"
8662      if test "x$tool_basename" = "x$tool_specified"; then
8663        # A command without a complete path is provided, search $PATH.
8664        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8665$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8666        # Extract the first word of "$tool_basename", so it can be a program name with args.
8667set dummy $tool_basename; ac_word=$2
8668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8669$as_echo_n "checking for $ac_word... " >&6; }
8670if ${ac_cv_path_NAWK+:} false; then :
8671  $as_echo_n "(cached) " >&6
8672else
8673  case $NAWK in
8674  [\\/]* | ?:[\\/]*)
8675  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8676  ;;
8677  *)
8678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8679for as_dir in $PATH
8680do
8681  IFS=$as_save_IFS
8682  test -z "$as_dir" && as_dir=.
8683    for ac_exec_ext in '' $ac_executable_extensions; do
8684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8685    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8687    break 2
8688  fi
8689done
8690  done
8691IFS=$as_save_IFS
8692
8693  ;;
8694esac
8695fi
8696NAWK=$ac_cv_path_NAWK
8697if test -n "$NAWK"; then
8698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8699$as_echo "$NAWK" >&6; }
8700else
8701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8702$as_echo "no" >&6; }
8703fi
8704
8705
8706        if test "x$NAWK" = x; then
8707          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8708        fi
8709      else
8710        # Otherwise we believe it is a complete path. Use it as it is.
8711        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8712$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8714$as_echo_n "checking for NAWK... " >&6; }
8715        if test ! -x "$tool_specified"; then
8716          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8717$as_echo "not found" >&6; }
8718          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8719        fi
8720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8721$as_echo "$tool_specified" >&6; }
8722      fi
8723    fi
8724  fi
8725
8726
8727
8728  if test "x$NAWK" = x; then
8729    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8730  fi
8731
8732
8733
8734
8735
8736  # Publish this variable in the help.
8737
8738
8739  if test "x$PRINTF" = x; then
8740    # The variable is not set by user, try to locate tool using the code snippet
8741    for ac_prog in printf
8742do
8743  # Extract the first word of "$ac_prog", so it can be a program name with args.
8744set dummy $ac_prog; ac_word=$2
8745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8746$as_echo_n "checking for $ac_word... " >&6; }
8747if ${ac_cv_path_PRINTF+:} false; then :
8748  $as_echo_n "(cached) " >&6
8749else
8750  case $PRINTF in
8751  [\\/]* | ?:[\\/]*)
8752  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8753  ;;
8754  *)
8755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8756for as_dir in $PATH
8757do
8758  IFS=$as_save_IFS
8759  test -z "$as_dir" && as_dir=.
8760    for ac_exec_ext in '' $ac_executable_extensions; do
8761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8762    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8764    break 2
8765  fi
8766done
8767  done
8768IFS=$as_save_IFS
8769
8770  ;;
8771esac
8772fi
8773PRINTF=$ac_cv_path_PRINTF
8774if test -n "$PRINTF"; then
8775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8776$as_echo "$PRINTF" >&6; }
8777else
8778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8779$as_echo "no" >&6; }
8780fi
8781
8782
8783  test -n "$PRINTF" && break
8784done
8785
8786  else
8787    # The variable is set, but is it from the command line or the environment?
8788
8789    # Try to remove the string !PRINTF! from our list.
8790    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8791    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8792      # If it failed, the variable was not from the command line. Ignore it,
8793      # but warn the user (except for BASH, which is always set by the calling BASH).
8794      if test "xPRINTF" != xBASH; then
8795        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8796$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8797      fi
8798      # Try to locate tool using the code snippet
8799      for ac_prog in printf
8800do
8801  # Extract the first word of "$ac_prog", so it can be a program name with args.
8802set dummy $ac_prog; ac_word=$2
8803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8804$as_echo_n "checking for $ac_word... " >&6; }
8805if ${ac_cv_path_PRINTF+:} false; then :
8806  $as_echo_n "(cached) " >&6
8807else
8808  case $PRINTF in
8809  [\\/]* | ?:[\\/]*)
8810  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8811  ;;
8812  *)
8813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8814for as_dir in $PATH
8815do
8816  IFS=$as_save_IFS
8817  test -z "$as_dir" && as_dir=.
8818    for ac_exec_ext in '' $ac_executable_extensions; do
8819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8820    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8822    break 2
8823  fi
8824done
8825  done
8826IFS=$as_save_IFS
8827
8828  ;;
8829esac
8830fi
8831PRINTF=$ac_cv_path_PRINTF
8832if test -n "$PRINTF"; then
8833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8834$as_echo "$PRINTF" >&6; }
8835else
8836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8837$as_echo "no" >&6; }
8838fi
8839
8840
8841  test -n "$PRINTF" && break
8842done
8843
8844    else
8845      # If it succeeded, then it was overridden by the user. We will use it
8846      # for the tool.
8847
8848      # First remove it from the list of overridden variables, so we can test
8849      # for unknown variables in the end.
8850      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8851
8852      # Check if the provided tool contains a complete path.
8853      tool_specified="$PRINTF"
8854      tool_basename="${tool_specified##*/}"
8855      if test "x$tool_basename" = "x$tool_specified"; then
8856        # A command without a complete path is provided, search $PATH.
8857        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8858$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8859        # Extract the first word of "$tool_basename", so it can be a program name with args.
8860set dummy $tool_basename; ac_word=$2
8861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8862$as_echo_n "checking for $ac_word... " >&6; }
8863if ${ac_cv_path_PRINTF+:} false; then :
8864  $as_echo_n "(cached) " >&6
8865else
8866  case $PRINTF in
8867  [\\/]* | ?:[\\/]*)
8868  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8869  ;;
8870  *)
8871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8872for as_dir in $PATH
8873do
8874  IFS=$as_save_IFS
8875  test -z "$as_dir" && as_dir=.
8876    for ac_exec_ext in '' $ac_executable_extensions; do
8877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8878    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8880    break 2
8881  fi
8882done
8883  done
8884IFS=$as_save_IFS
8885
8886  ;;
8887esac
8888fi
8889PRINTF=$ac_cv_path_PRINTF
8890if test -n "$PRINTF"; then
8891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8892$as_echo "$PRINTF" >&6; }
8893else
8894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8895$as_echo "no" >&6; }
8896fi
8897
8898
8899        if test "x$PRINTF" = x; then
8900          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8901        fi
8902      else
8903        # Otherwise we believe it is a complete path. Use it as it is.
8904        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8905$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8907$as_echo_n "checking for PRINTF... " >&6; }
8908        if test ! -x "$tool_specified"; then
8909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8910$as_echo "not found" >&6; }
8911          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8912        fi
8913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8914$as_echo "$tool_specified" >&6; }
8915      fi
8916    fi
8917  fi
8918
8919
8920
8921  if test "x$PRINTF" = x; then
8922    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8923  fi
8924
8925
8926
8927
8928
8929  # Publish this variable in the help.
8930
8931
8932  if test "x$RM" = x; then
8933    # The variable is not set by user, try to locate tool using the code snippet
8934    for ac_prog in rm
8935do
8936  # Extract the first word of "$ac_prog", so it can be a program name with args.
8937set dummy $ac_prog; ac_word=$2
8938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8939$as_echo_n "checking for $ac_word... " >&6; }
8940if ${ac_cv_path_RM+:} false; then :
8941  $as_echo_n "(cached) " >&6
8942else
8943  case $RM in
8944  [\\/]* | ?:[\\/]*)
8945  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8946  ;;
8947  *)
8948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8949for as_dir in $PATH
8950do
8951  IFS=$as_save_IFS
8952  test -z "$as_dir" && as_dir=.
8953    for ac_exec_ext in '' $ac_executable_extensions; do
8954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8955    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8957    break 2
8958  fi
8959done
8960  done
8961IFS=$as_save_IFS
8962
8963  ;;
8964esac
8965fi
8966RM=$ac_cv_path_RM
8967if test -n "$RM"; then
8968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8969$as_echo "$RM" >&6; }
8970else
8971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8972$as_echo "no" >&6; }
8973fi
8974
8975
8976  test -n "$RM" && break
8977done
8978
8979  else
8980    # The variable is set, but is it from the command line or the environment?
8981
8982    # Try to remove the string !RM! from our list.
8983    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8984    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8985      # If it failed, the variable was not from the command line. Ignore it,
8986      # but warn the user (except for BASH, which is always set by the calling BASH).
8987      if test "xRM" != xBASH; then
8988        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8989$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8990      fi
8991      # Try to locate tool using the code snippet
8992      for ac_prog in rm
8993do
8994  # Extract the first word of "$ac_prog", so it can be a program name with args.
8995set dummy $ac_prog; ac_word=$2
8996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8997$as_echo_n "checking for $ac_word... " >&6; }
8998if ${ac_cv_path_RM+:} false; then :
8999  $as_echo_n "(cached) " >&6
9000else
9001  case $RM in
9002  [\\/]* | ?:[\\/]*)
9003  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9004  ;;
9005  *)
9006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9007for as_dir in $PATH
9008do
9009  IFS=$as_save_IFS
9010  test -z "$as_dir" && as_dir=.
9011    for ac_exec_ext in '' $ac_executable_extensions; do
9012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9013    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9015    break 2
9016  fi
9017done
9018  done
9019IFS=$as_save_IFS
9020
9021  ;;
9022esac
9023fi
9024RM=$ac_cv_path_RM
9025if test -n "$RM"; then
9026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9027$as_echo "$RM" >&6; }
9028else
9029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9030$as_echo "no" >&6; }
9031fi
9032
9033
9034  test -n "$RM" && break
9035done
9036
9037    else
9038      # If it succeeded, then it was overridden by the user. We will use it
9039      # for the tool.
9040
9041      # First remove it from the list of overridden variables, so we can test
9042      # for unknown variables in the end.
9043      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9044
9045      # Check if the provided tool contains a complete path.
9046      tool_specified="$RM"
9047      tool_basename="${tool_specified##*/}"
9048      if test "x$tool_basename" = "x$tool_specified"; then
9049        # A command without a complete path is provided, search $PATH.
9050        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9051$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9052        # Extract the first word of "$tool_basename", so it can be a program name with args.
9053set dummy $tool_basename; ac_word=$2
9054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9055$as_echo_n "checking for $ac_word... " >&6; }
9056if ${ac_cv_path_RM+:} false; then :
9057  $as_echo_n "(cached) " >&6
9058else
9059  case $RM in
9060  [\\/]* | ?:[\\/]*)
9061  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9062  ;;
9063  *)
9064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9065for as_dir in $PATH
9066do
9067  IFS=$as_save_IFS
9068  test -z "$as_dir" && as_dir=.
9069    for ac_exec_ext in '' $ac_executable_extensions; do
9070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9071    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9073    break 2
9074  fi
9075done
9076  done
9077IFS=$as_save_IFS
9078
9079  ;;
9080esac
9081fi
9082RM=$ac_cv_path_RM
9083if test -n "$RM"; then
9084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9085$as_echo "$RM" >&6; }
9086else
9087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9088$as_echo "no" >&6; }
9089fi
9090
9091
9092        if test "x$RM" = x; then
9093          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9094        fi
9095      else
9096        # Otherwise we believe it is a complete path. Use it as it is.
9097        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9098$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9100$as_echo_n "checking for RM... " >&6; }
9101        if test ! -x "$tool_specified"; then
9102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9103$as_echo "not found" >&6; }
9104          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9105        fi
9106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9107$as_echo "$tool_specified" >&6; }
9108      fi
9109    fi
9110  fi
9111
9112
9113
9114  if test "x$RM" = x; then
9115    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9116  fi
9117
9118
9119
9120
9121
9122  # Publish this variable in the help.
9123
9124
9125  if test "x$SH" = x; then
9126    # The variable is not set by user, try to locate tool using the code snippet
9127    for ac_prog in sh
9128do
9129  # Extract the first word of "$ac_prog", so it can be a program name with args.
9130set dummy $ac_prog; ac_word=$2
9131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9132$as_echo_n "checking for $ac_word... " >&6; }
9133if ${ac_cv_path_SH+:} false; then :
9134  $as_echo_n "(cached) " >&6
9135else
9136  case $SH in
9137  [\\/]* | ?:[\\/]*)
9138  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9139  ;;
9140  *)
9141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9142for as_dir in $PATH
9143do
9144  IFS=$as_save_IFS
9145  test -z "$as_dir" && as_dir=.
9146    for ac_exec_ext in '' $ac_executable_extensions; do
9147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9148    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9150    break 2
9151  fi
9152done
9153  done
9154IFS=$as_save_IFS
9155
9156  ;;
9157esac
9158fi
9159SH=$ac_cv_path_SH
9160if test -n "$SH"; then
9161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9162$as_echo "$SH" >&6; }
9163else
9164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9165$as_echo "no" >&6; }
9166fi
9167
9168
9169  test -n "$SH" && break
9170done
9171
9172  else
9173    # The variable is set, but is it from the command line or the environment?
9174
9175    # Try to remove the string !SH! from our list.
9176    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9177    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9178      # If it failed, the variable was not from the command line. Ignore it,
9179      # but warn the user (except for BASH, which is always set by the calling BASH).
9180      if test "xSH" != xBASH; then
9181        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9182$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9183      fi
9184      # Try to locate tool using the code snippet
9185      for ac_prog in sh
9186do
9187  # Extract the first word of "$ac_prog", so it can be a program name with args.
9188set dummy $ac_prog; ac_word=$2
9189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9190$as_echo_n "checking for $ac_word... " >&6; }
9191if ${ac_cv_path_SH+:} false; then :
9192  $as_echo_n "(cached) " >&6
9193else
9194  case $SH in
9195  [\\/]* | ?:[\\/]*)
9196  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9197  ;;
9198  *)
9199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9200for as_dir in $PATH
9201do
9202  IFS=$as_save_IFS
9203  test -z "$as_dir" && as_dir=.
9204    for ac_exec_ext in '' $ac_executable_extensions; do
9205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9206    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9208    break 2
9209  fi
9210done
9211  done
9212IFS=$as_save_IFS
9213
9214  ;;
9215esac
9216fi
9217SH=$ac_cv_path_SH
9218if test -n "$SH"; then
9219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9220$as_echo "$SH" >&6; }
9221else
9222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9223$as_echo "no" >&6; }
9224fi
9225
9226
9227  test -n "$SH" && break
9228done
9229
9230    else
9231      # If it succeeded, then it was overridden by the user. We will use it
9232      # for the tool.
9233
9234      # First remove it from the list of overridden variables, so we can test
9235      # for unknown variables in the end.
9236      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9237
9238      # Check if the provided tool contains a complete path.
9239      tool_specified="$SH"
9240      tool_basename="${tool_specified##*/}"
9241      if test "x$tool_basename" = "x$tool_specified"; then
9242        # A command without a complete path is provided, search $PATH.
9243        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9244$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9245        # Extract the first word of "$tool_basename", so it can be a program name with args.
9246set dummy $tool_basename; ac_word=$2
9247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9248$as_echo_n "checking for $ac_word... " >&6; }
9249if ${ac_cv_path_SH+:} false; then :
9250  $as_echo_n "(cached) " >&6
9251else
9252  case $SH in
9253  [\\/]* | ?:[\\/]*)
9254  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9255  ;;
9256  *)
9257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9258for as_dir in $PATH
9259do
9260  IFS=$as_save_IFS
9261  test -z "$as_dir" && as_dir=.
9262    for ac_exec_ext in '' $ac_executable_extensions; do
9263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9264    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9266    break 2
9267  fi
9268done
9269  done
9270IFS=$as_save_IFS
9271
9272  ;;
9273esac
9274fi
9275SH=$ac_cv_path_SH
9276if test -n "$SH"; then
9277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9278$as_echo "$SH" >&6; }
9279else
9280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9281$as_echo "no" >&6; }
9282fi
9283
9284
9285        if test "x$SH" = x; then
9286          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9287        fi
9288      else
9289        # Otherwise we believe it is a complete path. Use it as it is.
9290        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9291$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9292        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9293$as_echo_n "checking for SH... " >&6; }
9294        if test ! -x "$tool_specified"; then
9295          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9296$as_echo "not found" >&6; }
9297          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9298        fi
9299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9300$as_echo "$tool_specified" >&6; }
9301      fi
9302    fi
9303  fi
9304
9305
9306
9307  if test "x$SH" = x; then
9308    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9309  fi
9310
9311
9312
9313
9314
9315  # Publish this variable in the help.
9316
9317
9318  if test "x$SORT" = x; then
9319    # The variable is not set by user, try to locate tool using the code snippet
9320    for ac_prog in sort
9321do
9322  # Extract the first word of "$ac_prog", so it can be a program name with args.
9323set dummy $ac_prog; ac_word=$2
9324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9325$as_echo_n "checking for $ac_word... " >&6; }
9326if ${ac_cv_path_SORT+:} false; then :
9327  $as_echo_n "(cached) " >&6
9328else
9329  case $SORT in
9330  [\\/]* | ?:[\\/]*)
9331  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9332  ;;
9333  *)
9334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9335for as_dir in $PATH
9336do
9337  IFS=$as_save_IFS
9338  test -z "$as_dir" && as_dir=.
9339    for ac_exec_ext in '' $ac_executable_extensions; do
9340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9341    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9343    break 2
9344  fi
9345done
9346  done
9347IFS=$as_save_IFS
9348
9349  ;;
9350esac
9351fi
9352SORT=$ac_cv_path_SORT
9353if test -n "$SORT"; then
9354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9355$as_echo "$SORT" >&6; }
9356else
9357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9358$as_echo "no" >&6; }
9359fi
9360
9361
9362  test -n "$SORT" && break
9363done
9364
9365  else
9366    # The variable is set, but is it from the command line or the environment?
9367
9368    # Try to remove the string !SORT! from our list.
9369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9370    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9371      # If it failed, the variable was not from the command line. Ignore it,
9372      # but warn the user (except for BASH, which is always set by the calling BASH).
9373      if test "xSORT" != xBASH; then
9374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9375$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9376      fi
9377      # Try to locate tool using the code snippet
9378      for ac_prog in sort
9379do
9380  # Extract the first word of "$ac_prog", so it can be a program name with args.
9381set dummy $ac_prog; ac_word=$2
9382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9383$as_echo_n "checking for $ac_word... " >&6; }
9384if ${ac_cv_path_SORT+:} false; then :
9385  $as_echo_n "(cached) " >&6
9386else
9387  case $SORT in
9388  [\\/]* | ?:[\\/]*)
9389  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9390  ;;
9391  *)
9392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9393for as_dir in $PATH
9394do
9395  IFS=$as_save_IFS
9396  test -z "$as_dir" && as_dir=.
9397    for ac_exec_ext in '' $ac_executable_extensions; do
9398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9399    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9401    break 2
9402  fi
9403done
9404  done
9405IFS=$as_save_IFS
9406
9407  ;;
9408esac
9409fi
9410SORT=$ac_cv_path_SORT
9411if test -n "$SORT"; then
9412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9413$as_echo "$SORT" >&6; }
9414else
9415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9416$as_echo "no" >&6; }
9417fi
9418
9419
9420  test -n "$SORT" && break
9421done
9422
9423    else
9424      # If it succeeded, then it was overridden by the user. We will use it
9425      # for the tool.
9426
9427      # First remove it from the list of overridden variables, so we can test
9428      # for unknown variables in the end.
9429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9430
9431      # Check if the provided tool contains a complete path.
9432      tool_specified="$SORT"
9433      tool_basename="${tool_specified##*/}"
9434      if test "x$tool_basename" = "x$tool_specified"; then
9435        # A command without a complete path is provided, search $PATH.
9436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9437$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9438        # Extract the first word of "$tool_basename", so it can be a program name with args.
9439set dummy $tool_basename; ac_word=$2
9440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9441$as_echo_n "checking for $ac_word... " >&6; }
9442if ${ac_cv_path_SORT+:} false; then :
9443  $as_echo_n "(cached) " >&6
9444else
9445  case $SORT in
9446  [\\/]* | ?:[\\/]*)
9447  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9448  ;;
9449  *)
9450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9451for as_dir in $PATH
9452do
9453  IFS=$as_save_IFS
9454  test -z "$as_dir" && as_dir=.
9455    for ac_exec_ext in '' $ac_executable_extensions; do
9456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9457    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9459    break 2
9460  fi
9461done
9462  done
9463IFS=$as_save_IFS
9464
9465  ;;
9466esac
9467fi
9468SORT=$ac_cv_path_SORT
9469if test -n "$SORT"; then
9470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9471$as_echo "$SORT" >&6; }
9472else
9473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9474$as_echo "no" >&6; }
9475fi
9476
9477
9478        if test "x$SORT" = x; then
9479          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9480        fi
9481      else
9482        # Otherwise we believe it is a complete path. Use it as it is.
9483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9484$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9486$as_echo_n "checking for SORT... " >&6; }
9487        if test ! -x "$tool_specified"; then
9488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9489$as_echo "not found" >&6; }
9490          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9491        fi
9492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9493$as_echo "$tool_specified" >&6; }
9494      fi
9495    fi
9496  fi
9497
9498
9499
9500  if test "x$SORT" = x; then
9501    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9502  fi
9503
9504
9505
9506
9507
9508  # Publish this variable in the help.
9509
9510
9511  if test "x$TAIL" = x; then
9512    # The variable is not set by user, try to locate tool using the code snippet
9513    for ac_prog in tail
9514do
9515  # Extract the first word of "$ac_prog", so it can be a program name with args.
9516set dummy $ac_prog; ac_word=$2
9517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9518$as_echo_n "checking for $ac_word... " >&6; }
9519if ${ac_cv_path_TAIL+:} false; then :
9520  $as_echo_n "(cached) " >&6
9521else
9522  case $TAIL in
9523  [\\/]* | ?:[\\/]*)
9524  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9525  ;;
9526  *)
9527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9528for as_dir in $PATH
9529do
9530  IFS=$as_save_IFS
9531  test -z "$as_dir" && as_dir=.
9532    for ac_exec_ext in '' $ac_executable_extensions; do
9533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9534    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9536    break 2
9537  fi
9538done
9539  done
9540IFS=$as_save_IFS
9541
9542  ;;
9543esac
9544fi
9545TAIL=$ac_cv_path_TAIL
9546if test -n "$TAIL"; then
9547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9548$as_echo "$TAIL" >&6; }
9549else
9550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9551$as_echo "no" >&6; }
9552fi
9553
9554
9555  test -n "$TAIL" && break
9556done
9557
9558  else
9559    # The variable is set, but is it from the command line or the environment?
9560
9561    # Try to remove the string !TAIL! from our list.
9562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9564      # If it failed, the variable was not from the command line. Ignore it,
9565      # but warn the user (except for BASH, which is always set by the calling BASH).
9566      if test "xTAIL" != xBASH; then
9567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9568$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9569      fi
9570      # Try to locate tool using the code snippet
9571      for ac_prog in tail
9572do
9573  # Extract the first word of "$ac_prog", so it can be a program name with args.
9574set dummy $ac_prog; ac_word=$2
9575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9576$as_echo_n "checking for $ac_word... " >&6; }
9577if ${ac_cv_path_TAIL+:} false; then :
9578  $as_echo_n "(cached) " >&6
9579else
9580  case $TAIL in
9581  [\\/]* | ?:[\\/]*)
9582  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9583  ;;
9584  *)
9585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9586for as_dir in $PATH
9587do
9588  IFS=$as_save_IFS
9589  test -z "$as_dir" && as_dir=.
9590    for ac_exec_ext in '' $ac_executable_extensions; do
9591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9592    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9594    break 2
9595  fi
9596done
9597  done
9598IFS=$as_save_IFS
9599
9600  ;;
9601esac
9602fi
9603TAIL=$ac_cv_path_TAIL
9604if test -n "$TAIL"; then
9605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9606$as_echo "$TAIL" >&6; }
9607else
9608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609$as_echo "no" >&6; }
9610fi
9611
9612
9613  test -n "$TAIL" && break
9614done
9615
9616    else
9617      # If it succeeded, then it was overridden by the user. We will use it
9618      # for the tool.
9619
9620      # First remove it from the list of overridden variables, so we can test
9621      # for unknown variables in the end.
9622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9623
9624      # Check if the provided tool contains a complete path.
9625      tool_specified="$TAIL"
9626      tool_basename="${tool_specified##*/}"
9627      if test "x$tool_basename" = "x$tool_specified"; then
9628        # A command without a complete path is provided, search $PATH.
9629        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9630$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9631        # Extract the first word of "$tool_basename", so it can be a program name with args.
9632set dummy $tool_basename; ac_word=$2
9633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9634$as_echo_n "checking for $ac_word... " >&6; }
9635if ${ac_cv_path_TAIL+:} false; then :
9636  $as_echo_n "(cached) " >&6
9637else
9638  case $TAIL in
9639  [\\/]* | ?:[\\/]*)
9640  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9641  ;;
9642  *)
9643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9644for as_dir in $PATH
9645do
9646  IFS=$as_save_IFS
9647  test -z "$as_dir" && as_dir=.
9648    for ac_exec_ext in '' $ac_executable_extensions; do
9649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9650    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9652    break 2
9653  fi
9654done
9655  done
9656IFS=$as_save_IFS
9657
9658  ;;
9659esac
9660fi
9661TAIL=$ac_cv_path_TAIL
9662if test -n "$TAIL"; then
9663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9664$as_echo "$TAIL" >&6; }
9665else
9666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9667$as_echo "no" >&6; }
9668fi
9669
9670
9671        if test "x$TAIL" = x; then
9672          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9673        fi
9674      else
9675        # Otherwise we believe it is a complete path. Use it as it is.
9676        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9677$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9679$as_echo_n "checking for TAIL... " >&6; }
9680        if test ! -x "$tool_specified"; then
9681          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9682$as_echo "not found" >&6; }
9683          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9684        fi
9685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9686$as_echo "$tool_specified" >&6; }
9687      fi
9688    fi
9689  fi
9690
9691
9692
9693  if test "x$TAIL" = x; then
9694    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9695  fi
9696
9697
9698
9699
9700
9701  # Publish this variable in the help.
9702
9703
9704  if test "x$TAR" = x; then
9705    # The variable is not set by user, try to locate tool using the code snippet
9706    for ac_prog in tar
9707do
9708  # Extract the first word of "$ac_prog", so it can be a program name with args.
9709set dummy $ac_prog; ac_word=$2
9710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9711$as_echo_n "checking for $ac_word... " >&6; }
9712if ${ac_cv_path_TAR+:} false; then :
9713  $as_echo_n "(cached) " >&6
9714else
9715  case $TAR in
9716  [\\/]* | ?:[\\/]*)
9717  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9718  ;;
9719  *)
9720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9721for as_dir in $PATH
9722do
9723  IFS=$as_save_IFS
9724  test -z "$as_dir" && as_dir=.
9725    for ac_exec_ext in '' $ac_executable_extensions; do
9726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9727    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9729    break 2
9730  fi
9731done
9732  done
9733IFS=$as_save_IFS
9734
9735  ;;
9736esac
9737fi
9738TAR=$ac_cv_path_TAR
9739if test -n "$TAR"; then
9740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9741$as_echo "$TAR" >&6; }
9742else
9743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9744$as_echo "no" >&6; }
9745fi
9746
9747
9748  test -n "$TAR" && break
9749done
9750
9751  else
9752    # The variable is set, but is it from the command line or the environment?
9753
9754    # Try to remove the string !TAR! from our list.
9755    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9756    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9757      # If it failed, the variable was not from the command line. Ignore it,
9758      # but warn the user (except for BASH, which is always set by the calling BASH).
9759      if test "xTAR" != xBASH; then
9760        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9761$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9762      fi
9763      # Try to locate tool using the code snippet
9764      for ac_prog in tar
9765do
9766  # Extract the first word of "$ac_prog", so it can be a program name with args.
9767set dummy $ac_prog; ac_word=$2
9768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9769$as_echo_n "checking for $ac_word... " >&6; }
9770if ${ac_cv_path_TAR+:} false; then :
9771  $as_echo_n "(cached) " >&6
9772else
9773  case $TAR in
9774  [\\/]* | ?:[\\/]*)
9775  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9776  ;;
9777  *)
9778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9779for as_dir in $PATH
9780do
9781  IFS=$as_save_IFS
9782  test -z "$as_dir" && as_dir=.
9783    for ac_exec_ext in '' $ac_executable_extensions; do
9784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9785    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9787    break 2
9788  fi
9789done
9790  done
9791IFS=$as_save_IFS
9792
9793  ;;
9794esac
9795fi
9796TAR=$ac_cv_path_TAR
9797if test -n "$TAR"; then
9798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9799$as_echo "$TAR" >&6; }
9800else
9801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9802$as_echo "no" >&6; }
9803fi
9804
9805
9806  test -n "$TAR" && break
9807done
9808
9809    else
9810      # If it succeeded, then it was overridden by the user. We will use it
9811      # for the tool.
9812
9813      # First remove it from the list of overridden variables, so we can test
9814      # for unknown variables in the end.
9815      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9816
9817      # Check if the provided tool contains a complete path.
9818      tool_specified="$TAR"
9819      tool_basename="${tool_specified##*/}"
9820      if test "x$tool_basename" = "x$tool_specified"; then
9821        # A command without a complete path is provided, search $PATH.
9822        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9823$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9824        # Extract the first word of "$tool_basename", so it can be a program name with args.
9825set dummy $tool_basename; ac_word=$2
9826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9827$as_echo_n "checking for $ac_word... " >&6; }
9828if ${ac_cv_path_TAR+:} false; then :
9829  $as_echo_n "(cached) " >&6
9830else
9831  case $TAR in
9832  [\\/]* | ?:[\\/]*)
9833  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9834  ;;
9835  *)
9836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9837for as_dir in $PATH
9838do
9839  IFS=$as_save_IFS
9840  test -z "$as_dir" && as_dir=.
9841    for ac_exec_ext in '' $ac_executable_extensions; do
9842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9843    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9845    break 2
9846  fi
9847done
9848  done
9849IFS=$as_save_IFS
9850
9851  ;;
9852esac
9853fi
9854TAR=$ac_cv_path_TAR
9855if test -n "$TAR"; then
9856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9857$as_echo "$TAR" >&6; }
9858else
9859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9860$as_echo "no" >&6; }
9861fi
9862
9863
9864        if test "x$TAR" = x; then
9865          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9866        fi
9867      else
9868        # Otherwise we believe it is a complete path. Use it as it is.
9869        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9870$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9872$as_echo_n "checking for TAR... " >&6; }
9873        if test ! -x "$tool_specified"; then
9874          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9875$as_echo "not found" >&6; }
9876          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9877        fi
9878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9879$as_echo "$tool_specified" >&6; }
9880      fi
9881    fi
9882  fi
9883
9884
9885
9886  if test "x$TAR" = x; then
9887    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9888  fi
9889
9890
9891
9892
9893
9894  # Publish this variable in the help.
9895
9896
9897  if test "x$TEE" = x; then
9898    # The variable is not set by user, try to locate tool using the code snippet
9899    for ac_prog in tee
9900do
9901  # Extract the first word of "$ac_prog", so it can be a program name with args.
9902set dummy $ac_prog; ac_word=$2
9903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9904$as_echo_n "checking for $ac_word... " >&6; }
9905if ${ac_cv_path_TEE+:} false; then :
9906  $as_echo_n "(cached) " >&6
9907else
9908  case $TEE in
9909  [\\/]* | ?:[\\/]*)
9910  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9911  ;;
9912  *)
9913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9914for as_dir in $PATH
9915do
9916  IFS=$as_save_IFS
9917  test -z "$as_dir" && as_dir=.
9918    for ac_exec_ext in '' $ac_executable_extensions; do
9919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9920    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9922    break 2
9923  fi
9924done
9925  done
9926IFS=$as_save_IFS
9927
9928  ;;
9929esac
9930fi
9931TEE=$ac_cv_path_TEE
9932if test -n "$TEE"; then
9933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9934$as_echo "$TEE" >&6; }
9935else
9936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9937$as_echo "no" >&6; }
9938fi
9939
9940
9941  test -n "$TEE" && break
9942done
9943
9944  else
9945    # The variable is set, but is it from the command line or the environment?
9946
9947    # Try to remove the string !TEE! from our list.
9948    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9949    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9950      # If it failed, the variable was not from the command line. Ignore it,
9951      # but warn the user (except for BASH, which is always set by the calling BASH).
9952      if test "xTEE" != xBASH; then
9953        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9954$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9955      fi
9956      # Try to locate tool using the code snippet
9957      for ac_prog in tee
9958do
9959  # Extract the first word of "$ac_prog", so it can be a program name with args.
9960set dummy $ac_prog; ac_word=$2
9961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9962$as_echo_n "checking for $ac_word... " >&6; }
9963if ${ac_cv_path_TEE+:} false; then :
9964  $as_echo_n "(cached) " >&6
9965else
9966  case $TEE in
9967  [\\/]* | ?:[\\/]*)
9968  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9969  ;;
9970  *)
9971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9972for as_dir in $PATH
9973do
9974  IFS=$as_save_IFS
9975  test -z "$as_dir" && as_dir=.
9976    for ac_exec_ext in '' $ac_executable_extensions; do
9977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9978    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9980    break 2
9981  fi
9982done
9983  done
9984IFS=$as_save_IFS
9985
9986  ;;
9987esac
9988fi
9989TEE=$ac_cv_path_TEE
9990if test -n "$TEE"; then
9991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9992$as_echo "$TEE" >&6; }
9993else
9994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9995$as_echo "no" >&6; }
9996fi
9997
9998
9999  test -n "$TEE" && break
10000done
10001
10002    else
10003      # If it succeeded, then it was overridden by the user. We will use it
10004      # for the tool.
10005
10006      # First remove it from the list of overridden variables, so we can test
10007      # for unknown variables in the end.
10008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10009
10010      # Check if the provided tool contains a complete path.
10011      tool_specified="$TEE"
10012      tool_basename="${tool_specified##*/}"
10013      if test "x$tool_basename" = "x$tool_specified"; then
10014        # A command without a complete path is provided, search $PATH.
10015        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10016$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10017        # Extract the first word of "$tool_basename", so it can be a program name with args.
10018set dummy $tool_basename; ac_word=$2
10019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10020$as_echo_n "checking for $ac_word... " >&6; }
10021if ${ac_cv_path_TEE+:} false; then :
10022  $as_echo_n "(cached) " >&6
10023else
10024  case $TEE in
10025  [\\/]* | ?:[\\/]*)
10026  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10027  ;;
10028  *)
10029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10030for as_dir in $PATH
10031do
10032  IFS=$as_save_IFS
10033  test -z "$as_dir" && as_dir=.
10034    for ac_exec_ext in '' $ac_executable_extensions; do
10035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10036    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10038    break 2
10039  fi
10040done
10041  done
10042IFS=$as_save_IFS
10043
10044  ;;
10045esac
10046fi
10047TEE=$ac_cv_path_TEE
10048if test -n "$TEE"; then
10049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10050$as_echo "$TEE" >&6; }
10051else
10052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053$as_echo "no" >&6; }
10054fi
10055
10056
10057        if test "x$TEE" = x; then
10058          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10059        fi
10060      else
10061        # Otherwise we believe it is a complete path. Use it as it is.
10062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10063$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10065$as_echo_n "checking for TEE... " >&6; }
10066        if test ! -x "$tool_specified"; then
10067          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10068$as_echo "not found" >&6; }
10069          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10070        fi
10071        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10072$as_echo "$tool_specified" >&6; }
10073      fi
10074    fi
10075  fi
10076
10077
10078
10079  if test "x$TEE" = x; then
10080    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10081  fi
10082
10083
10084
10085
10086
10087  # Publish this variable in the help.
10088
10089
10090  if test "x$TOUCH" = x; then
10091    # The variable is not set by user, try to locate tool using the code snippet
10092    for ac_prog in touch
10093do
10094  # Extract the first word of "$ac_prog", so it can be a program name with args.
10095set dummy $ac_prog; ac_word=$2
10096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10097$as_echo_n "checking for $ac_word... " >&6; }
10098if ${ac_cv_path_TOUCH+:} false; then :
10099  $as_echo_n "(cached) " >&6
10100else
10101  case $TOUCH in
10102  [\\/]* | ?:[\\/]*)
10103  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10104  ;;
10105  *)
10106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10107for as_dir in $PATH
10108do
10109  IFS=$as_save_IFS
10110  test -z "$as_dir" && as_dir=.
10111    for ac_exec_ext in '' $ac_executable_extensions; do
10112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10113    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10115    break 2
10116  fi
10117done
10118  done
10119IFS=$as_save_IFS
10120
10121  ;;
10122esac
10123fi
10124TOUCH=$ac_cv_path_TOUCH
10125if test -n "$TOUCH"; then
10126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10127$as_echo "$TOUCH" >&6; }
10128else
10129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10130$as_echo "no" >&6; }
10131fi
10132
10133
10134  test -n "$TOUCH" && break
10135done
10136
10137  else
10138    # The variable is set, but is it from the command line or the environment?
10139
10140    # Try to remove the string !TOUCH! from our list.
10141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10143      # If it failed, the variable was not from the command line. Ignore it,
10144      # but warn the user (except for BASH, which is always set by the calling BASH).
10145      if test "xTOUCH" != xBASH; then
10146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10147$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10148      fi
10149      # Try to locate tool using the code snippet
10150      for ac_prog in touch
10151do
10152  # Extract the first word of "$ac_prog", so it can be a program name with args.
10153set dummy $ac_prog; ac_word=$2
10154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10155$as_echo_n "checking for $ac_word... " >&6; }
10156if ${ac_cv_path_TOUCH+:} false; then :
10157  $as_echo_n "(cached) " >&6
10158else
10159  case $TOUCH in
10160  [\\/]* | ?:[\\/]*)
10161  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10162  ;;
10163  *)
10164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10165for as_dir in $PATH
10166do
10167  IFS=$as_save_IFS
10168  test -z "$as_dir" && as_dir=.
10169    for ac_exec_ext in '' $ac_executable_extensions; do
10170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10171    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10173    break 2
10174  fi
10175done
10176  done
10177IFS=$as_save_IFS
10178
10179  ;;
10180esac
10181fi
10182TOUCH=$ac_cv_path_TOUCH
10183if test -n "$TOUCH"; then
10184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10185$as_echo "$TOUCH" >&6; }
10186else
10187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10188$as_echo "no" >&6; }
10189fi
10190
10191
10192  test -n "$TOUCH" && break
10193done
10194
10195    else
10196      # If it succeeded, then it was overridden by the user. We will use it
10197      # for the tool.
10198
10199      # First remove it from the list of overridden variables, so we can test
10200      # for unknown variables in the end.
10201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10202
10203      # Check if the provided tool contains a complete path.
10204      tool_specified="$TOUCH"
10205      tool_basename="${tool_specified##*/}"
10206      if test "x$tool_basename" = "x$tool_specified"; then
10207        # A command without a complete path is provided, search $PATH.
10208        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10209$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10210        # Extract the first word of "$tool_basename", so it can be a program name with args.
10211set dummy $tool_basename; ac_word=$2
10212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10213$as_echo_n "checking for $ac_word... " >&6; }
10214if ${ac_cv_path_TOUCH+:} false; then :
10215  $as_echo_n "(cached) " >&6
10216else
10217  case $TOUCH in
10218  [\\/]* | ?:[\\/]*)
10219  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10220  ;;
10221  *)
10222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10223for as_dir in $PATH
10224do
10225  IFS=$as_save_IFS
10226  test -z "$as_dir" && as_dir=.
10227    for ac_exec_ext in '' $ac_executable_extensions; do
10228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10229    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10231    break 2
10232  fi
10233done
10234  done
10235IFS=$as_save_IFS
10236
10237  ;;
10238esac
10239fi
10240TOUCH=$ac_cv_path_TOUCH
10241if test -n "$TOUCH"; then
10242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10243$as_echo "$TOUCH" >&6; }
10244else
10245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10246$as_echo "no" >&6; }
10247fi
10248
10249
10250        if test "x$TOUCH" = x; then
10251          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10252        fi
10253      else
10254        # Otherwise we believe it is a complete path. Use it as it is.
10255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10256$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10257        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10258$as_echo_n "checking for TOUCH... " >&6; }
10259        if test ! -x "$tool_specified"; then
10260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10261$as_echo "not found" >&6; }
10262          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10263        fi
10264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10265$as_echo "$tool_specified" >&6; }
10266      fi
10267    fi
10268  fi
10269
10270
10271
10272  if test "x$TOUCH" = x; then
10273    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10274  fi
10275
10276
10277
10278
10279
10280  # Publish this variable in the help.
10281
10282
10283  if test "x$TR" = x; then
10284    # The variable is not set by user, try to locate tool using the code snippet
10285    for ac_prog in tr
10286do
10287  # Extract the first word of "$ac_prog", so it can be a program name with args.
10288set dummy $ac_prog; ac_word=$2
10289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10290$as_echo_n "checking for $ac_word... " >&6; }
10291if ${ac_cv_path_TR+:} false; then :
10292  $as_echo_n "(cached) " >&6
10293else
10294  case $TR in
10295  [\\/]* | ?:[\\/]*)
10296  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10297  ;;
10298  *)
10299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10300for as_dir in $PATH
10301do
10302  IFS=$as_save_IFS
10303  test -z "$as_dir" && as_dir=.
10304    for ac_exec_ext in '' $ac_executable_extensions; do
10305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10306    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10308    break 2
10309  fi
10310done
10311  done
10312IFS=$as_save_IFS
10313
10314  ;;
10315esac
10316fi
10317TR=$ac_cv_path_TR
10318if test -n "$TR"; then
10319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10320$as_echo "$TR" >&6; }
10321else
10322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10323$as_echo "no" >&6; }
10324fi
10325
10326
10327  test -n "$TR" && break
10328done
10329
10330  else
10331    # The variable is set, but is it from the command line or the environment?
10332
10333    # Try to remove the string !TR! from our list.
10334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10336      # If it failed, the variable was not from the command line. Ignore it,
10337      # but warn the user (except for BASH, which is always set by the calling BASH).
10338      if test "xTR" != xBASH; then
10339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10340$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10341      fi
10342      # Try to locate tool using the code snippet
10343      for ac_prog in tr
10344do
10345  # Extract the first word of "$ac_prog", so it can be a program name with args.
10346set dummy $ac_prog; ac_word=$2
10347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10348$as_echo_n "checking for $ac_word... " >&6; }
10349if ${ac_cv_path_TR+:} false; then :
10350  $as_echo_n "(cached) " >&6
10351else
10352  case $TR in
10353  [\\/]* | ?:[\\/]*)
10354  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10355  ;;
10356  *)
10357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10358for as_dir in $PATH
10359do
10360  IFS=$as_save_IFS
10361  test -z "$as_dir" && as_dir=.
10362    for ac_exec_ext in '' $ac_executable_extensions; do
10363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10364    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10366    break 2
10367  fi
10368done
10369  done
10370IFS=$as_save_IFS
10371
10372  ;;
10373esac
10374fi
10375TR=$ac_cv_path_TR
10376if test -n "$TR"; then
10377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10378$as_echo "$TR" >&6; }
10379else
10380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10381$as_echo "no" >&6; }
10382fi
10383
10384
10385  test -n "$TR" && break
10386done
10387
10388    else
10389      # If it succeeded, then it was overridden by the user. We will use it
10390      # for the tool.
10391
10392      # First remove it from the list of overridden variables, so we can test
10393      # for unknown variables in the end.
10394      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10395
10396      # Check if the provided tool contains a complete path.
10397      tool_specified="$TR"
10398      tool_basename="${tool_specified##*/}"
10399      if test "x$tool_basename" = "x$tool_specified"; then
10400        # A command without a complete path is provided, search $PATH.
10401        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10402$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10403        # Extract the first word of "$tool_basename", so it can be a program name with args.
10404set dummy $tool_basename; ac_word=$2
10405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10406$as_echo_n "checking for $ac_word... " >&6; }
10407if ${ac_cv_path_TR+:} false; then :
10408  $as_echo_n "(cached) " >&6
10409else
10410  case $TR in
10411  [\\/]* | ?:[\\/]*)
10412  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10413  ;;
10414  *)
10415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10416for as_dir in $PATH
10417do
10418  IFS=$as_save_IFS
10419  test -z "$as_dir" && as_dir=.
10420    for ac_exec_ext in '' $ac_executable_extensions; do
10421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10422    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10424    break 2
10425  fi
10426done
10427  done
10428IFS=$as_save_IFS
10429
10430  ;;
10431esac
10432fi
10433TR=$ac_cv_path_TR
10434if test -n "$TR"; then
10435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10436$as_echo "$TR" >&6; }
10437else
10438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10439$as_echo "no" >&6; }
10440fi
10441
10442
10443        if test "x$TR" = x; then
10444          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10445        fi
10446      else
10447        # Otherwise we believe it is a complete path. Use it as it is.
10448        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10449$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10450        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10451$as_echo_n "checking for TR... " >&6; }
10452        if test ! -x "$tool_specified"; then
10453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10454$as_echo "not found" >&6; }
10455          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10456        fi
10457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10458$as_echo "$tool_specified" >&6; }
10459      fi
10460    fi
10461  fi
10462
10463
10464
10465  if test "x$TR" = x; then
10466    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10467  fi
10468
10469
10470
10471
10472
10473  # Publish this variable in the help.
10474
10475
10476  if test "x$UNAME" = x; then
10477    # The variable is not set by user, try to locate tool using the code snippet
10478    for ac_prog in uname
10479do
10480  # Extract the first word of "$ac_prog", so it can be a program name with args.
10481set dummy $ac_prog; ac_word=$2
10482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10483$as_echo_n "checking for $ac_word... " >&6; }
10484if ${ac_cv_path_UNAME+:} false; then :
10485  $as_echo_n "(cached) " >&6
10486else
10487  case $UNAME in
10488  [\\/]* | ?:[\\/]*)
10489  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10490  ;;
10491  *)
10492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10493for as_dir in $PATH
10494do
10495  IFS=$as_save_IFS
10496  test -z "$as_dir" && as_dir=.
10497    for ac_exec_ext in '' $ac_executable_extensions; do
10498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10499    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10501    break 2
10502  fi
10503done
10504  done
10505IFS=$as_save_IFS
10506
10507  ;;
10508esac
10509fi
10510UNAME=$ac_cv_path_UNAME
10511if test -n "$UNAME"; then
10512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10513$as_echo "$UNAME" >&6; }
10514else
10515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10516$as_echo "no" >&6; }
10517fi
10518
10519
10520  test -n "$UNAME" && break
10521done
10522
10523  else
10524    # The variable is set, but is it from the command line or the environment?
10525
10526    # Try to remove the string !UNAME! from our list.
10527    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10528    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10529      # If it failed, the variable was not from the command line. Ignore it,
10530      # but warn the user (except for BASH, which is always set by the calling BASH).
10531      if test "xUNAME" != xBASH; then
10532        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10533$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10534      fi
10535      # Try to locate tool using the code snippet
10536      for ac_prog in uname
10537do
10538  # Extract the first word of "$ac_prog", so it can be a program name with args.
10539set dummy $ac_prog; ac_word=$2
10540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10541$as_echo_n "checking for $ac_word... " >&6; }
10542if ${ac_cv_path_UNAME+:} false; then :
10543  $as_echo_n "(cached) " >&6
10544else
10545  case $UNAME in
10546  [\\/]* | ?:[\\/]*)
10547  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10548  ;;
10549  *)
10550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10551for as_dir in $PATH
10552do
10553  IFS=$as_save_IFS
10554  test -z "$as_dir" && as_dir=.
10555    for ac_exec_ext in '' $ac_executable_extensions; do
10556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10557    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10559    break 2
10560  fi
10561done
10562  done
10563IFS=$as_save_IFS
10564
10565  ;;
10566esac
10567fi
10568UNAME=$ac_cv_path_UNAME
10569if test -n "$UNAME"; then
10570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10571$as_echo "$UNAME" >&6; }
10572else
10573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10574$as_echo "no" >&6; }
10575fi
10576
10577
10578  test -n "$UNAME" && break
10579done
10580
10581    else
10582      # If it succeeded, then it was overridden by the user. We will use it
10583      # for the tool.
10584
10585      # First remove it from the list of overridden variables, so we can test
10586      # for unknown variables in the end.
10587      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10588
10589      # Check if the provided tool contains a complete path.
10590      tool_specified="$UNAME"
10591      tool_basename="${tool_specified##*/}"
10592      if test "x$tool_basename" = "x$tool_specified"; then
10593        # A command without a complete path is provided, search $PATH.
10594        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10595$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10596        # Extract the first word of "$tool_basename", so it can be a program name with args.
10597set dummy $tool_basename; ac_word=$2
10598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10599$as_echo_n "checking for $ac_word... " >&6; }
10600if ${ac_cv_path_UNAME+:} false; then :
10601  $as_echo_n "(cached) " >&6
10602else
10603  case $UNAME in
10604  [\\/]* | ?:[\\/]*)
10605  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10606  ;;
10607  *)
10608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10609for as_dir in $PATH
10610do
10611  IFS=$as_save_IFS
10612  test -z "$as_dir" && as_dir=.
10613    for ac_exec_ext in '' $ac_executable_extensions; do
10614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10615    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10617    break 2
10618  fi
10619done
10620  done
10621IFS=$as_save_IFS
10622
10623  ;;
10624esac
10625fi
10626UNAME=$ac_cv_path_UNAME
10627if test -n "$UNAME"; then
10628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10629$as_echo "$UNAME" >&6; }
10630else
10631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10632$as_echo "no" >&6; }
10633fi
10634
10635
10636        if test "x$UNAME" = x; then
10637          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10638        fi
10639      else
10640        # Otherwise we believe it is a complete path. Use it as it is.
10641        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10642$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10643        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10644$as_echo_n "checking for UNAME... " >&6; }
10645        if test ! -x "$tool_specified"; then
10646          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10647$as_echo "not found" >&6; }
10648          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10649        fi
10650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10651$as_echo "$tool_specified" >&6; }
10652      fi
10653    fi
10654  fi
10655
10656
10657
10658  if test "x$UNAME" = x; then
10659    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10660  fi
10661
10662
10663
10664
10665
10666  # Publish this variable in the help.
10667
10668
10669  if test "x$UNIQ" = x; then
10670    # The variable is not set by user, try to locate tool using the code snippet
10671    for ac_prog in uniq
10672do
10673  # Extract the first word of "$ac_prog", so it can be a program name with args.
10674set dummy $ac_prog; ac_word=$2
10675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10676$as_echo_n "checking for $ac_word... " >&6; }
10677if ${ac_cv_path_UNIQ+:} false; then :
10678  $as_echo_n "(cached) " >&6
10679else
10680  case $UNIQ in
10681  [\\/]* | ?:[\\/]*)
10682  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10683  ;;
10684  *)
10685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10686for as_dir in $PATH
10687do
10688  IFS=$as_save_IFS
10689  test -z "$as_dir" && as_dir=.
10690    for ac_exec_ext in '' $ac_executable_extensions; do
10691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10692    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10694    break 2
10695  fi
10696done
10697  done
10698IFS=$as_save_IFS
10699
10700  ;;
10701esac
10702fi
10703UNIQ=$ac_cv_path_UNIQ
10704if test -n "$UNIQ"; then
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10706$as_echo "$UNIQ" >&6; }
10707else
10708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10709$as_echo "no" >&6; }
10710fi
10711
10712
10713  test -n "$UNIQ" && break
10714done
10715
10716  else
10717    # The variable is set, but is it from the command line or the environment?
10718
10719    # Try to remove the string !UNIQ! from our list.
10720    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10721    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10722      # If it failed, the variable was not from the command line. Ignore it,
10723      # but warn the user (except for BASH, which is always set by the calling BASH).
10724      if test "xUNIQ" != xBASH; then
10725        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10726$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10727      fi
10728      # Try to locate tool using the code snippet
10729      for ac_prog in uniq
10730do
10731  # Extract the first word of "$ac_prog", so it can be a program name with args.
10732set dummy $ac_prog; ac_word=$2
10733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10734$as_echo_n "checking for $ac_word... " >&6; }
10735if ${ac_cv_path_UNIQ+:} false; then :
10736  $as_echo_n "(cached) " >&6
10737else
10738  case $UNIQ in
10739  [\\/]* | ?:[\\/]*)
10740  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10741  ;;
10742  *)
10743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10744for as_dir in $PATH
10745do
10746  IFS=$as_save_IFS
10747  test -z "$as_dir" && as_dir=.
10748    for ac_exec_ext in '' $ac_executable_extensions; do
10749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10750    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10752    break 2
10753  fi
10754done
10755  done
10756IFS=$as_save_IFS
10757
10758  ;;
10759esac
10760fi
10761UNIQ=$ac_cv_path_UNIQ
10762if test -n "$UNIQ"; then
10763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10764$as_echo "$UNIQ" >&6; }
10765else
10766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10767$as_echo "no" >&6; }
10768fi
10769
10770
10771  test -n "$UNIQ" && break
10772done
10773
10774    else
10775      # If it succeeded, then it was overridden by the user. We will use it
10776      # for the tool.
10777
10778      # First remove it from the list of overridden variables, so we can test
10779      # for unknown variables in the end.
10780      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10781
10782      # Check if the provided tool contains a complete path.
10783      tool_specified="$UNIQ"
10784      tool_basename="${tool_specified##*/}"
10785      if test "x$tool_basename" = "x$tool_specified"; then
10786        # A command without a complete path is provided, search $PATH.
10787        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10788$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10789        # Extract the first word of "$tool_basename", so it can be a program name with args.
10790set dummy $tool_basename; ac_word=$2
10791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10792$as_echo_n "checking for $ac_word... " >&6; }
10793if ${ac_cv_path_UNIQ+:} false; then :
10794  $as_echo_n "(cached) " >&6
10795else
10796  case $UNIQ in
10797  [\\/]* | ?:[\\/]*)
10798  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10799  ;;
10800  *)
10801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10802for as_dir in $PATH
10803do
10804  IFS=$as_save_IFS
10805  test -z "$as_dir" && as_dir=.
10806    for ac_exec_ext in '' $ac_executable_extensions; do
10807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10808    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10810    break 2
10811  fi
10812done
10813  done
10814IFS=$as_save_IFS
10815
10816  ;;
10817esac
10818fi
10819UNIQ=$ac_cv_path_UNIQ
10820if test -n "$UNIQ"; then
10821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10822$as_echo "$UNIQ" >&6; }
10823else
10824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10825$as_echo "no" >&6; }
10826fi
10827
10828
10829        if test "x$UNIQ" = x; then
10830          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10831        fi
10832      else
10833        # Otherwise we believe it is a complete path. Use it as it is.
10834        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10835$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10836        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10837$as_echo_n "checking for UNIQ... " >&6; }
10838        if test ! -x "$tool_specified"; then
10839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10840$as_echo "not found" >&6; }
10841          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10842        fi
10843        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10844$as_echo "$tool_specified" >&6; }
10845      fi
10846    fi
10847  fi
10848
10849
10850
10851  if test "x$UNIQ" = x; then
10852    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10853  fi
10854
10855
10856
10857
10858
10859  # Publish this variable in the help.
10860
10861
10862  if test "x$WC" = x; then
10863    # The variable is not set by user, try to locate tool using the code snippet
10864    for ac_prog in wc
10865do
10866  # Extract the first word of "$ac_prog", so it can be a program name with args.
10867set dummy $ac_prog; ac_word=$2
10868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10869$as_echo_n "checking for $ac_word... " >&6; }
10870if ${ac_cv_path_WC+:} false; then :
10871  $as_echo_n "(cached) " >&6
10872else
10873  case $WC in
10874  [\\/]* | ?:[\\/]*)
10875  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10876  ;;
10877  *)
10878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10879for as_dir in $PATH
10880do
10881  IFS=$as_save_IFS
10882  test -z "$as_dir" && as_dir=.
10883    for ac_exec_ext in '' $ac_executable_extensions; do
10884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10885    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10887    break 2
10888  fi
10889done
10890  done
10891IFS=$as_save_IFS
10892
10893  ;;
10894esac
10895fi
10896WC=$ac_cv_path_WC
10897if test -n "$WC"; then
10898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10899$as_echo "$WC" >&6; }
10900else
10901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10902$as_echo "no" >&6; }
10903fi
10904
10905
10906  test -n "$WC" && break
10907done
10908
10909  else
10910    # The variable is set, but is it from the command line or the environment?
10911
10912    # Try to remove the string !WC! from our list.
10913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10915      # If it failed, the variable was not from the command line. Ignore it,
10916      # but warn the user (except for BASH, which is always set by the calling BASH).
10917      if test "xWC" != xBASH; then
10918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10919$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10920      fi
10921      # Try to locate tool using the code snippet
10922      for ac_prog in wc
10923do
10924  # Extract the first word of "$ac_prog", so it can be a program name with args.
10925set dummy $ac_prog; ac_word=$2
10926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10927$as_echo_n "checking for $ac_word... " >&6; }
10928if ${ac_cv_path_WC+:} false; then :
10929  $as_echo_n "(cached) " >&6
10930else
10931  case $WC in
10932  [\\/]* | ?:[\\/]*)
10933  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10934  ;;
10935  *)
10936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10937for as_dir in $PATH
10938do
10939  IFS=$as_save_IFS
10940  test -z "$as_dir" && as_dir=.
10941    for ac_exec_ext in '' $ac_executable_extensions; do
10942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10943    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10945    break 2
10946  fi
10947done
10948  done
10949IFS=$as_save_IFS
10950
10951  ;;
10952esac
10953fi
10954WC=$ac_cv_path_WC
10955if test -n "$WC"; then
10956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10957$as_echo "$WC" >&6; }
10958else
10959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10960$as_echo "no" >&6; }
10961fi
10962
10963
10964  test -n "$WC" && break
10965done
10966
10967    else
10968      # If it succeeded, then it was overridden by the user. We will use it
10969      # for the tool.
10970
10971      # First remove it from the list of overridden variables, so we can test
10972      # for unknown variables in the end.
10973      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10974
10975      # Check if the provided tool contains a complete path.
10976      tool_specified="$WC"
10977      tool_basename="${tool_specified##*/}"
10978      if test "x$tool_basename" = "x$tool_specified"; then
10979        # A command without a complete path is provided, search $PATH.
10980        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10981$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10982        # Extract the first word of "$tool_basename", so it can be a program name with args.
10983set dummy $tool_basename; ac_word=$2
10984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10985$as_echo_n "checking for $ac_word... " >&6; }
10986if ${ac_cv_path_WC+:} false; then :
10987  $as_echo_n "(cached) " >&6
10988else
10989  case $WC in
10990  [\\/]* | ?:[\\/]*)
10991  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10992  ;;
10993  *)
10994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10995for as_dir in $PATH
10996do
10997  IFS=$as_save_IFS
10998  test -z "$as_dir" && as_dir=.
10999    for ac_exec_ext in '' $ac_executable_extensions; do
11000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11001    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11003    break 2
11004  fi
11005done
11006  done
11007IFS=$as_save_IFS
11008
11009  ;;
11010esac
11011fi
11012WC=$ac_cv_path_WC
11013if test -n "$WC"; then
11014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11015$as_echo "$WC" >&6; }
11016else
11017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11018$as_echo "no" >&6; }
11019fi
11020
11021
11022        if test "x$WC" = x; then
11023          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11024        fi
11025      else
11026        # Otherwise we believe it is a complete path. Use it as it is.
11027        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11028$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11029        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11030$as_echo_n "checking for WC... " >&6; }
11031        if test ! -x "$tool_specified"; then
11032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11033$as_echo "not found" >&6; }
11034          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11035        fi
11036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11037$as_echo "$tool_specified" >&6; }
11038      fi
11039    fi
11040  fi
11041
11042
11043
11044  if test "x$WC" = x; then
11045    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11046  fi
11047
11048
11049
11050
11051
11052  # Publish this variable in the help.
11053
11054
11055  if test "x$WHICH" = x; then
11056    # The variable is not set by user, try to locate tool using the code snippet
11057    for ac_prog in which
11058do
11059  # Extract the first word of "$ac_prog", so it can be a program name with args.
11060set dummy $ac_prog; ac_word=$2
11061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11062$as_echo_n "checking for $ac_word... " >&6; }
11063if ${ac_cv_path_WHICH+:} false; then :
11064  $as_echo_n "(cached) " >&6
11065else
11066  case $WHICH in
11067  [\\/]* | ?:[\\/]*)
11068  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11069  ;;
11070  *)
11071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11072for as_dir in $PATH
11073do
11074  IFS=$as_save_IFS
11075  test -z "$as_dir" && as_dir=.
11076    for ac_exec_ext in '' $ac_executable_extensions; do
11077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11078    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11080    break 2
11081  fi
11082done
11083  done
11084IFS=$as_save_IFS
11085
11086  ;;
11087esac
11088fi
11089WHICH=$ac_cv_path_WHICH
11090if test -n "$WHICH"; then
11091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11092$as_echo "$WHICH" >&6; }
11093else
11094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11095$as_echo "no" >&6; }
11096fi
11097
11098
11099  test -n "$WHICH" && break
11100done
11101
11102  else
11103    # The variable is set, but is it from the command line or the environment?
11104
11105    # Try to remove the string !WHICH! from our list.
11106    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11107    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11108      # If it failed, the variable was not from the command line. Ignore it,
11109      # but warn the user (except for BASH, which is always set by the calling BASH).
11110      if test "xWHICH" != xBASH; then
11111        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11112$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11113      fi
11114      # Try to locate tool using the code snippet
11115      for ac_prog in which
11116do
11117  # Extract the first word of "$ac_prog", so it can be a program name with args.
11118set dummy $ac_prog; ac_word=$2
11119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11120$as_echo_n "checking for $ac_word... " >&6; }
11121if ${ac_cv_path_WHICH+:} false; then :
11122  $as_echo_n "(cached) " >&6
11123else
11124  case $WHICH in
11125  [\\/]* | ?:[\\/]*)
11126  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11127  ;;
11128  *)
11129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11130for as_dir in $PATH
11131do
11132  IFS=$as_save_IFS
11133  test -z "$as_dir" && as_dir=.
11134    for ac_exec_ext in '' $ac_executable_extensions; do
11135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11136    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11138    break 2
11139  fi
11140done
11141  done
11142IFS=$as_save_IFS
11143
11144  ;;
11145esac
11146fi
11147WHICH=$ac_cv_path_WHICH
11148if test -n "$WHICH"; then
11149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11150$as_echo "$WHICH" >&6; }
11151else
11152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11153$as_echo "no" >&6; }
11154fi
11155
11156
11157  test -n "$WHICH" && break
11158done
11159
11160    else
11161      # If it succeeded, then it was overridden by the user. We will use it
11162      # for the tool.
11163
11164      # First remove it from the list of overridden variables, so we can test
11165      # for unknown variables in the end.
11166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11167
11168      # Check if the provided tool contains a complete path.
11169      tool_specified="$WHICH"
11170      tool_basename="${tool_specified##*/}"
11171      if test "x$tool_basename" = "x$tool_specified"; then
11172        # A command without a complete path is provided, search $PATH.
11173        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11174$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11175        # Extract the first word of "$tool_basename", so it can be a program name with args.
11176set dummy $tool_basename; ac_word=$2
11177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11178$as_echo_n "checking for $ac_word... " >&6; }
11179if ${ac_cv_path_WHICH+:} false; then :
11180  $as_echo_n "(cached) " >&6
11181else
11182  case $WHICH in
11183  [\\/]* | ?:[\\/]*)
11184  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11185  ;;
11186  *)
11187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11188for as_dir in $PATH
11189do
11190  IFS=$as_save_IFS
11191  test -z "$as_dir" && as_dir=.
11192    for ac_exec_ext in '' $ac_executable_extensions; do
11193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11194    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11196    break 2
11197  fi
11198done
11199  done
11200IFS=$as_save_IFS
11201
11202  ;;
11203esac
11204fi
11205WHICH=$ac_cv_path_WHICH
11206if test -n "$WHICH"; then
11207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11208$as_echo "$WHICH" >&6; }
11209else
11210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11211$as_echo "no" >&6; }
11212fi
11213
11214
11215        if test "x$WHICH" = x; then
11216          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11217        fi
11218      else
11219        # Otherwise we believe it is a complete path. Use it as it is.
11220        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11221$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11222        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11223$as_echo_n "checking for WHICH... " >&6; }
11224        if test ! -x "$tool_specified"; then
11225          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11226$as_echo "not found" >&6; }
11227          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11228        fi
11229        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11230$as_echo "$tool_specified" >&6; }
11231      fi
11232    fi
11233  fi
11234
11235
11236
11237  if test "x$WHICH" = x; then
11238    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11239  fi
11240
11241
11242
11243
11244
11245  # Publish this variable in the help.
11246
11247
11248  if test "x$XARGS" = x; then
11249    # The variable is not set by user, try to locate tool using the code snippet
11250    for ac_prog in xargs
11251do
11252  # Extract the first word of "$ac_prog", so it can be a program name with args.
11253set dummy $ac_prog; ac_word=$2
11254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11255$as_echo_n "checking for $ac_word... " >&6; }
11256if ${ac_cv_path_XARGS+:} false; then :
11257  $as_echo_n "(cached) " >&6
11258else
11259  case $XARGS in
11260  [\\/]* | ?:[\\/]*)
11261  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11262  ;;
11263  *)
11264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11265for as_dir in $PATH
11266do
11267  IFS=$as_save_IFS
11268  test -z "$as_dir" && as_dir=.
11269    for ac_exec_ext in '' $ac_executable_extensions; do
11270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11271    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11273    break 2
11274  fi
11275done
11276  done
11277IFS=$as_save_IFS
11278
11279  ;;
11280esac
11281fi
11282XARGS=$ac_cv_path_XARGS
11283if test -n "$XARGS"; then
11284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11285$as_echo "$XARGS" >&6; }
11286else
11287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11288$as_echo "no" >&6; }
11289fi
11290
11291
11292  test -n "$XARGS" && break
11293done
11294
11295  else
11296    # The variable is set, but is it from the command line or the environment?
11297
11298    # Try to remove the string !XARGS! from our list.
11299    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11300    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11301      # If it failed, the variable was not from the command line. Ignore it,
11302      # but warn the user (except for BASH, which is always set by the calling BASH).
11303      if test "xXARGS" != xBASH; then
11304        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11305$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11306      fi
11307      # Try to locate tool using the code snippet
11308      for ac_prog in xargs
11309do
11310  # Extract the first word of "$ac_prog", so it can be a program name with args.
11311set dummy $ac_prog; ac_word=$2
11312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11313$as_echo_n "checking for $ac_word... " >&6; }
11314if ${ac_cv_path_XARGS+:} false; then :
11315  $as_echo_n "(cached) " >&6
11316else
11317  case $XARGS in
11318  [\\/]* | ?:[\\/]*)
11319  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11320  ;;
11321  *)
11322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11323for as_dir in $PATH
11324do
11325  IFS=$as_save_IFS
11326  test -z "$as_dir" && as_dir=.
11327    for ac_exec_ext in '' $ac_executable_extensions; do
11328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11329    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11331    break 2
11332  fi
11333done
11334  done
11335IFS=$as_save_IFS
11336
11337  ;;
11338esac
11339fi
11340XARGS=$ac_cv_path_XARGS
11341if test -n "$XARGS"; then
11342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11343$as_echo "$XARGS" >&6; }
11344else
11345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11346$as_echo "no" >&6; }
11347fi
11348
11349
11350  test -n "$XARGS" && break
11351done
11352
11353    else
11354      # If it succeeded, then it was overridden by the user. We will use it
11355      # for the tool.
11356
11357      # First remove it from the list of overridden variables, so we can test
11358      # for unknown variables in the end.
11359      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11360
11361      # Check if the provided tool contains a complete path.
11362      tool_specified="$XARGS"
11363      tool_basename="${tool_specified##*/}"
11364      if test "x$tool_basename" = "x$tool_specified"; then
11365        # A command without a complete path is provided, search $PATH.
11366        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11367$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11368        # Extract the first word of "$tool_basename", so it can be a program name with args.
11369set dummy $tool_basename; ac_word=$2
11370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11371$as_echo_n "checking for $ac_word... " >&6; }
11372if ${ac_cv_path_XARGS+:} false; then :
11373  $as_echo_n "(cached) " >&6
11374else
11375  case $XARGS in
11376  [\\/]* | ?:[\\/]*)
11377  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11378  ;;
11379  *)
11380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11381for as_dir in $PATH
11382do
11383  IFS=$as_save_IFS
11384  test -z "$as_dir" && as_dir=.
11385    for ac_exec_ext in '' $ac_executable_extensions; do
11386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11387    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11389    break 2
11390  fi
11391done
11392  done
11393IFS=$as_save_IFS
11394
11395  ;;
11396esac
11397fi
11398XARGS=$ac_cv_path_XARGS
11399if test -n "$XARGS"; then
11400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11401$as_echo "$XARGS" >&6; }
11402else
11403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11404$as_echo "no" >&6; }
11405fi
11406
11407
11408        if test "x$XARGS" = x; then
11409          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11410        fi
11411      else
11412        # Otherwise we believe it is a complete path. Use it as it is.
11413        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11414$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11415        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11416$as_echo_n "checking for XARGS... " >&6; }
11417        if test ! -x "$tool_specified"; then
11418          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11419$as_echo "not found" >&6; }
11420          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11421        fi
11422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11423$as_echo "$tool_specified" >&6; }
11424      fi
11425    fi
11426  fi
11427
11428
11429
11430  if test "x$XARGS" = x; then
11431    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11432  fi
11433
11434
11435
11436  # Then required tools that require some special treatment.
11437
11438
11439  # Publish this variable in the help.
11440
11441
11442  if test "x$AWK" = x; then
11443    # The variable is not set by user, try to locate tool using the code snippet
11444    for ac_prog in gawk mawk nawk awk
11445do
11446  # Extract the first word of "$ac_prog", so it can be a program name with args.
11447set dummy $ac_prog; ac_word=$2
11448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11449$as_echo_n "checking for $ac_word... " >&6; }
11450if ${ac_cv_prog_AWK+:} false; then :
11451  $as_echo_n "(cached) " >&6
11452else
11453  if test -n "$AWK"; then
11454  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11455else
11456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11457for as_dir in $PATH
11458do
11459  IFS=$as_save_IFS
11460  test -z "$as_dir" && as_dir=.
11461    for ac_exec_ext in '' $ac_executable_extensions; do
11462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11463    ac_cv_prog_AWK="$ac_prog"
11464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11465    break 2
11466  fi
11467done
11468  done
11469IFS=$as_save_IFS
11470
11471fi
11472fi
11473AWK=$ac_cv_prog_AWK
11474if test -n "$AWK"; then
11475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11476$as_echo "$AWK" >&6; }
11477else
11478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11479$as_echo "no" >&6; }
11480fi
11481
11482
11483  test -n "$AWK" && break
11484done
11485
11486  else
11487    # The variable is set, but is it from the command line or the environment?
11488
11489    # Try to remove the string !AWK! from our list.
11490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11492      # If it failed, the variable was not from the command line. Ignore it,
11493      # but warn the user (except for BASH, which is always set by the calling BASH).
11494      if test "xAWK" != xBASH; then
11495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11496$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11497      fi
11498      # Try to locate tool using the code snippet
11499      for ac_prog in gawk mawk nawk awk
11500do
11501  # Extract the first word of "$ac_prog", so it can be a program name with args.
11502set dummy $ac_prog; ac_word=$2
11503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11504$as_echo_n "checking for $ac_word... " >&6; }
11505if ${ac_cv_prog_AWK+:} false; then :
11506  $as_echo_n "(cached) " >&6
11507else
11508  if test -n "$AWK"; then
11509  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11510else
11511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11512for as_dir in $PATH
11513do
11514  IFS=$as_save_IFS
11515  test -z "$as_dir" && as_dir=.
11516    for ac_exec_ext in '' $ac_executable_extensions; do
11517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11518    ac_cv_prog_AWK="$ac_prog"
11519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11520    break 2
11521  fi
11522done
11523  done
11524IFS=$as_save_IFS
11525
11526fi
11527fi
11528AWK=$ac_cv_prog_AWK
11529if test -n "$AWK"; then
11530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11531$as_echo "$AWK" >&6; }
11532else
11533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11534$as_echo "no" >&6; }
11535fi
11536
11537
11538  test -n "$AWK" && break
11539done
11540
11541    else
11542      # If it succeeded, then it was overridden by the user. We will use it
11543      # for the tool.
11544
11545      # First remove it from the list of overridden variables, so we can test
11546      # for unknown variables in the end.
11547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11548
11549      # Check if the provided tool contains a complete path.
11550      tool_specified="$AWK"
11551      tool_basename="${tool_specified##*/}"
11552      if test "x$tool_basename" = "x$tool_specified"; then
11553        # A command without a complete path is provided, search $PATH.
11554        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11555$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11556        # Extract the first word of "$tool_basename", so it can be a program name with args.
11557set dummy $tool_basename; ac_word=$2
11558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11559$as_echo_n "checking for $ac_word... " >&6; }
11560if ${ac_cv_path_AWK+:} false; then :
11561  $as_echo_n "(cached) " >&6
11562else
11563  case $AWK in
11564  [\\/]* | ?:[\\/]*)
11565  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11566  ;;
11567  *)
11568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11569for as_dir in $PATH
11570do
11571  IFS=$as_save_IFS
11572  test -z "$as_dir" && as_dir=.
11573    for ac_exec_ext in '' $ac_executable_extensions; do
11574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11575    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11577    break 2
11578  fi
11579done
11580  done
11581IFS=$as_save_IFS
11582
11583  ;;
11584esac
11585fi
11586AWK=$ac_cv_path_AWK
11587if test -n "$AWK"; then
11588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11589$as_echo "$AWK" >&6; }
11590else
11591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11592$as_echo "no" >&6; }
11593fi
11594
11595
11596        if test "x$AWK" = x; then
11597          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11598        fi
11599      else
11600        # Otherwise we believe it is a complete path. Use it as it is.
11601        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11602$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11604$as_echo_n "checking for AWK... " >&6; }
11605        if test ! -x "$tool_specified"; then
11606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11607$as_echo "not found" >&6; }
11608          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11609        fi
11610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11611$as_echo "$tool_specified" >&6; }
11612      fi
11613    fi
11614  fi
11615
11616
11617  if test "x$AWK" = x; then
11618    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11619  fi
11620
11621
11622
11623
11624  # Publish this variable in the help.
11625
11626
11627  if test "x$GREP" = x; then
11628    # The variable is not set by user, try to locate tool using the code snippet
11629    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11630$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11631if ${ac_cv_path_GREP+:} false; then :
11632  $as_echo_n "(cached) " >&6
11633else
11634  if test -z "$GREP"; then
11635  ac_path_GREP_found=false
11636  # Loop through the user's path and test for each of PROGNAME-LIST
11637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11638for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11639do
11640  IFS=$as_save_IFS
11641  test -z "$as_dir" && as_dir=.
11642    for ac_prog in grep ggrep; do
11643    for ac_exec_ext in '' $ac_executable_extensions; do
11644      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11645      as_fn_executable_p "$ac_path_GREP" || continue
11646# Check for GNU ac_path_GREP and select it if it is found.
11647  # Check for GNU $ac_path_GREP
11648case `"$ac_path_GREP" --version 2>&1` in
11649*GNU*)
11650  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11651*)
11652  ac_count=0
11653  $as_echo_n 0123456789 >"conftest.in"
11654  while :
11655  do
11656    cat "conftest.in" "conftest.in" >"conftest.tmp"
11657    mv "conftest.tmp" "conftest.in"
11658    cp "conftest.in" "conftest.nl"
11659    $as_echo 'GREP' >> "conftest.nl"
11660    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11661    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11662    as_fn_arith $ac_count + 1 && ac_count=$as_val
11663    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11664      # Best one so far, save it but keep looking for a better one
11665      ac_cv_path_GREP="$ac_path_GREP"
11666      ac_path_GREP_max=$ac_count
11667    fi
11668    # 10*(2^10) chars as input seems more than enough
11669    test $ac_count -gt 10 && break
11670  done
11671  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11672esac
11673
11674      $ac_path_GREP_found && break 3
11675    done
11676  done
11677  done
11678IFS=$as_save_IFS
11679  if test -z "$ac_cv_path_GREP"; then
11680    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11681  fi
11682else
11683  ac_cv_path_GREP=$GREP
11684fi
11685
11686fi
11687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11688$as_echo "$ac_cv_path_GREP" >&6; }
11689 GREP="$ac_cv_path_GREP"
11690
11691
11692  else
11693    # The variable is set, but is it from the command line or the environment?
11694
11695    # Try to remove the string !GREP! from our list.
11696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11698      # If it failed, the variable was not from the command line. Ignore it,
11699      # but warn the user (except for BASH, which is always set by the calling BASH).
11700      if test "xGREP" != xBASH; then
11701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11702$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11703      fi
11704      # Try to locate tool using the code snippet
11705      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11706$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11707if ${ac_cv_path_GREP+:} false; then :
11708  $as_echo_n "(cached) " >&6
11709else
11710  if test -z "$GREP"; then
11711  ac_path_GREP_found=false
11712  # Loop through the user's path and test for each of PROGNAME-LIST
11713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11714for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11715do
11716  IFS=$as_save_IFS
11717  test -z "$as_dir" && as_dir=.
11718    for ac_prog in grep ggrep; do
11719    for ac_exec_ext in '' $ac_executable_extensions; do
11720      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11721      as_fn_executable_p "$ac_path_GREP" || continue
11722# Check for GNU ac_path_GREP and select it if it is found.
11723  # Check for GNU $ac_path_GREP
11724case `"$ac_path_GREP" --version 2>&1` in
11725*GNU*)
11726  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11727*)
11728  ac_count=0
11729  $as_echo_n 0123456789 >"conftest.in"
11730  while :
11731  do
11732    cat "conftest.in" "conftest.in" >"conftest.tmp"
11733    mv "conftest.tmp" "conftest.in"
11734    cp "conftest.in" "conftest.nl"
11735    $as_echo 'GREP' >> "conftest.nl"
11736    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11737    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11738    as_fn_arith $ac_count + 1 && ac_count=$as_val
11739    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11740      # Best one so far, save it but keep looking for a better one
11741      ac_cv_path_GREP="$ac_path_GREP"
11742      ac_path_GREP_max=$ac_count
11743    fi
11744    # 10*(2^10) chars as input seems more than enough
11745    test $ac_count -gt 10 && break
11746  done
11747  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11748esac
11749
11750      $ac_path_GREP_found && break 3
11751    done
11752  done
11753  done
11754IFS=$as_save_IFS
11755  if test -z "$ac_cv_path_GREP"; then
11756    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11757  fi
11758else
11759  ac_cv_path_GREP=$GREP
11760fi
11761
11762fi
11763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11764$as_echo "$ac_cv_path_GREP" >&6; }
11765 GREP="$ac_cv_path_GREP"
11766
11767
11768    else
11769      # If it succeeded, then it was overridden by the user. We will use it
11770      # for the tool.
11771
11772      # First remove it from the list of overridden variables, so we can test
11773      # for unknown variables in the end.
11774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11775
11776      # Check if the provided tool contains a complete path.
11777      tool_specified="$GREP"
11778      tool_basename="${tool_specified##*/}"
11779      if test "x$tool_basename" = "x$tool_specified"; then
11780        # A command without a complete path is provided, search $PATH.
11781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11782$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11783        # Extract the first word of "$tool_basename", so it can be a program name with args.
11784set dummy $tool_basename; ac_word=$2
11785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11786$as_echo_n "checking for $ac_word... " >&6; }
11787if ${ac_cv_path_GREP+:} false; then :
11788  $as_echo_n "(cached) " >&6
11789else
11790  case $GREP in
11791  [\\/]* | ?:[\\/]*)
11792  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11793  ;;
11794  *)
11795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11796for as_dir in $PATH
11797do
11798  IFS=$as_save_IFS
11799  test -z "$as_dir" && as_dir=.
11800    for ac_exec_ext in '' $ac_executable_extensions; do
11801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11802    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11804    break 2
11805  fi
11806done
11807  done
11808IFS=$as_save_IFS
11809
11810  ;;
11811esac
11812fi
11813GREP=$ac_cv_path_GREP
11814if test -n "$GREP"; then
11815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11816$as_echo "$GREP" >&6; }
11817else
11818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11819$as_echo "no" >&6; }
11820fi
11821
11822
11823        if test "x$GREP" = x; then
11824          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11825        fi
11826      else
11827        # Otherwise we believe it is a complete path. Use it as it is.
11828        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11829$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11830        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11831$as_echo_n "checking for GREP... " >&6; }
11832        if test ! -x "$tool_specified"; then
11833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11834$as_echo "not found" >&6; }
11835          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11836        fi
11837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11838$as_echo "$tool_specified" >&6; }
11839      fi
11840    fi
11841  fi
11842
11843
11844  if test "x$GREP" = x; then
11845    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11846  fi
11847
11848
11849
11850
11851  # Publish this variable in the help.
11852
11853
11854  if test "x$EGREP" = x; then
11855    # The variable is not set by user, try to locate tool using the code snippet
11856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11857$as_echo_n "checking for egrep... " >&6; }
11858if ${ac_cv_path_EGREP+:} false; then :
11859  $as_echo_n "(cached) " >&6
11860else
11861  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11862   then ac_cv_path_EGREP="$GREP -E"
11863   else
11864     if test -z "$EGREP"; then
11865  ac_path_EGREP_found=false
11866  # Loop through the user's path and test for each of PROGNAME-LIST
11867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11868for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11869do
11870  IFS=$as_save_IFS
11871  test -z "$as_dir" && as_dir=.
11872    for ac_prog in egrep; do
11873    for ac_exec_ext in '' $ac_executable_extensions; do
11874      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11875      as_fn_executable_p "$ac_path_EGREP" || continue
11876# Check for GNU ac_path_EGREP and select it if it is found.
11877  # Check for GNU $ac_path_EGREP
11878case `"$ac_path_EGREP" --version 2>&1` in
11879*GNU*)
11880  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11881*)
11882  ac_count=0
11883  $as_echo_n 0123456789 >"conftest.in"
11884  while :
11885  do
11886    cat "conftest.in" "conftest.in" >"conftest.tmp"
11887    mv "conftest.tmp" "conftest.in"
11888    cp "conftest.in" "conftest.nl"
11889    $as_echo 'EGREP' >> "conftest.nl"
11890    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11891    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11892    as_fn_arith $ac_count + 1 && ac_count=$as_val
11893    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11894      # Best one so far, save it but keep looking for a better one
11895      ac_cv_path_EGREP="$ac_path_EGREP"
11896      ac_path_EGREP_max=$ac_count
11897    fi
11898    # 10*(2^10) chars as input seems more than enough
11899    test $ac_count -gt 10 && break
11900  done
11901  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11902esac
11903
11904      $ac_path_EGREP_found && break 3
11905    done
11906  done
11907  done
11908IFS=$as_save_IFS
11909  if test -z "$ac_cv_path_EGREP"; then
11910    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11911  fi
11912else
11913  ac_cv_path_EGREP=$EGREP
11914fi
11915
11916   fi
11917fi
11918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11919$as_echo "$ac_cv_path_EGREP" >&6; }
11920 EGREP="$ac_cv_path_EGREP"
11921
11922
11923  else
11924    # The variable is set, but is it from the command line or the environment?
11925
11926    # Try to remove the string !EGREP! from our list.
11927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11929      # If it failed, the variable was not from the command line. Ignore it,
11930      # but warn the user (except for BASH, which is always set by the calling BASH).
11931      if test "xEGREP" != xBASH; then
11932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11933$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11934      fi
11935      # Try to locate tool using the code snippet
11936      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11937$as_echo_n "checking for egrep... " >&6; }
11938if ${ac_cv_path_EGREP+:} false; then :
11939  $as_echo_n "(cached) " >&6
11940else
11941  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11942   then ac_cv_path_EGREP="$GREP -E"
11943   else
11944     if test -z "$EGREP"; then
11945  ac_path_EGREP_found=false
11946  # Loop through the user's path and test for each of PROGNAME-LIST
11947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11948for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11949do
11950  IFS=$as_save_IFS
11951  test -z "$as_dir" && as_dir=.
11952    for ac_prog in egrep; do
11953    for ac_exec_ext in '' $ac_executable_extensions; do
11954      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11955      as_fn_executable_p "$ac_path_EGREP" || continue
11956# Check for GNU ac_path_EGREP and select it if it is found.
11957  # Check for GNU $ac_path_EGREP
11958case `"$ac_path_EGREP" --version 2>&1` in
11959*GNU*)
11960  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11961*)
11962  ac_count=0
11963  $as_echo_n 0123456789 >"conftest.in"
11964  while :
11965  do
11966    cat "conftest.in" "conftest.in" >"conftest.tmp"
11967    mv "conftest.tmp" "conftest.in"
11968    cp "conftest.in" "conftest.nl"
11969    $as_echo 'EGREP' >> "conftest.nl"
11970    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11971    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11972    as_fn_arith $ac_count + 1 && ac_count=$as_val
11973    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11974      # Best one so far, save it but keep looking for a better one
11975      ac_cv_path_EGREP="$ac_path_EGREP"
11976      ac_path_EGREP_max=$ac_count
11977    fi
11978    # 10*(2^10) chars as input seems more than enough
11979    test $ac_count -gt 10 && break
11980  done
11981  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11982esac
11983
11984      $ac_path_EGREP_found && break 3
11985    done
11986  done
11987  done
11988IFS=$as_save_IFS
11989  if test -z "$ac_cv_path_EGREP"; then
11990    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11991  fi
11992else
11993  ac_cv_path_EGREP=$EGREP
11994fi
11995
11996   fi
11997fi
11998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11999$as_echo "$ac_cv_path_EGREP" >&6; }
12000 EGREP="$ac_cv_path_EGREP"
12001
12002
12003    else
12004      # If it succeeded, then it was overridden by the user. We will use it
12005      # for the tool.
12006
12007      # First remove it from the list of overridden variables, so we can test
12008      # for unknown variables in the end.
12009      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12010
12011      # Check if the provided tool contains a complete path.
12012      tool_specified="$EGREP"
12013      tool_basename="${tool_specified##*/}"
12014      if test "x$tool_basename" = "x$tool_specified"; then
12015        # A command without a complete path is provided, search $PATH.
12016        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12017$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12018        # Extract the first word of "$tool_basename", so it can be a program name with args.
12019set dummy $tool_basename; ac_word=$2
12020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12021$as_echo_n "checking for $ac_word... " >&6; }
12022if ${ac_cv_path_EGREP+:} false; then :
12023  $as_echo_n "(cached) " >&6
12024else
12025  case $EGREP in
12026  [\\/]* | ?:[\\/]*)
12027  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12028  ;;
12029  *)
12030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12031for as_dir in $PATH
12032do
12033  IFS=$as_save_IFS
12034  test -z "$as_dir" && as_dir=.
12035    for ac_exec_ext in '' $ac_executable_extensions; do
12036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12037    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12039    break 2
12040  fi
12041done
12042  done
12043IFS=$as_save_IFS
12044
12045  ;;
12046esac
12047fi
12048EGREP=$ac_cv_path_EGREP
12049if test -n "$EGREP"; then
12050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12051$as_echo "$EGREP" >&6; }
12052else
12053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12054$as_echo "no" >&6; }
12055fi
12056
12057
12058        if test "x$EGREP" = x; then
12059          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12060        fi
12061      else
12062        # Otherwise we believe it is a complete path. Use it as it is.
12063        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12064$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12065        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12066$as_echo_n "checking for EGREP... " >&6; }
12067        if test ! -x "$tool_specified"; then
12068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12069$as_echo "not found" >&6; }
12070          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12071        fi
12072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12073$as_echo "$tool_specified" >&6; }
12074      fi
12075    fi
12076  fi
12077
12078
12079  if test "x$EGREP" = x; then
12080    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12081  fi
12082
12083
12084
12085
12086  # Publish this variable in the help.
12087
12088
12089  if test "x$FGREP" = x; then
12090    # The variable is not set by user, try to locate tool using the code snippet
12091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12092$as_echo_n "checking for fgrep... " >&6; }
12093if ${ac_cv_path_FGREP+:} false; then :
12094  $as_echo_n "(cached) " >&6
12095else
12096  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12097   then ac_cv_path_FGREP="$GREP -F"
12098   else
12099     if test -z "$FGREP"; then
12100  ac_path_FGREP_found=false
12101  # Loop through the user's path and test for each of PROGNAME-LIST
12102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12103for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12104do
12105  IFS=$as_save_IFS
12106  test -z "$as_dir" && as_dir=.
12107    for ac_prog in fgrep; do
12108    for ac_exec_ext in '' $ac_executable_extensions; do
12109      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12110      as_fn_executable_p "$ac_path_FGREP" || continue
12111# Check for GNU ac_path_FGREP and select it if it is found.
12112  # Check for GNU $ac_path_FGREP
12113case `"$ac_path_FGREP" --version 2>&1` in
12114*GNU*)
12115  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12116*)
12117  ac_count=0
12118  $as_echo_n 0123456789 >"conftest.in"
12119  while :
12120  do
12121    cat "conftest.in" "conftest.in" >"conftest.tmp"
12122    mv "conftest.tmp" "conftest.in"
12123    cp "conftest.in" "conftest.nl"
12124    $as_echo 'FGREP' >> "conftest.nl"
12125    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12126    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12127    as_fn_arith $ac_count + 1 && ac_count=$as_val
12128    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12129      # Best one so far, save it but keep looking for a better one
12130      ac_cv_path_FGREP="$ac_path_FGREP"
12131      ac_path_FGREP_max=$ac_count
12132    fi
12133    # 10*(2^10) chars as input seems more than enough
12134    test $ac_count -gt 10 && break
12135  done
12136  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12137esac
12138
12139      $ac_path_FGREP_found && break 3
12140    done
12141  done
12142  done
12143IFS=$as_save_IFS
12144  if test -z "$ac_cv_path_FGREP"; then
12145    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12146  fi
12147else
12148  ac_cv_path_FGREP=$FGREP
12149fi
12150
12151   fi
12152fi
12153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12154$as_echo "$ac_cv_path_FGREP" >&6; }
12155 FGREP="$ac_cv_path_FGREP"
12156
12157
12158  else
12159    # The variable is set, but is it from the command line or the environment?
12160
12161    # Try to remove the string !FGREP! from our list.
12162    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12163    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12164      # If it failed, the variable was not from the command line. Ignore it,
12165      # but warn the user (except for BASH, which is always set by the calling BASH).
12166      if test "xFGREP" != xBASH; then
12167        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12168$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12169      fi
12170      # Try to locate tool using the code snippet
12171      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12172$as_echo_n "checking for fgrep... " >&6; }
12173if ${ac_cv_path_FGREP+:} false; then :
12174  $as_echo_n "(cached) " >&6
12175else
12176  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12177   then ac_cv_path_FGREP="$GREP -F"
12178   else
12179     if test -z "$FGREP"; then
12180  ac_path_FGREP_found=false
12181  # Loop through the user's path and test for each of PROGNAME-LIST
12182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12183for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12184do
12185  IFS=$as_save_IFS
12186  test -z "$as_dir" && as_dir=.
12187    for ac_prog in fgrep; do
12188    for ac_exec_ext in '' $ac_executable_extensions; do
12189      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12190      as_fn_executable_p "$ac_path_FGREP" || continue
12191# Check for GNU ac_path_FGREP and select it if it is found.
12192  # Check for GNU $ac_path_FGREP
12193case `"$ac_path_FGREP" --version 2>&1` in
12194*GNU*)
12195  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12196*)
12197  ac_count=0
12198  $as_echo_n 0123456789 >"conftest.in"
12199  while :
12200  do
12201    cat "conftest.in" "conftest.in" >"conftest.tmp"
12202    mv "conftest.tmp" "conftest.in"
12203    cp "conftest.in" "conftest.nl"
12204    $as_echo 'FGREP' >> "conftest.nl"
12205    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12206    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12207    as_fn_arith $ac_count + 1 && ac_count=$as_val
12208    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12209      # Best one so far, save it but keep looking for a better one
12210      ac_cv_path_FGREP="$ac_path_FGREP"
12211      ac_path_FGREP_max=$ac_count
12212    fi
12213    # 10*(2^10) chars as input seems more than enough
12214    test $ac_count -gt 10 && break
12215  done
12216  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12217esac
12218
12219      $ac_path_FGREP_found && break 3
12220    done
12221  done
12222  done
12223IFS=$as_save_IFS
12224  if test -z "$ac_cv_path_FGREP"; then
12225    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12226  fi
12227else
12228  ac_cv_path_FGREP=$FGREP
12229fi
12230
12231   fi
12232fi
12233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12234$as_echo "$ac_cv_path_FGREP" >&6; }
12235 FGREP="$ac_cv_path_FGREP"
12236
12237
12238    else
12239      # If it succeeded, then it was overridden by the user. We will use it
12240      # for the tool.
12241
12242      # First remove it from the list of overridden variables, so we can test
12243      # for unknown variables in the end.
12244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12245
12246      # Check if the provided tool contains a complete path.
12247      tool_specified="$FGREP"
12248      tool_basename="${tool_specified##*/}"
12249      if test "x$tool_basename" = "x$tool_specified"; then
12250        # A command without a complete path is provided, search $PATH.
12251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12252$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12253        # Extract the first word of "$tool_basename", so it can be a program name with args.
12254set dummy $tool_basename; ac_word=$2
12255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12256$as_echo_n "checking for $ac_word... " >&6; }
12257if ${ac_cv_path_FGREP+:} false; then :
12258  $as_echo_n "(cached) " >&6
12259else
12260  case $FGREP in
12261  [\\/]* | ?:[\\/]*)
12262  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12263  ;;
12264  *)
12265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12266for as_dir in $PATH
12267do
12268  IFS=$as_save_IFS
12269  test -z "$as_dir" && as_dir=.
12270    for ac_exec_ext in '' $ac_executable_extensions; do
12271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12272    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12274    break 2
12275  fi
12276done
12277  done
12278IFS=$as_save_IFS
12279
12280  ;;
12281esac
12282fi
12283FGREP=$ac_cv_path_FGREP
12284if test -n "$FGREP"; then
12285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12286$as_echo "$FGREP" >&6; }
12287else
12288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12289$as_echo "no" >&6; }
12290fi
12291
12292
12293        if test "x$FGREP" = x; then
12294          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12295        fi
12296      else
12297        # Otherwise we believe it is a complete path. Use it as it is.
12298        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12299$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12301$as_echo_n "checking for FGREP... " >&6; }
12302        if test ! -x "$tool_specified"; then
12303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12304$as_echo "not found" >&6; }
12305          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12306        fi
12307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12308$as_echo "$tool_specified" >&6; }
12309      fi
12310    fi
12311  fi
12312
12313
12314  if test "x$FGREP" = x; then
12315    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12316  fi
12317
12318
12319
12320
12321  # Publish this variable in the help.
12322
12323
12324  if test "x$SED" = x; then
12325    # The variable is not set by user, try to locate tool using the code snippet
12326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12327$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12328if ${ac_cv_path_SED+:} false; then :
12329  $as_echo_n "(cached) " >&6
12330else
12331            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12332     for ac_i in 1 2 3 4 5 6 7; do
12333       ac_script="$ac_script$as_nl$ac_script"
12334     done
12335     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12336     { ac_script=; unset ac_script;}
12337     if test -z "$SED"; then
12338  ac_path_SED_found=false
12339  # Loop through the user's path and test for each of PROGNAME-LIST
12340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12341for as_dir in $PATH
12342do
12343  IFS=$as_save_IFS
12344  test -z "$as_dir" && as_dir=.
12345    for ac_prog in sed gsed; do
12346    for ac_exec_ext in '' $ac_executable_extensions; do
12347      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12348      as_fn_executable_p "$ac_path_SED" || continue
12349# Check for GNU ac_path_SED and select it if it is found.
12350  # Check for GNU $ac_path_SED
12351case `"$ac_path_SED" --version 2>&1` in
12352*GNU*)
12353  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12354*)
12355  ac_count=0
12356  $as_echo_n 0123456789 >"conftest.in"
12357  while :
12358  do
12359    cat "conftest.in" "conftest.in" >"conftest.tmp"
12360    mv "conftest.tmp" "conftest.in"
12361    cp "conftest.in" "conftest.nl"
12362    $as_echo '' >> "conftest.nl"
12363    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12364    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12365    as_fn_arith $ac_count + 1 && ac_count=$as_val
12366    if test $ac_count -gt ${ac_path_SED_max-0}; then
12367      # Best one so far, save it but keep looking for a better one
12368      ac_cv_path_SED="$ac_path_SED"
12369      ac_path_SED_max=$ac_count
12370    fi
12371    # 10*(2^10) chars as input seems more than enough
12372    test $ac_count -gt 10 && break
12373  done
12374  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12375esac
12376
12377      $ac_path_SED_found && break 3
12378    done
12379  done
12380  done
12381IFS=$as_save_IFS
12382  if test -z "$ac_cv_path_SED"; then
12383    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12384  fi
12385else
12386  ac_cv_path_SED=$SED
12387fi
12388
12389fi
12390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12391$as_echo "$ac_cv_path_SED" >&6; }
12392 SED="$ac_cv_path_SED"
12393  rm -f conftest.sed
12394
12395  else
12396    # The variable is set, but is it from the command line or the environment?
12397
12398    # Try to remove the string !SED! from our list.
12399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12401      # If it failed, the variable was not from the command line. Ignore it,
12402      # but warn the user (except for BASH, which is always set by the calling BASH).
12403      if test "xSED" != xBASH; then
12404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12405$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12406      fi
12407      # Try to locate tool using the code snippet
12408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12409$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12410if ${ac_cv_path_SED+:} false; then :
12411  $as_echo_n "(cached) " >&6
12412else
12413            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12414     for ac_i in 1 2 3 4 5 6 7; do
12415       ac_script="$ac_script$as_nl$ac_script"
12416     done
12417     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12418     { ac_script=; unset ac_script;}
12419     if test -z "$SED"; then
12420  ac_path_SED_found=false
12421  # Loop through the user's path and test for each of PROGNAME-LIST
12422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12423for as_dir in $PATH
12424do
12425  IFS=$as_save_IFS
12426  test -z "$as_dir" && as_dir=.
12427    for ac_prog in sed gsed; do
12428    for ac_exec_ext in '' $ac_executable_extensions; do
12429      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12430      as_fn_executable_p "$ac_path_SED" || continue
12431# Check for GNU ac_path_SED and select it if it is found.
12432  # Check for GNU $ac_path_SED
12433case `"$ac_path_SED" --version 2>&1` in
12434*GNU*)
12435  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12436*)
12437  ac_count=0
12438  $as_echo_n 0123456789 >"conftest.in"
12439  while :
12440  do
12441    cat "conftest.in" "conftest.in" >"conftest.tmp"
12442    mv "conftest.tmp" "conftest.in"
12443    cp "conftest.in" "conftest.nl"
12444    $as_echo '' >> "conftest.nl"
12445    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12446    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12447    as_fn_arith $ac_count + 1 && ac_count=$as_val
12448    if test $ac_count -gt ${ac_path_SED_max-0}; then
12449      # Best one so far, save it but keep looking for a better one
12450      ac_cv_path_SED="$ac_path_SED"
12451      ac_path_SED_max=$ac_count
12452    fi
12453    # 10*(2^10) chars as input seems more than enough
12454    test $ac_count -gt 10 && break
12455  done
12456  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12457esac
12458
12459      $ac_path_SED_found && break 3
12460    done
12461  done
12462  done
12463IFS=$as_save_IFS
12464  if test -z "$ac_cv_path_SED"; then
12465    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12466  fi
12467else
12468  ac_cv_path_SED=$SED
12469fi
12470
12471fi
12472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12473$as_echo "$ac_cv_path_SED" >&6; }
12474 SED="$ac_cv_path_SED"
12475  rm -f conftest.sed
12476
12477    else
12478      # If it succeeded, then it was overridden by the user. We will use it
12479      # for the tool.
12480
12481      # First remove it from the list of overridden variables, so we can test
12482      # for unknown variables in the end.
12483      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12484
12485      # Check if the provided tool contains a complete path.
12486      tool_specified="$SED"
12487      tool_basename="${tool_specified##*/}"
12488      if test "x$tool_basename" = "x$tool_specified"; then
12489        # A command without a complete path is provided, search $PATH.
12490        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12491$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12492        # Extract the first word of "$tool_basename", so it can be a program name with args.
12493set dummy $tool_basename; ac_word=$2
12494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12495$as_echo_n "checking for $ac_word... " >&6; }
12496if ${ac_cv_path_SED+:} false; then :
12497  $as_echo_n "(cached) " >&6
12498else
12499  case $SED in
12500  [\\/]* | ?:[\\/]*)
12501  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12502  ;;
12503  *)
12504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12505for as_dir in $PATH
12506do
12507  IFS=$as_save_IFS
12508  test -z "$as_dir" && as_dir=.
12509    for ac_exec_ext in '' $ac_executable_extensions; do
12510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12511    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12513    break 2
12514  fi
12515done
12516  done
12517IFS=$as_save_IFS
12518
12519  ;;
12520esac
12521fi
12522SED=$ac_cv_path_SED
12523if test -n "$SED"; then
12524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12525$as_echo "$SED" >&6; }
12526else
12527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12528$as_echo "no" >&6; }
12529fi
12530
12531
12532        if test "x$SED" = x; then
12533          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12534        fi
12535      else
12536        # Otherwise we believe it is a complete path. Use it as it is.
12537        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12538$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12540$as_echo_n "checking for SED... " >&6; }
12541        if test ! -x "$tool_specified"; then
12542          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12543$as_echo "not found" >&6; }
12544          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12545        fi
12546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12547$as_echo "$tool_specified" >&6; }
12548      fi
12549    fi
12550  fi
12551
12552
12553  if test "x$SED" = x; then
12554    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12555  fi
12556
12557
12558
12559  # Always force rm.
12560  RM="$RM -f"
12561
12562  # pwd behaves differently on various platforms and some don't support the -L flag.
12563  # Always use the bash builtin pwd to get uniform behavior.
12564  THEPWDCMD=pwd
12565
12566  # These are not required on all platforms
12567
12568
12569  # Publish this variable in the help.
12570
12571
12572  if test "x$CYGPATH" = x; then
12573    # The variable is not set by user, try to locate tool using the code snippet
12574    for ac_prog in cygpath
12575do
12576  # Extract the first word of "$ac_prog", so it can be a program name with args.
12577set dummy $ac_prog; ac_word=$2
12578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12579$as_echo_n "checking for $ac_word... " >&6; }
12580if ${ac_cv_path_CYGPATH+:} false; then :
12581  $as_echo_n "(cached) " >&6
12582else
12583  case $CYGPATH in
12584  [\\/]* | ?:[\\/]*)
12585  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12586  ;;
12587  *)
12588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12589for as_dir in $PATH
12590do
12591  IFS=$as_save_IFS
12592  test -z "$as_dir" && as_dir=.
12593    for ac_exec_ext in '' $ac_executable_extensions; do
12594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12595    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12597    break 2
12598  fi
12599done
12600  done
12601IFS=$as_save_IFS
12602
12603  ;;
12604esac
12605fi
12606CYGPATH=$ac_cv_path_CYGPATH
12607if test -n "$CYGPATH"; then
12608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12609$as_echo "$CYGPATH" >&6; }
12610else
12611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12612$as_echo "no" >&6; }
12613fi
12614
12615
12616  test -n "$CYGPATH" && break
12617done
12618
12619  else
12620    # The variable is set, but is it from the command line or the environment?
12621
12622    # Try to remove the string !CYGPATH! from our list.
12623    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12624    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12625      # If it failed, the variable was not from the command line. Ignore it,
12626      # but warn the user (except for BASH, which is always set by the calling BASH).
12627      if test "xCYGPATH" != xBASH; then
12628        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12629$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12630      fi
12631      # Try to locate tool using the code snippet
12632      for ac_prog in cygpath
12633do
12634  # Extract the first word of "$ac_prog", so it can be a program name with args.
12635set dummy $ac_prog; ac_word=$2
12636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12637$as_echo_n "checking for $ac_word... " >&6; }
12638if ${ac_cv_path_CYGPATH+:} false; then :
12639  $as_echo_n "(cached) " >&6
12640else
12641  case $CYGPATH in
12642  [\\/]* | ?:[\\/]*)
12643  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12644  ;;
12645  *)
12646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12647for as_dir in $PATH
12648do
12649  IFS=$as_save_IFS
12650  test -z "$as_dir" && as_dir=.
12651    for ac_exec_ext in '' $ac_executable_extensions; do
12652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12653    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12655    break 2
12656  fi
12657done
12658  done
12659IFS=$as_save_IFS
12660
12661  ;;
12662esac
12663fi
12664CYGPATH=$ac_cv_path_CYGPATH
12665if test -n "$CYGPATH"; then
12666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12667$as_echo "$CYGPATH" >&6; }
12668else
12669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12670$as_echo "no" >&6; }
12671fi
12672
12673
12674  test -n "$CYGPATH" && break
12675done
12676
12677    else
12678      # If it succeeded, then it was overridden by the user. We will use it
12679      # for the tool.
12680
12681      # First remove it from the list of overridden variables, so we can test
12682      # for unknown variables in the end.
12683      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12684
12685      # Check if the provided tool contains a complete path.
12686      tool_specified="$CYGPATH"
12687      tool_basename="${tool_specified##*/}"
12688      if test "x$tool_basename" = "x$tool_specified"; then
12689        # A command without a complete path is provided, search $PATH.
12690        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12691$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12692        # Extract the first word of "$tool_basename", so it can be a program name with args.
12693set dummy $tool_basename; ac_word=$2
12694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12695$as_echo_n "checking for $ac_word... " >&6; }
12696if ${ac_cv_path_CYGPATH+:} false; then :
12697  $as_echo_n "(cached) " >&6
12698else
12699  case $CYGPATH in
12700  [\\/]* | ?:[\\/]*)
12701  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12702  ;;
12703  *)
12704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12705for as_dir in $PATH
12706do
12707  IFS=$as_save_IFS
12708  test -z "$as_dir" && as_dir=.
12709    for ac_exec_ext in '' $ac_executable_extensions; do
12710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12711    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12713    break 2
12714  fi
12715done
12716  done
12717IFS=$as_save_IFS
12718
12719  ;;
12720esac
12721fi
12722CYGPATH=$ac_cv_path_CYGPATH
12723if test -n "$CYGPATH"; then
12724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12725$as_echo "$CYGPATH" >&6; }
12726else
12727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12728$as_echo "no" >&6; }
12729fi
12730
12731
12732        if test "x$CYGPATH" = x; then
12733          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12734        fi
12735      else
12736        # Otherwise we believe it is a complete path. Use it as it is.
12737        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12738$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12739        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12740$as_echo_n "checking for CYGPATH... " >&6; }
12741        if test ! -x "$tool_specified"; then
12742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12743$as_echo "not found" >&6; }
12744          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12745        fi
12746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12747$as_echo "$tool_specified" >&6; }
12748      fi
12749    fi
12750  fi
12751
12752
12753
12754
12755  # Publish this variable in the help.
12756
12757
12758  if test "x$READLINK" = x; then
12759    # The variable is not set by user, try to locate tool using the code snippet
12760    for ac_prog in greadlink readlink
12761do
12762  # Extract the first word of "$ac_prog", so it can be a program name with args.
12763set dummy $ac_prog; ac_word=$2
12764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12765$as_echo_n "checking for $ac_word... " >&6; }
12766if ${ac_cv_path_READLINK+:} false; then :
12767  $as_echo_n "(cached) " >&6
12768else
12769  case $READLINK in
12770  [\\/]* | ?:[\\/]*)
12771  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12772  ;;
12773  *)
12774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12775for as_dir in $PATH
12776do
12777  IFS=$as_save_IFS
12778  test -z "$as_dir" && as_dir=.
12779    for ac_exec_ext in '' $ac_executable_extensions; do
12780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12781    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12783    break 2
12784  fi
12785done
12786  done
12787IFS=$as_save_IFS
12788
12789  ;;
12790esac
12791fi
12792READLINK=$ac_cv_path_READLINK
12793if test -n "$READLINK"; then
12794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12795$as_echo "$READLINK" >&6; }
12796else
12797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12798$as_echo "no" >&6; }
12799fi
12800
12801
12802  test -n "$READLINK" && break
12803done
12804
12805  else
12806    # The variable is set, but is it from the command line or the environment?
12807
12808    # Try to remove the string !READLINK! from our list.
12809    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12810    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12811      # If it failed, the variable was not from the command line. Ignore it,
12812      # but warn the user (except for BASH, which is always set by the calling BASH).
12813      if test "xREADLINK" != xBASH; then
12814        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12815$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12816      fi
12817      # Try to locate tool using the code snippet
12818      for ac_prog in greadlink readlink
12819do
12820  # Extract the first word of "$ac_prog", so it can be a program name with args.
12821set dummy $ac_prog; ac_word=$2
12822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12823$as_echo_n "checking for $ac_word... " >&6; }
12824if ${ac_cv_path_READLINK+:} false; then :
12825  $as_echo_n "(cached) " >&6
12826else
12827  case $READLINK in
12828  [\\/]* | ?:[\\/]*)
12829  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12830  ;;
12831  *)
12832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12833for as_dir in $PATH
12834do
12835  IFS=$as_save_IFS
12836  test -z "$as_dir" && as_dir=.
12837    for ac_exec_ext in '' $ac_executable_extensions; do
12838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12839    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12841    break 2
12842  fi
12843done
12844  done
12845IFS=$as_save_IFS
12846
12847  ;;
12848esac
12849fi
12850READLINK=$ac_cv_path_READLINK
12851if test -n "$READLINK"; then
12852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12853$as_echo "$READLINK" >&6; }
12854else
12855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12856$as_echo "no" >&6; }
12857fi
12858
12859
12860  test -n "$READLINK" && break
12861done
12862
12863    else
12864      # If it succeeded, then it was overridden by the user. We will use it
12865      # for the tool.
12866
12867      # First remove it from the list of overridden variables, so we can test
12868      # for unknown variables in the end.
12869      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12870
12871      # Check if the provided tool contains a complete path.
12872      tool_specified="$READLINK"
12873      tool_basename="${tool_specified##*/}"
12874      if test "x$tool_basename" = "x$tool_specified"; then
12875        # A command without a complete path is provided, search $PATH.
12876        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12877$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12878        # Extract the first word of "$tool_basename", so it can be a program name with args.
12879set dummy $tool_basename; ac_word=$2
12880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12881$as_echo_n "checking for $ac_word... " >&6; }
12882if ${ac_cv_path_READLINK+:} false; then :
12883  $as_echo_n "(cached) " >&6
12884else
12885  case $READLINK in
12886  [\\/]* | ?:[\\/]*)
12887  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12888  ;;
12889  *)
12890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12891for as_dir in $PATH
12892do
12893  IFS=$as_save_IFS
12894  test -z "$as_dir" && as_dir=.
12895    for ac_exec_ext in '' $ac_executable_extensions; do
12896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12897    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12899    break 2
12900  fi
12901done
12902  done
12903IFS=$as_save_IFS
12904
12905  ;;
12906esac
12907fi
12908READLINK=$ac_cv_path_READLINK
12909if test -n "$READLINK"; then
12910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12911$as_echo "$READLINK" >&6; }
12912else
12913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12914$as_echo "no" >&6; }
12915fi
12916
12917
12918        if test "x$READLINK" = x; then
12919          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12920        fi
12921      else
12922        # Otherwise we believe it is a complete path. Use it as it is.
12923        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12924$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12925        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12926$as_echo_n "checking for READLINK... " >&6; }
12927        if test ! -x "$tool_specified"; then
12928          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12929$as_echo "not found" >&6; }
12930          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12931        fi
12932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12933$as_echo "$tool_specified" >&6; }
12934      fi
12935    fi
12936  fi
12937
12938
12939
12940
12941  # Publish this variable in the help.
12942
12943
12944  if test "x$DF" = x; then
12945    # The variable is not set by user, try to locate tool using the code snippet
12946    for ac_prog in df
12947do
12948  # Extract the first word of "$ac_prog", so it can be a program name with args.
12949set dummy $ac_prog; ac_word=$2
12950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12951$as_echo_n "checking for $ac_word... " >&6; }
12952if ${ac_cv_path_DF+:} false; then :
12953  $as_echo_n "(cached) " >&6
12954else
12955  case $DF in
12956  [\\/]* | ?:[\\/]*)
12957  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12958  ;;
12959  *)
12960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12961for as_dir in $PATH
12962do
12963  IFS=$as_save_IFS
12964  test -z "$as_dir" && as_dir=.
12965    for ac_exec_ext in '' $ac_executable_extensions; do
12966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12967    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12969    break 2
12970  fi
12971done
12972  done
12973IFS=$as_save_IFS
12974
12975  ;;
12976esac
12977fi
12978DF=$ac_cv_path_DF
12979if test -n "$DF"; then
12980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12981$as_echo "$DF" >&6; }
12982else
12983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12984$as_echo "no" >&6; }
12985fi
12986
12987
12988  test -n "$DF" && break
12989done
12990
12991  else
12992    # The variable is set, but is it from the command line or the environment?
12993
12994    # Try to remove the string !DF! from our list.
12995    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12996    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12997      # If it failed, the variable was not from the command line. Ignore it,
12998      # but warn the user (except for BASH, which is always set by the calling BASH).
12999      if test "xDF" != xBASH; then
13000        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13001$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13002      fi
13003      # Try to locate tool using the code snippet
13004      for ac_prog in df
13005do
13006  # Extract the first word of "$ac_prog", so it can be a program name with args.
13007set dummy $ac_prog; ac_word=$2
13008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13009$as_echo_n "checking for $ac_word... " >&6; }
13010if ${ac_cv_path_DF+:} false; then :
13011  $as_echo_n "(cached) " >&6
13012else
13013  case $DF in
13014  [\\/]* | ?:[\\/]*)
13015  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13016  ;;
13017  *)
13018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13019for as_dir in $PATH
13020do
13021  IFS=$as_save_IFS
13022  test -z "$as_dir" && as_dir=.
13023    for ac_exec_ext in '' $ac_executable_extensions; do
13024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13025    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13027    break 2
13028  fi
13029done
13030  done
13031IFS=$as_save_IFS
13032
13033  ;;
13034esac
13035fi
13036DF=$ac_cv_path_DF
13037if test -n "$DF"; then
13038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13039$as_echo "$DF" >&6; }
13040else
13041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13042$as_echo "no" >&6; }
13043fi
13044
13045
13046  test -n "$DF" && break
13047done
13048
13049    else
13050      # If it succeeded, then it was overridden by the user. We will use it
13051      # for the tool.
13052
13053      # First remove it from the list of overridden variables, so we can test
13054      # for unknown variables in the end.
13055      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13056
13057      # Check if the provided tool contains a complete path.
13058      tool_specified="$DF"
13059      tool_basename="${tool_specified##*/}"
13060      if test "x$tool_basename" = "x$tool_specified"; then
13061        # A command without a complete path is provided, search $PATH.
13062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13063$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13064        # Extract the first word of "$tool_basename", so it can be a program name with args.
13065set dummy $tool_basename; ac_word=$2
13066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13067$as_echo_n "checking for $ac_word... " >&6; }
13068if ${ac_cv_path_DF+:} false; then :
13069  $as_echo_n "(cached) " >&6
13070else
13071  case $DF in
13072  [\\/]* | ?:[\\/]*)
13073  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13074  ;;
13075  *)
13076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13077for as_dir in $PATH
13078do
13079  IFS=$as_save_IFS
13080  test -z "$as_dir" && as_dir=.
13081    for ac_exec_ext in '' $ac_executable_extensions; do
13082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13083    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13085    break 2
13086  fi
13087done
13088  done
13089IFS=$as_save_IFS
13090
13091  ;;
13092esac
13093fi
13094DF=$ac_cv_path_DF
13095if test -n "$DF"; then
13096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13097$as_echo "$DF" >&6; }
13098else
13099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13100$as_echo "no" >&6; }
13101fi
13102
13103
13104        if test "x$DF" = x; then
13105          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13106        fi
13107      else
13108        # Otherwise we believe it is a complete path. Use it as it is.
13109        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13110$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13112$as_echo_n "checking for DF... " >&6; }
13113        if test ! -x "$tool_specified"; then
13114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13115$as_echo "not found" >&6; }
13116          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13117        fi
13118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13119$as_echo "$tool_specified" >&6; }
13120      fi
13121    fi
13122  fi
13123
13124
13125
13126
13127  # Publish this variable in the help.
13128
13129
13130  if test "x$SETFILE" = x; then
13131    # The variable is not set by user, try to locate tool using the code snippet
13132    for ac_prog in SetFile
13133do
13134  # Extract the first word of "$ac_prog", so it can be a program name with args.
13135set dummy $ac_prog; ac_word=$2
13136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13137$as_echo_n "checking for $ac_word... " >&6; }
13138if ${ac_cv_path_SETFILE+:} false; then :
13139  $as_echo_n "(cached) " >&6
13140else
13141  case $SETFILE in
13142  [\\/]* | ?:[\\/]*)
13143  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13144  ;;
13145  *)
13146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13147for as_dir in $PATH
13148do
13149  IFS=$as_save_IFS
13150  test -z "$as_dir" && as_dir=.
13151    for ac_exec_ext in '' $ac_executable_extensions; do
13152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13153    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13155    break 2
13156  fi
13157done
13158  done
13159IFS=$as_save_IFS
13160
13161  ;;
13162esac
13163fi
13164SETFILE=$ac_cv_path_SETFILE
13165if test -n "$SETFILE"; then
13166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13167$as_echo "$SETFILE" >&6; }
13168else
13169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13170$as_echo "no" >&6; }
13171fi
13172
13173
13174  test -n "$SETFILE" && break
13175done
13176
13177  else
13178    # The variable is set, but is it from the command line or the environment?
13179
13180    # Try to remove the string !SETFILE! from our list.
13181    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13182    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13183      # If it failed, the variable was not from the command line. Ignore it,
13184      # but warn the user (except for BASH, which is always set by the calling BASH).
13185      if test "xSETFILE" != xBASH; then
13186        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13187$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13188      fi
13189      # Try to locate tool using the code snippet
13190      for ac_prog in SetFile
13191do
13192  # Extract the first word of "$ac_prog", so it can be a program name with args.
13193set dummy $ac_prog; ac_word=$2
13194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13195$as_echo_n "checking for $ac_word... " >&6; }
13196if ${ac_cv_path_SETFILE+:} false; then :
13197  $as_echo_n "(cached) " >&6
13198else
13199  case $SETFILE in
13200  [\\/]* | ?:[\\/]*)
13201  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13202  ;;
13203  *)
13204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13205for as_dir in $PATH
13206do
13207  IFS=$as_save_IFS
13208  test -z "$as_dir" && as_dir=.
13209    for ac_exec_ext in '' $ac_executable_extensions; do
13210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13211    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13213    break 2
13214  fi
13215done
13216  done
13217IFS=$as_save_IFS
13218
13219  ;;
13220esac
13221fi
13222SETFILE=$ac_cv_path_SETFILE
13223if test -n "$SETFILE"; then
13224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13225$as_echo "$SETFILE" >&6; }
13226else
13227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13228$as_echo "no" >&6; }
13229fi
13230
13231
13232  test -n "$SETFILE" && break
13233done
13234
13235    else
13236      # If it succeeded, then it was overridden by the user. We will use it
13237      # for the tool.
13238
13239      # First remove it from the list of overridden variables, so we can test
13240      # for unknown variables in the end.
13241      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13242
13243      # Check if the provided tool contains a complete path.
13244      tool_specified="$SETFILE"
13245      tool_basename="${tool_specified##*/}"
13246      if test "x$tool_basename" = "x$tool_specified"; then
13247        # A command without a complete path is provided, search $PATH.
13248        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13249$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13250        # Extract the first word of "$tool_basename", so it can be a program name with args.
13251set dummy $tool_basename; ac_word=$2
13252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13253$as_echo_n "checking for $ac_word... " >&6; }
13254if ${ac_cv_path_SETFILE+:} false; then :
13255  $as_echo_n "(cached) " >&6
13256else
13257  case $SETFILE in
13258  [\\/]* | ?:[\\/]*)
13259  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13260  ;;
13261  *)
13262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13263for as_dir in $PATH
13264do
13265  IFS=$as_save_IFS
13266  test -z "$as_dir" && as_dir=.
13267    for ac_exec_ext in '' $ac_executable_extensions; do
13268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13269    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13271    break 2
13272  fi
13273done
13274  done
13275IFS=$as_save_IFS
13276
13277  ;;
13278esac
13279fi
13280SETFILE=$ac_cv_path_SETFILE
13281if test -n "$SETFILE"; then
13282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13283$as_echo "$SETFILE" >&6; }
13284else
13285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13286$as_echo "no" >&6; }
13287fi
13288
13289
13290        if test "x$SETFILE" = x; then
13291          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13292        fi
13293      else
13294        # Otherwise we believe it is a complete path. Use it as it is.
13295        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13296$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13298$as_echo_n "checking for SETFILE... " >&6; }
13299        if test ! -x "$tool_specified"; then
13300          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13301$as_echo "not found" >&6; }
13302          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13303        fi
13304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13305$as_echo "$tool_specified" >&6; }
13306      fi
13307    fi
13308  fi
13309
13310
13311
13312
13313# Now we can determine OpenJDK build and target platforms. This is required to
13314# have early on.
13315# Make sure we can run config.sub.
13316$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13317  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13318
13319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13320$as_echo_n "checking build system type... " >&6; }
13321if ${ac_cv_build+:} false; then :
13322  $as_echo_n "(cached) " >&6
13323else
13324  ac_build_alias=$build_alias
13325test "x$ac_build_alias" = x &&
13326  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13327test "x$ac_build_alias" = x &&
13328  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13329ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13330  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13331
13332fi
13333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13334$as_echo "$ac_cv_build" >&6; }
13335case $ac_cv_build in
13336*-*-*) ;;
13337*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13338esac
13339build=$ac_cv_build
13340ac_save_IFS=$IFS; IFS='-'
13341set x $ac_cv_build
13342shift
13343build_cpu=$1
13344build_vendor=$2
13345shift; shift
13346# Remember, the first character of IFS is used to create $*,
13347# except with old shells:
13348build_os=$*
13349IFS=$ac_save_IFS
13350case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13351
13352
13353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13354$as_echo_n "checking host system type... " >&6; }
13355if ${ac_cv_host+:} false; then :
13356  $as_echo_n "(cached) " >&6
13357else
13358  if test "x$host_alias" = x; then
13359  ac_cv_host=$ac_cv_build
13360else
13361  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13362    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13363fi
13364
13365fi
13366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13367$as_echo "$ac_cv_host" >&6; }
13368case $ac_cv_host in
13369*-*-*) ;;
13370*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13371esac
13372host=$ac_cv_host
13373ac_save_IFS=$IFS; IFS='-'
13374set x $ac_cv_host
13375shift
13376host_cpu=$1
13377host_vendor=$2
13378shift; shift
13379# Remember, the first character of IFS is used to create $*,
13380# except with old shells:
13381host_os=$*
13382IFS=$ac_save_IFS
13383case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13384
13385
13386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13387$as_echo_n "checking target system type... " >&6; }
13388if ${ac_cv_target+:} false; then :
13389  $as_echo_n "(cached) " >&6
13390else
13391  if test "x$target_alias" = x; then
13392  ac_cv_target=$ac_cv_host
13393else
13394  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13395    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13396fi
13397
13398fi
13399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13400$as_echo "$ac_cv_target" >&6; }
13401case $ac_cv_target in
13402*-*-*) ;;
13403*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13404esac
13405target=$ac_cv_target
13406ac_save_IFS=$IFS; IFS='-'
13407set x $ac_cv_target
13408shift
13409target_cpu=$1
13410target_vendor=$2
13411shift; shift
13412# Remember, the first character of IFS is used to create $*,
13413# except with old shells:
13414target_os=$*
13415IFS=$ac_save_IFS
13416case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13417
13418
13419# The aliases save the names the user supplied, while $host etc.
13420# will get canonicalized.
13421test -n "$target_alias" &&
13422  test "$program_prefix$program_suffix$program_transform_name" = \
13423    NONENONEs,x,x, &&
13424  program_prefix=${target_alias}-
13425
13426  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13427  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13428  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13429  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13430  # to use the configure naming style.
13431
13432
13433
13434
13435
13436  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13437  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13438  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13439  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13440  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13441  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13442
13443
13444
13445  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13446
13447  case "$build_os" in
13448    *linux*)
13449      VAR_OS=linux
13450      VAR_OS_API=posix
13451      VAR_OS_ENV=linux
13452      ;;
13453    *solaris*)
13454      VAR_OS=solaris
13455      VAR_OS_API=posix
13456      VAR_OS_ENV=solaris
13457      ;;
13458    *darwin*)
13459      VAR_OS=macosx
13460      VAR_OS_API=posix
13461      VAR_OS_ENV=macosx
13462      ;;
13463    *bsd*)
13464      VAR_OS=bsd
13465      VAR_OS_API=posix
13466      VAR_OS_ENV=bsd
13467      ;;
13468    *cygwin*)
13469      VAR_OS=windows
13470      VAR_OS_API=winapi
13471      VAR_OS_ENV=windows.cygwin
13472      ;;
13473    *mingw*)
13474      VAR_OS=windows
13475      VAR_OS_API=winapi
13476      VAR_OS_ENV=windows.msys
13477      ;;
13478    *aix*)
13479      VAR_OS=aix
13480      VAR_OS_API=posix
13481      VAR_OS_ENV=aix
13482      ;;
13483    *)
13484      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13485      ;;
13486  esac
13487
13488
13489  # First argument is the cpu name from the trip/quad
13490  case "$build_cpu" in
13491    x86_64)
13492      VAR_CPU=x86_64
13493      VAR_CPU_ARCH=x86
13494      VAR_CPU_BITS=64
13495      VAR_CPU_ENDIAN=little
13496      ;;
13497    i?86)
13498      VAR_CPU=x86
13499      VAR_CPU_ARCH=x86
13500      VAR_CPU_BITS=32
13501      VAR_CPU_ENDIAN=little
13502      ;;
13503    arm*)
13504      VAR_CPU=arm
13505      VAR_CPU_ARCH=arm
13506      VAR_CPU_BITS=32
13507      VAR_CPU_ENDIAN=little
13508      ;;
13509    powerpc)
13510      VAR_CPU=ppc
13511      VAR_CPU_ARCH=ppc
13512      VAR_CPU_BITS=32
13513      VAR_CPU_ENDIAN=big
13514      ;;
13515    powerpc64)
13516      VAR_CPU=ppc64
13517      VAR_CPU_ARCH=ppc
13518      VAR_CPU_BITS=64
13519      VAR_CPU_ENDIAN=big
13520      ;;
13521    powerpc64le)
13522      VAR_CPU=ppc64
13523      VAR_CPU_ARCH=ppc
13524      VAR_CPU_BITS=64
13525      VAR_CPU_ENDIAN=little
13526      ;;
13527    s390)
13528      VAR_CPU=s390
13529      VAR_CPU_ARCH=s390
13530      VAR_CPU_BITS=32
13531      VAR_CPU_ENDIAN=big
13532      ;;
13533    s390x)
13534      VAR_CPU=s390x
13535      VAR_CPU_ARCH=s390
13536      VAR_CPU_BITS=64
13537      VAR_CPU_ENDIAN=big
13538      ;;
13539    sparc)
13540      VAR_CPU=sparc
13541      VAR_CPU_ARCH=sparc
13542      VAR_CPU_BITS=32
13543      VAR_CPU_ENDIAN=big
13544      ;;
13545    sparcv9)
13546      VAR_CPU=sparcv9
13547      VAR_CPU_ARCH=sparc
13548      VAR_CPU_BITS=64
13549      VAR_CPU_ENDIAN=big
13550      ;;
13551    *)
13552      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13553      ;;
13554  esac
13555
13556  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13557  OPENJDK_BUILD_OS="$VAR_OS"
13558  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13559  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13560  OPENJDK_BUILD_CPU="$VAR_CPU"
13561  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13562  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13563  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13564
13565
13566
13567
13568
13569
13570
13571  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13572$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13574$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13575
13576  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13577
13578  case "$host_os" in
13579    *linux*)
13580      VAR_OS=linux
13581      VAR_OS_API=posix
13582      VAR_OS_ENV=linux
13583      ;;
13584    *solaris*)
13585      VAR_OS=solaris
13586      VAR_OS_API=posix
13587      VAR_OS_ENV=solaris
13588      ;;
13589    *darwin*)
13590      VAR_OS=macosx
13591      VAR_OS_API=posix
13592      VAR_OS_ENV=macosx
13593      ;;
13594    *bsd*)
13595      VAR_OS=bsd
13596      VAR_OS_API=posix
13597      VAR_OS_ENV=bsd
13598      ;;
13599    *cygwin*)
13600      VAR_OS=windows
13601      VAR_OS_API=winapi
13602      VAR_OS_ENV=windows.cygwin
13603      ;;
13604    *mingw*)
13605      VAR_OS=windows
13606      VAR_OS_API=winapi
13607      VAR_OS_ENV=windows.msys
13608      ;;
13609    *aix*)
13610      VAR_OS=aix
13611      VAR_OS_API=posix
13612      VAR_OS_ENV=aix
13613      ;;
13614    *)
13615      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13616      ;;
13617  esac
13618
13619
13620  # First argument is the cpu name from the trip/quad
13621  case "$host_cpu" in
13622    x86_64)
13623      VAR_CPU=x86_64
13624      VAR_CPU_ARCH=x86
13625      VAR_CPU_BITS=64
13626      VAR_CPU_ENDIAN=little
13627      ;;
13628    i?86)
13629      VAR_CPU=x86
13630      VAR_CPU_ARCH=x86
13631      VAR_CPU_BITS=32
13632      VAR_CPU_ENDIAN=little
13633      ;;
13634    arm*)
13635      VAR_CPU=arm
13636      VAR_CPU_ARCH=arm
13637      VAR_CPU_BITS=32
13638      VAR_CPU_ENDIAN=little
13639      ;;
13640    powerpc)
13641      VAR_CPU=ppc
13642      VAR_CPU_ARCH=ppc
13643      VAR_CPU_BITS=32
13644      VAR_CPU_ENDIAN=big
13645      ;;
13646    powerpc64)
13647      VAR_CPU=ppc64
13648      VAR_CPU_ARCH=ppc
13649      VAR_CPU_BITS=64
13650      VAR_CPU_ENDIAN=big
13651      ;;
13652    powerpc64le)
13653      VAR_CPU=ppc64
13654      VAR_CPU_ARCH=ppc
13655      VAR_CPU_BITS=64
13656      VAR_CPU_ENDIAN=little
13657      ;;
13658    s390)
13659      VAR_CPU=s390
13660      VAR_CPU_ARCH=s390
13661      VAR_CPU_BITS=32
13662      VAR_CPU_ENDIAN=big
13663      ;;
13664    s390x)
13665      VAR_CPU=s390x
13666      VAR_CPU_ARCH=s390
13667      VAR_CPU_BITS=64
13668      VAR_CPU_ENDIAN=big
13669      ;;
13670    sparc)
13671      VAR_CPU=sparc
13672      VAR_CPU_ARCH=sparc
13673      VAR_CPU_BITS=32
13674      VAR_CPU_ENDIAN=big
13675      ;;
13676    sparcv9)
13677      VAR_CPU=sparcv9
13678      VAR_CPU_ARCH=sparc
13679      VAR_CPU_BITS=64
13680      VAR_CPU_ENDIAN=big
13681      ;;
13682    *)
13683      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13684      ;;
13685  esac
13686
13687  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13688  OPENJDK_TARGET_OS="$VAR_OS"
13689  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13690  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13691  OPENJDK_TARGET_CPU="$VAR_CPU"
13692  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13693  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13694  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13695
13696
13697
13698
13699
13700
13701
13702  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13703$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13705$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13706
13707
13708
13709# Check whether --with-target-bits was given.
13710if test "${with_target_bits+set}" = set; then :
13711  withval=$with_target_bits;
13712fi
13713
13714
13715  # We have three types of compiles:
13716  # native  == normal compilation, target system == build system
13717  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13718  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13719  #
13720  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13721    # We're doing a proper cross-compilation
13722    COMPILE_TYPE="cross"
13723  else
13724    COMPILE_TYPE="native"
13725  fi
13726
13727  if test "x$with_target_bits" != x; then
13728    if test "x$COMPILE_TYPE" = "xcross"; then
13729      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13730    fi
13731
13732    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13733      # A reduced build is requested
13734      COMPILE_TYPE="reduced"
13735      OPENJDK_TARGET_CPU_BITS=32
13736      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13737        OPENJDK_TARGET_CPU=x86
13738      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13739        OPENJDK_TARGET_CPU=sparc
13740      else
13741        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13742      fi
13743    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13744      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
13745    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13746      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13747$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13748    else
13749      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13750    fi
13751  fi
13752
13753
13754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13755$as_echo_n "checking compilation type... " >&6; }
13756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13757$as_echo "$COMPILE_TYPE" >&6; }
13758
13759
13760  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13761    REQUIRED_OS_NAME=SunOS
13762    REQUIRED_OS_VERSION=5.10
13763  fi
13764  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13765    REQUIRED_OS_NAME=Linux
13766    REQUIRED_OS_VERSION=2.6
13767  fi
13768  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13769    REQUIRED_OS_NAME=Windows
13770    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13771      REQUIRED_OS_VERSION=5.2
13772    else
13773      REQUIRED_OS_VERSION=5.1
13774    fi
13775  fi
13776  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13777    REQUIRED_OS_NAME=Darwin
13778    REQUIRED_OS_VERSION=11.2
13779  fi
13780
13781
13782
13783
13784
13785  # Also store the legacy naming of the cpu.
13786  # Ie i586 and amd64 instead of x86 and x86_64
13787  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13788  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13789    OPENJDK_TARGET_CPU_LEGACY="i586"
13790  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13791    # On all platforms except MacOSX replace x86_64 with amd64.
13792    OPENJDK_TARGET_CPU_LEGACY="amd64"
13793  fi
13794
13795
13796  # And the second legacy naming of the cpu.
13797  # Ie i386 and amd64 instead of x86 and x86_64.
13798  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13799  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13800    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13801  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13802    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13803  fi
13804
13805
13806  # This is the name of the cpu (but using i386 and amd64 instead of
13807  # x86 and x86_64, respectively), preceeded by a /, to be used when
13808  # locating libraries. On macosx, it's empty, though.
13809  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13810  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13811    OPENJDK_TARGET_CPU_LIBDIR=""
13812  fi
13813
13814
13815  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13816  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13817  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13818  OPENJDK_TARGET_CPU_ISADIR=""
13819  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13820    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13821      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13822    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13823      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13824    fi
13825  fi
13826
13827
13828  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13829  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13830  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13831    # On linux only, we replace x86 with i386.
13832    OPENJDK_TARGET_CPU_OSARCH="i386"
13833  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13834    # On all platforms except macosx, we replace x86_64 with amd64.
13835    OPENJDK_TARGET_CPU_OSARCH="amd64"
13836  fi
13837
13838
13839  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13840  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13841    OPENJDK_TARGET_CPU_JLI="i386"
13842  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13843    # On all platforms except macosx, we replace x86_64 with amd64.
13844    OPENJDK_TARGET_CPU_JLI="amd64"
13845  fi
13846  # Now setup the -D flags for building libjli.
13847  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13848  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13849    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13850      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13851    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13852      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13853    fi
13854  fi
13855
13856
13857  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13858  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13859    OPENJDK_TARGET_OS_API_DIR="solaris"
13860  fi
13861  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13862    OPENJDK_TARGET_OS_API_DIR="windows"
13863  fi
13864
13865
13866  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13867      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13868  else
13869      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13870  fi
13871
13872
13873  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13874    A_LP64="LP64:="
13875    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13876    # unpack200.exe
13877    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13878      ADD_LP64="-D_LP64=1"
13879    fi
13880  fi
13881  LP64=$A_LP64
13882
13883
13884  if test "x$COMPILE_TYPE" = "xcross"; then
13885    # FIXME: ... or should this include reduced builds..?
13886    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13887  else
13888    DEFINE_CROSS_COMPILE_ARCH=""
13889  fi
13890
13891
13892  # ZERO_ARCHDEF is used to enable architecture-specific code
13893  case "${OPENJDK_TARGET_CPU}" in
13894    ppc*)    ZERO_ARCHDEF=PPC   ;;
13895    s390*)   ZERO_ARCHDEF=S390  ;;
13896    sparc*)  ZERO_ARCHDEF=SPARC ;;
13897    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13898    x86)     ZERO_ARCHDEF=IA32  ;;
13899    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13900  esac
13901
13902
13903
13904
13905# Continue setting up basic stuff. Most remaining code require fundamental tools.
13906
13907  # Save the current directory this script was started from
13908  CURDIR="$PWD"
13909
13910  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13911    PATH_SEP=";"
13912
13913  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13914  if test $SRC_ROOT_LENGTH -gt 100; then
13915    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13916  fi
13917
13918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13920$as_echo_n "checking cygwin release... " >&6; }
13921    CYGWIN_VERSION=`$UNAME -r`
13922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13923$as_echo "$CYGWIN_VERSION" >&6; }
13924    WINDOWS_ENV_VENDOR='cygwin'
13925    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13926
13927    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13928    if test "x$CYGWIN_VERSION_OK" = x; then
13929      { $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
13930$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;}
13931      as_fn_error $? "Cannot continue" "$LINENO" 5
13932    fi
13933    if test "x$CYGPATH" = x; then
13934      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13935    fi
13936    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13937$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13938    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13939    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13940    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13941    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13942    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13943$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13944    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13945    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13946    if test "x$test_cygdrive_prefix" = x; then
13947      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13948    fi
13949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13950    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13951$as_echo_n "checking msys release... " >&6; }
13952    MSYS_VERSION=`$UNAME -r`
13953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13954$as_echo "$MSYS_VERSION" >&6; }
13955
13956    WINDOWS_ENV_VENDOR='msys'
13957    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13958
13959    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13960$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13961    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13962    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13963
13964  windows_path="$MSYS_ROOT_PATH"
13965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13966    unix_path=`$CYGPATH -u "$windows_path"`
13967    MSYS_ROOT_PATH="$unix_path"
13968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13970    MSYS_ROOT_PATH="$unix_path"
13971  fi
13972
13973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13974$as_echo "$MSYS_ROOT_PATH" >&6; }
13975    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13976  else
13977    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13978  fi
13979
13980  # Test if windows or unix (cygwin/msys) find is first in path.
13981  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13982$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13983  FIND_BINARY_OUTPUT=`find --version 2>&1`
13984  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13986$as_echo "unix style" >&6; }
13987  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13989$as_echo "Windows" >&6; }
13990    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13991$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13992    { $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
13993$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13994    as_fn_error $? "Cannot continue" "$LINENO" 5
13995  else
13996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13997$as_echo "unknown" >&6; }
13998    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13999$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14000  fi
14001
14002  else
14003    PATH_SEP=":"
14004  fi
14005
14006
14007  # We get the top-level directory from the supporting wrappers.
14008  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14009$as_echo_n "checking for top-level directory... " >&6; }
14010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14011$as_echo "$TOPDIR" >&6; }
14012
14013
14014  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14015
14016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14017
14018  # Input might be given as Windows format, start by converting to
14019  # unix format.
14020  path="$CURDIR"
14021  new_path=`$CYGPATH -u "$path"`
14022
14023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14026  # "foo.exe" is OK but "foo" is an error.
14027  #
14028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14029  # It is also a way to make sure we got the proper file name for the real test later on.
14030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14031  if test "x$test_shortpath" = x; then
14032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14033$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14034    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14035  fi
14036
14037  # Call helper function which possibly converts this using DOS-style short mode.
14038  # If so, the updated path is stored in $new_path.
14039
14040  input_path="$new_path"
14041  # Check if we need to convert this using DOS-style short mode. If the path
14042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14043  # take no chances and rewrite it.
14044  # Note: m4 eats our [], so we need to use [ and ] instead.
14045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14046  if test "x$has_forbidden_chars" != x; then
14047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14051      # Going to short mode and back again did indeed matter. Since short mode is
14052      # case insensitive, let's make it lowercase to improve readability.
14053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14054      # Now convert it back to Unix-stile (cygpath)
14055      input_path=`$CYGPATH -u "$shortmode_path"`
14056      new_path="$input_path"
14057    fi
14058  fi
14059
14060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14061  if test "x$test_cygdrive_prefix" = x; then
14062    # As a simple fix, exclude /usr/bin since it's not a real path.
14063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14065      # a path prefixed by /cygdrive for fixpath to work.
14066      new_path="$CYGWIN_ROOT_PATH$input_path"
14067    fi
14068  fi
14069
14070
14071  if test "x$path" != "x$new_path"; then
14072    CURDIR="$new_path"
14073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14074$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14075  fi
14076
14077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14078
14079  path="$CURDIR"
14080  has_colon=`$ECHO $path | $GREP ^.:`
14081  new_path="$path"
14082  if test "x$has_colon" = x; then
14083    # Not in mixed or Windows style, start by that.
14084    new_path=`cmd //c echo $path`
14085  fi
14086
14087
14088  input_path="$new_path"
14089  # Check if we need to convert this using DOS-style short mode. If the path
14090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14091  # take no chances and rewrite it.
14092  # Note: m4 eats our [], so we need to use [ and ] instead.
14093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14094  if test "x$has_forbidden_chars" != x; then
14095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14097  fi
14098
14099
14100  windows_path="$new_path"
14101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14102    unix_path=`$CYGPATH -u "$windows_path"`
14103    new_path="$unix_path"
14104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14106    new_path="$unix_path"
14107  fi
14108
14109  if test "x$path" != "x$new_path"; then
14110    CURDIR="$new_path"
14111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14112$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14113  fi
14114
14115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14117
14118  else
14119    # We're on a posix platform. Hooray! :)
14120    path="$CURDIR"
14121    has_space=`$ECHO "$path" | $GREP " "`
14122    if test "x$has_space" != x; then
14123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14124$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14125      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14126    fi
14127
14128    # Use eval to expand a potential ~
14129    eval path="$path"
14130    if test ! -f "$path" && test ! -d "$path"; then
14131      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14132    fi
14133
14134    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14135  fi
14136
14137
14138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14139
14140  # Input might be given as Windows format, start by converting to
14141  # unix format.
14142  path="$TOPDIR"
14143  new_path=`$CYGPATH -u "$path"`
14144
14145  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14146  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14147  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14148  # "foo.exe" is OK but "foo" is an error.
14149  #
14150  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14151  # It is also a way to make sure we got the proper file name for the real test later on.
14152  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14153  if test "x$test_shortpath" = x; then
14154    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14155$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14156    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14157  fi
14158
14159  # Call helper function which possibly converts this using DOS-style short mode.
14160  # If so, the updated path is stored in $new_path.
14161
14162  input_path="$new_path"
14163  # Check if we need to convert this using DOS-style short mode. If the path
14164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14165  # take no chances and rewrite it.
14166  # Note: m4 eats our [], so we need to use [ and ] instead.
14167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14168  if test "x$has_forbidden_chars" != x; then
14169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14170    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14171    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14172    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14173      # Going to short mode and back again did indeed matter. Since short mode is
14174      # case insensitive, let's make it lowercase to improve readability.
14175      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14176      # Now convert it back to Unix-stile (cygpath)
14177      input_path=`$CYGPATH -u "$shortmode_path"`
14178      new_path="$input_path"
14179    fi
14180  fi
14181
14182  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14183  if test "x$test_cygdrive_prefix" = x; then
14184    # As a simple fix, exclude /usr/bin since it's not a real path.
14185    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14186      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14187      # a path prefixed by /cygdrive for fixpath to work.
14188      new_path="$CYGWIN_ROOT_PATH$input_path"
14189    fi
14190  fi
14191
14192
14193  if test "x$path" != "x$new_path"; then
14194    TOPDIR="$new_path"
14195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14196$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14197  fi
14198
14199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14200
14201  path="$TOPDIR"
14202  has_colon=`$ECHO $path | $GREP ^.:`
14203  new_path="$path"
14204  if test "x$has_colon" = x; then
14205    # Not in mixed or Windows style, start by that.
14206    new_path=`cmd //c echo $path`
14207  fi
14208
14209
14210  input_path="$new_path"
14211  # Check if we need to convert this using DOS-style short mode. If the path
14212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14213  # take no chances and rewrite it.
14214  # Note: m4 eats our [], so we need to use [ and ] instead.
14215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14216  if test "x$has_forbidden_chars" != x; then
14217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14219  fi
14220
14221
14222  windows_path="$new_path"
14223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14224    unix_path=`$CYGPATH -u "$windows_path"`
14225    new_path="$unix_path"
14226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14228    new_path="$unix_path"
14229  fi
14230
14231  if test "x$path" != "x$new_path"; then
14232    TOPDIR="$new_path"
14233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14234$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14235  fi
14236
14237  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14238  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14239
14240  else
14241    # We're on a posix platform. Hooray! :)
14242    path="$TOPDIR"
14243    has_space=`$ECHO "$path" | $GREP " "`
14244    if test "x$has_space" != x; then
14245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14246$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14247      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14248    fi
14249
14250    # Use eval to expand a potential ~
14251    eval path="$path"
14252    if test ! -f "$path" && test ! -d "$path"; then
14253      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14254    fi
14255
14256    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14257  fi
14258
14259  # SRC_ROOT is a traditional alias for TOPDIR.
14260  SRC_ROOT=$TOPDIR
14261
14262  # Locate the directory of this script.
14263  AUTOCONF_DIR=$TOPDIR/common/autoconf
14264
14265
14266  # Setup default logging of stdout and stderr to build.log in the output root.
14267  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14268  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14269  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14270
14271
14272
14273
14274
14275# Check if it's a pure open build or if custom sources are to be used.
14276
14277  # Check whether --enable-openjdk-only was given.
14278if test "${enable_openjdk_only+set}" = set; then :
14279  enableval=$enable_openjdk_only;
14280else
14281  enable_openjdk_only="no"
14282fi
14283
14284
14285  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14286$as_echo_n "checking for presence of closed sources... " >&6; }
14287  if test -d "$SRC_ROOT/jdk/src/closed"; then
14288    CLOSED_SOURCE_PRESENT=yes
14289  else
14290    CLOSED_SOURCE_PRESENT=no
14291  fi
14292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14293$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14294
14295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14296$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14297  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14299$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14300
14301  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14302    OPENJDK=true
14303    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14304      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14305$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14306    fi
14307  else
14308    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14309      OPENJDK=true
14310    else
14311      OPENJDK=false
14312    fi
14313  fi
14314
14315  if test "x$OPENJDK" = "xtrue"; then
14316    SET_OPENJDK="OPENJDK=true"
14317  fi
14318
14319
14320
14321  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14322  # the IncludeCustomExtension macro.
14323
14324
14325# Check whether --with-custom-make-dir was given.
14326if test "${with_custom_make_dir+set}" = set; then :
14327  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
14328$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14329fi
14330
14331
14332
14333
14334# These are needed to be able to create a configuration name (and thus the output directory)
14335
14336  ###############################################################################
14337  #
14338  # Check which variant of the JDK that we want to build.
14339  # Currently we have:
14340  #    normal:   standard edition
14341  # but the custom make system may add other variants
14342  #
14343  # Effectively the JDK variant gives a name to a specific set of
14344  # modules to compile into the JDK. In the future, these modules
14345  # might even be Jigsaw modules.
14346  #
14347  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14348$as_echo_n "checking which variant of the JDK to build... " >&6; }
14349
14350# Check whether --with-jdk-variant was given.
14351if test "${with_jdk_variant+set}" = set; then :
14352  withval=$with_jdk_variant;
14353fi
14354
14355
14356  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14357    JDK_VARIANT="normal"
14358  else
14359    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14360  fi
14361
14362
14363
14364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14365$as_echo "$JDK_VARIANT" >&6; }
14366
14367
14368###############################################################################
14369#
14370# Check which interpreter of the JVM we want to build.
14371# Currently we have:
14372#    template: Template interpreter (the default)
14373#    cpp     : C++ interpreter
14374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14375$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14376
14377# Check whether --with-jvm-interpreter was given.
14378if test "${with_jvm_interpreter+set}" = set; then :
14379  withval=$with_jvm_interpreter;
14380fi
14381
14382
14383if test "x$with_jvm_interpreter" = x; then
14384     with_jvm_interpreter="template"
14385fi
14386
14387JVM_INTERPRETER="$with_jvm_interpreter"
14388
14389if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14390   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14391fi
14392
14393
14394
14395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14396$as_echo "$with_jvm_interpreter" >&6; }
14397
14398
14399
14400  ###############################################################################
14401  #
14402  # Check which variants of the JVM that we want to build.
14403  # Currently we have:
14404  #    server: normal interpreter and a tiered C1/C2 compiler
14405  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14406  #    minimal1: reduced form of client with optional VM services and features stripped out
14407  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14408  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14409  #    zero: no machine code interpreter, no compiler
14410  #    zeroshark: zero interpreter and shark/llvm compiler backend
14411#    core: interpreter only, no compiler (only works on some platforms)
14412  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14413$as_echo_n "checking which variants of the JVM to build... " >&6; }
14414
14415# Check whether --with-jvm-variants was given.
14416if test "${with_jvm_variants+set}" = set; then :
14417  withval=$with_jvm_variants;
14418fi
14419
14420
14421  if test "x$with_jvm_variants" = x; then
14422    with_jvm_variants="server"
14423  fi
14424
14425  JVM_VARIANTS=",$with_jvm_variants,"
14426  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,//'`
14427
14428  if test "x$TEST_VARIANTS" != "x,"; then
14429     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14430  fi
14431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14432$as_echo "$with_jvm_variants" >&6; }
14433
14434  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14435  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14436  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14437  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14438  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14439  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14440  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14441
14442  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14443    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14444      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14445    fi
14446  fi
14447  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14448    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14449      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14450    fi
14451  fi
14452  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14453    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14454      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14455    fi
14456  fi
14457
14458  # Replace the commas with AND for use in the build directory name.
14459  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14460  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/'`
14461  if test "x$COUNT_VARIANTS" != "x,1"; then
14462    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14463  else
14464    BUILDING_MULTIPLE_JVM_VARIANTS=no
14465  fi
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476  INCLUDE_SA=true
14477  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14478    INCLUDE_SA=false
14479  fi
14480  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14481    INCLUDE_SA=false
14482  fi
14483  if test "x$VAR_CPU" = xppc64 ; then
14484    INCLUDE_SA=false
14485  fi
14486
14487
14488  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14489    MACOSX_UNIVERSAL="true"
14490  fi
14491
14492
14493
14494
14495  ###############################################################################
14496  #
14497  # Set the debug level
14498  #    release: no debug information, all optimizations, no asserts.
14499  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14500  #    fastdebug: debug information (-g), all optimizations, all asserts
14501  #    slowdebug: debug information (-g), no optimizations, all asserts
14502  #
14503  DEBUG_LEVEL="release"
14504  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14505$as_echo_n "checking which debug level to use... " >&6; }
14506  # Check whether --enable-debug was given.
14507if test "${enable_debug+set}" = set; then :
14508  enableval=$enable_debug;
14509        ENABLE_DEBUG="${enableval}"
14510        DEBUG_LEVEL="fastdebug"
14511
14512else
14513  ENABLE_DEBUG="no"
14514fi
14515
14516
14517
14518# Check whether --with-debug-level was given.
14519if test "${with_debug_level+set}" = set; then :
14520  withval=$with_debug_level;
14521        DEBUG_LEVEL="${withval}"
14522        if test "x$ENABLE_DEBUG" = xyes; then
14523          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14524        fi
14525
14526fi
14527
14528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14529$as_echo "$DEBUG_LEVEL" >&6; }
14530
14531  if test "x$DEBUG_LEVEL" != xrelease && \
14532      test "x$DEBUG_LEVEL" != xoptimized && \
14533      test "x$DEBUG_LEVEL" != xfastdebug && \
14534      test "x$DEBUG_LEVEL" != xslowdebug; then
14535    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14536  fi
14537
14538
14539  ###############################################################################
14540  #
14541  # Setup legacy vars/targets and new vars to deal with different debug levels.
14542  #
14543
14544  case $DEBUG_LEVEL in
14545    release )
14546      VARIANT="OPT"
14547      FASTDEBUG="false"
14548      DEBUG_CLASSFILES="false"
14549      BUILD_VARIANT_RELEASE=""
14550      HOTSPOT_DEBUG_LEVEL="product"
14551      HOTSPOT_EXPORT="product"
14552      ;;
14553    fastdebug )
14554      VARIANT="DBG"
14555      FASTDEBUG="true"
14556      DEBUG_CLASSFILES="true"
14557      BUILD_VARIANT_RELEASE="-fastdebug"
14558      HOTSPOT_DEBUG_LEVEL="fastdebug"
14559      HOTSPOT_EXPORT="fastdebug"
14560      ;;
14561    slowdebug )
14562      VARIANT="DBG"
14563      FASTDEBUG="false"
14564      DEBUG_CLASSFILES="true"
14565      BUILD_VARIANT_RELEASE="-debug"
14566      HOTSPOT_DEBUG_LEVEL="jvmg"
14567      HOTSPOT_EXPORT="debug"
14568      ;;
14569    optimized )
14570      VARIANT="OPT"
14571      FASTDEBUG="false"
14572      DEBUG_CLASSFILES="false"
14573      BUILD_VARIANT_RELEASE="-optimized"
14574      HOTSPOT_DEBUG_LEVEL="optimized"
14575      HOTSPOT_EXPORT="optimized"
14576      ;;
14577  esac
14578
14579  # The debug level 'optimized' is a little special because it is currently only
14580  # applicable to the HotSpot build where it means to build a completely
14581  # optimized version of the VM without any debugging code (like for the
14582  # 'release' debug level which is called 'product' in the HotSpot build) but
14583  # with the exception that it can contain additional code which is otherwise
14584  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14585  # test new and/or experimental features which are not intended for customer
14586  # shipment. Because these new features need to be tested and benchmarked in
14587  # real world scenarios, we want to build the containing JDK at the 'release'
14588  # debug level.
14589  if test "x$DEBUG_LEVEL" = xoptimized; then
14590    DEBUG_LEVEL="release"
14591  fi
14592
14593  #####
14594  # Generate the legacy makefile targets for hotspot.
14595  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14596  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14597  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14598  # But until then ...
14599  HOTSPOT_TARGET=""
14600
14601  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14602    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14603  fi
14604
14605  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14606    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14607  fi
14608
14609  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14610    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14611  fi
14612
14613  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14614    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14615  fi
14616
14617  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14618    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14619  fi
14620
14621  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14622    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14623  fi
14624
14625  if test "x$JVM_VARIANT_CORE" = xtrue; then
14626    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14627  fi
14628
14629  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14630
14631  # On Macosx universal binaries are produced, but they only contain
14632  # 64 bit intel. This invalidates control of which jvms are built
14633  # from configure, but only server is valid anyway. Fix this
14634  # when hotspot makefiles are rewritten.
14635  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14636    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14637  fi
14638
14639  #####
14640
14641
14642
14643
14644
14645
14646
14647
14648# With basic setup done, call the custom early hook.
14649
14650
14651# Check if we have devkits, extra paths or sysroot set.
14652
14653
14654# Check whether --with-devkit was given.
14655if test "${with_devkit+set}" = set; then :
14656  withval=$with_devkit;
14657
14658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14659
14660  # Input might be given as Windows format, start by converting to
14661  # unix format.
14662  path="$with_devkit"
14663  new_path=`$CYGPATH -u "$path"`
14664
14665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14668  # "foo.exe" is OK but "foo" is an error.
14669  #
14670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14671  # It is also a way to make sure we got the proper file name for the real test later on.
14672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14673  if test "x$test_shortpath" = x; then
14674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14675$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14676    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14677  fi
14678
14679  # Call helper function which possibly converts this using DOS-style short mode.
14680  # If so, the updated path is stored in $new_path.
14681
14682  input_path="$new_path"
14683  # Check if we need to convert this using DOS-style short mode. If the path
14684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14685  # take no chances and rewrite it.
14686  # Note: m4 eats our [], so we need to use [ and ] instead.
14687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14688  if test "x$has_forbidden_chars" != x; then
14689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14693      # Going to short mode and back again did indeed matter. Since short mode is
14694      # case insensitive, let's make it lowercase to improve readability.
14695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14696      # Now convert it back to Unix-stile (cygpath)
14697      input_path=`$CYGPATH -u "$shortmode_path"`
14698      new_path="$input_path"
14699    fi
14700  fi
14701
14702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14703  if test "x$test_cygdrive_prefix" = x; then
14704    # As a simple fix, exclude /usr/bin since it's not a real path.
14705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14707      # a path prefixed by /cygdrive for fixpath to work.
14708      new_path="$CYGWIN_ROOT_PATH$input_path"
14709    fi
14710  fi
14711
14712
14713  if test "x$path" != "x$new_path"; then
14714    with_devkit="$new_path"
14715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14716$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14717  fi
14718
14719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14720
14721  path="$with_devkit"
14722  has_colon=`$ECHO $path | $GREP ^.:`
14723  new_path="$path"
14724  if test "x$has_colon" = x; then
14725    # Not in mixed or Windows style, start by that.
14726    new_path=`cmd //c echo $path`
14727  fi
14728
14729
14730  input_path="$new_path"
14731  # Check if we need to convert this using DOS-style short mode. If the path
14732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14733  # take no chances and rewrite it.
14734  # Note: m4 eats our [], so we need to use [ and ] instead.
14735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14736  if test "x$has_forbidden_chars" != x; then
14737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14739  fi
14740
14741
14742  windows_path="$new_path"
14743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14744    unix_path=`$CYGPATH -u "$windows_path"`
14745    new_path="$unix_path"
14746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14748    new_path="$unix_path"
14749  fi
14750
14751  if test "x$path" != "x$new_path"; then
14752    with_devkit="$new_path"
14753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14754$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14755  fi
14756
14757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14759
14760  else
14761    # We're on a posix platform. Hooray! :)
14762    path="$with_devkit"
14763    has_space=`$ECHO "$path" | $GREP " "`
14764    if test "x$has_space" != x; then
14765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14766$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14767      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14768    fi
14769
14770    # Use eval to expand a potential ~
14771    eval path="$path"
14772    if test ! -f "$path" && test ! -d "$path"; then
14773      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14774    fi
14775
14776    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14777  fi
14778
14779        DEVKIT_ROOT="$with_devkit"
14780        # Check for a meta data info file in the root of the devkit
14781        if test -f "$DEVKIT_ROOT/devkit.info"; then
14782          # This potentially sets the following:
14783          # DEVKIT_NAME: A descriptive name of the devkit
14784          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14785          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14786          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14787          . $DEVKIT_ROOT/devkit.info
14788        fi
14789
14790        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14791$as_echo_n "checking for devkit... " >&6; }
14792        if test "x$DEVKIT_NAME" != x; then
14793          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14794$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14795        else
14796          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14797$as_echo "$DEVKIT_ROOT" >&6; }
14798        fi
14799
14800        if test "x$DEVKIT_EXTRA_PATH" != x; then
14801
14802  if test "x$DEVKIT_EXTRA_PATH" != x; then
14803    if test "x$EXTRA_PATH" = x; then
14804      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14805    else
14806      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14807    fi
14808  fi
14809
14810        fi
14811
14812        # Fallback default of just /bin if DEVKIT_PATH is not defined
14813        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14814          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14815        fi
14816
14817  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14818    if test "x$TOOLCHAIN_PATH" = x; then
14819      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14820    else
14821      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14822    fi
14823  fi
14824
14825
14826        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14827        # places for backwards compatiblity.
14828        if test "x$DEVKIT_SYSROOT" != x; then
14829          SYSROOT="$DEVKIT_SYSROOT"
14830        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14831          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14832        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14833          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14834        fi
14835
14836
14837fi
14838
14839
14840  # You can force the sysroot if the sysroot encoded into the compiler tools
14841  # is not correct.
14842
14843# Check whether --with-sys-root was given.
14844if test "${with_sys_root+set}" = set; then :
14845  withval=$with_sys_root; SYSROOT=$with_sys_root
14846
14847fi
14848
14849
14850
14851# Check whether --with-sysroot was given.
14852if test "${with_sysroot+set}" = set; then :
14853  withval=$with_sysroot; SYSROOT=$with_sysroot
14854
14855fi
14856
14857
14858
14859# Check whether --with-tools-dir was given.
14860if test "${with_tools_dir+set}" = set; then :
14861  withval=$with_tools_dir;
14862  if test "x$with_tools_dir" != x; then
14863    if test "x$TOOLCHAIN_PATH" = x; then
14864      TOOLCHAIN_PATH="$with_tools_dir"
14865    else
14866      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14867    fi
14868  fi
14869
14870
14871fi
14872
14873
14874
14875# Check whether --with-toolchain-path was given.
14876if test "${with_toolchain_path+set}" = set; then :
14877  withval=$with_toolchain_path;
14878  if test "x$with_toolchain_path" != x; then
14879    if test "x$TOOLCHAIN_PATH" = x; then
14880      TOOLCHAIN_PATH="$with_toolchain_path"
14881    else
14882      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14883    fi
14884  fi
14885
14886
14887fi
14888
14889
14890
14891# Check whether --with-extra-path was given.
14892if test "${with_extra_path+set}" = set; then :
14893  withval=$with_extra_path;
14894  if test "x$with_extra_path" != x; then
14895    if test "x$EXTRA_PATH" = x; then
14896      EXTRA_PATH="$with_extra_path"
14897    else
14898      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14899    fi
14900  fi
14901
14902
14903fi
14904
14905
14906  # Prepend the extra path to the global path
14907
14908  if test "x$EXTRA_PATH" != x; then
14909    if test "x$PATH" = x; then
14910      PATH="$EXTRA_PATH"
14911    else
14912      PATH="$EXTRA_PATH:$PATH"
14913    fi
14914  fi
14915
14916
14917  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14918    # Add extra search paths on solaris for utilities like ar and as etc...
14919    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14920  fi
14921
14922  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
14923$as_echo_n "checking for sysroot... " >&6; }
14924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
14925$as_echo "$SYSROOT" >&6; }
14926  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
14927$as_echo_n "checking for toolchain path... " >&6; }
14928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
14929$as_echo "$TOOLCHAIN_PATH" >&6; }
14930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
14931$as_echo_n "checking for extra path... " >&6; }
14932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
14933$as_echo "$EXTRA_PATH" >&6; }
14934
14935
14936# To properly create a configuration name, we need to have the OpenJDK target
14937# and options (variants and debug level) parsed.
14938
14939
14940
14941# Check whether --with-conf-name was given.
14942if test "${with_conf_name+set}" = set; then :
14943  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14944fi
14945
14946
14947  # Test from where we are running configure, in or outside of src root.
14948  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14949$as_echo_n "checking where to store configuration... " >&6; }
14950  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14951      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14952      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14953    # We are running configure from the src root.
14954    # Create a default ./build/target-variant-debuglevel output root.
14955    if test "x${CONF_NAME}" = x; then
14956      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
14957$as_echo "in default location" >&6; }
14958      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14959    else
14960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
14961$as_echo "in build directory with custom name" >&6; }
14962    fi
14963    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14964    $MKDIR -p "$OUTPUT_ROOT"
14965    if test ! -d "$OUTPUT_ROOT"; then
14966      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14967    fi
14968  else
14969    # We are running configure from outside of the src dir.
14970    # Then use the current directory as output dir!
14971    # If configuration is situated in normal build directory, just use the build
14972    # directory name as configuration name, otherwise use the complete path.
14973    if test "x${CONF_NAME}" = x; then
14974      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14975    fi
14976    OUTPUT_ROOT="$CURDIR"
14977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
14978$as_echo "in current directory" >&6; }
14979
14980    # WARNING: This might be a bad thing to do. You need to be sure you want to
14981    # have a configuration in this directory. Do some sanity checks!
14982
14983    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14984      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14985      # other files
14986      files_present=`$LS $OUTPUT_ROOT`
14987      # Configure has already touched config.log and confdefs.h in the current dir when this check
14988      # is performed.
14989      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14990      | $TR -d '\n'`
14991      if test "x$filtered_files" != x; then
14992        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14993$as_echo "$as_me: Current directory is $CURDIR." >&6;}
14994        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14995$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14996        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14997$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14998        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14999$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15000        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15001$as_echo "$as_me: seriously mess up just about everything." >&6;}
15002        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15003$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15004        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15005$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15006        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15007      fi
15008    fi
15009  fi
15010  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15011$as_echo_n "checking what configuration name to use... " >&6; }
15012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15013$as_echo "$CONF_NAME" >&6; }
15014
15015
15016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15017
15018  # Input might be given as Windows format, start by converting to
15019  # unix format.
15020  path="$OUTPUT_ROOT"
15021  new_path=`$CYGPATH -u "$path"`
15022
15023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15026  # "foo.exe" is OK but "foo" is an error.
15027  #
15028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15029  # It is also a way to make sure we got the proper file name for the real test later on.
15030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15031  if test "x$test_shortpath" = x; then
15032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15033$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15034    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15035  fi
15036
15037  # Call helper function which possibly converts this using DOS-style short mode.
15038  # If so, the updated path is stored in $new_path.
15039
15040  input_path="$new_path"
15041  # Check if we need to convert this using DOS-style short mode. If the path
15042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15043  # take no chances and rewrite it.
15044  # Note: m4 eats our [], so we need to use [ and ] instead.
15045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15046  if test "x$has_forbidden_chars" != x; then
15047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15051      # Going to short mode and back again did indeed matter. Since short mode is
15052      # case insensitive, let's make it lowercase to improve readability.
15053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15054      # Now convert it back to Unix-stile (cygpath)
15055      input_path=`$CYGPATH -u "$shortmode_path"`
15056      new_path="$input_path"
15057    fi
15058  fi
15059
15060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15061  if test "x$test_cygdrive_prefix" = x; then
15062    # As a simple fix, exclude /usr/bin since it's not a real path.
15063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15065      # a path prefixed by /cygdrive for fixpath to work.
15066      new_path="$CYGWIN_ROOT_PATH$input_path"
15067    fi
15068  fi
15069
15070
15071  if test "x$path" != "x$new_path"; then
15072    OUTPUT_ROOT="$new_path"
15073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15074$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15075  fi
15076
15077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15078
15079  path="$OUTPUT_ROOT"
15080  has_colon=`$ECHO $path | $GREP ^.:`
15081  new_path="$path"
15082  if test "x$has_colon" = x; then
15083    # Not in mixed or Windows style, start by that.
15084    new_path=`cmd //c echo $path`
15085  fi
15086
15087
15088  input_path="$new_path"
15089  # Check if we need to convert this using DOS-style short mode. If the path
15090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15091  # take no chances and rewrite it.
15092  # Note: m4 eats our [], so we need to use [ and ] instead.
15093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15094  if test "x$has_forbidden_chars" != x; then
15095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15097  fi
15098
15099
15100  windows_path="$new_path"
15101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15102    unix_path=`$CYGPATH -u "$windows_path"`
15103    new_path="$unix_path"
15104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15106    new_path="$unix_path"
15107  fi
15108
15109  if test "x$path" != "x$new_path"; then
15110    OUTPUT_ROOT="$new_path"
15111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15112$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15113  fi
15114
15115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15117
15118  else
15119    # We're on a posix platform. Hooray! :)
15120    path="$OUTPUT_ROOT"
15121    has_space=`$ECHO "$path" | $GREP " "`
15122    if test "x$has_space" != x; then
15123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15124$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15125      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15126    fi
15127
15128    # Use eval to expand a potential ~
15129    eval path="$path"
15130    if test ! -f "$path" && test ! -d "$path"; then
15131      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15132    fi
15133
15134    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15135  fi
15136
15137
15138  SPEC=$OUTPUT_ROOT/spec.gmk
15139
15140  CONF_NAME=$CONF_NAME
15141
15142  OUTPUT_ROOT=$OUTPUT_ROOT
15143
15144
15145  # Most of the probed defines are put into config.h
15146  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15147
15148  # The spec.gmk file contains all variables for the make system.
15149  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15150
15151  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15152  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15153
15154  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15155  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15156
15157  # The compare.sh is used to compare the build output to other builds.
15158  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15159
15160  # Spec.sh is currently used by compare-objects.sh
15161  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15162
15163  # The generated Makefile knows where the spec.gmk is and where the source is.
15164  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15165  # which will look for generated configurations
15166  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15167
15168
15169
15170# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15171
15172  for ac_prog in apt-get yum port pkgutil pkgadd
15173do
15174  # Extract the first word of "$ac_prog", so it can be a program name with args.
15175set dummy $ac_prog; ac_word=$2
15176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15177$as_echo_n "checking for $ac_word... " >&6; }
15178if ${ac_cv_prog_PKGHANDLER+:} false; then :
15179  $as_echo_n "(cached) " >&6
15180else
15181  if test -n "$PKGHANDLER"; then
15182  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15183else
15184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15185for as_dir in $PATH
15186do
15187  IFS=$as_save_IFS
15188  test -z "$as_dir" && as_dir=.
15189    for ac_exec_ext in '' $ac_executable_extensions; do
15190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15191    ac_cv_prog_PKGHANDLER="$ac_prog"
15192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15193    break 2
15194  fi
15195done
15196  done
15197IFS=$as_save_IFS
15198
15199fi
15200fi
15201PKGHANDLER=$ac_cv_prog_PKGHANDLER
15202if test -n "$PKGHANDLER"; then
15203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15204$as_echo "$PKGHANDLER" >&6; }
15205else
15206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15207$as_echo "no" >&6; }
15208fi
15209
15210
15211  test -n "$PKGHANDLER" && break
15212done
15213
15214
15215
15216# Setup tools that requires more complex handling, or that is not needed by the configure script.
15217
15218
15219  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15220  if test "x$MAKE" != x; then
15221    # User has supplied a make, test it.
15222    if test ! -f "$MAKE"; then
15223      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15224    fi
15225
15226  MAKE_CANDIDATE=""$MAKE""
15227  DESCRIPTION="user supplied MAKE=$MAKE"
15228  if test "x$MAKE_CANDIDATE" != x; then
15229    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15230$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15231    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15232    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15233    if test "x$IS_GNU_MAKE" = x; then
15234      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15235$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15236    else
15237      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15238      if test "x$IS_MODERN_MAKE" = x; then
15239        { $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
15240$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;}
15241      else
15242        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15243          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15244            MAKE_EXPECTED_ENV='cygwin'
15245          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15246            MAKE_EXPECTED_ENV='msys'
15247          else
15248            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15249          fi
15250          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15251          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15252        else
15253          # Not relevant for non-Windows
15254          IS_MAKE_CORRECT_ENV=true
15255        fi
15256        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15257          { $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
15258$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;}
15259        else
15260          FOUND_MAKE=$MAKE_CANDIDATE
15261
15262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15263
15264  # First separate the path from the arguments. This will split at the first
15265  # space.
15266  complete="$FOUND_MAKE"
15267  path="${complete%% *}"
15268  tmp="$complete EOL"
15269  arguments="${tmp#* }"
15270
15271  # Input might be given as Windows format, start by converting to
15272  # unix format.
15273  new_path=`$CYGPATH -u "$path"`
15274
15275  # Now try to locate executable using which
15276  new_path=`$WHICH "$new_path" 2> /dev/null`
15277  # bat and cmd files are not always considered executable in cygwin causing which
15278  # to not find them
15279  if test "x$new_path" = x \
15280      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15281      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15282    new_path=`$CYGPATH -u "$path"`
15283  fi
15284  if test "x$new_path" = x; then
15285    # Oops. Which didn't find the executable.
15286    # The splitting of arguments from the executable at a space might have been incorrect,
15287    # since paths with space are more likely in Windows. Give it another try with the whole
15288    # argument.
15289    path="$complete"
15290    arguments="EOL"
15291    new_path=`$CYGPATH -u "$path"`
15292    new_path=`$WHICH "$new_path" 2> /dev/null`
15293    # bat and cmd files are not always considered executable in cygwin causing which
15294    # to not find them
15295    if test "x$new_path" = x \
15296        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15297        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15298      new_path=`$CYGPATH -u "$path"`
15299    fi
15300    if test "x$new_path" = x; then
15301      # It's still not found. Now this is an unrecoverable error.
15302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15303$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15304      has_space=`$ECHO "$complete" | $GREP " "`
15305      if test "x$has_space" != x; then
15306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15308      fi
15309      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15310    fi
15311  fi
15312
15313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15316  # "foo.exe" is OK but "foo" is an error.
15317  #
15318  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15319  # It is also a way to make sure we got the proper file name for the real test later on.
15320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15321  if test "x$test_shortpath" = x; then
15322    # Short path failed, file does not exist as specified.
15323    # Try adding .exe or .cmd
15324    if test -f "${new_path}.exe"; then
15325      input_to_shortpath="${new_path}.exe"
15326    elif test -f "${new_path}.cmd"; then
15327      input_to_shortpath="${new_path}.cmd"
15328    else
15329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15330$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15331      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15332$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15333      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15334    fi
15335  else
15336    input_to_shortpath="$new_path"
15337  fi
15338
15339  # Call helper function which possibly converts this using DOS-style short mode.
15340  # If so, the updated path is stored in $new_path.
15341  new_path="$input_to_shortpath"
15342
15343  input_path="$input_to_shortpath"
15344  # Check if we need to convert this using DOS-style short mode. If the path
15345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15346  # take no chances and rewrite it.
15347  # Note: m4 eats our [], so we need to use [ and ] instead.
15348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15349  if test "x$has_forbidden_chars" != x; then
15350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15354      # Going to short mode and back again did indeed matter. Since short mode is
15355      # case insensitive, let's make it lowercase to improve readability.
15356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15357      # Now convert it back to Unix-stile (cygpath)
15358      input_path=`$CYGPATH -u "$shortmode_path"`
15359      new_path="$input_path"
15360    fi
15361  fi
15362
15363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15364  if test "x$test_cygdrive_prefix" = x; then
15365    # As a simple fix, exclude /usr/bin since it's not a real path.
15366    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15368      # a path prefixed by /cygdrive for fixpath to work.
15369      new_path="$CYGWIN_ROOT_PATH$input_path"
15370    fi
15371  fi
15372
15373  # remove trailing .exe if any
15374  new_path="${new_path/%.exe/}"
15375
15376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15377
15378  # First separate the path from the arguments. This will split at the first
15379  # space.
15380  complete="$FOUND_MAKE"
15381  path="${complete%% *}"
15382  tmp="$complete EOL"
15383  arguments="${tmp#* }"
15384
15385  # Input might be given as Windows format, start by converting to
15386  # unix format.
15387  new_path="$path"
15388
15389  windows_path="$new_path"
15390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15391    unix_path=`$CYGPATH -u "$windows_path"`
15392    new_path="$unix_path"
15393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15395    new_path="$unix_path"
15396  fi
15397
15398
15399  # Now try to locate executable using which
15400  new_path=`$WHICH "$new_path" 2> /dev/null`
15401
15402  if test "x$new_path" = x; then
15403    # Oops. Which didn't find the executable.
15404    # The splitting of arguments from the executable at a space might have been incorrect,
15405    # since paths with space are more likely in Windows. Give it another try with the whole
15406    # argument.
15407    path="$complete"
15408    arguments="EOL"
15409    new_path="$path"
15410
15411  windows_path="$new_path"
15412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15413    unix_path=`$CYGPATH -u "$windows_path"`
15414    new_path="$unix_path"
15415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15417    new_path="$unix_path"
15418  fi
15419
15420
15421    new_path=`$WHICH "$new_path" 2> /dev/null`
15422
15423    if test "x$new_path" = x; then
15424      # It's still not found. Now this is an unrecoverable error.
15425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15426$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15427      has_space=`$ECHO "$complete" | $GREP " "`
15428      if test "x$has_space" != x; then
15429        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15430$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15431      fi
15432      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15433    fi
15434  fi
15435
15436  # Now new_path has a complete unix path to the binary
15437  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15438    # Keep paths in /bin as-is, but remove trailing .exe if any
15439    new_path="${new_path/%.exe/}"
15440    # Do not save /bin paths to all_fixpath_prefixes!
15441  else
15442    # Not in mixed or Windows style, start by that.
15443    new_path=`cmd //c echo $new_path`
15444
15445  input_path="$new_path"
15446  # Check if we need to convert this using DOS-style short mode. If the path
15447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15448  # take no chances and rewrite it.
15449  # Note: m4 eats our [], so we need to use [ and ] instead.
15450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15451  if test "x$has_forbidden_chars" != x; then
15452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15453    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15454  fi
15455
15456    # Output is in $new_path
15457
15458  windows_path="$new_path"
15459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15460    unix_path=`$CYGPATH -u "$windows_path"`
15461    new_path="$unix_path"
15462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15464    new_path="$unix_path"
15465  fi
15466
15467    # remove trailing .exe if any
15468    new_path="${new_path/%.exe/}"
15469
15470    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15471    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15472  fi
15473
15474  else
15475    # We're on a posix platform. Hooray! :)
15476    # First separate the path from the arguments. This will split at the first
15477    # space.
15478    complete="$FOUND_MAKE"
15479    path="${complete%% *}"
15480    tmp="$complete EOL"
15481    arguments="${tmp#* }"
15482
15483    # Cannot rely on the command "which" here since it doesn't always work.
15484    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15485    if test -z "$is_absolute_path"; then
15486      # Path to executable is not absolute. Find it.
15487      IFS_save="$IFS"
15488      IFS=:
15489      for p in $PATH; do
15490        if test -f "$p/$path" && test -x "$p/$path"; then
15491          new_path="$p/$path"
15492          break
15493        fi
15494      done
15495      IFS="$IFS_save"
15496    else
15497      # This is an absolute path, we can use it without further modifications.
15498      new_path="$path"
15499    fi
15500
15501    if test "x$new_path" = x; then
15502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15503$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15504      has_space=`$ECHO "$complete" | $GREP " "`
15505      if test "x$has_space" != x; then
15506        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15507$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15508      fi
15509      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15510    fi
15511  fi
15512
15513  # Now join together the path and the arguments once again
15514  if test "x$arguments" != xEOL; then
15515    new_complete="$new_path ${arguments% *}"
15516  else
15517    new_complete="$new_path"
15518  fi
15519
15520  if test "x$complete" != "x$new_complete"; then
15521    FOUND_MAKE="$new_complete"
15522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15523$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15524  fi
15525
15526        fi
15527      fi
15528    fi
15529  fi
15530
15531    if test "x$FOUND_MAKE" = x; then
15532      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15533    fi
15534  else
15535    # Try our hardest to locate a correct version of GNU make
15536    for ac_prog in gmake
15537do
15538  # Extract the first word of "$ac_prog", so it can be a program name with args.
15539set dummy $ac_prog; ac_word=$2
15540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15541$as_echo_n "checking for $ac_word... " >&6; }
15542if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15543  $as_echo_n "(cached) " >&6
15544else
15545  case $CHECK_GMAKE in
15546  [\\/]* | ?:[\\/]*)
15547  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15548  ;;
15549  *)
15550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15551for as_dir in $PATH
15552do
15553  IFS=$as_save_IFS
15554  test -z "$as_dir" && as_dir=.
15555    for ac_exec_ext in '' $ac_executable_extensions; do
15556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15557    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15559    break 2
15560  fi
15561done
15562  done
15563IFS=$as_save_IFS
15564
15565  ;;
15566esac
15567fi
15568CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15569if test -n "$CHECK_GMAKE"; then
15570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15571$as_echo "$CHECK_GMAKE" >&6; }
15572else
15573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15574$as_echo "no" >&6; }
15575fi
15576
15577
15578  test -n "$CHECK_GMAKE" && break
15579done
15580
15581
15582  MAKE_CANDIDATE=""$CHECK_GMAKE""
15583  DESCRIPTION="gmake in PATH"
15584  if test "x$MAKE_CANDIDATE" != x; then
15585    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15586$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15587    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15588    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15589    if test "x$IS_GNU_MAKE" = x; then
15590      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15591$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15592    else
15593      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15594      if test "x$IS_MODERN_MAKE" = x; then
15595        { $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
15596$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;}
15597      else
15598        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15599          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15600            MAKE_EXPECTED_ENV='cygwin'
15601          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15602            MAKE_EXPECTED_ENV='msys'
15603          else
15604            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15605          fi
15606          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15607          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15608        else
15609          # Not relevant for non-Windows
15610          IS_MAKE_CORRECT_ENV=true
15611        fi
15612        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15613          { $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
15614$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;}
15615        else
15616          FOUND_MAKE=$MAKE_CANDIDATE
15617
15618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15619
15620  # First separate the path from the arguments. This will split at the first
15621  # space.
15622  complete="$FOUND_MAKE"
15623  path="${complete%% *}"
15624  tmp="$complete EOL"
15625  arguments="${tmp#* }"
15626
15627  # Input might be given as Windows format, start by converting to
15628  # unix format.
15629  new_path=`$CYGPATH -u "$path"`
15630
15631  # Now try to locate executable using which
15632  new_path=`$WHICH "$new_path" 2> /dev/null`
15633  # bat and cmd files are not always considered executable in cygwin causing which
15634  # to not find them
15635  if test "x$new_path" = x \
15636      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15637      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15638    new_path=`$CYGPATH -u "$path"`
15639  fi
15640  if test "x$new_path" = x; then
15641    # Oops. Which didn't find the executable.
15642    # The splitting of arguments from the executable at a space might have been incorrect,
15643    # since paths with space are more likely in Windows. Give it another try with the whole
15644    # argument.
15645    path="$complete"
15646    arguments="EOL"
15647    new_path=`$CYGPATH -u "$path"`
15648    new_path=`$WHICH "$new_path" 2> /dev/null`
15649    # bat and cmd files are not always considered executable in cygwin causing which
15650    # to not find them
15651    if test "x$new_path" = x \
15652        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15653        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15654      new_path=`$CYGPATH -u "$path"`
15655    fi
15656    if test "x$new_path" = x; then
15657      # It's still not found. Now this is an unrecoverable error.
15658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15659$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15660      has_space=`$ECHO "$complete" | $GREP " "`
15661      if test "x$has_space" != x; then
15662        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15663$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15664      fi
15665      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15666    fi
15667  fi
15668
15669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15672  # "foo.exe" is OK but "foo" is an error.
15673  #
15674  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15675  # It is also a way to make sure we got the proper file name for the real test later on.
15676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15677  if test "x$test_shortpath" = x; then
15678    # Short path failed, file does not exist as specified.
15679    # Try adding .exe or .cmd
15680    if test -f "${new_path}.exe"; then
15681      input_to_shortpath="${new_path}.exe"
15682    elif test -f "${new_path}.cmd"; then
15683      input_to_shortpath="${new_path}.cmd"
15684    else
15685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15686$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15687      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15688$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15689      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15690    fi
15691  else
15692    input_to_shortpath="$new_path"
15693  fi
15694
15695  # Call helper function which possibly converts this using DOS-style short mode.
15696  # If so, the updated path is stored in $new_path.
15697  new_path="$input_to_shortpath"
15698
15699  input_path="$input_to_shortpath"
15700  # Check if we need to convert this using DOS-style short mode. If the path
15701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15702  # take no chances and rewrite it.
15703  # Note: m4 eats our [], so we need to use [ and ] instead.
15704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15705  if test "x$has_forbidden_chars" != x; then
15706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15710      # Going to short mode and back again did indeed matter. Since short mode is
15711      # case insensitive, let's make it lowercase to improve readability.
15712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15713      # Now convert it back to Unix-stile (cygpath)
15714      input_path=`$CYGPATH -u "$shortmode_path"`
15715      new_path="$input_path"
15716    fi
15717  fi
15718
15719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15720  if test "x$test_cygdrive_prefix" = x; then
15721    # As a simple fix, exclude /usr/bin since it's not a real path.
15722    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15724      # a path prefixed by /cygdrive for fixpath to work.
15725      new_path="$CYGWIN_ROOT_PATH$input_path"
15726    fi
15727  fi
15728
15729  # remove trailing .exe if any
15730  new_path="${new_path/%.exe/}"
15731
15732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15733
15734  # First separate the path from the arguments. This will split at the first
15735  # space.
15736  complete="$FOUND_MAKE"
15737  path="${complete%% *}"
15738  tmp="$complete EOL"
15739  arguments="${tmp#* }"
15740
15741  # Input might be given as Windows format, start by converting to
15742  # unix format.
15743  new_path="$path"
15744
15745  windows_path="$new_path"
15746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15747    unix_path=`$CYGPATH -u "$windows_path"`
15748    new_path="$unix_path"
15749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15751    new_path="$unix_path"
15752  fi
15753
15754
15755  # Now try to locate executable using which
15756  new_path=`$WHICH "$new_path" 2> /dev/null`
15757
15758  if test "x$new_path" = x; then
15759    # Oops. Which didn't find the executable.
15760    # The splitting of arguments from the executable at a space might have been incorrect,
15761    # since paths with space are more likely in Windows. Give it another try with the whole
15762    # argument.
15763    path="$complete"
15764    arguments="EOL"
15765    new_path="$path"
15766
15767  windows_path="$new_path"
15768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15769    unix_path=`$CYGPATH -u "$windows_path"`
15770    new_path="$unix_path"
15771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15773    new_path="$unix_path"
15774  fi
15775
15776
15777    new_path=`$WHICH "$new_path" 2> /dev/null`
15778
15779    if test "x$new_path" = x; then
15780      # It's still not found. Now this is an unrecoverable error.
15781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15782$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15783      has_space=`$ECHO "$complete" | $GREP " "`
15784      if test "x$has_space" != x; then
15785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15787      fi
15788      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15789    fi
15790  fi
15791
15792  # Now new_path has a complete unix path to the binary
15793  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15794    # Keep paths in /bin as-is, but remove trailing .exe if any
15795    new_path="${new_path/%.exe/}"
15796    # Do not save /bin paths to all_fixpath_prefixes!
15797  else
15798    # Not in mixed or Windows style, start by that.
15799    new_path=`cmd //c echo $new_path`
15800
15801  input_path="$new_path"
15802  # Check if we need to convert this using DOS-style short mode. If the path
15803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15804  # take no chances and rewrite it.
15805  # Note: m4 eats our [], so we need to use [ and ] instead.
15806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15807  if test "x$has_forbidden_chars" != x; then
15808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15810  fi
15811
15812    # Output is in $new_path
15813
15814  windows_path="$new_path"
15815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15816    unix_path=`$CYGPATH -u "$windows_path"`
15817    new_path="$unix_path"
15818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15820    new_path="$unix_path"
15821  fi
15822
15823    # remove trailing .exe if any
15824    new_path="${new_path/%.exe/}"
15825
15826    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15827    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15828  fi
15829
15830  else
15831    # We're on a posix platform. Hooray! :)
15832    # First separate the path from the arguments. This will split at the first
15833    # space.
15834    complete="$FOUND_MAKE"
15835    path="${complete%% *}"
15836    tmp="$complete EOL"
15837    arguments="${tmp#* }"
15838
15839    # Cannot rely on the command "which" here since it doesn't always work.
15840    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15841    if test -z "$is_absolute_path"; then
15842      # Path to executable is not absolute. Find it.
15843      IFS_save="$IFS"
15844      IFS=:
15845      for p in $PATH; do
15846        if test -f "$p/$path" && test -x "$p/$path"; then
15847          new_path="$p/$path"
15848          break
15849        fi
15850      done
15851      IFS="$IFS_save"
15852    else
15853      # This is an absolute path, we can use it without further modifications.
15854      new_path="$path"
15855    fi
15856
15857    if test "x$new_path" = x; then
15858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15859$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15860      has_space=`$ECHO "$complete" | $GREP " "`
15861      if test "x$has_space" != x; then
15862        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15863$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15864      fi
15865      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15866    fi
15867  fi
15868
15869  # Now join together the path and the arguments once again
15870  if test "x$arguments" != xEOL; then
15871    new_complete="$new_path ${arguments% *}"
15872  else
15873    new_complete="$new_path"
15874  fi
15875
15876  if test "x$complete" != "x$new_complete"; then
15877    FOUND_MAKE="$new_complete"
15878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15879$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15880  fi
15881
15882        fi
15883      fi
15884    fi
15885  fi
15886
15887
15888    if test "x$FOUND_MAKE" = x; then
15889      for ac_prog in make
15890do
15891  # Extract the first word of "$ac_prog", so it can be a program name with args.
15892set dummy $ac_prog; ac_word=$2
15893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15894$as_echo_n "checking for $ac_word... " >&6; }
15895if ${ac_cv_path_CHECK_MAKE+:} false; then :
15896  $as_echo_n "(cached) " >&6
15897else
15898  case $CHECK_MAKE in
15899  [\\/]* | ?:[\\/]*)
15900  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15901  ;;
15902  *)
15903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15904for as_dir in $PATH
15905do
15906  IFS=$as_save_IFS
15907  test -z "$as_dir" && as_dir=.
15908    for ac_exec_ext in '' $ac_executable_extensions; do
15909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15910    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15912    break 2
15913  fi
15914done
15915  done
15916IFS=$as_save_IFS
15917
15918  ;;
15919esac
15920fi
15921CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15922if test -n "$CHECK_MAKE"; then
15923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15924$as_echo "$CHECK_MAKE" >&6; }
15925else
15926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15927$as_echo "no" >&6; }
15928fi
15929
15930
15931  test -n "$CHECK_MAKE" && break
15932done
15933
15934
15935  MAKE_CANDIDATE=""$CHECK_MAKE""
15936  DESCRIPTION="make in PATH"
15937  if test "x$MAKE_CANDIDATE" != x; then
15938    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15939$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15940    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15941    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15942    if test "x$IS_GNU_MAKE" = x; then
15943      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15944$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15945    else
15946      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15947      if test "x$IS_MODERN_MAKE" = x; then
15948        { $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
15949$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;}
15950      else
15951        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15952          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15953            MAKE_EXPECTED_ENV='cygwin'
15954          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15955            MAKE_EXPECTED_ENV='msys'
15956          else
15957            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15958          fi
15959          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15960          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15961        else
15962          # Not relevant for non-Windows
15963          IS_MAKE_CORRECT_ENV=true
15964        fi
15965        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15966          { $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
15967$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;}
15968        else
15969          FOUND_MAKE=$MAKE_CANDIDATE
15970
15971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15972
15973  # First separate the path from the arguments. This will split at the first
15974  # space.
15975  complete="$FOUND_MAKE"
15976  path="${complete%% *}"
15977  tmp="$complete EOL"
15978  arguments="${tmp#* }"
15979
15980  # Input might be given as Windows format, start by converting to
15981  # unix format.
15982  new_path=`$CYGPATH -u "$path"`
15983
15984  # Now try to locate executable using which
15985  new_path=`$WHICH "$new_path" 2> /dev/null`
15986  # bat and cmd files are not always considered executable in cygwin causing which
15987  # to not find them
15988  if test "x$new_path" = x \
15989      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15990      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15991    new_path=`$CYGPATH -u "$path"`
15992  fi
15993  if test "x$new_path" = x; then
15994    # Oops. Which didn't find the executable.
15995    # The splitting of arguments from the executable at a space might have been incorrect,
15996    # since paths with space are more likely in Windows. Give it another try with the whole
15997    # argument.
15998    path="$complete"
15999    arguments="EOL"
16000    new_path=`$CYGPATH -u "$path"`
16001    new_path=`$WHICH "$new_path" 2> /dev/null`
16002    # bat and cmd files are not always considered executable in cygwin causing which
16003    # to not find them
16004    if test "x$new_path" = x \
16005        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16006        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16007      new_path=`$CYGPATH -u "$path"`
16008    fi
16009    if test "x$new_path" = x; then
16010      # It's still not found. Now this is an unrecoverable error.
16011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16012$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16013      has_space=`$ECHO "$complete" | $GREP " "`
16014      if test "x$has_space" != x; then
16015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16017      fi
16018      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16019    fi
16020  fi
16021
16022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16025  # "foo.exe" is OK but "foo" is an error.
16026  #
16027  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16028  # It is also a way to make sure we got the proper file name for the real test later on.
16029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16030  if test "x$test_shortpath" = x; then
16031    # Short path failed, file does not exist as specified.
16032    # Try adding .exe or .cmd
16033    if test -f "${new_path}.exe"; then
16034      input_to_shortpath="${new_path}.exe"
16035    elif test -f "${new_path}.cmd"; then
16036      input_to_shortpath="${new_path}.cmd"
16037    else
16038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16039$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16040      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16041$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16042      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16043    fi
16044  else
16045    input_to_shortpath="$new_path"
16046  fi
16047
16048  # Call helper function which possibly converts this using DOS-style short mode.
16049  # If so, the updated path is stored in $new_path.
16050  new_path="$input_to_shortpath"
16051
16052  input_path="$input_to_shortpath"
16053  # Check if we need to convert this using DOS-style short mode. If the path
16054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16055  # take no chances and rewrite it.
16056  # Note: m4 eats our [], so we need to use [ and ] instead.
16057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16058  if test "x$has_forbidden_chars" != x; then
16059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16063      # Going to short mode and back again did indeed matter. Since short mode is
16064      # case insensitive, let's make it lowercase to improve readability.
16065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16066      # Now convert it back to Unix-stile (cygpath)
16067      input_path=`$CYGPATH -u "$shortmode_path"`
16068      new_path="$input_path"
16069    fi
16070  fi
16071
16072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16073  if test "x$test_cygdrive_prefix" = x; then
16074    # As a simple fix, exclude /usr/bin since it's not a real path.
16075    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16077      # a path prefixed by /cygdrive for fixpath to work.
16078      new_path="$CYGWIN_ROOT_PATH$input_path"
16079    fi
16080  fi
16081
16082  # remove trailing .exe if any
16083  new_path="${new_path/%.exe/}"
16084
16085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16086
16087  # First separate the path from the arguments. This will split at the first
16088  # space.
16089  complete="$FOUND_MAKE"
16090  path="${complete%% *}"
16091  tmp="$complete EOL"
16092  arguments="${tmp#* }"
16093
16094  # Input might be given as Windows format, start by converting to
16095  # unix format.
16096  new_path="$path"
16097
16098  windows_path="$new_path"
16099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16100    unix_path=`$CYGPATH -u "$windows_path"`
16101    new_path="$unix_path"
16102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16104    new_path="$unix_path"
16105  fi
16106
16107
16108  # Now try to locate executable using which
16109  new_path=`$WHICH "$new_path" 2> /dev/null`
16110
16111  if test "x$new_path" = x; then
16112    # Oops. Which didn't find the executable.
16113    # The splitting of arguments from the executable at a space might have been incorrect,
16114    # since paths with space are more likely in Windows. Give it another try with the whole
16115    # argument.
16116    path="$complete"
16117    arguments="EOL"
16118    new_path="$path"
16119
16120  windows_path="$new_path"
16121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16122    unix_path=`$CYGPATH -u "$windows_path"`
16123    new_path="$unix_path"
16124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16126    new_path="$unix_path"
16127  fi
16128
16129
16130    new_path=`$WHICH "$new_path" 2> /dev/null`
16131
16132    if test "x$new_path" = x; then
16133      # It's still not found. Now this is an unrecoverable error.
16134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16135$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16136      has_space=`$ECHO "$complete" | $GREP " "`
16137      if test "x$has_space" != x; then
16138        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16139$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16140      fi
16141      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16142    fi
16143  fi
16144
16145  # Now new_path has a complete unix path to the binary
16146  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16147    # Keep paths in /bin as-is, but remove trailing .exe if any
16148    new_path="${new_path/%.exe/}"
16149    # Do not save /bin paths to all_fixpath_prefixes!
16150  else
16151    # Not in mixed or Windows style, start by that.
16152    new_path=`cmd //c echo $new_path`
16153
16154  input_path="$new_path"
16155  # Check if we need to convert this using DOS-style short mode. If the path
16156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16157  # take no chances and rewrite it.
16158  # Note: m4 eats our [], so we need to use [ and ] instead.
16159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16160  if test "x$has_forbidden_chars" != x; then
16161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16162    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16163  fi
16164
16165    # Output is in $new_path
16166
16167  windows_path="$new_path"
16168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16169    unix_path=`$CYGPATH -u "$windows_path"`
16170    new_path="$unix_path"
16171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16173    new_path="$unix_path"
16174  fi
16175
16176    # remove trailing .exe if any
16177    new_path="${new_path/%.exe/}"
16178
16179    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16180    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16181  fi
16182
16183  else
16184    # We're on a posix platform. Hooray! :)
16185    # First separate the path from the arguments. This will split at the first
16186    # space.
16187    complete="$FOUND_MAKE"
16188    path="${complete%% *}"
16189    tmp="$complete EOL"
16190    arguments="${tmp#* }"
16191
16192    # Cannot rely on the command "which" here since it doesn't always work.
16193    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16194    if test -z "$is_absolute_path"; then
16195      # Path to executable is not absolute. Find it.
16196      IFS_save="$IFS"
16197      IFS=:
16198      for p in $PATH; do
16199        if test -f "$p/$path" && test -x "$p/$path"; then
16200          new_path="$p/$path"
16201          break
16202        fi
16203      done
16204      IFS="$IFS_save"
16205    else
16206      # This is an absolute path, we can use it without further modifications.
16207      new_path="$path"
16208    fi
16209
16210    if test "x$new_path" = x; then
16211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16212$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16213      has_space=`$ECHO "$complete" | $GREP " "`
16214      if test "x$has_space" != x; then
16215        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16216$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16217      fi
16218      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16219    fi
16220  fi
16221
16222  # Now join together the path and the arguments once again
16223  if test "x$arguments" != xEOL; then
16224    new_complete="$new_path ${arguments% *}"
16225  else
16226    new_complete="$new_path"
16227  fi
16228
16229  if test "x$complete" != "x$new_complete"; then
16230    FOUND_MAKE="$new_complete"
16231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16232$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16233  fi
16234
16235        fi
16236      fi
16237    fi
16238  fi
16239
16240    fi
16241
16242    if test "x$FOUND_MAKE" = x; then
16243      if test "x$TOOLCHAIN_PATH" != x; then
16244        # We have a toolchain path, check that as well before giving up.
16245        OLD_PATH=$PATH
16246        PATH=$TOOLCHAIN_PATH:$PATH
16247        for ac_prog in gmake
16248do
16249  # Extract the first word of "$ac_prog", so it can be a program name with args.
16250set dummy $ac_prog; ac_word=$2
16251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16252$as_echo_n "checking for $ac_word... " >&6; }
16253if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16254  $as_echo_n "(cached) " >&6
16255else
16256  case $CHECK_TOOLSDIR_GMAKE in
16257  [\\/]* | ?:[\\/]*)
16258  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16259  ;;
16260  *)
16261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16262for as_dir in $PATH
16263do
16264  IFS=$as_save_IFS
16265  test -z "$as_dir" && as_dir=.
16266    for ac_exec_ext in '' $ac_executable_extensions; do
16267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16268    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16270    break 2
16271  fi
16272done
16273  done
16274IFS=$as_save_IFS
16275
16276  ;;
16277esac
16278fi
16279CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16280if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16282$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16283else
16284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16285$as_echo "no" >&6; }
16286fi
16287
16288
16289  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16290done
16291
16292
16293  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16294  DESCRIPTION="gmake in tools-dir"
16295  if test "x$MAKE_CANDIDATE" != x; then
16296    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16297$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16298    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16299    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16300    if test "x$IS_GNU_MAKE" = x; then
16301      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16302$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16303    else
16304      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16305      if test "x$IS_MODERN_MAKE" = x; then
16306        { $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
16307$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;}
16308      else
16309        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16310          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16311            MAKE_EXPECTED_ENV='cygwin'
16312          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16313            MAKE_EXPECTED_ENV='msys'
16314          else
16315            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16316          fi
16317          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16318          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16319        else
16320          # Not relevant for non-Windows
16321          IS_MAKE_CORRECT_ENV=true
16322        fi
16323        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16324          { $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
16325$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;}
16326        else
16327          FOUND_MAKE=$MAKE_CANDIDATE
16328
16329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16330
16331  # First separate the path from the arguments. This will split at the first
16332  # space.
16333  complete="$FOUND_MAKE"
16334  path="${complete%% *}"
16335  tmp="$complete EOL"
16336  arguments="${tmp#* }"
16337
16338  # Input might be given as Windows format, start by converting to
16339  # unix format.
16340  new_path=`$CYGPATH -u "$path"`
16341
16342  # Now try to locate executable using which
16343  new_path=`$WHICH "$new_path" 2> /dev/null`
16344  # bat and cmd files are not always considered executable in cygwin causing which
16345  # to not find them
16346  if test "x$new_path" = x \
16347      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16348      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16349    new_path=`$CYGPATH -u "$path"`
16350  fi
16351  if test "x$new_path" = x; then
16352    # Oops. Which didn't find the executable.
16353    # The splitting of arguments from the executable at a space might have been incorrect,
16354    # since paths with space are more likely in Windows. Give it another try with the whole
16355    # argument.
16356    path="$complete"
16357    arguments="EOL"
16358    new_path=`$CYGPATH -u "$path"`
16359    new_path=`$WHICH "$new_path" 2> /dev/null`
16360    # bat and cmd files are not always considered executable in cygwin causing which
16361    # to not find them
16362    if test "x$new_path" = x \
16363        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16364        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16365      new_path=`$CYGPATH -u "$path"`
16366    fi
16367    if test "x$new_path" = x; then
16368      # It's still not found. Now this is an unrecoverable error.
16369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16370$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16371      has_space=`$ECHO "$complete" | $GREP " "`
16372      if test "x$has_space" != x; then
16373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16375      fi
16376      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16377    fi
16378  fi
16379
16380  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16381  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16382  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16383  # "foo.exe" is OK but "foo" is an error.
16384  #
16385  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16386  # It is also a way to make sure we got the proper file name for the real test later on.
16387  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16388  if test "x$test_shortpath" = x; then
16389    # Short path failed, file does not exist as specified.
16390    # Try adding .exe or .cmd
16391    if test -f "${new_path}.exe"; then
16392      input_to_shortpath="${new_path}.exe"
16393    elif test -f "${new_path}.cmd"; then
16394      input_to_shortpath="${new_path}.cmd"
16395    else
16396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16397$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16398      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16399$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16400      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16401    fi
16402  else
16403    input_to_shortpath="$new_path"
16404  fi
16405
16406  # Call helper function which possibly converts this using DOS-style short mode.
16407  # If so, the updated path is stored in $new_path.
16408  new_path="$input_to_shortpath"
16409
16410  input_path="$input_to_shortpath"
16411  # Check if we need to convert this using DOS-style short mode. If the path
16412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16413  # take no chances and rewrite it.
16414  # Note: m4 eats our [], so we need to use [ and ] instead.
16415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16416  if test "x$has_forbidden_chars" != x; then
16417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16421      # Going to short mode and back again did indeed matter. Since short mode is
16422      # case insensitive, let's make it lowercase to improve readability.
16423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16424      # Now convert it back to Unix-stile (cygpath)
16425      input_path=`$CYGPATH -u "$shortmode_path"`
16426      new_path="$input_path"
16427    fi
16428  fi
16429
16430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16431  if test "x$test_cygdrive_prefix" = x; then
16432    # As a simple fix, exclude /usr/bin since it's not a real path.
16433    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16435      # a path prefixed by /cygdrive for fixpath to work.
16436      new_path="$CYGWIN_ROOT_PATH$input_path"
16437    fi
16438  fi
16439
16440  # remove trailing .exe if any
16441  new_path="${new_path/%.exe/}"
16442
16443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16444
16445  # First separate the path from the arguments. This will split at the first
16446  # space.
16447  complete="$FOUND_MAKE"
16448  path="${complete%% *}"
16449  tmp="$complete EOL"
16450  arguments="${tmp#* }"
16451
16452  # Input might be given as Windows format, start by converting to
16453  # unix format.
16454  new_path="$path"
16455
16456  windows_path="$new_path"
16457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16458    unix_path=`$CYGPATH -u "$windows_path"`
16459    new_path="$unix_path"
16460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16462    new_path="$unix_path"
16463  fi
16464
16465
16466  # Now try to locate executable using which
16467  new_path=`$WHICH "$new_path" 2> /dev/null`
16468
16469  if test "x$new_path" = x; then
16470    # Oops. Which didn't find the executable.
16471    # The splitting of arguments from the executable at a space might have been incorrect,
16472    # since paths with space are more likely in Windows. Give it another try with the whole
16473    # argument.
16474    path="$complete"
16475    arguments="EOL"
16476    new_path="$path"
16477
16478  windows_path="$new_path"
16479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16480    unix_path=`$CYGPATH -u "$windows_path"`
16481    new_path="$unix_path"
16482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16484    new_path="$unix_path"
16485  fi
16486
16487
16488    new_path=`$WHICH "$new_path" 2> /dev/null`
16489
16490    if test "x$new_path" = x; then
16491      # It's still not found. Now this is an unrecoverable error.
16492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16493$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16494      has_space=`$ECHO "$complete" | $GREP " "`
16495      if test "x$has_space" != x; then
16496        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16497$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16498      fi
16499      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16500    fi
16501  fi
16502
16503  # Now new_path has a complete unix path to the binary
16504  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16505    # Keep paths in /bin as-is, but remove trailing .exe if any
16506    new_path="${new_path/%.exe/}"
16507    # Do not save /bin paths to all_fixpath_prefixes!
16508  else
16509    # Not in mixed or Windows style, start by that.
16510    new_path=`cmd //c echo $new_path`
16511
16512  input_path="$new_path"
16513  # Check if we need to convert this using DOS-style short mode. If the path
16514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16515  # take no chances and rewrite it.
16516  # Note: m4 eats our [], so we need to use [ and ] instead.
16517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16518  if test "x$has_forbidden_chars" != x; then
16519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16521  fi
16522
16523    # Output is in $new_path
16524
16525  windows_path="$new_path"
16526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16527    unix_path=`$CYGPATH -u "$windows_path"`
16528    new_path="$unix_path"
16529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16531    new_path="$unix_path"
16532  fi
16533
16534    # remove trailing .exe if any
16535    new_path="${new_path/%.exe/}"
16536
16537    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16538    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16539  fi
16540
16541  else
16542    # We're on a posix platform. Hooray! :)
16543    # First separate the path from the arguments. This will split at the first
16544    # space.
16545    complete="$FOUND_MAKE"
16546    path="${complete%% *}"
16547    tmp="$complete EOL"
16548    arguments="${tmp#* }"
16549
16550    # Cannot rely on the command "which" here since it doesn't always work.
16551    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16552    if test -z "$is_absolute_path"; then
16553      # Path to executable is not absolute. Find it.
16554      IFS_save="$IFS"
16555      IFS=:
16556      for p in $PATH; do
16557        if test -f "$p/$path" && test -x "$p/$path"; then
16558          new_path="$p/$path"
16559          break
16560        fi
16561      done
16562      IFS="$IFS_save"
16563    else
16564      # This is an absolute path, we can use it without further modifications.
16565      new_path="$path"
16566    fi
16567
16568    if test "x$new_path" = x; then
16569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16570$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16571      has_space=`$ECHO "$complete" | $GREP " "`
16572      if test "x$has_space" != x; then
16573        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16574$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16575      fi
16576      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16577    fi
16578  fi
16579
16580  # Now join together the path and the arguments once again
16581  if test "x$arguments" != xEOL; then
16582    new_complete="$new_path ${arguments% *}"
16583  else
16584    new_complete="$new_path"
16585  fi
16586
16587  if test "x$complete" != "x$new_complete"; then
16588    FOUND_MAKE="$new_complete"
16589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16590$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16591  fi
16592
16593        fi
16594      fi
16595    fi
16596  fi
16597
16598        if test "x$FOUND_MAKE" = x; then
16599          for ac_prog in make
16600do
16601  # Extract the first word of "$ac_prog", so it can be a program name with args.
16602set dummy $ac_prog; ac_word=$2
16603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16604$as_echo_n "checking for $ac_word... " >&6; }
16605if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16606  $as_echo_n "(cached) " >&6
16607else
16608  case $CHECK_TOOLSDIR_MAKE in
16609  [\\/]* | ?:[\\/]*)
16610  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16611  ;;
16612  *)
16613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16614for as_dir in $PATH
16615do
16616  IFS=$as_save_IFS
16617  test -z "$as_dir" && as_dir=.
16618    for ac_exec_ext in '' $ac_executable_extensions; do
16619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16620    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16622    break 2
16623  fi
16624done
16625  done
16626IFS=$as_save_IFS
16627
16628  ;;
16629esac
16630fi
16631CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16632if test -n "$CHECK_TOOLSDIR_MAKE"; then
16633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16634$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16635else
16636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16637$as_echo "no" >&6; }
16638fi
16639
16640
16641  test -n "$CHECK_TOOLSDIR_MAKE" && break
16642done
16643
16644
16645  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16646  DESCRIPTION="make in tools-dir"
16647  if test "x$MAKE_CANDIDATE" != x; then
16648    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16649$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16650    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16651    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16652    if test "x$IS_GNU_MAKE" = x; then
16653      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16654$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16655    else
16656      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16657      if test "x$IS_MODERN_MAKE" = x; then
16658        { $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
16659$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;}
16660      else
16661        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16662          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16663            MAKE_EXPECTED_ENV='cygwin'
16664          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16665            MAKE_EXPECTED_ENV='msys'
16666          else
16667            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16668          fi
16669          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16670          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16671        else
16672          # Not relevant for non-Windows
16673          IS_MAKE_CORRECT_ENV=true
16674        fi
16675        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16676          { $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
16677$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;}
16678        else
16679          FOUND_MAKE=$MAKE_CANDIDATE
16680
16681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16682
16683  # First separate the path from the arguments. This will split at the first
16684  # space.
16685  complete="$FOUND_MAKE"
16686  path="${complete%% *}"
16687  tmp="$complete EOL"
16688  arguments="${tmp#* }"
16689
16690  # Input might be given as Windows format, start by converting to
16691  # unix format.
16692  new_path=`$CYGPATH -u "$path"`
16693
16694  # Now try to locate executable using which
16695  new_path=`$WHICH "$new_path" 2> /dev/null`
16696  # bat and cmd files are not always considered executable in cygwin causing which
16697  # to not find them
16698  if test "x$new_path" = x \
16699      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16700      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16701    new_path=`$CYGPATH -u "$path"`
16702  fi
16703  if test "x$new_path" = x; then
16704    # Oops. Which didn't find the executable.
16705    # The splitting of arguments from the executable at a space might have been incorrect,
16706    # since paths with space are more likely in Windows. Give it another try with the whole
16707    # argument.
16708    path="$complete"
16709    arguments="EOL"
16710    new_path=`$CYGPATH -u "$path"`
16711    new_path=`$WHICH "$new_path" 2> /dev/null`
16712    # bat and cmd files are not always considered executable in cygwin causing which
16713    # to not find them
16714    if test "x$new_path" = x \
16715        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16716        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16717      new_path=`$CYGPATH -u "$path"`
16718    fi
16719    if test "x$new_path" = x; then
16720      # It's still not found. Now this is an unrecoverable error.
16721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16722$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16723      has_space=`$ECHO "$complete" | $GREP " "`
16724      if test "x$has_space" != x; then
16725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16727      fi
16728      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16729    fi
16730  fi
16731
16732  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16733  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16734  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16735  # "foo.exe" is OK but "foo" is an error.
16736  #
16737  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16738  # It is also a way to make sure we got the proper file name for the real test later on.
16739  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16740  if test "x$test_shortpath" = x; then
16741    # Short path failed, file does not exist as specified.
16742    # Try adding .exe or .cmd
16743    if test -f "${new_path}.exe"; then
16744      input_to_shortpath="${new_path}.exe"
16745    elif test -f "${new_path}.cmd"; then
16746      input_to_shortpath="${new_path}.cmd"
16747    else
16748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16749$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16750      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16751$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16752      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16753    fi
16754  else
16755    input_to_shortpath="$new_path"
16756  fi
16757
16758  # Call helper function which possibly converts this using DOS-style short mode.
16759  # If so, the updated path is stored in $new_path.
16760  new_path="$input_to_shortpath"
16761
16762  input_path="$input_to_shortpath"
16763  # Check if we need to convert this using DOS-style short mode. If the path
16764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16765  # take no chances and rewrite it.
16766  # Note: m4 eats our [], so we need to use [ and ] instead.
16767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16768  if test "x$has_forbidden_chars" != x; then
16769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16773      # Going to short mode and back again did indeed matter. Since short mode is
16774      # case insensitive, let's make it lowercase to improve readability.
16775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16776      # Now convert it back to Unix-stile (cygpath)
16777      input_path=`$CYGPATH -u "$shortmode_path"`
16778      new_path="$input_path"
16779    fi
16780  fi
16781
16782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16783  if test "x$test_cygdrive_prefix" = x; then
16784    # As a simple fix, exclude /usr/bin since it's not a real path.
16785    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16787      # a path prefixed by /cygdrive for fixpath to work.
16788      new_path="$CYGWIN_ROOT_PATH$input_path"
16789    fi
16790  fi
16791
16792  # remove trailing .exe if any
16793  new_path="${new_path/%.exe/}"
16794
16795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16796
16797  # First separate the path from the arguments. This will split at the first
16798  # space.
16799  complete="$FOUND_MAKE"
16800  path="${complete%% *}"
16801  tmp="$complete EOL"
16802  arguments="${tmp#* }"
16803
16804  # Input might be given as Windows format, start by converting to
16805  # unix format.
16806  new_path="$path"
16807
16808  windows_path="$new_path"
16809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16810    unix_path=`$CYGPATH -u "$windows_path"`
16811    new_path="$unix_path"
16812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16814    new_path="$unix_path"
16815  fi
16816
16817
16818  # Now try to locate executable using which
16819  new_path=`$WHICH "$new_path" 2> /dev/null`
16820
16821  if test "x$new_path" = x; then
16822    # Oops. Which didn't find the executable.
16823    # The splitting of arguments from the executable at a space might have been incorrect,
16824    # since paths with space are more likely in Windows. Give it another try with the whole
16825    # argument.
16826    path="$complete"
16827    arguments="EOL"
16828    new_path="$path"
16829
16830  windows_path="$new_path"
16831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16832    unix_path=`$CYGPATH -u "$windows_path"`
16833    new_path="$unix_path"
16834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16836    new_path="$unix_path"
16837  fi
16838
16839
16840    new_path=`$WHICH "$new_path" 2> /dev/null`
16841
16842    if test "x$new_path" = x; then
16843      # It's still not found. Now this is an unrecoverable error.
16844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16845$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16846      has_space=`$ECHO "$complete" | $GREP " "`
16847      if test "x$has_space" != x; then
16848        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16849$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16850      fi
16851      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16852    fi
16853  fi
16854
16855  # Now new_path has a complete unix path to the binary
16856  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16857    # Keep paths in /bin as-is, but remove trailing .exe if any
16858    new_path="${new_path/%.exe/}"
16859    # Do not save /bin paths to all_fixpath_prefixes!
16860  else
16861    # Not in mixed or Windows style, start by that.
16862    new_path=`cmd //c echo $new_path`
16863
16864  input_path="$new_path"
16865  # Check if we need to convert this using DOS-style short mode. If the path
16866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16867  # take no chances and rewrite it.
16868  # Note: m4 eats our [], so we need to use [ and ] instead.
16869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16870  if test "x$has_forbidden_chars" != x; then
16871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16873  fi
16874
16875    # Output is in $new_path
16876
16877  windows_path="$new_path"
16878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16879    unix_path=`$CYGPATH -u "$windows_path"`
16880    new_path="$unix_path"
16881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16883    new_path="$unix_path"
16884  fi
16885
16886    # remove trailing .exe if any
16887    new_path="${new_path/%.exe/}"
16888
16889    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16890    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16891  fi
16892
16893  else
16894    # We're on a posix platform. Hooray! :)
16895    # First separate the path from the arguments. This will split at the first
16896    # space.
16897    complete="$FOUND_MAKE"
16898    path="${complete%% *}"
16899    tmp="$complete EOL"
16900    arguments="${tmp#* }"
16901
16902    # Cannot rely on the command "which" here since it doesn't always work.
16903    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16904    if test -z "$is_absolute_path"; then
16905      # Path to executable is not absolute. Find it.
16906      IFS_save="$IFS"
16907      IFS=:
16908      for p in $PATH; do
16909        if test -f "$p/$path" && test -x "$p/$path"; then
16910          new_path="$p/$path"
16911          break
16912        fi
16913      done
16914      IFS="$IFS_save"
16915    else
16916      # This is an absolute path, we can use it without further modifications.
16917      new_path="$path"
16918    fi
16919
16920    if test "x$new_path" = x; then
16921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16922$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16923      has_space=`$ECHO "$complete" | $GREP " "`
16924      if test "x$has_space" != x; then
16925        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16926$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16927      fi
16928      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16929    fi
16930  fi
16931
16932  # Now join together the path and the arguments once again
16933  if test "x$arguments" != xEOL; then
16934    new_complete="$new_path ${arguments% *}"
16935  else
16936    new_complete="$new_path"
16937  fi
16938
16939  if test "x$complete" != "x$new_complete"; then
16940    FOUND_MAKE="$new_complete"
16941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16942$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16943  fi
16944
16945        fi
16946      fi
16947    fi
16948  fi
16949
16950        fi
16951        PATH=$OLD_PATH
16952      fi
16953    fi
16954
16955    if test "x$FOUND_MAKE" = x; then
16956      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
16957    fi
16958  fi
16959
16960  MAKE=$FOUND_MAKE
16961
16962  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16963$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16964
16965
16966
16967  # Test if find supports -delete
16968  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16969$as_echo_n "checking if find supports -delete... " >&6; }
16970  FIND_DELETE="-delete"
16971
16972  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16973
16974  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16975
16976  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16977  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16978    # No, it does not.
16979    rm $DELETEDIR/TestIfFindSupportsDelete
16980    FIND_DELETE="-exec rm \{\} \+"
16981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16982$as_echo "no" >&6; }
16983  else
16984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16985$as_echo "yes" >&6; }
16986  fi
16987  rmdir $DELETEDIR
16988
16989
16990
16991  # These tools might not be installed by default,
16992  # need hint on how to install them.
16993
16994
16995
16996  # Publish this variable in the help.
16997
16998
16999  if test "x$UNZIP" = x; then
17000    # The variable is not set by user, try to locate tool using the code snippet
17001    for ac_prog in unzip
17002do
17003  # Extract the first word of "$ac_prog", so it can be a program name with args.
17004set dummy $ac_prog; ac_word=$2
17005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17006$as_echo_n "checking for $ac_word... " >&6; }
17007if ${ac_cv_path_UNZIP+:} false; then :
17008  $as_echo_n "(cached) " >&6
17009else
17010  case $UNZIP in
17011  [\\/]* | ?:[\\/]*)
17012  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17013  ;;
17014  *)
17015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17016for as_dir in $PATH
17017do
17018  IFS=$as_save_IFS
17019  test -z "$as_dir" && as_dir=.
17020    for ac_exec_ext in '' $ac_executable_extensions; do
17021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17022    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17024    break 2
17025  fi
17026done
17027  done
17028IFS=$as_save_IFS
17029
17030  ;;
17031esac
17032fi
17033UNZIP=$ac_cv_path_UNZIP
17034if test -n "$UNZIP"; then
17035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17036$as_echo "$UNZIP" >&6; }
17037else
17038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17039$as_echo "no" >&6; }
17040fi
17041
17042
17043  test -n "$UNZIP" && break
17044done
17045
17046  else
17047    # The variable is set, but is it from the command line or the environment?
17048
17049    # Try to remove the string !UNZIP! from our list.
17050    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17051    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17052      # If it failed, the variable was not from the command line. Ignore it,
17053      # but warn the user (except for BASH, which is always set by the calling BASH).
17054      if test "xUNZIP" != xBASH; then
17055        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17056$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17057      fi
17058      # Try to locate tool using the code snippet
17059      for ac_prog in unzip
17060do
17061  # Extract the first word of "$ac_prog", so it can be a program name with args.
17062set dummy $ac_prog; ac_word=$2
17063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17064$as_echo_n "checking for $ac_word... " >&6; }
17065if ${ac_cv_path_UNZIP+:} false; then :
17066  $as_echo_n "(cached) " >&6
17067else
17068  case $UNZIP in
17069  [\\/]* | ?:[\\/]*)
17070  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17071  ;;
17072  *)
17073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17074for as_dir in $PATH
17075do
17076  IFS=$as_save_IFS
17077  test -z "$as_dir" && as_dir=.
17078    for ac_exec_ext in '' $ac_executable_extensions; do
17079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17080    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17082    break 2
17083  fi
17084done
17085  done
17086IFS=$as_save_IFS
17087
17088  ;;
17089esac
17090fi
17091UNZIP=$ac_cv_path_UNZIP
17092if test -n "$UNZIP"; then
17093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17094$as_echo "$UNZIP" >&6; }
17095else
17096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17097$as_echo "no" >&6; }
17098fi
17099
17100
17101  test -n "$UNZIP" && break
17102done
17103
17104    else
17105      # If it succeeded, then it was overridden by the user. We will use it
17106      # for the tool.
17107
17108      # First remove it from the list of overridden variables, so we can test
17109      # for unknown variables in the end.
17110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17111
17112      # Check if the provided tool contains a complete path.
17113      tool_specified="$UNZIP"
17114      tool_basename="${tool_specified##*/}"
17115      if test "x$tool_basename" = "x$tool_specified"; then
17116        # A command without a complete path is provided, search $PATH.
17117        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17118$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17119        # Extract the first word of "$tool_basename", so it can be a program name with args.
17120set dummy $tool_basename; ac_word=$2
17121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17122$as_echo_n "checking for $ac_word... " >&6; }
17123if ${ac_cv_path_UNZIP+:} false; then :
17124  $as_echo_n "(cached) " >&6
17125else
17126  case $UNZIP in
17127  [\\/]* | ?:[\\/]*)
17128  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17129  ;;
17130  *)
17131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17132for as_dir in $PATH
17133do
17134  IFS=$as_save_IFS
17135  test -z "$as_dir" && as_dir=.
17136    for ac_exec_ext in '' $ac_executable_extensions; do
17137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17138    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17140    break 2
17141  fi
17142done
17143  done
17144IFS=$as_save_IFS
17145
17146  ;;
17147esac
17148fi
17149UNZIP=$ac_cv_path_UNZIP
17150if test -n "$UNZIP"; then
17151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17152$as_echo "$UNZIP" >&6; }
17153else
17154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17155$as_echo "no" >&6; }
17156fi
17157
17158
17159        if test "x$UNZIP" = x; then
17160          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17161        fi
17162      else
17163        # Otherwise we believe it is a complete path. Use it as it is.
17164        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17165$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17166        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17167$as_echo_n "checking for UNZIP... " >&6; }
17168        if test ! -x "$tool_specified"; then
17169          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17170$as_echo "not found" >&6; }
17171          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17172        fi
17173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17174$as_echo "$tool_specified" >&6; }
17175      fi
17176    fi
17177  fi
17178
17179
17180
17181  if test "x$UNZIP" = x; then
17182    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17183  fi
17184
17185
17186
17187
17188
17189  # Publish this variable in the help.
17190
17191
17192  if test "x$ZIP" = x; then
17193    # The variable is not set by user, try to locate tool using the code snippet
17194    for ac_prog in zip
17195do
17196  # Extract the first word of "$ac_prog", so it can be a program name with args.
17197set dummy $ac_prog; ac_word=$2
17198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17199$as_echo_n "checking for $ac_word... " >&6; }
17200if ${ac_cv_path_ZIP+:} false; then :
17201  $as_echo_n "(cached) " >&6
17202else
17203  case $ZIP in
17204  [\\/]* | ?:[\\/]*)
17205  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17206  ;;
17207  *)
17208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17209for as_dir in $PATH
17210do
17211  IFS=$as_save_IFS
17212  test -z "$as_dir" && as_dir=.
17213    for ac_exec_ext in '' $ac_executable_extensions; do
17214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17215    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17217    break 2
17218  fi
17219done
17220  done
17221IFS=$as_save_IFS
17222
17223  ;;
17224esac
17225fi
17226ZIP=$ac_cv_path_ZIP
17227if test -n "$ZIP"; then
17228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17229$as_echo "$ZIP" >&6; }
17230else
17231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17232$as_echo "no" >&6; }
17233fi
17234
17235
17236  test -n "$ZIP" && break
17237done
17238
17239  else
17240    # The variable is set, but is it from the command line or the environment?
17241
17242    # Try to remove the string !ZIP! from our list.
17243    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17244    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17245      # If it failed, the variable was not from the command line. Ignore it,
17246      # but warn the user (except for BASH, which is always set by the calling BASH).
17247      if test "xZIP" != xBASH; then
17248        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17249$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17250      fi
17251      # Try to locate tool using the code snippet
17252      for ac_prog in zip
17253do
17254  # Extract the first word of "$ac_prog", so it can be a program name with args.
17255set dummy $ac_prog; ac_word=$2
17256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17257$as_echo_n "checking for $ac_word... " >&6; }
17258if ${ac_cv_path_ZIP+:} false; then :
17259  $as_echo_n "(cached) " >&6
17260else
17261  case $ZIP in
17262  [\\/]* | ?:[\\/]*)
17263  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17264  ;;
17265  *)
17266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17267for as_dir in $PATH
17268do
17269  IFS=$as_save_IFS
17270  test -z "$as_dir" && as_dir=.
17271    for ac_exec_ext in '' $ac_executable_extensions; do
17272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17273    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17275    break 2
17276  fi
17277done
17278  done
17279IFS=$as_save_IFS
17280
17281  ;;
17282esac
17283fi
17284ZIP=$ac_cv_path_ZIP
17285if test -n "$ZIP"; then
17286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17287$as_echo "$ZIP" >&6; }
17288else
17289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17290$as_echo "no" >&6; }
17291fi
17292
17293
17294  test -n "$ZIP" && break
17295done
17296
17297    else
17298      # If it succeeded, then it was overridden by the user. We will use it
17299      # for the tool.
17300
17301      # First remove it from the list of overridden variables, so we can test
17302      # for unknown variables in the end.
17303      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17304
17305      # Check if the provided tool contains a complete path.
17306      tool_specified="$ZIP"
17307      tool_basename="${tool_specified##*/}"
17308      if test "x$tool_basename" = "x$tool_specified"; then
17309        # A command without a complete path is provided, search $PATH.
17310        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17311$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17312        # Extract the first word of "$tool_basename", so it can be a program name with args.
17313set dummy $tool_basename; ac_word=$2
17314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17315$as_echo_n "checking for $ac_word... " >&6; }
17316if ${ac_cv_path_ZIP+:} false; then :
17317  $as_echo_n "(cached) " >&6
17318else
17319  case $ZIP in
17320  [\\/]* | ?:[\\/]*)
17321  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17322  ;;
17323  *)
17324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17325for as_dir in $PATH
17326do
17327  IFS=$as_save_IFS
17328  test -z "$as_dir" && as_dir=.
17329    for ac_exec_ext in '' $ac_executable_extensions; do
17330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17331    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17333    break 2
17334  fi
17335done
17336  done
17337IFS=$as_save_IFS
17338
17339  ;;
17340esac
17341fi
17342ZIP=$ac_cv_path_ZIP
17343if test -n "$ZIP"; then
17344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17345$as_echo "$ZIP" >&6; }
17346else
17347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17348$as_echo "no" >&6; }
17349fi
17350
17351
17352        if test "x$ZIP" = x; then
17353          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17354        fi
17355      else
17356        # Otherwise we believe it is a complete path. Use it as it is.
17357        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17358$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17359        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17360$as_echo_n "checking for ZIP... " >&6; }
17361        if test ! -x "$tool_specified"; then
17362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17363$as_echo "not found" >&6; }
17364          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17365        fi
17366        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17367$as_echo "$tool_specified" >&6; }
17368      fi
17369    fi
17370  fi
17371
17372
17373
17374  if test "x$ZIP" = x; then
17375    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17376  fi
17377
17378
17379
17380  # Non-required basic tools
17381
17382
17383
17384  # Publish this variable in the help.
17385
17386
17387  if test "x$LDD" = x; then
17388    # The variable is not set by user, try to locate tool using the code snippet
17389    for ac_prog in ldd
17390do
17391  # Extract the first word of "$ac_prog", so it can be a program name with args.
17392set dummy $ac_prog; ac_word=$2
17393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17394$as_echo_n "checking for $ac_word... " >&6; }
17395if ${ac_cv_path_LDD+:} false; then :
17396  $as_echo_n "(cached) " >&6
17397else
17398  case $LDD in
17399  [\\/]* | ?:[\\/]*)
17400  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17401  ;;
17402  *)
17403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17404for as_dir in $PATH
17405do
17406  IFS=$as_save_IFS
17407  test -z "$as_dir" && as_dir=.
17408    for ac_exec_ext in '' $ac_executable_extensions; do
17409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17410    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17412    break 2
17413  fi
17414done
17415  done
17416IFS=$as_save_IFS
17417
17418  ;;
17419esac
17420fi
17421LDD=$ac_cv_path_LDD
17422if test -n "$LDD"; then
17423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17424$as_echo "$LDD" >&6; }
17425else
17426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17427$as_echo "no" >&6; }
17428fi
17429
17430
17431  test -n "$LDD" && break
17432done
17433
17434  else
17435    # The variable is set, but is it from the command line or the environment?
17436
17437    # Try to remove the string !LDD! from our list.
17438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17440      # If it failed, the variable was not from the command line. Ignore it,
17441      # but warn the user (except for BASH, which is always set by the calling BASH).
17442      if test "xLDD" != xBASH; then
17443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17444$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17445      fi
17446      # Try to locate tool using the code snippet
17447      for ac_prog in ldd
17448do
17449  # Extract the first word of "$ac_prog", so it can be a program name with args.
17450set dummy $ac_prog; ac_word=$2
17451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17452$as_echo_n "checking for $ac_word... " >&6; }
17453if ${ac_cv_path_LDD+:} false; then :
17454  $as_echo_n "(cached) " >&6
17455else
17456  case $LDD in
17457  [\\/]* | ?:[\\/]*)
17458  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17459  ;;
17460  *)
17461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17462for as_dir in $PATH
17463do
17464  IFS=$as_save_IFS
17465  test -z "$as_dir" && as_dir=.
17466    for ac_exec_ext in '' $ac_executable_extensions; do
17467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17468    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17470    break 2
17471  fi
17472done
17473  done
17474IFS=$as_save_IFS
17475
17476  ;;
17477esac
17478fi
17479LDD=$ac_cv_path_LDD
17480if test -n "$LDD"; then
17481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17482$as_echo "$LDD" >&6; }
17483else
17484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17485$as_echo "no" >&6; }
17486fi
17487
17488
17489  test -n "$LDD" && break
17490done
17491
17492    else
17493      # If it succeeded, then it was overridden by the user. We will use it
17494      # for the tool.
17495
17496      # First remove it from the list of overridden variables, so we can test
17497      # for unknown variables in the end.
17498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17499
17500      # Check if the provided tool contains a complete path.
17501      tool_specified="$LDD"
17502      tool_basename="${tool_specified##*/}"
17503      if test "x$tool_basename" = "x$tool_specified"; then
17504        # A command without a complete path is provided, search $PATH.
17505        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17506$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17507        # Extract the first word of "$tool_basename", so it can be a program name with args.
17508set dummy $tool_basename; ac_word=$2
17509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17510$as_echo_n "checking for $ac_word... " >&6; }
17511if ${ac_cv_path_LDD+:} false; then :
17512  $as_echo_n "(cached) " >&6
17513else
17514  case $LDD in
17515  [\\/]* | ?:[\\/]*)
17516  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17517  ;;
17518  *)
17519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17520for as_dir in $PATH
17521do
17522  IFS=$as_save_IFS
17523  test -z "$as_dir" && as_dir=.
17524    for ac_exec_ext in '' $ac_executable_extensions; do
17525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17526    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17528    break 2
17529  fi
17530done
17531  done
17532IFS=$as_save_IFS
17533
17534  ;;
17535esac
17536fi
17537LDD=$ac_cv_path_LDD
17538if test -n "$LDD"; then
17539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17540$as_echo "$LDD" >&6; }
17541else
17542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17543$as_echo "no" >&6; }
17544fi
17545
17546
17547        if test "x$LDD" = x; then
17548          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17549        fi
17550      else
17551        # Otherwise we believe it is a complete path. Use it as it is.
17552        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17553$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17555$as_echo_n "checking for LDD... " >&6; }
17556        if test ! -x "$tool_specified"; then
17557          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17558$as_echo "not found" >&6; }
17559          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17560        fi
17561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17562$as_echo "$tool_specified" >&6; }
17563      fi
17564    fi
17565  fi
17566
17567
17568  if test "x$LDD" = "x"; then
17569    # List shared lib dependencies is used for
17570    # debug output and checking for forbidden dependencies.
17571    # We can build without it.
17572    LDD="true"
17573  fi
17574
17575
17576  # Publish this variable in the help.
17577
17578
17579  if test "x$OTOOL" = x; then
17580    # The variable is not set by user, try to locate tool using the code snippet
17581    for ac_prog in otool
17582do
17583  # Extract the first word of "$ac_prog", so it can be a program name with args.
17584set dummy $ac_prog; ac_word=$2
17585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17586$as_echo_n "checking for $ac_word... " >&6; }
17587if ${ac_cv_path_OTOOL+:} false; then :
17588  $as_echo_n "(cached) " >&6
17589else
17590  case $OTOOL in
17591  [\\/]* | ?:[\\/]*)
17592  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17593  ;;
17594  *)
17595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17596for as_dir in $PATH
17597do
17598  IFS=$as_save_IFS
17599  test -z "$as_dir" && as_dir=.
17600    for ac_exec_ext in '' $ac_executable_extensions; do
17601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17602    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17604    break 2
17605  fi
17606done
17607  done
17608IFS=$as_save_IFS
17609
17610  ;;
17611esac
17612fi
17613OTOOL=$ac_cv_path_OTOOL
17614if test -n "$OTOOL"; then
17615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17616$as_echo "$OTOOL" >&6; }
17617else
17618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17619$as_echo "no" >&6; }
17620fi
17621
17622
17623  test -n "$OTOOL" && break
17624done
17625
17626  else
17627    # The variable is set, but is it from the command line or the environment?
17628
17629    # Try to remove the string !OTOOL! from our list.
17630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17632      # If it failed, the variable was not from the command line. Ignore it,
17633      # but warn the user (except for BASH, which is always set by the calling BASH).
17634      if test "xOTOOL" != xBASH; then
17635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17636$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17637      fi
17638      # Try to locate tool using the code snippet
17639      for ac_prog in otool
17640do
17641  # Extract the first word of "$ac_prog", so it can be a program name with args.
17642set dummy $ac_prog; ac_word=$2
17643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17644$as_echo_n "checking for $ac_word... " >&6; }
17645if ${ac_cv_path_OTOOL+:} false; then :
17646  $as_echo_n "(cached) " >&6
17647else
17648  case $OTOOL in
17649  [\\/]* | ?:[\\/]*)
17650  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17651  ;;
17652  *)
17653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17654for as_dir in $PATH
17655do
17656  IFS=$as_save_IFS
17657  test -z "$as_dir" && as_dir=.
17658    for ac_exec_ext in '' $ac_executable_extensions; do
17659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17660    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17662    break 2
17663  fi
17664done
17665  done
17666IFS=$as_save_IFS
17667
17668  ;;
17669esac
17670fi
17671OTOOL=$ac_cv_path_OTOOL
17672if test -n "$OTOOL"; then
17673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17674$as_echo "$OTOOL" >&6; }
17675else
17676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17677$as_echo "no" >&6; }
17678fi
17679
17680
17681  test -n "$OTOOL" && break
17682done
17683
17684    else
17685      # If it succeeded, then it was overridden by the user. We will use it
17686      # for the tool.
17687
17688      # First remove it from the list of overridden variables, so we can test
17689      # for unknown variables in the end.
17690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17691
17692      # Check if the provided tool contains a complete path.
17693      tool_specified="$OTOOL"
17694      tool_basename="${tool_specified##*/}"
17695      if test "x$tool_basename" = "x$tool_specified"; then
17696        # A command without a complete path is provided, search $PATH.
17697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17698$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17699        # Extract the first word of "$tool_basename", so it can be a program name with args.
17700set dummy $tool_basename; ac_word=$2
17701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17702$as_echo_n "checking for $ac_word... " >&6; }
17703if ${ac_cv_path_OTOOL+:} false; then :
17704  $as_echo_n "(cached) " >&6
17705else
17706  case $OTOOL in
17707  [\\/]* | ?:[\\/]*)
17708  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17709  ;;
17710  *)
17711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17712for as_dir in $PATH
17713do
17714  IFS=$as_save_IFS
17715  test -z "$as_dir" && as_dir=.
17716    for ac_exec_ext in '' $ac_executable_extensions; do
17717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17718    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17720    break 2
17721  fi
17722done
17723  done
17724IFS=$as_save_IFS
17725
17726  ;;
17727esac
17728fi
17729OTOOL=$ac_cv_path_OTOOL
17730if test -n "$OTOOL"; then
17731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17732$as_echo "$OTOOL" >&6; }
17733else
17734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17735$as_echo "no" >&6; }
17736fi
17737
17738
17739        if test "x$OTOOL" = x; then
17740          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17741        fi
17742      else
17743        # Otherwise we believe it is a complete path. Use it as it is.
17744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17745$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17747$as_echo_n "checking for OTOOL... " >&6; }
17748        if test ! -x "$tool_specified"; then
17749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17750$as_echo "not found" >&6; }
17751          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17752        fi
17753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17754$as_echo "$tool_specified" >&6; }
17755      fi
17756    fi
17757  fi
17758
17759
17760  if test "x$OTOOL" = "x"; then
17761    OTOOL="true"
17762  fi
17763
17764
17765  # Publish this variable in the help.
17766
17767
17768  if test "x$READELF" = x; then
17769    # The variable is not set by user, try to locate tool using the code snippet
17770    for ac_prog in greadelf readelf
17771do
17772  # Extract the first word of "$ac_prog", so it can be a program name with args.
17773set dummy $ac_prog; ac_word=$2
17774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17775$as_echo_n "checking for $ac_word... " >&6; }
17776if ${ac_cv_path_READELF+:} false; then :
17777  $as_echo_n "(cached) " >&6
17778else
17779  case $READELF in
17780  [\\/]* | ?:[\\/]*)
17781  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17782  ;;
17783  *)
17784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17785for as_dir in $PATH
17786do
17787  IFS=$as_save_IFS
17788  test -z "$as_dir" && as_dir=.
17789    for ac_exec_ext in '' $ac_executable_extensions; do
17790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17791    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17793    break 2
17794  fi
17795done
17796  done
17797IFS=$as_save_IFS
17798
17799  ;;
17800esac
17801fi
17802READELF=$ac_cv_path_READELF
17803if test -n "$READELF"; then
17804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17805$as_echo "$READELF" >&6; }
17806else
17807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17808$as_echo "no" >&6; }
17809fi
17810
17811
17812  test -n "$READELF" && break
17813done
17814
17815  else
17816    # The variable is set, but is it from the command line or the environment?
17817
17818    # Try to remove the string !READELF! from our list.
17819    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17820    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17821      # If it failed, the variable was not from the command line. Ignore it,
17822      # but warn the user (except for BASH, which is always set by the calling BASH).
17823      if test "xREADELF" != xBASH; then
17824        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17825$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17826      fi
17827      # Try to locate tool using the code snippet
17828      for ac_prog in greadelf readelf
17829do
17830  # Extract the first word of "$ac_prog", so it can be a program name with args.
17831set dummy $ac_prog; ac_word=$2
17832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17833$as_echo_n "checking for $ac_word... " >&6; }
17834if ${ac_cv_path_READELF+:} false; then :
17835  $as_echo_n "(cached) " >&6
17836else
17837  case $READELF in
17838  [\\/]* | ?:[\\/]*)
17839  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17840  ;;
17841  *)
17842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17843for as_dir in $PATH
17844do
17845  IFS=$as_save_IFS
17846  test -z "$as_dir" && as_dir=.
17847    for ac_exec_ext in '' $ac_executable_extensions; do
17848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17849    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17851    break 2
17852  fi
17853done
17854  done
17855IFS=$as_save_IFS
17856
17857  ;;
17858esac
17859fi
17860READELF=$ac_cv_path_READELF
17861if test -n "$READELF"; then
17862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17863$as_echo "$READELF" >&6; }
17864else
17865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17866$as_echo "no" >&6; }
17867fi
17868
17869
17870  test -n "$READELF" && break
17871done
17872
17873    else
17874      # If it succeeded, then it was overridden by the user. We will use it
17875      # for the tool.
17876
17877      # First remove it from the list of overridden variables, so we can test
17878      # for unknown variables in the end.
17879      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17880
17881      # Check if the provided tool contains a complete path.
17882      tool_specified="$READELF"
17883      tool_basename="${tool_specified##*/}"
17884      if test "x$tool_basename" = "x$tool_specified"; then
17885        # A command without a complete path is provided, search $PATH.
17886        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17887$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17888        # Extract the first word of "$tool_basename", so it can be a program name with args.
17889set dummy $tool_basename; ac_word=$2
17890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17891$as_echo_n "checking for $ac_word... " >&6; }
17892if ${ac_cv_path_READELF+:} false; then :
17893  $as_echo_n "(cached) " >&6
17894else
17895  case $READELF in
17896  [\\/]* | ?:[\\/]*)
17897  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17898  ;;
17899  *)
17900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17901for as_dir in $PATH
17902do
17903  IFS=$as_save_IFS
17904  test -z "$as_dir" && as_dir=.
17905    for ac_exec_ext in '' $ac_executable_extensions; do
17906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17907    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17909    break 2
17910  fi
17911done
17912  done
17913IFS=$as_save_IFS
17914
17915  ;;
17916esac
17917fi
17918READELF=$ac_cv_path_READELF
17919if test -n "$READELF"; then
17920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17921$as_echo "$READELF" >&6; }
17922else
17923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17924$as_echo "no" >&6; }
17925fi
17926
17927
17928        if test "x$READELF" = x; then
17929          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17930        fi
17931      else
17932        # Otherwise we believe it is a complete path. Use it as it is.
17933        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17934$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17935        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17936$as_echo_n "checking for READELF... " >&6; }
17937        if test ! -x "$tool_specified"; then
17938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17939$as_echo "not found" >&6; }
17940          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17941        fi
17942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17943$as_echo "$tool_specified" >&6; }
17944      fi
17945    fi
17946  fi
17947
17948
17949
17950
17951  # Publish this variable in the help.
17952
17953
17954  if test "x$HG" = x; then
17955    # The variable is not set by user, try to locate tool using the code snippet
17956    for ac_prog in hg
17957do
17958  # Extract the first word of "$ac_prog", so it can be a program name with args.
17959set dummy $ac_prog; ac_word=$2
17960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17961$as_echo_n "checking for $ac_word... " >&6; }
17962if ${ac_cv_path_HG+:} false; then :
17963  $as_echo_n "(cached) " >&6
17964else
17965  case $HG in
17966  [\\/]* | ?:[\\/]*)
17967  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17968  ;;
17969  *)
17970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17971for as_dir in $PATH
17972do
17973  IFS=$as_save_IFS
17974  test -z "$as_dir" && as_dir=.
17975    for ac_exec_ext in '' $ac_executable_extensions; do
17976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17977    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17979    break 2
17980  fi
17981done
17982  done
17983IFS=$as_save_IFS
17984
17985  ;;
17986esac
17987fi
17988HG=$ac_cv_path_HG
17989if test -n "$HG"; then
17990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17991$as_echo "$HG" >&6; }
17992else
17993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17994$as_echo "no" >&6; }
17995fi
17996
17997
17998  test -n "$HG" && break
17999done
18000
18001  else
18002    # The variable is set, but is it from the command line or the environment?
18003
18004    # Try to remove the string !HG! from our list.
18005    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18006    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18007      # If it failed, the variable was not from the command line. Ignore it,
18008      # but warn the user (except for BASH, which is always set by the calling BASH).
18009      if test "xHG" != xBASH; then
18010        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18011$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18012      fi
18013      # Try to locate tool using the code snippet
18014      for ac_prog in hg
18015do
18016  # Extract the first word of "$ac_prog", so it can be a program name with args.
18017set dummy $ac_prog; ac_word=$2
18018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18019$as_echo_n "checking for $ac_word... " >&6; }
18020if ${ac_cv_path_HG+:} false; then :
18021  $as_echo_n "(cached) " >&6
18022else
18023  case $HG in
18024  [\\/]* | ?:[\\/]*)
18025  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18026  ;;
18027  *)
18028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18029for as_dir in $PATH
18030do
18031  IFS=$as_save_IFS
18032  test -z "$as_dir" && as_dir=.
18033    for ac_exec_ext in '' $ac_executable_extensions; do
18034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18035    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18037    break 2
18038  fi
18039done
18040  done
18041IFS=$as_save_IFS
18042
18043  ;;
18044esac
18045fi
18046HG=$ac_cv_path_HG
18047if test -n "$HG"; then
18048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18049$as_echo "$HG" >&6; }
18050else
18051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18052$as_echo "no" >&6; }
18053fi
18054
18055
18056  test -n "$HG" && break
18057done
18058
18059    else
18060      # If it succeeded, then it was overridden by the user. We will use it
18061      # for the tool.
18062
18063      # First remove it from the list of overridden variables, so we can test
18064      # for unknown variables in the end.
18065      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18066
18067      # Check if the provided tool contains a complete path.
18068      tool_specified="$HG"
18069      tool_basename="${tool_specified##*/}"
18070      if test "x$tool_basename" = "x$tool_specified"; then
18071        # A command without a complete path is provided, search $PATH.
18072        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18073$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18074        # Extract the first word of "$tool_basename", so it can be a program name with args.
18075set dummy $tool_basename; ac_word=$2
18076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18077$as_echo_n "checking for $ac_word... " >&6; }
18078if ${ac_cv_path_HG+:} false; then :
18079  $as_echo_n "(cached) " >&6
18080else
18081  case $HG in
18082  [\\/]* | ?:[\\/]*)
18083  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18084  ;;
18085  *)
18086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18087for as_dir in $PATH
18088do
18089  IFS=$as_save_IFS
18090  test -z "$as_dir" && as_dir=.
18091    for ac_exec_ext in '' $ac_executable_extensions; do
18092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18093    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18095    break 2
18096  fi
18097done
18098  done
18099IFS=$as_save_IFS
18100
18101  ;;
18102esac
18103fi
18104HG=$ac_cv_path_HG
18105if test -n "$HG"; then
18106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18107$as_echo "$HG" >&6; }
18108else
18109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18110$as_echo "no" >&6; }
18111fi
18112
18113
18114        if test "x$HG" = x; then
18115          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18116        fi
18117      else
18118        # Otherwise we believe it is a complete path. Use it as it is.
18119        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18120$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18121        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18122$as_echo_n "checking for HG... " >&6; }
18123        if test ! -x "$tool_specified"; then
18124          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18125$as_echo "not found" >&6; }
18126          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18127        fi
18128        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18129$as_echo "$tool_specified" >&6; }
18130      fi
18131    fi
18132  fi
18133
18134
18135
18136
18137  # Publish this variable in the help.
18138
18139
18140  if test "x$STAT" = x; then
18141    # The variable is not set by user, try to locate tool using the code snippet
18142    for ac_prog in stat
18143do
18144  # Extract the first word of "$ac_prog", so it can be a program name with args.
18145set dummy $ac_prog; ac_word=$2
18146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18147$as_echo_n "checking for $ac_word... " >&6; }
18148if ${ac_cv_path_STAT+:} false; then :
18149  $as_echo_n "(cached) " >&6
18150else
18151  case $STAT in
18152  [\\/]* | ?:[\\/]*)
18153  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18154  ;;
18155  *)
18156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18157for as_dir in $PATH
18158do
18159  IFS=$as_save_IFS
18160  test -z "$as_dir" && as_dir=.
18161    for ac_exec_ext in '' $ac_executable_extensions; do
18162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18163    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18165    break 2
18166  fi
18167done
18168  done
18169IFS=$as_save_IFS
18170
18171  ;;
18172esac
18173fi
18174STAT=$ac_cv_path_STAT
18175if test -n "$STAT"; then
18176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18177$as_echo "$STAT" >&6; }
18178else
18179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18180$as_echo "no" >&6; }
18181fi
18182
18183
18184  test -n "$STAT" && break
18185done
18186
18187  else
18188    # The variable is set, but is it from the command line or the environment?
18189
18190    # Try to remove the string !STAT! from our list.
18191    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18192    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18193      # If it failed, the variable was not from the command line. Ignore it,
18194      # but warn the user (except for BASH, which is always set by the calling BASH).
18195      if test "xSTAT" != xBASH; then
18196        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18197$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18198      fi
18199      # Try to locate tool using the code snippet
18200      for ac_prog in stat
18201do
18202  # Extract the first word of "$ac_prog", so it can be a program name with args.
18203set dummy $ac_prog; ac_word=$2
18204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18205$as_echo_n "checking for $ac_word... " >&6; }
18206if ${ac_cv_path_STAT+:} false; then :
18207  $as_echo_n "(cached) " >&6
18208else
18209  case $STAT in
18210  [\\/]* | ?:[\\/]*)
18211  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18212  ;;
18213  *)
18214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18215for as_dir in $PATH
18216do
18217  IFS=$as_save_IFS
18218  test -z "$as_dir" && as_dir=.
18219    for ac_exec_ext in '' $ac_executable_extensions; do
18220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18221    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18223    break 2
18224  fi
18225done
18226  done
18227IFS=$as_save_IFS
18228
18229  ;;
18230esac
18231fi
18232STAT=$ac_cv_path_STAT
18233if test -n "$STAT"; then
18234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18235$as_echo "$STAT" >&6; }
18236else
18237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18238$as_echo "no" >&6; }
18239fi
18240
18241
18242  test -n "$STAT" && break
18243done
18244
18245    else
18246      # If it succeeded, then it was overridden by the user. We will use it
18247      # for the tool.
18248
18249      # First remove it from the list of overridden variables, so we can test
18250      # for unknown variables in the end.
18251      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18252
18253      # Check if the provided tool contains a complete path.
18254      tool_specified="$STAT"
18255      tool_basename="${tool_specified##*/}"
18256      if test "x$tool_basename" = "x$tool_specified"; then
18257        # A command without a complete path is provided, search $PATH.
18258        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18259$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18260        # Extract the first word of "$tool_basename", so it can be a program name with args.
18261set dummy $tool_basename; ac_word=$2
18262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18263$as_echo_n "checking for $ac_word... " >&6; }
18264if ${ac_cv_path_STAT+:} false; then :
18265  $as_echo_n "(cached) " >&6
18266else
18267  case $STAT in
18268  [\\/]* | ?:[\\/]*)
18269  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18270  ;;
18271  *)
18272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18273for as_dir in $PATH
18274do
18275  IFS=$as_save_IFS
18276  test -z "$as_dir" && as_dir=.
18277    for ac_exec_ext in '' $ac_executable_extensions; do
18278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18279    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18281    break 2
18282  fi
18283done
18284  done
18285IFS=$as_save_IFS
18286
18287  ;;
18288esac
18289fi
18290STAT=$ac_cv_path_STAT
18291if test -n "$STAT"; then
18292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18293$as_echo "$STAT" >&6; }
18294else
18295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18296$as_echo "no" >&6; }
18297fi
18298
18299
18300        if test "x$STAT" = x; then
18301          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18302        fi
18303      else
18304        # Otherwise we believe it is a complete path. Use it as it is.
18305        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18306$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18308$as_echo_n "checking for STAT... " >&6; }
18309        if test ! -x "$tool_specified"; then
18310          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18311$as_echo "not found" >&6; }
18312          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18313        fi
18314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18315$as_echo "$tool_specified" >&6; }
18316      fi
18317    fi
18318  fi
18319
18320
18321
18322
18323  # Publish this variable in the help.
18324
18325
18326  if test "x$TIME" = x; then
18327    # The variable is not set by user, try to locate tool using the code snippet
18328    for ac_prog in time
18329do
18330  # Extract the first word of "$ac_prog", so it can be a program name with args.
18331set dummy $ac_prog; ac_word=$2
18332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18333$as_echo_n "checking for $ac_word... " >&6; }
18334if ${ac_cv_path_TIME+:} false; then :
18335  $as_echo_n "(cached) " >&6
18336else
18337  case $TIME in
18338  [\\/]* | ?:[\\/]*)
18339  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18340  ;;
18341  *)
18342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18343for as_dir in $PATH
18344do
18345  IFS=$as_save_IFS
18346  test -z "$as_dir" && as_dir=.
18347    for ac_exec_ext in '' $ac_executable_extensions; do
18348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18349    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18351    break 2
18352  fi
18353done
18354  done
18355IFS=$as_save_IFS
18356
18357  ;;
18358esac
18359fi
18360TIME=$ac_cv_path_TIME
18361if test -n "$TIME"; then
18362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18363$as_echo "$TIME" >&6; }
18364else
18365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18366$as_echo "no" >&6; }
18367fi
18368
18369
18370  test -n "$TIME" && break
18371done
18372
18373  else
18374    # The variable is set, but is it from the command line or the environment?
18375
18376    # Try to remove the string !TIME! from our list.
18377    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18378    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18379      # If it failed, the variable was not from the command line. Ignore it,
18380      # but warn the user (except for BASH, which is always set by the calling BASH).
18381      if test "xTIME" != xBASH; then
18382        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18383$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18384      fi
18385      # Try to locate tool using the code snippet
18386      for ac_prog in time
18387do
18388  # Extract the first word of "$ac_prog", so it can be a program name with args.
18389set dummy $ac_prog; ac_word=$2
18390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18391$as_echo_n "checking for $ac_word... " >&6; }
18392if ${ac_cv_path_TIME+:} false; then :
18393  $as_echo_n "(cached) " >&6
18394else
18395  case $TIME in
18396  [\\/]* | ?:[\\/]*)
18397  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18398  ;;
18399  *)
18400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18401for as_dir in $PATH
18402do
18403  IFS=$as_save_IFS
18404  test -z "$as_dir" && as_dir=.
18405    for ac_exec_ext in '' $ac_executable_extensions; do
18406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18407    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18409    break 2
18410  fi
18411done
18412  done
18413IFS=$as_save_IFS
18414
18415  ;;
18416esac
18417fi
18418TIME=$ac_cv_path_TIME
18419if test -n "$TIME"; then
18420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18421$as_echo "$TIME" >&6; }
18422else
18423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18424$as_echo "no" >&6; }
18425fi
18426
18427
18428  test -n "$TIME" && break
18429done
18430
18431    else
18432      # If it succeeded, then it was overridden by the user. We will use it
18433      # for the tool.
18434
18435      # First remove it from the list of overridden variables, so we can test
18436      # for unknown variables in the end.
18437      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18438
18439      # Check if the provided tool contains a complete path.
18440      tool_specified="$TIME"
18441      tool_basename="${tool_specified##*/}"
18442      if test "x$tool_basename" = "x$tool_specified"; then
18443        # A command without a complete path is provided, search $PATH.
18444        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18445$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18446        # Extract the first word of "$tool_basename", so it can be a program name with args.
18447set dummy $tool_basename; ac_word=$2
18448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18449$as_echo_n "checking for $ac_word... " >&6; }
18450if ${ac_cv_path_TIME+:} false; then :
18451  $as_echo_n "(cached) " >&6
18452else
18453  case $TIME in
18454  [\\/]* | ?:[\\/]*)
18455  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18456  ;;
18457  *)
18458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18459for as_dir in $PATH
18460do
18461  IFS=$as_save_IFS
18462  test -z "$as_dir" && as_dir=.
18463    for ac_exec_ext in '' $ac_executable_extensions; do
18464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18465    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18467    break 2
18468  fi
18469done
18470  done
18471IFS=$as_save_IFS
18472
18473  ;;
18474esac
18475fi
18476TIME=$ac_cv_path_TIME
18477if test -n "$TIME"; then
18478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18479$as_echo "$TIME" >&6; }
18480else
18481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18482$as_echo "no" >&6; }
18483fi
18484
18485
18486        if test "x$TIME" = x; then
18487          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18488        fi
18489      else
18490        # Otherwise we believe it is a complete path. Use it as it is.
18491        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18492$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18493        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18494$as_echo_n "checking for TIME... " >&6; }
18495        if test ! -x "$tool_specified"; then
18496          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18497$as_echo "not found" >&6; }
18498          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18499        fi
18500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18501$as_echo "$tool_specified" >&6; }
18502      fi
18503    fi
18504  fi
18505
18506
18507  # Check if it's GNU time
18508  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18509  if test "x$IS_GNU_TIME" != x; then
18510    IS_GNU_TIME=yes
18511  else
18512    IS_GNU_TIME=no
18513  fi
18514
18515
18516  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18517
18518
18519
18520  # Publish this variable in the help.
18521
18522
18523  if test "x$COMM" = x; then
18524    # The variable is not set by user, try to locate tool using the code snippet
18525    for ac_prog in comm
18526do
18527  # Extract the first word of "$ac_prog", so it can be a program name with args.
18528set dummy $ac_prog; ac_word=$2
18529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18530$as_echo_n "checking for $ac_word... " >&6; }
18531if ${ac_cv_path_COMM+:} false; then :
18532  $as_echo_n "(cached) " >&6
18533else
18534  case $COMM in
18535  [\\/]* | ?:[\\/]*)
18536  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18537  ;;
18538  *)
18539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18540for as_dir in $PATH
18541do
18542  IFS=$as_save_IFS
18543  test -z "$as_dir" && as_dir=.
18544    for ac_exec_ext in '' $ac_executable_extensions; do
18545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18546    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18548    break 2
18549  fi
18550done
18551  done
18552IFS=$as_save_IFS
18553
18554  ;;
18555esac
18556fi
18557COMM=$ac_cv_path_COMM
18558if test -n "$COMM"; then
18559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18560$as_echo "$COMM" >&6; }
18561else
18562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18563$as_echo "no" >&6; }
18564fi
18565
18566
18567  test -n "$COMM" && break
18568done
18569
18570  else
18571    # The variable is set, but is it from the command line or the environment?
18572
18573    # Try to remove the string !COMM! from our list.
18574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18576      # If it failed, the variable was not from the command line. Ignore it,
18577      # but warn the user (except for BASH, which is always set by the calling BASH).
18578      if test "xCOMM" != xBASH; then
18579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18580$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18581      fi
18582      # Try to locate tool using the code snippet
18583      for ac_prog in comm
18584do
18585  # Extract the first word of "$ac_prog", so it can be a program name with args.
18586set dummy $ac_prog; ac_word=$2
18587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18588$as_echo_n "checking for $ac_word... " >&6; }
18589if ${ac_cv_path_COMM+:} false; then :
18590  $as_echo_n "(cached) " >&6
18591else
18592  case $COMM in
18593  [\\/]* | ?:[\\/]*)
18594  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18595  ;;
18596  *)
18597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18598for as_dir in $PATH
18599do
18600  IFS=$as_save_IFS
18601  test -z "$as_dir" && as_dir=.
18602    for ac_exec_ext in '' $ac_executable_extensions; do
18603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18604    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18606    break 2
18607  fi
18608done
18609  done
18610IFS=$as_save_IFS
18611
18612  ;;
18613esac
18614fi
18615COMM=$ac_cv_path_COMM
18616if test -n "$COMM"; then
18617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18618$as_echo "$COMM" >&6; }
18619else
18620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18621$as_echo "no" >&6; }
18622fi
18623
18624
18625  test -n "$COMM" && break
18626done
18627
18628    else
18629      # If it succeeded, then it was overridden by the user. We will use it
18630      # for the tool.
18631
18632      # First remove it from the list of overridden variables, so we can test
18633      # for unknown variables in the end.
18634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18635
18636      # Check if the provided tool contains a complete path.
18637      tool_specified="$COMM"
18638      tool_basename="${tool_specified##*/}"
18639      if test "x$tool_basename" = "x$tool_specified"; then
18640        # A command without a complete path is provided, search $PATH.
18641        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18642$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18643        # Extract the first word of "$tool_basename", so it can be a program name with args.
18644set dummy $tool_basename; ac_word=$2
18645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18646$as_echo_n "checking for $ac_word... " >&6; }
18647if ${ac_cv_path_COMM+:} false; then :
18648  $as_echo_n "(cached) " >&6
18649else
18650  case $COMM in
18651  [\\/]* | ?:[\\/]*)
18652  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18653  ;;
18654  *)
18655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18656for as_dir in $PATH
18657do
18658  IFS=$as_save_IFS
18659  test -z "$as_dir" && as_dir=.
18660    for ac_exec_ext in '' $ac_executable_extensions; do
18661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18662    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18664    break 2
18665  fi
18666done
18667  done
18668IFS=$as_save_IFS
18669
18670  ;;
18671esac
18672fi
18673COMM=$ac_cv_path_COMM
18674if test -n "$COMM"; then
18675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18676$as_echo "$COMM" >&6; }
18677else
18678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18679$as_echo "no" >&6; }
18680fi
18681
18682
18683        if test "x$COMM" = x; then
18684          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18685        fi
18686      else
18687        # Otherwise we believe it is a complete path. Use it as it is.
18688        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18689$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18691$as_echo_n "checking for COMM... " >&6; }
18692        if test ! -x "$tool_specified"; then
18693          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18694$as_echo "not found" >&6; }
18695          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18696        fi
18697        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18698$as_echo "$tool_specified" >&6; }
18699      fi
18700    fi
18701  fi
18702
18703
18704
18705  if test "x$COMM" = x; then
18706    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18707  fi
18708
18709
18710  fi
18711
18712  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18713
18714
18715
18716  # Publish this variable in the help.
18717
18718
18719  if test "x$DSYMUTIL" = x; then
18720    # The variable is not set by user, try to locate tool using the code snippet
18721    for ac_prog in dsymutil
18722do
18723  # Extract the first word of "$ac_prog", so it can be a program name with args.
18724set dummy $ac_prog; ac_word=$2
18725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18726$as_echo_n "checking for $ac_word... " >&6; }
18727if ${ac_cv_path_DSYMUTIL+:} false; then :
18728  $as_echo_n "(cached) " >&6
18729else
18730  case $DSYMUTIL in
18731  [\\/]* | ?:[\\/]*)
18732  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18733  ;;
18734  *)
18735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18736for as_dir in $PATH
18737do
18738  IFS=$as_save_IFS
18739  test -z "$as_dir" && as_dir=.
18740    for ac_exec_ext in '' $ac_executable_extensions; do
18741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18742    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18744    break 2
18745  fi
18746done
18747  done
18748IFS=$as_save_IFS
18749
18750  ;;
18751esac
18752fi
18753DSYMUTIL=$ac_cv_path_DSYMUTIL
18754if test -n "$DSYMUTIL"; then
18755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18756$as_echo "$DSYMUTIL" >&6; }
18757else
18758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18759$as_echo "no" >&6; }
18760fi
18761
18762
18763  test -n "$DSYMUTIL" && break
18764done
18765
18766  else
18767    # The variable is set, but is it from the command line or the environment?
18768
18769    # Try to remove the string !DSYMUTIL! from our list.
18770    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18771    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18772      # If it failed, the variable was not from the command line. Ignore it,
18773      # but warn the user (except for BASH, which is always set by the calling BASH).
18774      if test "xDSYMUTIL" != xBASH; then
18775        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18776$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18777      fi
18778      # Try to locate tool using the code snippet
18779      for ac_prog in dsymutil
18780do
18781  # Extract the first word of "$ac_prog", so it can be a program name with args.
18782set dummy $ac_prog; ac_word=$2
18783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18784$as_echo_n "checking for $ac_word... " >&6; }
18785if ${ac_cv_path_DSYMUTIL+:} false; then :
18786  $as_echo_n "(cached) " >&6
18787else
18788  case $DSYMUTIL in
18789  [\\/]* | ?:[\\/]*)
18790  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18791  ;;
18792  *)
18793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18794for as_dir in $PATH
18795do
18796  IFS=$as_save_IFS
18797  test -z "$as_dir" && as_dir=.
18798    for ac_exec_ext in '' $ac_executable_extensions; do
18799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18800    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18802    break 2
18803  fi
18804done
18805  done
18806IFS=$as_save_IFS
18807
18808  ;;
18809esac
18810fi
18811DSYMUTIL=$ac_cv_path_DSYMUTIL
18812if test -n "$DSYMUTIL"; then
18813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18814$as_echo "$DSYMUTIL" >&6; }
18815else
18816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18817$as_echo "no" >&6; }
18818fi
18819
18820
18821  test -n "$DSYMUTIL" && break
18822done
18823
18824    else
18825      # If it succeeded, then it was overridden by the user. We will use it
18826      # for the tool.
18827
18828      # First remove it from the list of overridden variables, so we can test
18829      # for unknown variables in the end.
18830      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18831
18832      # Check if the provided tool contains a complete path.
18833      tool_specified="$DSYMUTIL"
18834      tool_basename="${tool_specified##*/}"
18835      if test "x$tool_basename" = "x$tool_specified"; then
18836        # A command without a complete path is provided, search $PATH.
18837        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18838$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18839        # Extract the first word of "$tool_basename", so it can be a program name with args.
18840set dummy $tool_basename; ac_word=$2
18841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18842$as_echo_n "checking for $ac_word... " >&6; }
18843if ${ac_cv_path_DSYMUTIL+:} false; then :
18844  $as_echo_n "(cached) " >&6
18845else
18846  case $DSYMUTIL in
18847  [\\/]* | ?:[\\/]*)
18848  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18849  ;;
18850  *)
18851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18852for as_dir in $PATH
18853do
18854  IFS=$as_save_IFS
18855  test -z "$as_dir" && as_dir=.
18856    for ac_exec_ext in '' $ac_executable_extensions; do
18857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18858    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18860    break 2
18861  fi
18862done
18863  done
18864IFS=$as_save_IFS
18865
18866  ;;
18867esac
18868fi
18869DSYMUTIL=$ac_cv_path_DSYMUTIL
18870if test -n "$DSYMUTIL"; then
18871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18872$as_echo "$DSYMUTIL" >&6; }
18873else
18874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18875$as_echo "no" >&6; }
18876fi
18877
18878
18879        if test "x$DSYMUTIL" = x; then
18880          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18881        fi
18882      else
18883        # Otherwise we believe it is a complete path. Use it as it is.
18884        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18885$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18886        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18887$as_echo_n "checking for DSYMUTIL... " >&6; }
18888        if test ! -x "$tool_specified"; then
18889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18890$as_echo "not found" >&6; }
18891          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18892        fi
18893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18894$as_echo "$tool_specified" >&6; }
18895      fi
18896    fi
18897  fi
18898
18899
18900
18901  if test "x$DSYMUTIL" = x; then
18902    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18903  fi
18904
18905
18906
18907
18908
18909  # Publish this variable in the help.
18910
18911
18912  if test "x$XATTR" = x; then
18913    # The variable is not set by user, try to locate tool using the code snippet
18914    for ac_prog in xattr
18915do
18916  # Extract the first word of "$ac_prog", so it can be a program name with args.
18917set dummy $ac_prog; ac_word=$2
18918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18919$as_echo_n "checking for $ac_word... " >&6; }
18920if ${ac_cv_path_XATTR+:} false; then :
18921  $as_echo_n "(cached) " >&6
18922else
18923  case $XATTR in
18924  [\\/]* | ?:[\\/]*)
18925  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18926  ;;
18927  *)
18928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18929for as_dir in $PATH
18930do
18931  IFS=$as_save_IFS
18932  test -z "$as_dir" && as_dir=.
18933    for ac_exec_ext in '' $ac_executable_extensions; do
18934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18935    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18937    break 2
18938  fi
18939done
18940  done
18941IFS=$as_save_IFS
18942
18943  ;;
18944esac
18945fi
18946XATTR=$ac_cv_path_XATTR
18947if test -n "$XATTR"; then
18948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18949$as_echo "$XATTR" >&6; }
18950else
18951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18952$as_echo "no" >&6; }
18953fi
18954
18955
18956  test -n "$XATTR" && break
18957done
18958
18959  else
18960    # The variable is set, but is it from the command line or the environment?
18961
18962    # Try to remove the string !XATTR! from our list.
18963    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18964    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18965      # If it failed, the variable was not from the command line. Ignore it,
18966      # but warn the user (except for BASH, which is always set by the calling BASH).
18967      if test "xXATTR" != xBASH; then
18968        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18969$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18970      fi
18971      # Try to locate tool using the code snippet
18972      for ac_prog in xattr
18973do
18974  # Extract the first word of "$ac_prog", so it can be a program name with args.
18975set dummy $ac_prog; ac_word=$2
18976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18977$as_echo_n "checking for $ac_word... " >&6; }
18978if ${ac_cv_path_XATTR+:} false; then :
18979  $as_echo_n "(cached) " >&6
18980else
18981  case $XATTR in
18982  [\\/]* | ?:[\\/]*)
18983  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18984  ;;
18985  *)
18986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18987for as_dir in $PATH
18988do
18989  IFS=$as_save_IFS
18990  test -z "$as_dir" && as_dir=.
18991    for ac_exec_ext in '' $ac_executable_extensions; do
18992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18993    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18995    break 2
18996  fi
18997done
18998  done
18999IFS=$as_save_IFS
19000
19001  ;;
19002esac
19003fi
19004XATTR=$ac_cv_path_XATTR
19005if test -n "$XATTR"; then
19006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19007$as_echo "$XATTR" >&6; }
19008else
19009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19010$as_echo "no" >&6; }
19011fi
19012
19013
19014  test -n "$XATTR" && break
19015done
19016
19017    else
19018      # If it succeeded, then it was overridden by the user. We will use it
19019      # for the tool.
19020
19021      # First remove it from the list of overridden variables, so we can test
19022      # for unknown variables in the end.
19023      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19024
19025      # Check if the provided tool contains a complete path.
19026      tool_specified="$XATTR"
19027      tool_basename="${tool_specified##*/}"
19028      if test "x$tool_basename" = "x$tool_specified"; then
19029        # A command without a complete path is provided, search $PATH.
19030        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19031$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19032        # Extract the first word of "$tool_basename", so it can be a program name with args.
19033set dummy $tool_basename; ac_word=$2
19034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19035$as_echo_n "checking for $ac_word... " >&6; }
19036if ${ac_cv_path_XATTR+:} false; then :
19037  $as_echo_n "(cached) " >&6
19038else
19039  case $XATTR in
19040  [\\/]* | ?:[\\/]*)
19041  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19042  ;;
19043  *)
19044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19045for as_dir in $PATH
19046do
19047  IFS=$as_save_IFS
19048  test -z "$as_dir" && as_dir=.
19049    for ac_exec_ext in '' $ac_executable_extensions; do
19050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19051    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19053    break 2
19054  fi
19055done
19056  done
19057IFS=$as_save_IFS
19058
19059  ;;
19060esac
19061fi
19062XATTR=$ac_cv_path_XATTR
19063if test -n "$XATTR"; then
19064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19065$as_echo "$XATTR" >&6; }
19066else
19067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19068$as_echo "no" >&6; }
19069fi
19070
19071
19072        if test "x$XATTR" = x; then
19073          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19074        fi
19075      else
19076        # Otherwise we believe it is a complete path. Use it as it is.
19077        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19078$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19079        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19080$as_echo_n "checking for XATTR... " >&6; }
19081        if test ! -x "$tool_specified"; then
19082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19083$as_echo "not found" >&6; }
19084          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19085        fi
19086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19087$as_echo "$tool_specified" >&6; }
19088      fi
19089    fi
19090  fi
19091
19092
19093
19094  if test "x$XATTR" = x; then
19095    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19096  fi
19097
19098
19099
19100
19101  # Publish this variable in the help.
19102
19103
19104  if test "x$CODESIGN" = x; then
19105    # The variable is not set by user, try to locate tool using the code snippet
19106    for ac_prog in codesign
19107do
19108  # Extract the first word of "$ac_prog", so it can be a program name with args.
19109set dummy $ac_prog; ac_word=$2
19110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19111$as_echo_n "checking for $ac_word... " >&6; }
19112if ${ac_cv_path_CODESIGN+:} false; then :
19113  $as_echo_n "(cached) " >&6
19114else
19115  case $CODESIGN in
19116  [\\/]* | ?:[\\/]*)
19117  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19118  ;;
19119  *)
19120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19121for as_dir in $PATH
19122do
19123  IFS=$as_save_IFS
19124  test -z "$as_dir" && as_dir=.
19125    for ac_exec_ext in '' $ac_executable_extensions; do
19126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19127    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19129    break 2
19130  fi
19131done
19132  done
19133IFS=$as_save_IFS
19134
19135  ;;
19136esac
19137fi
19138CODESIGN=$ac_cv_path_CODESIGN
19139if test -n "$CODESIGN"; then
19140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19141$as_echo "$CODESIGN" >&6; }
19142else
19143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19144$as_echo "no" >&6; }
19145fi
19146
19147
19148  test -n "$CODESIGN" && break
19149done
19150
19151  else
19152    # The variable is set, but is it from the command line or the environment?
19153
19154    # Try to remove the string !CODESIGN! from our list.
19155    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19156    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19157      # If it failed, the variable was not from the command line. Ignore it,
19158      # but warn the user (except for BASH, which is always set by the calling BASH).
19159      if test "xCODESIGN" != xBASH; then
19160        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19161$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19162      fi
19163      # Try to locate tool using the code snippet
19164      for ac_prog in codesign
19165do
19166  # Extract the first word of "$ac_prog", so it can be a program name with args.
19167set dummy $ac_prog; ac_word=$2
19168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19169$as_echo_n "checking for $ac_word... " >&6; }
19170if ${ac_cv_path_CODESIGN+:} false; then :
19171  $as_echo_n "(cached) " >&6
19172else
19173  case $CODESIGN in
19174  [\\/]* | ?:[\\/]*)
19175  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19176  ;;
19177  *)
19178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19179for as_dir in $PATH
19180do
19181  IFS=$as_save_IFS
19182  test -z "$as_dir" && as_dir=.
19183    for ac_exec_ext in '' $ac_executable_extensions; do
19184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19185    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19187    break 2
19188  fi
19189done
19190  done
19191IFS=$as_save_IFS
19192
19193  ;;
19194esac
19195fi
19196CODESIGN=$ac_cv_path_CODESIGN
19197if test -n "$CODESIGN"; then
19198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19199$as_echo "$CODESIGN" >&6; }
19200else
19201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19202$as_echo "no" >&6; }
19203fi
19204
19205
19206  test -n "$CODESIGN" && break
19207done
19208
19209    else
19210      # If it succeeded, then it was overridden by the user. We will use it
19211      # for the tool.
19212
19213      # First remove it from the list of overridden variables, so we can test
19214      # for unknown variables in the end.
19215      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19216
19217      # Check if the provided tool contains a complete path.
19218      tool_specified="$CODESIGN"
19219      tool_basename="${tool_specified##*/}"
19220      if test "x$tool_basename" = "x$tool_specified"; then
19221        # A command without a complete path is provided, search $PATH.
19222        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19223$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19224        # Extract the first word of "$tool_basename", so it can be a program name with args.
19225set dummy $tool_basename; ac_word=$2
19226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19227$as_echo_n "checking for $ac_word... " >&6; }
19228if ${ac_cv_path_CODESIGN+:} false; then :
19229  $as_echo_n "(cached) " >&6
19230else
19231  case $CODESIGN in
19232  [\\/]* | ?:[\\/]*)
19233  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19234  ;;
19235  *)
19236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19237for as_dir in $PATH
19238do
19239  IFS=$as_save_IFS
19240  test -z "$as_dir" && as_dir=.
19241    for ac_exec_ext in '' $ac_executable_extensions; do
19242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19243    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19245    break 2
19246  fi
19247done
19248  done
19249IFS=$as_save_IFS
19250
19251  ;;
19252esac
19253fi
19254CODESIGN=$ac_cv_path_CODESIGN
19255if test -n "$CODESIGN"; then
19256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19257$as_echo "$CODESIGN" >&6; }
19258else
19259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19260$as_echo "no" >&6; }
19261fi
19262
19263
19264        if test "x$CODESIGN" = x; then
19265          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19266        fi
19267      else
19268        # Otherwise we believe it is a complete path. Use it as it is.
19269        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19270$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19271        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19272$as_echo_n "checking for CODESIGN... " >&6; }
19273        if test ! -x "$tool_specified"; then
19274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19275$as_echo "not found" >&6; }
19276          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19277        fi
19278        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19279$as_echo "$tool_specified" >&6; }
19280      fi
19281    fi
19282  fi
19283
19284
19285    if test "x$CODESIGN" != "x"; then
19286      # Verify that the openjdk_codesign certificate is present
19287      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19288$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19289      rm -f codesign-testfile
19290      touch codesign-testfile
19291      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19292      rm -f codesign-testfile
19293      if test "x$CODESIGN" = x; then
19294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19295$as_echo "no" >&6; }
19296      else
19297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19298$as_echo "yes" >&6; }
19299      fi
19300    fi
19301  fi
19302
19303
19304# Check if pkg-config is available.
19305
19306
19307if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19308	if test -n "$ac_tool_prefix"; then
19309  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19310set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19312$as_echo_n "checking for $ac_word... " >&6; }
19313if ${ac_cv_path_PKG_CONFIG+:} false; then :
19314  $as_echo_n "(cached) " >&6
19315else
19316  case $PKG_CONFIG in
19317  [\\/]* | ?:[\\/]*)
19318  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19319  ;;
19320  *)
19321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19322for as_dir in $PATH
19323do
19324  IFS=$as_save_IFS
19325  test -z "$as_dir" && as_dir=.
19326    for ac_exec_ext in '' $ac_executable_extensions; do
19327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19328    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19330    break 2
19331  fi
19332done
19333  done
19334IFS=$as_save_IFS
19335
19336  ;;
19337esac
19338fi
19339PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19340if test -n "$PKG_CONFIG"; then
19341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19342$as_echo "$PKG_CONFIG" >&6; }
19343else
19344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19345$as_echo "no" >&6; }
19346fi
19347
19348
19349fi
19350if test -z "$ac_cv_path_PKG_CONFIG"; then
19351  ac_pt_PKG_CONFIG=$PKG_CONFIG
19352  # Extract the first word of "pkg-config", so it can be a program name with args.
19353set dummy pkg-config; ac_word=$2
19354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19355$as_echo_n "checking for $ac_word... " >&6; }
19356if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19357  $as_echo_n "(cached) " >&6
19358else
19359  case $ac_pt_PKG_CONFIG in
19360  [\\/]* | ?:[\\/]*)
19361  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19362  ;;
19363  *)
19364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19365for as_dir in $PATH
19366do
19367  IFS=$as_save_IFS
19368  test -z "$as_dir" && as_dir=.
19369    for ac_exec_ext in '' $ac_executable_extensions; do
19370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19371    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19373    break 2
19374  fi
19375done
19376  done
19377IFS=$as_save_IFS
19378
19379  ;;
19380esac
19381fi
19382ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19383if test -n "$ac_pt_PKG_CONFIG"; then
19384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19385$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19386else
19387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19388$as_echo "no" >&6; }
19389fi
19390
19391  if test "x$ac_pt_PKG_CONFIG" = x; then
19392    PKG_CONFIG=""
19393  else
19394    case $cross_compiling:$ac_tool_warned in
19395yes:)
19396{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19397$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19398ac_tool_warned=yes ;;
19399esac
19400    PKG_CONFIG=$ac_pt_PKG_CONFIG
19401  fi
19402else
19403  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19404fi
19405
19406fi
19407if test -n "$PKG_CONFIG"; then
19408	_pkg_min_version=0.9.0
19409	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19410$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19411	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19412		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19413$as_echo "yes" >&6; }
19414	else
19415		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19416$as_echo "no" >&6; }
19417		PKG_CONFIG=""
19418	fi
19419
19420fi
19421
19422# After basic tools have been setup, we can check build os specific details.
19423
19424  ###############################################################################
19425
19426  # Note that this is the build platform OS version!
19427
19428  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19429  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19430  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19431  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19432
19433
19434
19435
19436
19437# Setup builddeps, for automatic downloading of tools we need.
19438# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19439# boot-jdk setup, but we need to have basic tools setup first.
19440
19441
19442# Check whether --with-builddeps-conf was given.
19443if test "${with_builddeps_conf+set}" = set; then :
19444  withval=$with_builddeps_conf;
19445fi
19446
19447
19448
19449# Check whether --with-builddeps-server was given.
19450if test "${with_builddeps_server+set}" = set; then :
19451  withval=$with_builddeps_server;
19452fi
19453
19454
19455
19456# Check whether --with-builddeps-dir was given.
19457if test "${with_builddeps_dir+set}" = set; then :
19458  withval=$with_builddeps_dir;
19459else
19460  with_builddeps_dir=/localhome/builddeps
19461fi
19462
19463
19464
19465# Check whether --with-builddeps-group was given.
19466if test "${with_builddeps_group+set}" = set; then :
19467  withval=$with_builddeps_group;
19468fi
19469
19470
19471
19472
19473  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19474    if test "x$with_builddeps_conf" != x; then
19475      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19476$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19477      builddepsfile=$with_builddeps_conf
19478      if test -s $builddepsfile; then
19479        . $builddepsfile
19480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19481$as_echo "loaded!" >&6; }
19482      else
19483        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19484      fi
19485    else
19486      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19487$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19488      builddepsfile=`mktemp`
19489      touch $builddepsfile
19490      # Put all found confs into a single file.
19491      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19492      # Source the file to acquire the variables
19493      if test -s $builddepsfile; then
19494        . $builddepsfile
19495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19496$as_echo "found at least one!" >&6; }
19497      else
19498        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19499      fi
19500    fi
19501    # Create build and target names that use _ instead of "-" and ".".
19502    # This is necessary to use them in variable names.
19503    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19504    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19505    # Extract rewrite information for build and target
19506    eval rewritten_build=\${REWRITE_${build_var}}
19507    if test "x$rewritten_build" = x; then
19508      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19509      echo Build stays the same $rewritten_build
19510    else
19511      echo Rewriting build for builddeps into $rewritten_build
19512    fi
19513    eval rewritten_target=\${REWRITE_${target_var}}
19514    if test "x$rewritten_target" = x; then
19515      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19516      echo Target stays the same $rewritten_target
19517    else
19518      echo Rewriting target for builddeps into $rewritten_target
19519    fi
19520    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19521    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19522  fi
19523  for ac_prog in 7z unzip
19524do
19525  # Extract the first word of "$ac_prog", so it can be a program name with args.
19526set dummy $ac_prog; ac_word=$2
19527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19528$as_echo_n "checking for $ac_word... " >&6; }
19529if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19530  $as_echo_n "(cached) " >&6
19531else
19532  if test -n "$BDEPS_UNZIP"; then
19533  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19534else
19535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19536for as_dir in $PATH
19537do
19538  IFS=$as_save_IFS
19539  test -z "$as_dir" && as_dir=.
19540    for ac_exec_ext in '' $ac_executable_extensions; do
19541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19542    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19544    break 2
19545  fi
19546done
19547  done
19548IFS=$as_save_IFS
19549
19550fi
19551fi
19552BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19553if test -n "$BDEPS_UNZIP"; then
19554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19555$as_echo "$BDEPS_UNZIP" >&6; }
19556else
19557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19558$as_echo "no" >&6; }
19559fi
19560
19561
19562  test -n "$BDEPS_UNZIP" && break
19563done
19564
19565  if test "x$BDEPS_UNZIP" = x7z; then
19566    BDEPS_UNZIP="7z x"
19567  fi
19568
19569  for ac_prog in wget lftp ftp
19570do
19571  # Extract the first word of "$ac_prog", so it can be a program name with args.
19572set dummy $ac_prog; ac_word=$2
19573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19574$as_echo_n "checking for $ac_word... " >&6; }
19575if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19576  $as_echo_n "(cached) " >&6
19577else
19578  if test -n "$BDEPS_FTP"; then
19579  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19580else
19581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19582for as_dir in $PATH
19583do
19584  IFS=$as_save_IFS
19585  test -z "$as_dir" && as_dir=.
19586    for ac_exec_ext in '' $ac_executable_extensions; do
19587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19588    ac_cv_prog_BDEPS_FTP="$ac_prog"
19589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19590    break 2
19591  fi
19592done
19593  done
19594IFS=$as_save_IFS
19595
19596fi
19597fi
19598BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19599if test -n "$BDEPS_FTP"; then
19600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19601$as_echo "$BDEPS_FTP" >&6; }
19602else
19603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19604$as_echo "no" >&6; }
19605fi
19606
19607
19608  test -n "$BDEPS_FTP" && break
19609done
19610
19611
19612
19613###############################################################################
19614#
19615# Determine OpenJDK variants, options and version numbers.
19616#
19617###############################################################################
19618
19619# We need build & target for this.
19620
19621
19622  ###############################################################################
19623  #
19624  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19625  # We always build headless support.
19626  #
19627  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19628$as_echo_n "checking headful support... " >&6; }
19629  # Check whether --enable-headful was given.
19630if test "${enable_headful+set}" = set; then :
19631  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19632else
19633  SUPPORT_HEADFUL=yes
19634fi
19635
19636
19637  SUPPORT_HEADLESS=yes
19638  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19639
19640  if test "x$SUPPORT_HEADFUL" = xyes; then
19641    # We are building both headful and headless.
19642    headful_msg="include support for both headful and headless"
19643  fi
19644
19645  if test "x$SUPPORT_HEADFUL" = xno; then
19646    # Thus we are building headless only.
19647    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19648    headful_msg="headless only"
19649  fi
19650
19651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19652$as_echo "$headful_msg" >&6; }
19653
19654
19655
19656
19657
19658  # Control wether Hotspot runs Queens test after build.
19659  # Check whether --enable-hotspot-test-in-build was given.
19660if test "${enable_hotspot_test_in_build+set}" = set; then :
19661  enableval=$enable_hotspot_test_in_build;
19662else
19663  enable_hotspot_test_in_build=no
19664fi
19665
19666  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19667    TEST_IN_BUILD=true
19668  else
19669    TEST_IN_BUILD=false
19670  fi
19671
19672
19673  ###############################################################################
19674  #
19675  # Choose cacerts source file
19676  #
19677
19678# Check whether --with-cacerts-file was given.
19679if test "${with_cacerts_file+set}" = set; then :
19680  withval=$with_cacerts_file;
19681fi
19682
19683  if test "x$with_cacerts_file" != x; then
19684    CACERTS_FILE=$with_cacerts_file
19685  else
19686    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19687  fi
19688
19689
19690  ###############################################################################
19691  #
19692  # Enable or disable unlimited crypto
19693  #
19694  # Check whether --enable-unlimited-crypto was given.
19695if test "${enable_unlimited_crypto+set}" = set; then :
19696  enableval=$enable_unlimited_crypto;
19697else
19698  enable_unlimited_crypto=no
19699fi
19700
19701  if test "x$enable_unlimited_crypto" = "xyes"; then
19702    UNLIMITED_CRYPTO=true
19703  else
19704    UNLIMITED_CRYPTO=false
19705  fi
19706
19707
19708  ###############################################################################
19709  #
19710  # Enable or disable the elliptic curve crypto implementation
19711  #
19712
19713
19714  ###############################################################################
19715  #
19716  # --enable-rmiconnector-iiop
19717  #
19718  # Check whether --enable-rmiconnector-iiop was given.
19719if test "${enable_rmiconnector_iiop+set}" = set; then :
19720  enableval=$enable_rmiconnector_iiop;
19721fi
19722
19723  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19724    RMICONNECTOR_IIOP=true
19725  else
19726    RMICONNECTOR_IIOP=false
19727  fi
19728
19729
19730  ###############################################################################
19731  #
19732  # Compress jars
19733  #
19734  COMPRESS_JARS=false
19735
19736
19737
19738
19739  # Source the version numbers
19740  . $AUTOCONF_DIR/version-numbers
19741
19742  # Get the settings from parameters
19743
19744# Check whether --with-milestone was given.
19745if test "${with_milestone+set}" = set; then :
19746  withval=$with_milestone;
19747fi
19748
19749  if test "x$with_milestone" = xyes; then
19750    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19751  elif test "x$with_milestone" != x; then
19752    MILESTONE="$with_milestone"
19753  fi
19754  if test "x$MILESTONE" = x; then
19755    MILESTONE=internal
19756  fi
19757
19758
19759# Check whether --with-update-version was given.
19760if test "${with_update_version+set}" = set; then :
19761  withval=$with_update_version;
19762fi
19763
19764  if test "x$with_update_version" = xyes; then
19765    as_fn_error $? "Update version must have a value" "$LINENO" 5
19766  elif test "x$with_update_version" != x; then
19767    JDK_UPDATE_VERSION="$with_update_version"
19768    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19769    # to a bug in expr (which reduces it to just X). To work around this, we
19770    # always add a 0 to one digit update versions.
19771    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19772      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19773    fi
19774  fi
19775
19776
19777# Check whether --with-user-release-suffix was given.
19778if test "${with_user_release_suffix+set}" = set; then :
19779  withval=$with_user_release_suffix;
19780fi
19781
19782  if test "x$with_user_release_suffix" = xyes; then
19783    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19784  elif test "x$with_user_release_suffix" != x; then
19785    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19786  fi
19787
19788
19789# Check whether --with-build-number was given.
19790if test "${with_build_number+set}" = set; then :
19791  withval=$with_build_number;
19792fi
19793
19794  if test "x$with_build_number" = xyes; then
19795    as_fn_error $? "Build number must have a value" "$LINENO" 5
19796  elif test "x$with_build_number" != x; then
19797    JDK_BUILD_NUMBER="$with_build_number"
19798  fi
19799  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19800  if test "x$JDK_BUILD_NUMBER" = x; then
19801    JDK_BUILD_NUMBER=b00
19802    if test "x$USER_RELEASE_SUFFIX" = x; then
19803      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19804      # Avoid [:alnum:] since it depends on the locale.
19805      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19806      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19807    fi
19808  fi
19809
19810  # Now set the JDK version, milestone, build number etc.
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826  COPYRIGHT_YEAR=`date +'%Y'`
19827
19828
19829  if test "x$JDK_UPDATE_VERSION" != x; then
19830    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19831  else
19832    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19833  fi
19834
19835
19836  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19837
19838
19839
19840###############################################################################
19841#
19842# Setup BootJDK, used to bootstrap the build.
19843#
19844###############################################################################
19845
19846
19847  BOOT_JDK_FOUND=no
19848
19849# Check whether --with-boot-jdk was given.
19850if test "${with_boot_jdk+set}" = set; then :
19851  withval=$with_boot_jdk;
19852fi
19853
19854
19855  # We look for the Boot JDK through various means, going from more certain to
19856  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19857  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19858  # must check if this is indeed valid; otherwise we'll continue looking.
19859
19860  # Test: Is bootjdk explicitely set by command line arguments?
19861
19862  if test "x$BOOT_JDK_FOUND" = xno; then
19863    # Now execute the test
19864
19865  if test "x$with_boot_jdk" != x; then
19866    BOOT_JDK=$with_boot_jdk
19867    BOOT_JDK_FOUND=maybe
19868    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19869$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19870  fi
19871
19872
19873    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19874    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19875      # Do we have a bin/java?
19876      if test ! -x "$BOOT_JDK/bin/java"; then
19877        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19879        BOOT_JDK_FOUND=no
19880      else
19881        # Do we have a bin/javac?
19882        if test ! -x "$BOOT_JDK/bin/javac"; then
19883          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19885          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19886$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19887          BOOT_JDK_FOUND=no
19888        else
19889          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19890          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19891            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19893            BOOT_JDK_FOUND=no
19894          else
19895            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19896            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19897
19898            # Extra M4 quote needed to protect [] in grep expression.
19899            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
19900            if test "x$FOUND_CORRECT_VERSION" = x; then
19901              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19903              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
19904$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
19905              BOOT_JDK_FOUND=no
19906            else
19907              # We're done! :-)
19908              BOOT_JDK_FOUND=yes
19909
19910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19911
19912  # Input might be given as Windows format, start by converting to
19913  # unix format.
19914  path="$BOOT_JDK"
19915  new_path=`$CYGPATH -u "$path"`
19916
19917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19920  # "foo.exe" is OK but "foo" is an error.
19921  #
19922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19923  # It is also a way to make sure we got the proper file name for the real test later on.
19924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19925  if test "x$test_shortpath" = x; then
19926    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19927$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19928    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19929  fi
19930
19931  # Call helper function which possibly converts this using DOS-style short mode.
19932  # If so, the updated path is stored in $new_path.
19933
19934  input_path="$new_path"
19935  # Check if we need to convert this using DOS-style short mode. If the path
19936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19937  # take no chances and rewrite it.
19938  # Note: m4 eats our [], so we need to use [ and ] instead.
19939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19940  if test "x$has_forbidden_chars" != x; then
19941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19945      # Going to short mode and back again did indeed matter. Since short mode is
19946      # case insensitive, let's make it lowercase to improve readability.
19947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19948      # Now convert it back to Unix-stile (cygpath)
19949      input_path=`$CYGPATH -u "$shortmode_path"`
19950      new_path="$input_path"
19951    fi
19952  fi
19953
19954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19955  if test "x$test_cygdrive_prefix" = x; then
19956    # As a simple fix, exclude /usr/bin since it's not a real path.
19957    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19959      # a path prefixed by /cygdrive for fixpath to work.
19960      new_path="$CYGWIN_ROOT_PATH$input_path"
19961    fi
19962  fi
19963
19964
19965  if test "x$path" != "x$new_path"; then
19966    BOOT_JDK="$new_path"
19967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19968$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19969  fi
19970
19971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19972
19973  path="$BOOT_JDK"
19974  has_colon=`$ECHO $path | $GREP ^.:`
19975  new_path="$path"
19976  if test "x$has_colon" = x; then
19977    # Not in mixed or Windows style, start by that.
19978    new_path=`cmd //c echo $path`
19979  fi
19980
19981
19982  input_path="$new_path"
19983  # Check if we need to convert this using DOS-style short mode. If the path
19984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19985  # take no chances and rewrite it.
19986  # Note: m4 eats our [], so we need to use [ and ] instead.
19987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19988  if test "x$has_forbidden_chars" != x; then
19989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19991  fi
19992
19993
19994  windows_path="$new_path"
19995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19996    unix_path=`$CYGPATH -u "$windows_path"`
19997    new_path="$unix_path"
19998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20000    new_path="$unix_path"
20001  fi
20002
20003  if test "x$path" != "x$new_path"; then
20004    BOOT_JDK="$new_path"
20005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20006$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20007  fi
20008
20009  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20010  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20011
20012  else
20013    # We're on a posix platform. Hooray! :)
20014    path="$BOOT_JDK"
20015    has_space=`$ECHO "$path" | $GREP " "`
20016    if test "x$has_space" != x; then
20017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20018$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20019      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20020    fi
20021
20022    # Use eval to expand a potential ~
20023    eval path="$path"
20024    if test ! -f "$path" && test ! -d "$path"; then
20025      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20026    fi
20027
20028    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20029  fi
20030
20031              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20032$as_echo_n "checking for Boot JDK... " >&6; }
20033              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20034$as_echo "$BOOT_JDK" >&6; }
20035              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20036$as_echo_n "checking Boot JDK version... " >&6; }
20037              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20038              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20039$as_echo "$BOOT_JDK_VERSION" >&6; }
20040            fi # end check jdk version
20041          fi # end check rt.jar
20042        fi # end check javac
20043      fi # end check java
20044    fi # end check boot jdk found
20045  fi
20046
20047  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20048    # Having specified an argument which is incorrect will produce an instant failure;
20049    # we should not go on looking
20050    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20051  fi
20052
20053  # Test: Is bootjdk available from builddeps?
20054
20055  if test "x$BOOT_JDK_FOUND" = xno; then
20056    # Now execute the test
20057
20058
20059
20060  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20061    # Source the builddeps file again, to make sure it uses the latest variables!
20062    . $builddepsfile
20063    # Look for a target and build machine specific resource!
20064    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20065    if test "x$resource" = x; then
20066      # Ok, lets instead look for a target specific resource
20067      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20068    fi
20069    if test "x$resource" = x; then
20070      # Ok, lets instead look for a build specific resource
20071      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20072    fi
20073    if test "x$resource" = x; then
20074      # Ok, lets instead look for a generic resource
20075      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20076      resource=${builddep_bootjdk}
20077    fi
20078    if test "x$resource" != x; then
20079      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20080$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20081      # If the resource in the builddeps.conf file is an existing directory,
20082      # for example /java/linux/cups
20083      if test -d ${resource}; then
20084        depdir=${resource}
20085      else
20086
20087  # bootjdk is for example mymodule
20088  # $resource is for example libs/general/libmymod_1_2_3.zip
20089  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20090  # $with_builddeps_dir is for example /localhome/builddeps
20091  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20092  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20093  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20094  filename=`basename $resource`
20095  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20096  filebase=${filename%%.*}
20097  extension=${filename#*.}
20098  installdir=$with_builddeps_dir/$filebase
20099  if test ! -f $installdir/$filename.unpacked; then
20100    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20101$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20102    if test ! -d $installdir; then
20103      mkdir -p $installdir
20104    fi
20105    if test ! -d $installdir; then
20106      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20107    fi
20108    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20109    touch $tmpfile
20110    if test ! -f $tmpfile; then
20111      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20112    fi
20113
20114  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20115  # $tmpfile is the local file name for the downloaded file.
20116  VALID_TOOL=no
20117  if test "x$BDEPS_FTP" = xwget; then
20118    VALID_TOOL=yes
20119    wget -O $tmpfile $with_builddeps_server/$resource
20120  fi
20121  if test "x$BDEPS_FTP" = xlftp; then
20122    VALID_TOOL=yes
20123    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20124  fi
20125  if test "x$BDEPS_FTP" = xftp; then
20126    VALID_TOOL=yes
20127    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20128    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20129    FTPUSERPWD=${FTPSERVER%%@*}
20130    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20131      FTPUSER=${userpwd%%:*}
20132      FTPPWD=${userpwd#*@}
20133      FTPSERVER=${FTPSERVER#*@}
20134    else
20135      FTPUSER=ftp
20136      FTPPWD=ftp
20137    fi
20138    # the "pass" command does not work on some
20139    # ftp clients (read ftp.exe) but if it works,
20140    # passive mode is better!
20141    ( \
20142        echo "user $FTPUSER $FTPPWD"        ; \
20143        echo "pass"                         ; \
20144        echo "bin"                          ; \
20145        echo "get $FTPPATH $tmpfile"              ; \
20146    ) | ftp -in $FTPSERVER
20147  fi
20148  if test "x$VALID_TOOL" != xyes; then
20149    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20150  fi
20151
20152    mv $tmpfile $installdir/$filename
20153    if test ! -s $installdir/$filename; then
20154      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20155    fi
20156    case "$extension" in
20157      zip)  echo "Unzipping $installdir/$filename..."
20158        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20159        ;;
20160      tar.gz) echo "Untaring $installdir/$filename..."
20161        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20162        ;;
20163      tgz) echo "Untaring $installdir/$filename..."
20164        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20165        ;;
20166      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20167        ;;
20168    esac
20169  fi
20170  if test -f $installdir/$filename.unpacked; then
20171    depdir=$installdir
20172  fi
20173
20174      fi
20175      # Source the builddeps file again, because in the previous command, the depdir
20176      # was updated to point at the current build dependency install directory.
20177      . $builddepsfile
20178      # Now extract variables from the builddeps.conf files.
20179      theroot=${builddep_bootjdk_ROOT}
20180      thecflags=${builddep_bootjdk_CFLAGS}
20181      thelibs=${builddep_bootjdk_LIBS}
20182      if test "x$depdir" = x; then
20183        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20184      fi
20185      BOOT_JDK=$depdir
20186      if test "x$theroot" != x; then
20187        BOOT_JDK="$theroot"
20188      fi
20189      if test "x$thecflags" != x; then
20190        BOOT_JDK_CFLAGS="$thecflags"
20191      fi
20192      if test "x$thelibs" != x; then
20193        BOOT_JDK_LIBS="$thelibs"
20194      fi
20195      BOOT_JDK_FOUND=maybe
20196      else BOOT_JDK_FOUND=no
20197
20198    fi
20199    else BOOT_JDK_FOUND=no
20200
20201  fi
20202
20203
20204
20205    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20206    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20207      # Do we have a bin/java?
20208      if test ! -x "$BOOT_JDK/bin/java"; then
20209        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20211        BOOT_JDK_FOUND=no
20212      else
20213        # Do we have a bin/javac?
20214        if test ! -x "$BOOT_JDK/bin/javac"; then
20215          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20216$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20217          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20218$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20219          BOOT_JDK_FOUND=no
20220        else
20221          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20222          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20223            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20225            BOOT_JDK_FOUND=no
20226          else
20227            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20228            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20229
20230            # Extra M4 quote needed to protect [] in grep expression.
20231            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20232            if test "x$FOUND_CORRECT_VERSION" = x; then
20233              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20234$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20235              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20236$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20237              BOOT_JDK_FOUND=no
20238            else
20239              # We're done! :-)
20240              BOOT_JDK_FOUND=yes
20241
20242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20243
20244  # Input might be given as Windows format, start by converting to
20245  # unix format.
20246  path="$BOOT_JDK"
20247  new_path=`$CYGPATH -u "$path"`
20248
20249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20252  # "foo.exe" is OK but "foo" is an error.
20253  #
20254  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20255  # It is also a way to make sure we got the proper file name for the real test later on.
20256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20257  if test "x$test_shortpath" = x; then
20258    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20259$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20260    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20261  fi
20262
20263  # Call helper function which possibly converts this using DOS-style short mode.
20264  # If so, the updated path is stored in $new_path.
20265
20266  input_path="$new_path"
20267  # Check if we need to convert this using DOS-style short mode. If the path
20268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20269  # take no chances and rewrite it.
20270  # Note: m4 eats our [], so we need to use [ and ] instead.
20271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20272  if test "x$has_forbidden_chars" != x; then
20273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20277      # Going to short mode and back again did indeed matter. Since short mode is
20278      # case insensitive, let's make it lowercase to improve readability.
20279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20280      # Now convert it back to Unix-stile (cygpath)
20281      input_path=`$CYGPATH -u "$shortmode_path"`
20282      new_path="$input_path"
20283    fi
20284  fi
20285
20286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20287  if test "x$test_cygdrive_prefix" = x; then
20288    # As a simple fix, exclude /usr/bin since it's not a real path.
20289    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20291      # a path prefixed by /cygdrive for fixpath to work.
20292      new_path="$CYGWIN_ROOT_PATH$input_path"
20293    fi
20294  fi
20295
20296
20297  if test "x$path" != "x$new_path"; then
20298    BOOT_JDK="$new_path"
20299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20300$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20301  fi
20302
20303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20304
20305  path="$BOOT_JDK"
20306  has_colon=`$ECHO $path | $GREP ^.:`
20307  new_path="$path"
20308  if test "x$has_colon" = x; then
20309    # Not in mixed or Windows style, start by that.
20310    new_path=`cmd //c echo $path`
20311  fi
20312
20313
20314  input_path="$new_path"
20315  # Check if we need to convert this using DOS-style short mode. If the path
20316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20317  # take no chances and rewrite it.
20318  # Note: m4 eats our [], so we need to use [ and ] instead.
20319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20320  if test "x$has_forbidden_chars" != x; then
20321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20322    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20323  fi
20324
20325
20326  windows_path="$new_path"
20327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20328    unix_path=`$CYGPATH -u "$windows_path"`
20329    new_path="$unix_path"
20330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20332    new_path="$unix_path"
20333  fi
20334
20335  if test "x$path" != "x$new_path"; then
20336    BOOT_JDK="$new_path"
20337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20339  fi
20340
20341  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20342  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20343
20344  else
20345    # We're on a posix platform. Hooray! :)
20346    path="$BOOT_JDK"
20347    has_space=`$ECHO "$path" | $GREP " "`
20348    if test "x$has_space" != x; then
20349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20350$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20351      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20352    fi
20353
20354    # Use eval to expand a potential ~
20355    eval path="$path"
20356    if test ! -f "$path" && test ! -d "$path"; then
20357      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20358    fi
20359
20360    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20361  fi
20362
20363              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20364$as_echo_n "checking for Boot JDK... " >&6; }
20365              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20366$as_echo "$BOOT_JDK" >&6; }
20367              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20368$as_echo_n "checking Boot JDK version... " >&6; }
20369              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20370              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20371$as_echo "$BOOT_JDK_VERSION" >&6; }
20372            fi # end check jdk version
20373          fi # end check rt.jar
20374        fi # end check javac
20375      fi # end check java
20376    fi # end check boot jdk found
20377  fi
20378
20379
20380  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20381
20382  if test "x$BOOT_JDK_FOUND" = xno; then
20383    # Now execute the test
20384
20385  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20386    # First check at user selected default
20387
20388  if test "x$BOOT_JDK_FOUND" = xno; then
20389    # Now execute the test
20390
20391  if test -x /usr/libexec/java_home; then
20392    BOOT_JDK=`/usr/libexec/java_home `
20393    BOOT_JDK_FOUND=maybe
20394    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20395$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20396  fi
20397
20398
20399    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20400    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20401      # Do we have a bin/java?
20402      if test ! -x "$BOOT_JDK/bin/java"; then
20403        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20404$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20405        BOOT_JDK_FOUND=no
20406      else
20407        # Do we have a bin/javac?
20408        if test ! -x "$BOOT_JDK/bin/javac"; then
20409          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20411          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20412$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20413          BOOT_JDK_FOUND=no
20414        else
20415          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20416          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20417            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20419            BOOT_JDK_FOUND=no
20420          else
20421            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20422            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20423
20424            # Extra M4 quote needed to protect [] in grep expression.
20425            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20426            if test "x$FOUND_CORRECT_VERSION" = x; then
20427              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20429              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20430$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20431              BOOT_JDK_FOUND=no
20432            else
20433              # We're done! :-)
20434              BOOT_JDK_FOUND=yes
20435
20436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20437
20438  # Input might be given as Windows format, start by converting to
20439  # unix format.
20440  path="$BOOT_JDK"
20441  new_path=`$CYGPATH -u "$path"`
20442
20443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20446  # "foo.exe" is OK but "foo" is an error.
20447  #
20448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20449  # It is also a way to make sure we got the proper file name for the real test later on.
20450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20451  if test "x$test_shortpath" = x; then
20452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20453$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20454    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20455  fi
20456
20457  # Call helper function which possibly converts this using DOS-style short mode.
20458  # If so, the updated path is stored in $new_path.
20459
20460  input_path="$new_path"
20461  # Check if we need to convert this using DOS-style short mode. If the path
20462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20463  # take no chances and rewrite it.
20464  # Note: m4 eats our [], so we need to use [ and ] instead.
20465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20466  if test "x$has_forbidden_chars" != x; then
20467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20471      # Going to short mode and back again did indeed matter. Since short mode is
20472      # case insensitive, let's make it lowercase to improve readability.
20473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20474      # Now convert it back to Unix-stile (cygpath)
20475      input_path=`$CYGPATH -u "$shortmode_path"`
20476      new_path="$input_path"
20477    fi
20478  fi
20479
20480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20481  if test "x$test_cygdrive_prefix" = x; then
20482    # As a simple fix, exclude /usr/bin since it's not a real path.
20483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20485      # a path prefixed by /cygdrive for fixpath to work.
20486      new_path="$CYGWIN_ROOT_PATH$input_path"
20487    fi
20488  fi
20489
20490
20491  if test "x$path" != "x$new_path"; then
20492    BOOT_JDK="$new_path"
20493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20494$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20495  fi
20496
20497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20498
20499  path="$BOOT_JDK"
20500  has_colon=`$ECHO $path | $GREP ^.:`
20501  new_path="$path"
20502  if test "x$has_colon" = x; then
20503    # Not in mixed or Windows style, start by that.
20504    new_path=`cmd //c echo $path`
20505  fi
20506
20507
20508  input_path="$new_path"
20509  # Check if we need to convert this using DOS-style short mode. If the path
20510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20511  # take no chances and rewrite it.
20512  # Note: m4 eats our [], so we need to use [ and ] instead.
20513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20514  if test "x$has_forbidden_chars" != x; then
20515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20517  fi
20518
20519
20520  windows_path="$new_path"
20521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20522    unix_path=`$CYGPATH -u "$windows_path"`
20523    new_path="$unix_path"
20524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20526    new_path="$unix_path"
20527  fi
20528
20529  if test "x$path" != "x$new_path"; then
20530    BOOT_JDK="$new_path"
20531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20532$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20533  fi
20534
20535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20537
20538  else
20539    # We're on a posix platform. Hooray! :)
20540    path="$BOOT_JDK"
20541    has_space=`$ECHO "$path" | $GREP " "`
20542    if test "x$has_space" != x; then
20543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20544$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20545      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20546    fi
20547
20548    # Use eval to expand a potential ~
20549    eval path="$path"
20550    if test ! -f "$path" && test ! -d "$path"; then
20551      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20552    fi
20553
20554    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20555  fi
20556
20557              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20558$as_echo_n "checking for Boot JDK... " >&6; }
20559              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20560$as_echo "$BOOT_JDK" >&6; }
20561              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20562$as_echo_n "checking Boot JDK version... " >&6; }
20563              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20564              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20565$as_echo "$BOOT_JDK_VERSION" >&6; }
20566            fi # end check jdk version
20567          fi # end check rt.jar
20568        fi # end check javac
20569      fi # end check java
20570    fi # end check boot jdk found
20571  fi
20572
20573    # If that did not work out (e.g. too old), try explicit versions instead
20574
20575  if test "x$BOOT_JDK_FOUND" = xno; then
20576    # Now execute the test
20577
20578  if test -x /usr/libexec/java_home; then
20579    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20580    BOOT_JDK_FOUND=maybe
20581    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20582$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20583  fi
20584
20585
20586    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20587    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20588      # Do we have a bin/java?
20589      if test ! -x "$BOOT_JDK/bin/java"; then
20590        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20592        BOOT_JDK_FOUND=no
20593      else
20594        # Do we have a bin/javac?
20595        if test ! -x "$BOOT_JDK/bin/javac"; then
20596          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20598          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20599$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20600          BOOT_JDK_FOUND=no
20601        else
20602          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20603          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20604            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20606            BOOT_JDK_FOUND=no
20607          else
20608            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20609            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20610
20611            # Extra M4 quote needed to protect [] in grep expression.
20612            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20613            if test "x$FOUND_CORRECT_VERSION" = x; then
20614              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20615$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20616              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20617$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20618              BOOT_JDK_FOUND=no
20619            else
20620              # We're done! :-)
20621              BOOT_JDK_FOUND=yes
20622
20623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20624
20625  # Input might be given as Windows format, start by converting to
20626  # unix format.
20627  path="$BOOT_JDK"
20628  new_path=`$CYGPATH -u "$path"`
20629
20630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20633  # "foo.exe" is OK but "foo" is an error.
20634  #
20635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20636  # It is also a way to make sure we got the proper file name for the real test later on.
20637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20638  if test "x$test_shortpath" = x; then
20639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20640$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20641    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20642  fi
20643
20644  # Call helper function which possibly converts this using DOS-style short mode.
20645  # If so, the updated path is stored in $new_path.
20646
20647  input_path="$new_path"
20648  # Check if we need to convert this using DOS-style short mode. If the path
20649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20650  # take no chances and rewrite it.
20651  # Note: m4 eats our [], so we need to use [ and ] instead.
20652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20653  if test "x$has_forbidden_chars" != x; then
20654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20658      # Going to short mode and back again did indeed matter. Since short mode is
20659      # case insensitive, let's make it lowercase to improve readability.
20660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20661      # Now convert it back to Unix-stile (cygpath)
20662      input_path=`$CYGPATH -u "$shortmode_path"`
20663      new_path="$input_path"
20664    fi
20665  fi
20666
20667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20668  if test "x$test_cygdrive_prefix" = x; then
20669    # As a simple fix, exclude /usr/bin since it's not a real path.
20670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20672      # a path prefixed by /cygdrive for fixpath to work.
20673      new_path="$CYGWIN_ROOT_PATH$input_path"
20674    fi
20675  fi
20676
20677
20678  if test "x$path" != "x$new_path"; then
20679    BOOT_JDK="$new_path"
20680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20681$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20682  fi
20683
20684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20685
20686  path="$BOOT_JDK"
20687  has_colon=`$ECHO $path | $GREP ^.:`
20688  new_path="$path"
20689  if test "x$has_colon" = x; then
20690    # Not in mixed or Windows style, start by that.
20691    new_path=`cmd //c echo $path`
20692  fi
20693
20694
20695  input_path="$new_path"
20696  # Check if we need to convert this using DOS-style short mode. If the path
20697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20698  # take no chances and rewrite it.
20699  # Note: m4 eats our [], so we need to use [ and ] instead.
20700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20701  if test "x$has_forbidden_chars" != x; then
20702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20704  fi
20705
20706
20707  windows_path="$new_path"
20708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20709    unix_path=`$CYGPATH -u "$windows_path"`
20710    new_path="$unix_path"
20711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20713    new_path="$unix_path"
20714  fi
20715
20716  if test "x$path" != "x$new_path"; then
20717    BOOT_JDK="$new_path"
20718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20719$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20720  fi
20721
20722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20724
20725  else
20726    # We're on a posix platform. Hooray! :)
20727    path="$BOOT_JDK"
20728    has_space=`$ECHO "$path" | $GREP " "`
20729    if test "x$has_space" != x; then
20730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20731$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20732      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20733    fi
20734
20735    # Use eval to expand a potential ~
20736    eval path="$path"
20737    if test ! -f "$path" && test ! -d "$path"; then
20738      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20739    fi
20740
20741    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20742  fi
20743
20744              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20745$as_echo_n "checking for Boot JDK... " >&6; }
20746              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20747$as_echo "$BOOT_JDK" >&6; }
20748              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20749$as_echo_n "checking Boot JDK version... " >&6; }
20750              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20751              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20752$as_echo "$BOOT_JDK_VERSION" >&6; }
20753            fi # end check jdk version
20754          fi # end check rt.jar
20755        fi # end check javac
20756      fi # end check java
20757    fi # end check boot jdk found
20758  fi
20759
20760
20761  if test "x$BOOT_JDK_FOUND" = xno; then
20762    # Now execute the test
20763
20764  if test -x /usr/libexec/java_home; then
20765    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20766    BOOT_JDK_FOUND=maybe
20767    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20768$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20769  fi
20770
20771
20772    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20773    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20774      # Do we have a bin/java?
20775      if test ! -x "$BOOT_JDK/bin/java"; then
20776        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20778        BOOT_JDK_FOUND=no
20779      else
20780        # Do we have a bin/javac?
20781        if test ! -x "$BOOT_JDK/bin/javac"; then
20782          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20784          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20785$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20786          BOOT_JDK_FOUND=no
20787        else
20788          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20789          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20790            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20792            BOOT_JDK_FOUND=no
20793          else
20794            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20795            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20796
20797            # Extra M4 quote needed to protect [] in grep expression.
20798            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20799            if test "x$FOUND_CORRECT_VERSION" = x; then
20800              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20802              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20803$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20804              BOOT_JDK_FOUND=no
20805            else
20806              # We're done! :-)
20807              BOOT_JDK_FOUND=yes
20808
20809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20810
20811  # Input might be given as Windows format, start by converting to
20812  # unix format.
20813  path="$BOOT_JDK"
20814  new_path=`$CYGPATH -u "$path"`
20815
20816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20819  # "foo.exe" is OK but "foo" is an error.
20820  #
20821  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20822  # It is also a way to make sure we got the proper file name for the real test later on.
20823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20824  if test "x$test_shortpath" = x; then
20825    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20826$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20827    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20828  fi
20829
20830  # Call helper function which possibly converts this using DOS-style short mode.
20831  # If so, the updated path is stored in $new_path.
20832
20833  input_path="$new_path"
20834  # Check if we need to convert this using DOS-style short mode. If the path
20835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20836  # take no chances and rewrite it.
20837  # Note: m4 eats our [], so we need to use [ and ] instead.
20838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20839  if test "x$has_forbidden_chars" != x; then
20840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20844      # Going to short mode and back again did indeed matter. Since short mode is
20845      # case insensitive, let's make it lowercase to improve readability.
20846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20847      # Now convert it back to Unix-stile (cygpath)
20848      input_path=`$CYGPATH -u "$shortmode_path"`
20849      new_path="$input_path"
20850    fi
20851  fi
20852
20853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20854  if test "x$test_cygdrive_prefix" = x; then
20855    # As a simple fix, exclude /usr/bin since it's not a real path.
20856    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20858      # a path prefixed by /cygdrive for fixpath to work.
20859      new_path="$CYGWIN_ROOT_PATH$input_path"
20860    fi
20861  fi
20862
20863
20864  if test "x$path" != "x$new_path"; then
20865    BOOT_JDK="$new_path"
20866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20867$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20868  fi
20869
20870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20871
20872  path="$BOOT_JDK"
20873  has_colon=`$ECHO $path | $GREP ^.:`
20874  new_path="$path"
20875  if test "x$has_colon" = x; then
20876    # Not in mixed or Windows style, start by that.
20877    new_path=`cmd //c echo $path`
20878  fi
20879
20880
20881  input_path="$new_path"
20882  # Check if we need to convert this using DOS-style short mode. If the path
20883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20884  # take no chances and rewrite it.
20885  # Note: m4 eats our [], so we need to use [ and ] instead.
20886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20887  if test "x$has_forbidden_chars" != x; then
20888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20890  fi
20891
20892
20893  windows_path="$new_path"
20894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20895    unix_path=`$CYGPATH -u "$windows_path"`
20896    new_path="$unix_path"
20897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20899    new_path="$unix_path"
20900  fi
20901
20902  if test "x$path" != "x$new_path"; then
20903    BOOT_JDK="$new_path"
20904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20905$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20906  fi
20907
20908  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20909  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20910
20911  else
20912    # We're on a posix platform. Hooray! :)
20913    path="$BOOT_JDK"
20914    has_space=`$ECHO "$path" | $GREP " "`
20915    if test "x$has_space" != x; then
20916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20917$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20918      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20919    fi
20920
20921    # Use eval to expand a potential ~
20922    eval path="$path"
20923    if test ! -f "$path" && test ! -d "$path"; then
20924      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20925    fi
20926
20927    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20928  fi
20929
20930              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20931$as_echo_n "checking for Boot JDK... " >&6; }
20932              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20933$as_echo "$BOOT_JDK" >&6; }
20934              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20935$as_echo_n "checking Boot JDK version... " >&6; }
20936              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20937              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20938$as_echo "$BOOT_JDK_VERSION" >&6; }
20939            fi # end check jdk version
20940          fi # end check rt.jar
20941        fi # end check javac
20942      fi # end check java
20943    fi # end check boot jdk found
20944  fi
20945
20946
20947  if test "x$BOOT_JDK_FOUND" = xno; then
20948    # Now execute the test
20949
20950  if test -x /usr/libexec/java_home; then
20951    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20952    BOOT_JDK_FOUND=maybe
20953    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20954$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20955  fi
20956
20957
20958    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20959    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20960      # Do we have a bin/java?
20961      if test ! -x "$BOOT_JDK/bin/java"; then
20962        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20964        BOOT_JDK_FOUND=no
20965      else
20966        # Do we have a bin/javac?
20967        if test ! -x "$BOOT_JDK/bin/javac"; then
20968          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20969$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20970          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20971$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20972          BOOT_JDK_FOUND=no
20973        else
20974          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20975          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20976            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20978            BOOT_JDK_FOUND=no
20979          else
20980            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20981            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20982
20983            # Extra M4 quote needed to protect [] in grep expression.
20984            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20985            if test "x$FOUND_CORRECT_VERSION" = x; then
20986              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20988              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20989$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20990              BOOT_JDK_FOUND=no
20991            else
20992              # We're done! :-)
20993              BOOT_JDK_FOUND=yes
20994
20995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20996
20997  # Input might be given as Windows format, start by converting to
20998  # unix format.
20999  path="$BOOT_JDK"
21000  new_path=`$CYGPATH -u "$path"`
21001
21002  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21003  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21004  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21005  # "foo.exe" is OK but "foo" is an error.
21006  #
21007  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21008  # It is also a way to make sure we got the proper file name for the real test later on.
21009  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21010  if test "x$test_shortpath" = x; then
21011    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21012$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21013    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21014  fi
21015
21016  # Call helper function which possibly converts this using DOS-style short mode.
21017  # If so, the updated path is stored in $new_path.
21018
21019  input_path="$new_path"
21020  # Check if we need to convert this using DOS-style short mode. If the path
21021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21022  # take no chances and rewrite it.
21023  # Note: m4 eats our [], so we need to use [ and ] instead.
21024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21025  if test "x$has_forbidden_chars" != x; then
21026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21027    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21028    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21029    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21030      # Going to short mode and back again did indeed matter. Since short mode is
21031      # case insensitive, let's make it lowercase to improve readability.
21032      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21033      # Now convert it back to Unix-stile (cygpath)
21034      input_path=`$CYGPATH -u "$shortmode_path"`
21035      new_path="$input_path"
21036    fi
21037  fi
21038
21039  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21040  if test "x$test_cygdrive_prefix" = x; then
21041    # As a simple fix, exclude /usr/bin since it's not a real path.
21042    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21043      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21044      # a path prefixed by /cygdrive for fixpath to work.
21045      new_path="$CYGWIN_ROOT_PATH$input_path"
21046    fi
21047  fi
21048
21049
21050  if test "x$path" != "x$new_path"; then
21051    BOOT_JDK="$new_path"
21052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21053$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21054  fi
21055
21056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21057
21058  path="$BOOT_JDK"
21059  has_colon=`$ECHO $path | $GREP ^.:`
21060  new_path="$path"
21061  if test "x$has_colon" = x; then
21062    # Not in mixed or Windows style, start by that.
21063    new_path=`cmd //c echo $path`
21064  fi
21065
21066
21067  input_path="$new_path"
21068  # Check if we need to convert this using DOS-style short mode. If the path
21069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21070  # take no chances and rewrite it.
21071  # Note: m4 eats our [], so we need to use [ and ] instead.
21072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21073  if test "x$has_forbidden_chars" != x; then
21074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21075    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21076  fi
21077
21078
21079  windows_path="$new_path"
21080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21081    unix_path=`$CYGPATH -u "$windows_path"`
21082    new_path="$unix_path"
21083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21085    new_path="$unix_path"
21086  fi
21087
21088  if test "x$path" != "x$new_path"; then
21089    BOOT_JDK="$new_path"
21090    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21091$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21092  fi
21093
21094  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21095  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21096
21097  else
21098    # We're on a posix platform. Hooray! :)
21099    path="$BOOT_JDK"
21100    has_space=`$ECHO "$path" | $GREP " "`
21101    if test "x$has_space" != x; then
21102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21103$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21104      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21105    fi
21106
21107    # Use eval to expand a potential ~
21108    eval path="$path"
21109    if test ! -f "$path" && test ! -d "$path"; then
21110      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21111    fi
21112
21113    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21114  fi
21115
21116              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21117$as_echo_n "checking for Boot JDK... " >&6; }
21118              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21119$as_echo "$BOOT_JDK" >&6; }
21120              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21121$as_echo_n "checking Boot JDK version... " >&6; }
21122              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21123              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21124$as_echo "$BOOT_JDK_VERSION" >&6; }
21125            fi # end check jdk version
21126          fi # end check rt.jar
21127        fi # end check javac
21128      fi # end check java
21129    fi # end check boot jdk found
21130  fi
21131
21132  fi
21133
21134
21135    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21136    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21137      # Do we have a bin/java?
21138      if test ! -x "$BOOT_JDK/bin/java"; then
21139        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21140$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21141        BOOT_JDK_FOUND=no
21142      else
21143        # Do we have a bin/javac?
21144        if test ! -x "$BOOT_JDK/bin/javac"; then
21145          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21147          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21148$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21149          BOOT_JDK_FOUND=no
21150        else
21151          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21152          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21153            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21155            BOOT_JDK_FOUND=no
21156          else
21157            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21158            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21159
21160            # Extra M4 quote needed to protect [] in grep expression.
21161            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21162            if test "x$FOUND_CORRECT_VERSION" = x; then
21163              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21165              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21166$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21167              BOOT_JDK_FOUND=no
21168            else
21169              # We're done! :-)
21170              BOOT_JDK_FOUND=yes
21171
21172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21173
21174  # Input might be given as Windows format, start by converting to
21175  # unix format.
21176  path="$BOOT_JDK"
21177  new_path=`$CYGPATH -u "$path"`
21178
21179  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21180  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21181  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21182  # "foo.exe" is OK but "foo" is an error.
21183  #
21184  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21185  # It is also a way to make sure we got the proper file name for the real test later on.
21186  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21187  if test "x$test_shortpath" = x; then
21188    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21189$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21190    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21191  fi
21192
21193  # Call helper function which possibly converts this using DOS-style short mode.
21194  # If so, the updated path is stored in $new_path.
21195
21196  input_path="$new_path"
21197  # Check if we need to convert this using DOS-style short mode. If the path
21198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21199  # take no chances and rewrite it.
21200  # Note: m4 eats our [], so we need to use [ and ] instead.
21201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21202  if test "x$has_forbidden_chars" != x; then
21203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21207      # Going to short mode and back again did indeed matter. Since short mode is
21208      # case insensitive, let's make it lowercase to improve readability.
21209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21210      # Now convert it back to Unix-stile (cygpath)
21211      input_path=`$CYGPATH -u "$shortmode_path"`
21212      new_path="$input_path"
21213    fi
21214  fi
21215
21216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21217  if test "x$test_cygdrive_prefix" = x; then
21218    # As a simple fix, exclude /usr/bin since it's not a real path.
21219    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21221      # a path prefixed by /cygdrive for fixpath to work.
21222      new_path="$CYGWIN_ROOT_PATH$input_path"
21223    fi
21224  fi
21225
21226
21227  if test "x$path" != "x$new_path"; then
21228    BOOT_JDK="$new_path"
21229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21230$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21231  fi
21232
21233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21234
21235  path="$BOOT_JDK"
21236  has_colon=`$ECHO $path | $GREP ^.:`
21237  new_path="$path"
21238  if test "x$has_colon" = x; then
21239    # Not in mixed or Windows style, start by that.
21240    new_path=`cmd //c echo $path`
21241  fi
21242
21243
21244  input_path="$new_path"
21245  # Check if we need to convert this using DOS-style short mode. If the path
21246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21247  # take no chances and rewrite it.
21248  # Note: m4 eats our [], so we need to use [ and ] instead.
21249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21250  if test "x$has_forbidden_chars" != x; then
21251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21253  fi
21254
21255
21256  windows_path="$new_path"
21257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21258    unix_path=`$CYGPATH -u "$windows_path"`
21259    new_path="$unix_path"
21260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21262    new_path="$unix_path"
21263  fi
21264
21265  if test "x$path" != "x$new_path"; then
21266    BOOT_JDK="$new_path"
21267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21268$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21269  fi
21270
21271  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21272  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21273
21274  else
21275    # We're on a posix platform. Hooray! :)
21276    path="$BOOT_JDK"
21277    has_space=`$ECHO "$path" | $GREP " "`
21278    if test "x$has_space" != x; then
21279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21280$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21281      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21282    fi
21283
21284    # Use eval to expand a potential ~
21285    eval path="$path"
21286    if test ! -f "$path" && test ! -d "$path"; then
21287      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21288    fi
21289
21290    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21291  fi
21292
21293              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21294$as_echo_n "checking for Boot JDK... " >&6; }
21295              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21296$as_echo "$BOOT_JDK" >&6; }
21297              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21298$as_echo_n "checking Boot JDK version... " >&6; }
21299              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21300              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21301$as_echo "$BOOT_JDK_VERSION" >&6; }
21302            fi # end check jdk version
21303          fi # end check rt.jar
21304        fi # end check javac
21305      fi # end check java
21306    fi # end check boot jdk found
21307  fi
21308
21309
21310  # Test: Is $JAVA_HOME set?
21311
21312  if test "x$BOOT_JDK_FOUND" = xno; then
21313    # Now execute the test
21314
21315  if test "x$JAVA_HOME" != x; then
21316    JAVA_HOME_PROCESSED="$JAVA_HOME"
21317
21318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21319
21320  # Input might be given as Windows format, start by converting to
21321  # unix format.
21322  path="$JAVA_HOME_PROCESSED"
21323  new_path=`$CYGPATH -u "$path"`
21324
21325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21328  # "foo.exe" is OK but "foo" is an error.
21329  #
21330  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21331  # It is also a way to make sure we got the proper file name for the real test later on.
21332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21333  if test "x$test_shortpath" = x; then
21334    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21335$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21336    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21337  fi
21338
21339  # Call helper function which possibly converts this using DOS-style short mode.
21340  # If so, the updated path is stored in $new_path.
21341
21342  input_path="$new_path"
21343  # Check if we need to convert this using DOS-style short mode. If the path
21344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21345  # take no chances and rewrite it.
21346  # Note: m4 eats our [], so we need to use [ and ] instead.
21347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21348  if test "x$has_forbidden_chars" != x; then
21349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21353      # Going to short mode and back again did indeed matter. Since short mode is
21354      # case insensitive, let's make it lowercase to improve readability.
21355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21356      # Now convert it back to Unix-stile (cygpath)
21357      input_path=`$CYGPATH -u "$shortmode_path"`
21358      new_path="$input_path"
21359    fi
21360  fi
21361
21362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21363  if test "x$test_cygdrive_prefix" = x; then
21364    # As a simple fix, exclude /usr/bin since it's not a real path.
21365    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21367      # a path prefixed by /cygdrive for fixpath to work.
21368      new_path="$CYGWIN_ROOT_PATH$input_path"
21369    fi
21370  fi
21371
21372
21373  if test "x$path" != "x$new_path"; then
21374    JAVA_HOME_PROCESSED="$new_path"
21375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21376$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21377  fi
21378
21379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21380
21381  path="$JAVA_HOME_PROCESSED"
21382  has_colon=`$ECHO $path | $GREP ^.:`
21383  new_path="$path"
21384  if test "x$has_colon" = x; then
21385    # Not in mixed or Windows style, start by that.
21386    new_path=`cmd //c echo $path`
21387  fi
21388
21389
21390  input_path="$new_path"
21391  # Check if we need to convert this using DOS-style short mode. If the path
21392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21393  # take no chances and rewrite it.
21394  # Note: m4 eats our [], so we need to use [ and ] instead.
21395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21396  if test "x$has_forbidden_chars" != x; then
21397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21399  fi
21400
21401
21402  windows_path="$new_path"
21403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21404    unix_path=`$CYGPATH -u "$windows_path"`
21405    new_path="$unix_path"
21406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21408    new_path="$unix_path"
21409  fi
21410
21411  if test "x$path" != "x$new_path"; then
21412    JAVA_HOME_PROCESSED="$new_path"
21413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21414$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21415  fi
21416
21417  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21418  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21419
21420  else
21421    # We're on a posix platform. Hooray! :)
21422    path="$JAVA_HOME_PROCESSED"
21423    has_space=`$ECHO "$path" | $GREP " "`
21424    if test "x$has_space" != x; then
21425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21426$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21427      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21428    fi
21429
21430    # Use eval to expand a potential ~
21431    eval path="$path"
21432    if test ! -f "$path" && test ! -d "$path"; then
21433      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21434    fi
21435
21436    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21437  fi
21438
21439    if test ! -d "$JAVA_HOME_PROCESSED"; then
21440      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21441$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21442    else
21443      # Aha, the user has set a JAVA_HOME
21444      # let us use that as the Boot JDK.
21445      BOOT_JDK="$JAVA_HOME_PROCESSED"
21446      BOOT_JDK_FOUND=maybe
21447      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21448$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21449    fi
21450  fi
21451
21452
21453    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21454    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21455      # Do we have a bin/java?
21456      if test ! -x "$BOOT_JDK/bin/java"; then
21457        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21459        BOOT_JDK_FOUND=no
21460      else
21461        # Do we have a bin/javac?
21462        if test ! -x "$BOOT_JDK/bin/javac"; then
21463          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21464$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21465          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21466$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21467          BOOT_JDK_FOUND=no
21468        else
21469          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21470          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21471            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21473            BOOT_JDK_FOUND=no
21474          else
21475            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21476            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21477
21478            # Extra M4 quote needed to protect [] in grep expression.
21479            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21480            if test "x$FOUND_CORRECT_VERSION" = x; then
21481              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21482$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21483              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21484$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21485              BOOT_JDK_FOUND=no
21486            else
21487              # We're done! :-)
21488              BOOT_JDK_FOUND=yes
21489
21490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21491
21492  # Input might be given as Windows format, start by converting to
21493  # unix format.
21494  path="$BOOT_JDK"
21495  new_path=`$CYGPATH -u "$path"`
21496
21497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21500  # "foo.exe" is OK but "foo" is an error.
21501  #
21502  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21503  # It is also a way to make sure we got the proper file name for the real test later on.
21504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21505  if test "x$test_shortpath" = x; then
21506    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21507$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21508    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21509  fi
21510
21511  # Call helper function which possibly converts this using DOS-style short mode.
21512  # If so, the updated path is stored in $new_path.
21513
21514  input_path="$new_path"
21515  # Check if we need to convert this using DOS-style short mode. If the path
21516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21517  # take no chances and rewrite it.
21518  # Note: m4 eats our [], so we need to use [ and ] instead.
21519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21520  if test "x$has_forbidden_chars" != x; then
21521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21525      # Going to short mode and back again did indeed matter. Since short mode is
21526      # case insensitive, let's make it lowercase to improve readability.
21527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21528      # Now convert it back to Unix-stile (cygpath)
21529      input_path=`$CYGPATH -u "$shortmode_path"`
21530      new_path="$input_path"
21531    fi
21532  fi
21533
21534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21535  if test "x$test_cygdrive_prefix" = x; then
21536    # As a simple fix, exclude /usr/bin since it's not a real path.
21537    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21539      # a path prefixed by /cygdrive for fixpath to work.
21540      new_path="$CYGWIN_ROOT_PATH$input_path"
21541    fi
21542  fi
21543
21544
21545  if test "x$path" != "x$new_path"; then
21546    BOOT_JDK="$new_path"
21547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21548$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21549  fi
21550
21551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21552
21553  path="$BOOT_JDK"
21554  has_colon=`$ECHO $path | $GREP ^.:`
21555  new_path="$path"
21556  if test "x$has_colon" = x; then
21557    # Not in mixed or Windows style, start by that.
21558    new_path=`cmd //c echo $path`
21559  fi
21560
21561
21562  input_path="$new_path"
21563  # Check if we need to convert this using DOS-style short mode. If the path
21564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21565  # take no chances and rewrite it.
21566  # Note: m4 eats our [], so we need to use [ and ] instead.
21567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21568  if test "x$has_forbidden_chars" != x; then
21569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21571  fi
21572
21573
21574  windows_path="$new_path"
21575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21576    unix_path=`$CYGPATH -u "$windows_path"`
21577    new_path="$unix_path"
21578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21580    new_path="$unix_path"
21581  fi
21582
21583  if test "x$path" != "x$new_path"; then
21584    BOOT_JDK="$new_path"
21585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21586$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21587  fi
21588
21589  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21590  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21591
21592  else
21593    # We're on a posix platform. Hooray! :)
21594    path="$BOOT_JDK"
21595    has_space=`$ECHO "$path" | $GREP " "`
21596    if test "x$has_space" != x; then
21597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21598$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21599      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21600    fi
21601
21602    # Use eval to expand a potential ~
21603    eval path="$path"
21604    if test ! -f "$path" && test ! -d "$path"; then
21605      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21606    fi
21607
21608    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21609  fi
21610
21611              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21612$as_echo_n "checking for Boot JDK... " >&6; }
21613              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21614$as_echo "$BOOT_JDK" >&6; }
21615              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21616$as_echo_n "checking Boot JDK version... " >&6; }
21617              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21618              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21619$as_echo "$BOOT_JDK_VERSION" >&6; }
21620            fi # end check jdk version
21621          fi # end check rt.jar
21622        fi # end check javac
21623      fi # end check java
21624    fi # end check boot jdk found
21625  fi
21626
21627
21628  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21629
21630  if test "x$BOOT_JDK_FOUND" = xno; then
21631    # Now execute the test
21632
21633  # Extract the first word of "javac", so it can be a program name with args.
21634set dummy javac; ac_word=$2
21635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21636$as_echo_n "checking for $ac_word... " >&6; }
21637if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21638  $as_echo_n "(cached) " >&6
21639else
21640  case $JAVAC_CHECK in
21641  [\\/]* | ?:[\\/]*)
21642  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21643  ;;
21644  *)
21645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21646for as_dir in $PATH
21647do
21648  IFS=$as_save_IFS
21649  test -z "$as_dir" && as_dir=.
21650    for ac_exec_ext in '' $ac_executable_extensions; do
21651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21652    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21654    break 2
21655  fi
21656done
21657  done
21658IFS=$as_save_IFS
21659
21660  ;;
21661esac
21662fi
21663JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21664if test -n "$JAVAC_CHECK"; then
21665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21666$as_echo "$JAVAC_CHECK" >&6; }
21667else
21668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21669$as_echo "no" >&6; }
21670fi
21671
21672
21673  # Extract the first word of "java", so it can be a program name with args.
21674set dummy java; ac_word=$2
21675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21676$as_echo_n "checking for $ac_word... " >&6; }
21677if ${ac_cv_path_JAVA_CHECK+:} false; then :
21678  $as_echo_n "(cached) " >&6
21679else
21680  case $JAVA_CHECK in
21681  [\\/]* | ?:[\\/]*)
21682  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21683  ;;
21684  *)
21685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21686for as_dir in $PATH
21687do
21688  IFS=$as_save_IFS
21689  test -z "$as_dir" && as_dir=.
21690    for ac_exec_ext in '' $ac_executable_extensions; do
21691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21692    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21694    break 2
21695  fi
21696done
21697  done
21698IFS=$as_save_IFS
21699
21700  ;;
21701esac
21702fi
21703JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21704if test -n "$JAVA_CHECK"; then
21705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21706$as_echo "$JAVA_CHECK" >&6; }
21707else
21708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21709$as_echo "no" >&6; }
21710fi
21711
21712
21713  BINARY="$JAVAC_CHECK"
21714  if test "x$JAVAC_CHECK" = x; then
21715    BINARY="$JAVA_CHECK"
21716  fi
21717  if test "x$BINARY" != x; then
21718    # So there is a java(c) binary, it might be part of a JDK.
21719    # Lets find the JDK/JRE directory by following symbolic links.
21720    # Linux/GNU systems often have links from /usr/bin/java to
21721    # /etc/alternatives/java to the real JDK binary.
21722
21723  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21724    # Follow a chain of symbolic links. Use readlink
21725    # where it exists, else fall back to horribly
21726    # complicated shell code.
21727    if test "x$READLINK_TESTED" != yes; then
21728      # On MacOSX there is a readlink tool with a different
21729      # purpose than the GNU readlink tool. Check the found readlink.
21730      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21731      if test "x$ISGNU" = x; then
21732        # A readlink that we do not know how to use.
21733        # Are there other non-GNU readlinks out there?
21734        READLINK_TESTED=yes
21735        READLINK=
21736      fi
21737    fi
21738
21739    if test "x$READLINK" != x; then
21740      BINARY=`$READLINK -f $BINARY`
21741    else
21742      # Save the current directory for restoring afterwards
21743      STARTDIR=$PWD
21744      COUNTER=0
21745      sym_link_dir=`$DIRNAME $BINARY`
21746      sym_link_file=`$BASENAME $BINARY`
21747      cd $sym_link_dir
21748      # Use -P flag to resolve symlinks in directories.
21749      cd `$THEPWDCMD -P`
21750      sym_link_dir=`$THEPWDCMD -P`
21751      # Resolve file symlinks
21752      while test $COUNTER -lt 20; do
21753        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21754        if test "x$ISLINK" == x; then
21755          # This is not a symbolic link! We are done!
21756          break
21757        fi
21758        # Again resolve directory symlinks since the target of the just found
21759        # link could be in a different directory
21760        cd `$DIRNAME $ISLINK`
21761        sym_link_dir=`$THEPWDCMD -P`
21762        sym_link_file=`$BASENAME $ISLINK`
21763        let COUNTER=COUNTER+1
21764      done
21765      cd $STARTDIR
21766      BINARY=$sym_link_dir/$sym_link_file
21767    fi
21768  fi
21769
21770    BOOT_JDK=`dirname "$BINARY"`
21771    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21772    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21773      # Looks like we found ourselves an JDK
21774      BOOT_JDK_FOUND=maybe
21775      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21776$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21777    fi
21778  fi
21779
21780
21781    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21782    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21783      # Do we have a bin/java?
21784      if test ! -x "$BOOT_JDK/bin/java"; then
21785        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21786$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21787        BOOT_JDK_FOUND=no
21788      else
21789        # Do we have a bin/javac?
21790        if test ! -x "$BOOT_JDK/bin/javac"; then
21791          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21793          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21794$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21795          BOOT_JDK_FOUND=no
21796        else
21797          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21798          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21799            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21801            BOOT_JDK_FOUND=no
21802          else
21803            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21804            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21805
21806            # Extra M4 quote needed to protect [] in grep expression.
21807            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21808            if test "x$FOUND_CORRECT_VERSION" = x; then
21809              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21811              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21812$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21813              BOOT_JDK_FOUND=no
21814            else
21815              # We're done! :-)
21816              BOOT_JDK_FOUND=yes
21817
21818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21819
21820  # Input might be given as Windows format, start by converting to
21821  # unix format.
21822  path="$BOOT_JDK"
21823  new_path=`$CYGPATH -u "$path"`
21824
21825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21828  # "foo.exe" is OK but "foo" is an error.
21829  #
21830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21831  # It is also a way to make sure we got the proper file name for the real test later on.
21832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21833  if test "x$test_shortpath" = x; then
21834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21835$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21836    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21837  fi
21838
21839  # Call helper function which possibly converts this using DOS-style short mode.
21840  # If so, the updated path is stored in $new_path.
21841
21842  input_path="$new_path"
21843  # Check if we need to convert this using DOS-style short mode. If the path
21844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21845  # take no chances and rewrite it.
21846  # Note: m4 eats our [], so we need to use [ and ] instead.
21847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21848  if test "x$has_forbidden_chars" != x; then
21849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21853      # Going to short mode and back again did indeed matter. Since short mode is
21854      # case insensitive, let's make it lowercase to improve readability.
21855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21856      # Now convert it back to Unix-stile (cygpath)
21857      input_path=`$CYGPATH -u "$shortmode_path"`
21858      new_path="$input_path"
21859    fi
21860  fi
21861
21862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21863  if test "x$test_cygdrive_prefix" = x; then
21864    # As a simple fix, exclude /usr/bin since it's not a real path.
21865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21867      # a path prefixed by /cygdrive for fixpath to work.
21868      new_path="$CYGWIN_ROOT_PATH$input_path"
21869    fi
21870  fi
21871
21872
21873  if test "x$path" != "x$new_path"; then
21874    BOOT_JDK="$new_path"
21875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21876$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21877  fi
21878
21879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21880
21881  path="$BOOT_JDK"
21882  has_colon=`$ECHO $path | $GREP ^.:`
21883  new_path="$path"
21884  if test "x$has_colon" = x; then
21885    # Not in mixed or Windows style, start by that.
21886    new_path=`cmd //c echo $path`
21887  fi
21888
21889
21890  input_path="$new_path"
21891  # Check if we need to convert this using DOS-style short mode. If the path
21892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21893  # take no chances and rewrite it.
21894  # Note: m4 eats our [], so we need to use [ and ] instead.
21895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21896  if test "x$has_forbidden_chars" != x; then
21897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21899  fi
21900
21901
21902  windows_path="$new_path"
21903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21904    unix_path=`$CYGPATH -u "$windows_path"`
21905    new_path="$unix_path"
21906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21908    new_path="$unix_path"
21909  fi
21910
21911  if test "x$path" != "x$new_path"; then
21912    BOOT_JDK="$new_path"
21913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21914$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21915  fi
21916
21917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21919
21920  else
21921    # We're on a posix platform. Hooray! :)
21922    path="$BOOT_JDK"
21923    has_space=`$ECHO "$path" | $GREP " "`
21924    if test "x$has_space" != x; then
21925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21926$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21927      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21928    fi
21929
21930    # Use eval to expand a potential ~
21931    eval path="$path"
21932    if test ! -f "$path" && test ! -d "$path"; then
21933      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21934    fi
21935
21936    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21937  fi
21938
21939              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21940$as_echo_n "checking for Boot JDK... " >&6; }
21941              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21942$as_echo "$BOOT_JDK" >&6; }
21943              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21944$as_echo_n "checking Boot JDK version... " >&6; }
21945              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21946              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21947$as_echo "$BOOT_JDK_VERSION" >&6; }
21948            fi # end check jdk version
21949          fi # end check rt.jar
21950        fi # end check javac
21951      fi # end check java
21952    fi # end check boot jdk found
21953  fi
21954
21955
21956  # Test: Is there a JDK installed in default, well-known locations?
21957
21958  if test "x$BOOT_JDK_FOUND" = xno; then
21959    # Now execute the test
21960
21961  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21962
21963  if test "x$BOOT_JDK_FOUND" = xno; then
21964    # Now execute the test
21965
21966  if test "x$ProgramW6432" != x; then
21967    VIRTUAL_DIR="$ProgramW6432/Java"
21968
21969  windows_path="$VIRTUAL_DIR"
21970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21971    unix_path=`$CYGPATH -u "$windows_path"`
21972    VIRTUAL_DIR="$unix_path"
21973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21975    VIRTUAL_DIR="$unix_path"
21976  fi
21977
21978
21979  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21980  BOOT_JDK_SUFFIX=""
21981  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21982  if test "x$ALL_JDKS_FOUND" != x; then
21983    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21984
21985  if test "x$BOOT_JDK_FOUND" = xno; then
21986    # Now execute the test
21987
21988        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21989        if test -d "$BOOT_JDK"; then
21990          BOOT_JDK_FOUND=maybe
21991          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21992$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21993        fi
21994
21995
21996    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21997    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21998      # Do we have a bin/java?
21999      if test ! -x "$BOOT_JDK/bin/java"; then
22000        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22002        BOOT_JDK_FOUND=no
22003      else
22004        # Do we have a bin/javac?
22005        if test ! -x "$BOOT_JDK/bin/javac"; then
22006          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22008          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22009$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22010          BOOT_JDK_FOUND=no
22011        else
22012          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22013          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22014            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22015$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22016            BOOT_JDK_FOUND=no
22017          else
22018            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22019            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22020
22021            # Extra M4 quote needed to protect [] in grep expression.
22022            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22023            if test "x$FOUND_CORRECT_VERSION" = x; then
22024              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22026              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22027$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22028              BOOT_JDK_FOUND=no
22029            else
22030              # We're done! :-)
22031              BOOT_JDK_FOUND=yes
22032
22033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22034
22035  # Input might be given as Windows format, start by converting to
22036  # unix format.
22037  path="$BOOT_JDK"
22038  new_path=`$CYGPATH -u "$path"`
22039
22040  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22041  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22042  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22043  # "foo.exe" is OK but "foo" is an error.
22044  #
22045  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22046  # It is also a way to make sure we got the proper file name for the real test later on.
22047  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22048  if test "x$test_shortpath" = x; then
22049    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22050$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22051    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22052  fi
22053
22054  # Call helper function which possibly converts this using DOS-style short mode.
22055  # If so, the updated path is stored in $new_path.
22056
22057  input_path="$new_path"
22058  # Check if we need to convert this using DOS-style short mode. If the path
22059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22060  # take no chances and rewrite it.
22061  # Note: m4 eats our [], so we need to use [ and ] instead.
22062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22063  if test "x$has_forbidden_chars" != x; then
22064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22068      # Going to short mode and back again did indeed matter. Since short mode is
22069      # case insensitive, let's make it lowercase to improve readability.
22070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22071      # Now convert it back to Unix-stile (cygpath)
22072      input_path=`$CYGPATH -u "$shortmode_path"`
22073      new_path="$input_path"
22074    fi
22075  fi
22076
22077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22078  if test "x$test_cygdrive_prefix" = x; then
22079    # As a simple fix, exclude /usr/bin since it's not a real path.
22080    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22082      # a path prefixed by /cygdrive for fixpath to work.
22083      new_path="$CYGWIN_ROOT_PATH$input_path"
22084    fi
22085  fi
22086
22087
22088  if test "x$path" != "x$new_path"; then
22089    BOOT_JDK="$new_path"
22090    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22091$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22092  fi
22093
22094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22095
22096  path="$BOOT_JDK"
22097  has_colon=`$ECHO $path | $GREP ^.:`
22098  new_path="$path"
22099  if test "x$has_colon" = x; then
22100    # Not in mixed or Windows style, start by that.
22101    new_path=`cmd //c echo $path`
22102  fi
22103
22104
22105  input_path="$new_path"
22106  # Check if we need to convert this using DOS-style short mode. If the path
22107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22108  # take no chances and rewrite it.
22109  # Note: m4 eats our [], so we need to use [ and ] instead.
22110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22111  if test "x$has_forbidden_chars" != x; then
22112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22113    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22114  fi
22115
22116
22117  windows_path="$new_path"
22118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22119    unix_path=`$CYGPATH -u "$windows_path"`
22120    new_path="$unix_path"
22121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22123    new_path="$unix_path"
22124  fi
22125
22126  if test "x$path" != "x$new_path"; then
22127    BOOT_JDK="$new_path"
22128    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22129$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22130  fi
22131
22132  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22133  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22134
22135  else
22136    # We're on a posix platform. Hooray! :)
22137    path="$BOOT_JDK"
22138    has_space=`$ECHO "$path" | $GREP " "`
22139    if test "x$has_space" != x; then
22140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22141$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22142      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22143    fi
22144
22145    # Use eval to expand a potential ~
22146    eval path="$path"
22147    if test ! -f "$path" && test ! -d "$path"; then
22148      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22149    fi
22150
22151    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22152  fi
22153
22154              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22155$as_echo_n "checking for Boot JDK... " >&6; }
22156              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22157$as_echo "$BOOT_JDK" >&6; }
22158              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22159$as_echo_n "checking Boot JDK version... " >&6; }
22160              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22161              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22162$as_echo "$BOOT_JDK_VERSION" >&6; }
22163            fi # end check jdk version
22164          fi # end check rt.jar
22165        fi # end check javac
22166      fi # end check java
22167    fi # end check boot jdk found
22168  fi
22169
22170    done
22171  fi
22172
22173  fi
22174
22175
22176    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22177    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22178      # Do we have a bin/java?
22179      if test ! -x "$BOOT_JDK/bin/java"; then
22180        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22182        BOOT_JDK_FOUND=no
22183      else
22184        # Do we have a bin/javac?
22185        if test ! -x "$BOOT_JDK/bin/javac"; then
22186          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22188          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22189$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22190          BOOT_JDK_FOUND=no
22191        else
22192          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22193          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22194            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22196            BOOT_JDK_FOUND=no
22197          else
22198            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22199            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22200
22201            # Extra M4 quote needed to protect [] in grep expression.
22202            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22203            if test "x$FOUND_CORRECT_VERSION" = x; then
22204              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22206              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22207$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22208              BOOT_JDK_FOUND=no
22209            else
22210              # We're done! :-)
22211              BOOT_JDK_FOUND=yes
22212
22213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22214
22215  # Input might be given as Windows format, start by converting to
22216  # unix format.
22217  path="$BOOT_JDK"
22218  new_path=`$CYGPATH -u "$path"`
22219
22220  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22221  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22222  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22223  # "foo.exe" is OK but "foo" is an error.
22224  #
22225  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22226  # It is also a way to make sure we got the proper file name for the real test later on.
22227  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22228  if test "x$test_shortpath" = x; then
22229    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22230$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22231    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22232  fi
22233
22234  # Call helper function which possibly converts this using DOS-style short mode.
22235  # If so, the updated path is stored in $new_path.
22236
22237  input_path="$new_path"
22238  # Check if we need to convert this using DOS-style short mode. If the path
22239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22240  # take no chances and rewrite it.
22241  # Note: m4 eats our [], so we need to use [ and ] instead.
22242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22243  if test "x$has_forbidden_chars" != x; then
22244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22248      # Going to short mode and back again did indeed matter. Since short mode is
22249      # case insensitive, let's make it lowercase to improve readability.
22250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22251      # Now convert it back to Unix-stile (cygpath)
22252      input_path=`$CYGPATH -u "$shortmode_path"`
22253      new_path="$input_path"
22254    fi
22255  fi
22256
22257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22258  if test "x$test_cygdrive_prefix" = x; then
22259    # As a simple fix, exclude /usr/bin since it's not a real path.
22260    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22262      # a path prefixed by /cygdrive for fixpath to work.
22263      new_path="$CYGWIN_ROOT_PATH$input_path"
22264    fi
22265  fi
22266
22267
22268  if test "x$path" != "x$new_path"; then
22269    BOOT_JDK="$new_path"
22270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22271$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22272  fi
22273
22274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22275
22276  path="$BOOT_JDK"
22277  has_colon=`$ECHO $path | $GREP ^.:`
22278  new_path="$path"
22279  if test "x$has_colon" = x; then
22280    # Not in mixed or Windows style, start by that.
22281    new_path=`cmd //c echo $path`
22282  fi
22283
22284
22285  input_path="$new_path"
22286  # Check if we need to convert this using DOS-style short mode. If the path
22287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22288  # take no chances and rewrite it.
22289  # Note: m4 eats our [], so we need to use [ and ] instead.
22290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22291  if test "x$has_forbidden_chars" != x; then
22292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22293    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22294  fi
22295
22296
22297  windows_path="$new_path"
22298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22299    unix_path=`$CYGPATH -u "$windows_path"`
22300    new_path="$unix_path"
22301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22303    new_path="$unix_path"
22304  fi
22305
22306  if test "x$path" != "x$new_path"; then
22307    BOOT_JDK="$new_path"
22308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22309$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22310  fi
22311
22312  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22313  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22314
22315  else
22316    # We're on a posix platform. Hooray! :)
22317    path="$BOOT_JDK"
22318    has_space=`$ECHO "$path" | $GREP " "`
22319    if test "x$has_space" != x; then
22320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22321$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22322      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22323    fi
22324
22325    # Use eval to expand a potential ~
22326    eval path="$path"
22327    if test ! -f "$path" && test ! -d "$path"; then
22328      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22329    fi
22330
22331    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22332  fi
22333
22334              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22335$as_echo_n "checking for Boot JDK... " >&6; }
22336              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22337$as_echo "$BOOT_JDK" >&6; }
22338              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22339$as_echo_n "checking Boot JDK version... " >&6; }
22340              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22341              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22342$as_echo "$BOOT_JDK_VERSION" >&6; }
22343            fi # end check jdk version
22344          fi # end check rt.jar
22345        fi # end check javac
22346      fi # end check java
22347    fi # end check boot jdk found
22348  fi
22349
22350
22351  if test "x$BOOT_JDK_FOUND" = xno; then
22352    # Now execute the test
22353
22354  if test "x$PROGRAMW6432" != x; then
22355    VIRTUAL_DIR="$PROGRAMW6432/Java"
22356
22357  windows_path="$VIRTUAL_DIR"
22358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22359    unix_path=`$CYGPATH -u "$windows_path"`
22360    VIRTUAL_DIR="$unix_path"
22361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22363    VIRTUAL_DIR="$unix_path"
22364  fi
22365
22366
22367  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22368  BOOT_JDK_SUFFIX=""
22369  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22370  if test "x$ALL_JDKS_FOUND" != x; then
22371    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22372
22373  if test "x$BOOT_JDK_FOUND" = xno; then
22374    # Now execute the test
22375
22376        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22377        if test -d "$BOOT_JDK"; then
22378          BOOT_JDK_FOUND=maybe
22379          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22380$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22381        fi
22382
22383
22384    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22385    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22386      # Do we have a bin/java?
22387      if test ! -x "$BOOT_JDK/bin/java"; then
22388        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22390        BOOT_JDK_FOUND=no
22391      else
22392        # Do we have a bin/javac?
22393        if test ! -x "$BOOT_JDK/bin/javac"; then
22394          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22396          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22397$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22398          BOOT_JDK_FOUND=no
22399        else
22400          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22401          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22402            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22404            BOOT_JDK_FOUND=no
22405          else
22406            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22407            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22408
22409            # Extra M4 quote needed to protect [] in grep expression.
22410            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22411            if test "x$FOUND_CORRECT_VERSION" = x; then
22412              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22414              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22415$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22416              BOOT_JDK_FOUND=no
22417            else
22418              # We're done! :-)
22419              BOOT_JDK_FOUND=yes
22420
22421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22422
22423  # Input might be given as Windows format, start by converting to
22424  # unix format.
22425  path="$BOOT_JDK"
22426  new_path=`$CYGPATH -u "$path"`
22427
22428  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22429  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22430  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22431  # "foo.exe" is OK but "foo" is an error.
22432  #
22433  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22434  # It is also a way to make sure we got the proper file name for the real test later on.
22435  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22436  if test "x$test_shortpath" = x; then
22437    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22438$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22439    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22440  fi
22441
22442  # Call helper function which possibly converts this using DOS-style short mode.
22443  # If so, the updated path is stored in $new_path.
22444
22445  input_path="$new_path"
22446  # Check if we need to convert this using DOS-style short mode. If the path
22447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22448  # take no chances and rewrite it.
22449  # Note: m4 eats our [], so we need to use [ and ] instead.
22450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22451  if test "x$has_forbidden_chars" != x; then
22452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22456      # Going to short mode and back again did indeed matter. Since short mode is
22457      # case insensitive, let's make it lowercase to improve readability.
22458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22459      # Now convert it back to Unix-stile (cygpath)
22460      input_path=`$CYGPATH -u "$shortmode_path"`
22461      new_path="$input_path"
22462    fi
22463  fi
22464
22465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22466  if test "x$test_cygdrive_prefix" = x; then
22467    # As a simple fix, exclude /usr/bin since it's not a real path.
22468    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22470      # a path prefixed by /cygdrive for fixpath to work.
22471      new_path="$CYGWIN_ROOT_PATH$input_path"
22472    fi
22473  fi
22474
22475
22476  if test "x$path" != "x$new_path"; then
22477    BOOT_JDK="$new_path"
22478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22479$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22480  fi
22481
22482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22483
22484  path="$BOOT_JDK"
22485  has_colon=`$ECHO $path | $GREP ^.:`
22486  new_path="$path"
22487  if test "x$has_colon" = x; then
22488    # Not in mixed or Windows style, start by that.
22489    new_path=`cmd //c echo $path`
22490  fi
22491
22492
22493  input_path="$new_path"
22494  # Check if we need to convert this using DOS-style short mode. If the path
22495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22496  # take no chances and rewrite it.
22497  # Note: m4 eats our [], so we need to use [ and ] instead.
22498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22499  if test "x$has_forbidden_chars" != x; then
22500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22502  fi
22503
22504
22505  windows_path="$new_path"
22506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22507    unix_path=`$CYGPATH -u "$windows_path"`
22508    new_path="$unix_path"
22509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22511    new_path="$unix_path"
22512  fi
22513
22514  if test "x$path" != "x$new_path"; then
22515    BOOT_JDK="$new_path"
22516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22517$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22518  fi
22519
22520  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22521  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22522
22523  else
22524    # We're on a posix platform. Hooray! :)
22525    path="$BOOT_JDK"
22526    has_space=`$ECHO "$path" | $GREP " "`
22527    if test "x$has_space" != x; then
22528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22529$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22530      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22531    fi
22532
22533    # Use eval to expand a potential ~
22534    eval path="$path"
22535    if test ! -f "$path" && test ! -d "$path"; then
22536      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22537    fi
22538
22539    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22540  fi
22541
22542              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22543$as_echo_n "checking for Boot JDK... " >&6; }
22544              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22545$as_echo "$BOOT_JDK" >&6; }
22546              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22547$as_echo_n "checking Boot JDK version... " >&6; }
22548              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22549              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22550$as_echo "$BOOT_JDK_VERSION" >&6; }
22551            fi # end check jdk version
22552          fi # end check rt.jar
22553        fi # end check javac
22554      fi # end check java
22555    fi # end check boot jdk found
22556  fi
22557
22558    done
22559  fi
22560
22561  fi
22562
22563
22564    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22565    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22566      # Do we have a bin/java?
22567      if test ! -x "$BOOT_JDK/bin/java"; then
22568        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22570        BOOT_JDK_FOUND=no
22571      else
22572        # Do we have a bin/javac?
22573        if test ! -x "$BOOT_JDK/bin/javac"; then
22574          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22575$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22576          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22577$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22578          BOOT_JDK_FOUND=no
22579        else
22580          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22581          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22582            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22583$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22584            BOOT_JDK_FOUND=no
22585          else
22586            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22587            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22588
22589            # Extra M4 quote needed to protect [] in grep expression.
22590            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22591            if test "x$FOUND_CORRECT_VERSION" = x; then
22592              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22594              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22595$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22596              BOOT_JDK_FOUND=no
22597            else
22598              # We're done! :-)
22599              BOOT_JDK_FOUND=yes
22600
22601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22602
22603  # Input might be given as Windows format, start by converting to
22604  # unix format.
22605  path="$BOOT_JDK"
22606  new_path=`$CYGPATH -u "$path"`
22607
22608  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22609  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22610  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22611  # "foo.exe" is OK but "foo" is an error.
22612  #
22613  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22614  # It is also a way to make sure we got the proper file name for the real test later on.
22615  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22616  if test "x$test_shortpath" = x; then
22617    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22618$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22619    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22620  fi
22621
22622  # Call helper function which possibly converts this using DOS-style short mode.
22623  # If so, the updated path is stored in $new_path.
22624
22625  input_path="$new_path"
22626  # Check if we need to convert this using DOS-style short mode. If the path
22627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22628  # take no chances and rewrite it.
22629  # Note: m4 eats our [], so we need to use [ and ] instead.
22630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22631  if test "x$has_forbidden_chars" != x; then
22632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22633    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22634    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22635    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22636      # Going to short mode and back again did indeed matter. Since short mode is
22637      # case insensitive, let's make it lowercase to improve readability.
22638      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22639      # Now convert it back to Unix-stile (cygpath)
22640      input_path=`$CYGPATH -u "$shortmode_path"`
22641      new_path="$input_path"
22642    fi
22643  fi
22644
22645  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22646  if test "x$test_cygdrive_prefix" = x; then
22647    # As a simple fix, exclude /usr/bin since it's not a real path.
22648    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22649      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22650      # a path prefixed by /cygdrive for fixpath to work.
22651      new_path="$CYGWIN_ROOT_PATH$input_path"
22652    fi
22653  fi
22654
22655
22656  if test "x$path" != "x$new_path"; then
22657    BOOT_JDK="$new_path"
22658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22659$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22660  fi
22661
22662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22663
22664  path="$BOOT_JDK"
22665  has_colon=`$ECHO $path | $GREP ^.:`
22666  new_path="$path"
22667  if test "x$has_colon" = x; then
22668    # Not in mixed or Windows style, start by that.
22669    new_path=`cmd //c echo $path`
22670  fi
22671
22672
22673  input_path="$new_path"
22674  # Check if we need to convert this using DOS-style short mode. If the path
22675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22676  # take no chances and rewrite it.
22677  # Note: m4 eats our [], so we need to use [ and ] instead.
22678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22679  if test "x$has_forbidden_chars" != x; then
22680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22682  fi
22683
22684
22685  windows_path="$new_path"
22686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22687    unix_path=`$CYGPATH -u "$windows_path"`
22688    new_path="$unix_path"
22689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22691    new_path="$unix_path"
22692  fi
22693
22694  if test "x$path" != "x$new_path"; then
22695    BOOT_JDK="$new_path"
22696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22697$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22698  fi
22699
22700  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22701  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22702
22703  else
22704    # We're on a posix platform. Hooray! :)
22705    path="$BOOT_JDK"
22706    has_space=`$ECHO "$path" | $GREP " "`
22707    if test "x$has_space" != x; then
22708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22709$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22710      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22711    fi
22712
22713    # Use eval to expand a potential ~
22714    eval path="$path"
22715    if test ! -f "$path" && test ! -d "$path"; then
22716      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22717    fi
22718
22719    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22720  fi
22721
22722              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22723$as_echo_n "checking for Boot JDK... " >&6; }
22724              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22725$as_echo "$BOOT_JDK" >&6; }
22726              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22727$as_echo_n "checking Boot JDK version... " >&6; }
22728              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22729              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22730$as_echo "$BOOT_JDK_VERSION" >&6; }
22731            fi # end check jdk version
22732          fi # end check rt.jar
22733        fi # end check javac
22734      fi # end check java
22735    fi # end check boot jdk found
22736  fi
22737
22738
22739  if test "x$BOOT_JDK_FOUND" = xno; then
22740    # Now execute the test
22741
22742  if test "x$PROGRAMFILES" != x; then
22743    VIRTUAL_DIR="$PROGRAMFILES/Java"
22744
22745  windows_path="$VIRTUAL_DIR"
22746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22747    unix_path=`$CYGPATH -u "$windows_path"`
22748    VIRTUAL_DIR="$unix_path"
22749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22751    VIRTUAL_DIR="$unix_path"
22752  fi
22753
22754
22755  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22756  BOOT_JDK_SUFFIX=""
22757  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22758  if test "x$ALL_JDKS_FOUND" != x; then
22759    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22760
22761  if test "x$BOOT_JDK_FOUND" = xno; then
22762    # Now execute the test
22763
22764        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22765        if test -d "$BOOT_JDK"; then
22766          BOOT_JDK_FOUND=maybe
22767          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22768$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22769        fi
22770
22771
22772    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22773    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22774      # Do we have a bin/java?
22775      if test ! -x "$BOOT_JDK/bin/java"; then
22776        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22778        BOOT_JDK_FOUND=no
22779      else
22780        # Do we have a bin/javac?
22781        if test ! -x "$BOOT_JDK/bin/javac"; then
22782          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22784          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22785$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22786          BOOT_JDK_FOUND=no
22787        else
22788          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22789          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22790            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22792            BOOT_JDK_FOUND=no
22793          else
22794            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22795            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22796
22797            # Extra M4 quote needed to protect [] in grep expression.
22798            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22799            if test "x$FOUND_CORRECT_VERSION" = x; then
22800              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22802              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22803$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22804              BOOT_JDK_FOUND=no
22805            else
22806              # We're done! :-)
22807              BOOT_JDK_FOUND=yes
22808
22809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22810
22811  # Input might be given as Windows format, start by converting to
22812  # unix format.
22813  path="$BOOT_JDK"
22814  new_path=`$CYGPATH -u "$path"`
22815
22816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22819  # "foo.exe" is OK but "foo" is an error.
22820  #
22821  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22822  # It is also a way to make sure we got the proper file name for the real test later on.
22823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22824  if test "x$test_shortpath" = x; then
22825    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22826$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22827    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22828  fi
22829
22830  # Call helper function which possibly converts this using DOS-style short mode.
22831  # If so, the updated path is stored in $new_path.
22832
22833  input_path="$new_path"
22834  # Check if we need to convert this using DOS-style short mode. If the path
22835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22836  # take no chances and rewrite it.
22837  # Note: m4 eats our [], so we need to use [ and ] instead.
22838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22839  if test "x$has_forbidden_chars" != x; then
22840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22844      # Going to short mode and back again did indeed matter. Since short mode is
22845      # case insensitive, let's make it lowercase to improve readability.
22846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22847      # Now convert it back to Unix-stile (cygpath)
22848      input_path=`$CYGPATH -u "$shortmode_path"`
22849      new_path="$input_path"
22850    fi
22851  fi
22852
22853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22854  if test "x$test_cygdrive_prefix" = x; then
22855    # As a simple fix, exclude /usr/bin since it's not a real path.
22856    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22858      # a path prefixed by /cygdrive for fixpath to work.
22859      new_path="$CYGWIN_ROOT_PATH$input_path"
22860    fi
22861  fi
22862
22863
22864  if test "x$path" != "x$new_path"; then
22865    BOOT_JDK="$new_path"
22866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22867$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22868  fi
22869
22870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22871
22872  path="$BOOT_JDK"
22873  has_colon=`$ECHO $path | $GREP ^.:`
22874  new_path="$path"
22875  if test "x$has_colon" = x; then
22876    # Not in mixed or Windows style, start by that.
22877    new_path=`cmd //c echo $path`
22878  fi
22879
22880
22881  input_path="$new_path"
22882  # Check if we need to convert this using DOS-style short mode. If the path
22883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22884  # take no chances and rewrite it.
22885  # Note: m4 eats our [], so we need to use [ and ] instead.
22886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22887  if test "x$has_forbidden_chars" != x; then
22888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22890  fi
22891
22892
22893  windows_path="$new_path"
22894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22895    unix_path=`$CYGPATH -u "$windows_path"`
22896    new_path="$unix_path"
22897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22899    new_path="$unix_path"
22900  fi
22901
22902  if test "x$path" != "x$new_path"; then
22903    BOOT_JDK="$new_path"
22904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22905$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22906  fi
22907
22908  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22909  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22910
22911  else
22912    # We're on a posix platform. Hooray! :)
22913    path="$BOOT_JDK"
22914    has_space=`$ECHO "$path" | $GREP " "`
22915    if test "x$has_space" != x; then
22916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22917$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22918      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22919    fi
22920
22921    # Use eval to expand a potential ~
22922    eval path="$path"
22923    if test ! -f "$path" && test ! -d "$path"; then
22924      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22925    fi
22926
22927    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22928  fi
22929
22930              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22931$as_echo_n "checking for Boot JDK... " >&6; }
22932              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22933$as_echo "$BOOT_JDK" >&6; }
22934              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22935$as_echo_n "checking Boot JDK version... " >&6; }
22936              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22937              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22938$as_echo "$BOOT_JDK_VERSION" >&6; }
22939            fi # end check jdk version
22940          fi # end check rt.jar
22941        fi # end check javac
22942      fi # end check java
22943    fi # end check boot jdk found
22944  fi
22945
22946    done
22947  fi
22948
22949  fi
22950
22951
22952    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22953    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22954      # Do we have a bin/java?
22955      if test ! -x "$BOOT_JDK/bin/java"; then
22956        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22958        BOOT_JDK_FOUND=no
22959      else
22960        # Do we have a bin/javac?
22961        if test ! -x "$BOOT_JDK/bin/javac"; then
22962          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22964          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22965$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22966          BOOT_JDK_FOUND=no
22967        else
22968          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22969          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22970            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22972            BOOT_JDK_FOUND=no
22973          else
22974            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22975            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22976
22977            # Extra M4 quote needed to protect [] in grep expression.
22978            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22979            if test "x$FOUND_CORRECT_VERSION" = x; then
22980              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22982              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22983$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22984              BOOT_JDK_FOUND=no
22985            else
22986              # We're done! :-)
22987              BOOT_JDK_FOUND=yes
22988
22989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22990
22991  # Input might be given as Windows format, start by converting to
22992  # unix format.
22993  path="$BOOT_JDK"
22994  new_path=`$CYGPATH -u "$path"`
22995
22996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22999  # "foo.exe" is OK but "foo" is an error.
23000  #
23001  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23002  # It is also a way to make sure we got the proper file name for the real test later on.
23003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23004  if test "x$test_shortpath" = x; then
23005    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23006$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23007    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23008  fi
23009
23010  # Call helper function which possibly converts this using DOS-style short mode.
23011  # If so, the updated path is stored in $new_path.
23012
23013  input_path="$new_path"
23014  # Check if we need to convert this using DOS-style short mode. If the path
23015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23016  # take no chances and rewrite it.
23017  # Note: m4 eats our [], so we need to use [ and ] instead.
23018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23019  if test "x$has_forbidden_chars" != x; then
23020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23024      # Going to short mode and back again did indeed matter. Since short mode is
23025      # case insensitive, let's make it lowercase to improve readability.
23026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23027      # Now convert it back to Unix-stile (cygpath)
23028      input_path=`$CYGPATH -u "$shortmode_path"`
23029      new_path="$input_path"
23030    fi
23031  fi
23032
23033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23034  if test "x$test_cygdrive_prefix" = x; then
23035    # As a simple fix, exclude /usr/bin since it's not a real path.
23036    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23038      # a path prefixed by /cygdrive for fixpath to work.
23039      new_path="$CYGWIN_ROOT_PATH$input_path"
23040    fi
23041  fi
23042
23043
23044  if test "x$path" != "x$new_path"; then
23045    BOOT_JDK="$new_path"
23046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23047$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23048  fi
23049
23050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23051
23052  path="$BOOT_JDK"
23053  has_colon=`$ECHO $path | $GREP ^.:`
23054  new_path="$path"
23055  if test "x$has_colon" = x; then
23056    # Not in mixed or Windows style, start by that.
23057    new_path=`cmd //c echo $path`
23058  fi
23059
23060
23061  input_path="$new_path"
23062  # Check if we need to convert this using DOS-style short mode. If the path
23063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23064  # take no chances and rewrite it.
23065  # Note: m4 eats our [], so we need to use [ and ] instead.
23066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23067  if test "x$has_forbidden_chars" != x; then
23068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23069    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23070  fi
23071
23072
23073  windows_path="$new_path"
23074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23075    unix_path=`$CYGPATH -u "$windows_path"`
23076    new_path="$unix_path"
23077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23079    new_path="$unix_path"
23080  fi
23081
23082  if test "x$path" != "x$new_path"; then
23083    BOOT_JDK="$new_path"
23084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23085$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23086  fi
23087
23088  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23089  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23090
23091  else
23092    # We're on a posix platform. Hooray! :)
23093    path="$BOOT_JDK"
23094    has_space=`$ECHO "$path" | $GREP " "`
23095    if test "x$has_space" != x; then
23096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23097$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23098      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23099    fi
23100
23101    # Use eval to expand a potential ~
23102    eval path="$path"
23103    if test ! -f "$path" && test ! -d "$path"; then
23104      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23105    fi
23106
23107    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23108  fi
23109
23110              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23111$as_echo_n "checking for Boot JDK... " >&6; }
23112              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23113$as_echo "$BOOT_JDK" >&6; }
23114              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23115$as_echo_n "checking Boot JDK version... " >&6; }
23116              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23117              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23118$as_echo "$BOOT_JDK_VERSION" >&6; }
23119            fi # end check jdk version
23120          fi # end check rt.jar
23121        fi # end check javac
23122      fi # end check java
23123    fi # end check boot jdk found
23124  fi
23125
23126
23127  if test "x$BOOT_JDK_FOUND" = xno; then
23128    # Now execute the test
23129
23130  if test "x$ProgramFiles" != x; then
23131    VIRTUAL_DIR="$ProgramFiles/Java"
23132
23133  windows_path="$VIRTUAL_DIR"
23134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23135    unix_path=`$CYGPATH -u "$windows_path"`
23136    VIRTUAL_DIR="$unix_path"
23137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23139    VIRTUAL_DIR="$unix_path"
23140  fi
23141
23142
23143  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23144  BOOT_JDK_SUFFIX=""
23145  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23146  if test "x$ALL_JDKS_FOUND" != x; then
23147    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23148
23149  if test "x$BOOT_JDK_FOUND" = xno; then
23150    # Now execute the test
23151
23152        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23153        if test -d "$BOOT_JDK"; then
23154          BOOT_JDK_FOUND=maybe
23155          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23156$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23157        fi
23158
23159
23160    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23161    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23162      # Do we have a bin/java?
23163      if test ! -x "$BOOT_JDK/bin/java"; then
23164        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23166        BOOT_JDK_FOUND=no
23167      else
23168        # Do we have a bin/javac?
23169        if test ! -x "$BOOT_JDK/bin/javac"; then
23170          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23172          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23173$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23174          BOOT_JDK_FOUND=no
23175        else
23176          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23177          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23178            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23180            BOOT_JDK_FOUND=no
23181          else
23182            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23183            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23184
23185            # Extra M4 quote needed to protect [] in grep expression.
23186            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23187            if test "x$FOUND_CORRECT_VERSION" = x; then
23188              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23190              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23191$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23192              BOOT_JDK_FOUND=no
23193            else
23194              # We're done! :-)
23195              BOOT_JDK_FOUND=yes
23196
23197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23198
23199  # Input might be given as Windows format, start by converting to
23200  # unix format.
23201  path="$BOOT_JDK"
23202  new_path=`$CYGPATH -u "$path"`
23203
23204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23207  # "foo.exe" is OK but "foo" is an error.
23208  #
23209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23210  # It is also a way to make sure we got the proper file name for the real test later on.
23211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23212  if test "x$test_shortpath" = x; then
23213    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23214$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23215    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23216  fi
23217
23218  # Call helper function which possibly converts this using DOS-style short mode.
23219  # If so, the updated path is stored in $new_path.
23220
23221  input_path="$new_path"
23222  # Check if we need to convert this using DOS-style short mode. If the path
23223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23224  # take no chances and rewrite it.
23225  # Note: m4 eats our [], so we need to use [ and ] instead.
23226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23227  if test "x$has_forbidden_chars" != x; then
23228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23232      # Going to short mode and back again did indeed matter. Since short mode is
23233      # case insensitive, let's make it lowercase to improve readability.
23234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23235      # Now convert it back to Unix-stile (cygpath)
23236      input_path=`$CYGPATH -u "$shortmode_path"`
23237      new_path="$input_path"
23238    fi
23239  fi
23240
23241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23242  if test "x$test_cygdrive_prefix" = x; then
23243    # As a simple fix, exclude /usr/bin since it's not a real path.
23244    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23246      # a path prefixed by /cygdrive for fixpath to work.
23247      new_path="$CYGWIN_ROOT_PATH$input_path"
23248    fi
23249  fi
23250
23251
23252  if test "x$path" != "x$new_path"; then
23253    BOOT_JDK="$new_path"
23254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23255$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23256  fi
23257
23258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23259
23260  path="$BOOT_JDK"
23261  has_colon=`$ECHO $path | $GREP ^.:`
23262  new_path="$path"
23263  if test "x$has_colon" = x; then
23264    # Not in mixed or Windows style, start by that.
23265    new_path=`cmd //c echo $path`
23266  fi
23267
23268
23269  input_path="$new_path"
23270  # Check if we need to convert this using DOS-style short mode. If the path
23271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23272  # take no chances and rewrite it.
23273  # Note: m4 eats our [], so we need to use [ and ] instead.
23274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23275  if test "x$has_forbidden_chars" != x; then
23276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23278  fi
23279
23280
23281  windows_path="$new_path"
23282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23283    unix_path=`$CYGPATH -u "$windows_path"`
23284    new_path="$unix_path"
23285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23287    new_path="$unix_path"
23288  fi
23289
23290  if test "x$path" != "x$new_path"; then
23291    BOOT_JDK="$new_path"
23292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23293$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23294  fi
23295
23296  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23297  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23298
23299  else
23300    # We're on a posix platform. Hooray! :)
23301    path="$BOOT_JDK"
23302    has_space=`$ECHO "$path" | $GREP " "`
23303    if test "x$has_space" != x; then
23304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23305$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23306      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23307    fi
23308
23309    # Use eval to expand a potential ~
23310    eval path="$path"
23311    if test ! -f "$path" && test ! -d "$path"; then
23312      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23313    fi
23314
23315    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23316  fi
23317
23318              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23319$as_echo_n "checking for Boot JDK... " >&6; }
23320              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23321$as_echo "$BOOT_JDK" >&6; }
23322              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23323$as_echo_n "checking Boot JDK version... " >&6; }
23324              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23325              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23326$as_echo "$BOOT_JDK_VERSION" >&6; }
23327            fi # end check jdk version
23328          fi # end check rt.jar
23329        fi # end check javac
23330      fi # end check java
23331    fi # end check boot jdk found
23332  fi
23333
23334    done
23335  fi
23336
23337  fi
23338
23339
23340    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23341    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23342      # Do we have a bin/java?
23343      if test ! -x "$BOOT_JDK/bin/java"; then
23344        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23345$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23346        BOOT_JDK_FOUND=no
23347      else
23348        # Do we have a bin/javac?
23349        if test ! -x "$BOOT_JDK/bin/javac"; then
23350          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23352          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23353$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23354          BOOT_JDK_FOUND=no
23355        else
23356          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23357          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23358            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23360            BOOT_JDK_FOUND=no
23361          else
23362            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23363            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23364
23365            # Extra M4 quote needed to protect [] in grep expression.
23366            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23367            if test "x$FOUND_CORRECT_VERSION" = x; then
23368              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23370              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23371$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23372              BOOT_JDK_FOUND=no
23373            else
23374              # We're done! :-)
23375              BOOT_JDK_FOUND=yes
23376
23377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23378
23379  # Input might be given as Windows format, start by converting to
23380  # unix format.
23381  path="$BOOT_JDK"
23382  new_path=`$CYGPATH -u "$path"`
23383
23384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23387  # "foo.exe" is OK but "foo" is an error.
23388  #
23389  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23390  # It is also a way to make sure we got the proper file name for the real test later on.
23391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23392  if test "x$test_shortpath" = x; then
23393    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23394$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23395    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23396  fi
23397
23398  # Call helper function which possibly converts this using DOS-style short mode.
23399  # If so, the updated path is stored in $new_path.
23400
23401  input_path="$new_path"
23402  # Check if we need to convert this using DOS-style short mode. If the path
23403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23404  # take no chances and rewrite it.
23405  # Note: m4 eats our [], so we need to use [ and ] instead.
23406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23407  if test "x$has_forbidden_chars" != x; then
23408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23412      # Going to short mode and back again did indeed matter. Since short mode is
23413      # case insensitive, let's make it lowercase to improve readability.
23414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23415      # Now convert it back to Unix-stile (cygpath)
23416      input_path=`$CYGPATH -u "$shortmode_path"`
23417      new_path="$input_path"
23418    fi
23419  fi
23420
23421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23422  if test "x$test_cygdrive_prefix" = x; then
23423    # As a simple fix, exclude /usr/bin since it's not a real path.
23424    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23426      # a path prefixed by /cygdrive for fixpath to work.
23427      new_path="$CYGWIN_ROOT_PATH$input_path"
23428    fi
23429  fi
23430
23431
23432  if test "x$path" != "x$new_path"; then
23433    BOOT_JDK="$new_path"
23434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23436  fi
23437
23438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23439
23440  path="$BOOT_JDK"
23441  has_colon=`$ECHO $path | $GREP ^.:`
23442  new_path="$path"
23443  if test "x$has_colon" = x; then
23444    # Not in mixed or Windows style, start by that.
23445    new_path=`cmd //c echo $path`
23446  fi
23447
23448
23449  input_path="$new_path"
23450  # Check if we need to convert this using DOS-style short mode. If the path
23451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23452  # take no chances and rewrite it.
23453  # Note: m4 eats our [], so we need to use [ and ] instead.
23454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23455  if test "x$has_forbidden_chars" != x; then
23456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23458  fi
23459
23460
23461  windows_path="$new_path"
23462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23463    unix_path=`$CYGPATH -u "$windows_path"`
23464    new_path="$unix_path"
23465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23467    new_path="$unix_path"
23468  fi
23469
23470  if test "x$path" != "x$new_path"; then
23471    BOOT_JDK="$new_path"
23472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23473$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23474  fi
23475
23476  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23477  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23478
23479  else
23480    # We're on a posix platform. Hooray! :)
23481    path="$BOOT_JDK"
23482    has_space=`$ECHO "$path" | $GREP " "`
23483    if test "x$has_space" != x; then
23484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23485$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23486      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23487    fi
23488
23489    # Use eval to expand a potential ~
23490    eval path="$path"
23491    if test ! -f "$path" && test ! -d "$path"; then
23492      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23493    fi
23494
23495    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23496  fi
23497
23498              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23499$as_echo_n "checking for Boot JDK... " >&6; }
23500              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23501$as_echo "$BOOT_JDK" >&6; }
23502              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23503$as_echo_n "checking Boot JDK version... " >&6; }
23504              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23505              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23506$as_echo "$BOOT_JDK_VERSION" >&6; }
23507            fi # end check jdk version
23508          fi # end check rt.jar
23509        fi # end check javac
23510      fi # end check java
23511    fi # end check boot jdk found
23512  fi
23513
23514
23515  if test "x$BOOT_JDK_FOUND" = xno; then
23516    # Now execute the test
23517
23518  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23519  BOOT_JDK_SUFFIX=""
23520  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23521  if test "x$ALL_JDKS_FOUND" != x; then
23522    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23523
23524  if test "x$BOOT_JDK_FOUND" = xno; then
23525    # Now execute the test
23526
23527        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23528        if test -d "$BOOT_JDK"; then
23529          BOOT_JDK_FOUND=maybe
23530          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23531$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23532        fi
23533
23534
23535    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23536    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23537      # Do we have a bin/java?
23538      if test ! -x "$BOOT_JDK/bin/java"; then
23539        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23541        BOOT_JDK_FOUND=no
23542      else
23543        # Do we have a bin/javac?
23544        if test ! -x "$BOOT_JDK/bin/javac"; then
23545          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23547          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23548$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23549          BOOT_JDK_FOUND=no
23550        else
23551          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23552          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23553            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23555            BOOT_JDK_FOUND=no
23556          else
23557            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23558            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23559
23560            # Extra M4 quote needed to protect [] in grep expression.
23561            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23562            if test "x$FOUND_CORRECT_VERSION" = x; then
23563              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23565              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23566$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23567              BOOT_JDK_FOUND=no
23568            else
23569              # We're done! :-)
23570              BOOT_JDK_FOUND=yes
23571
23572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23573
23574  # Input might be given as Windows format, start by converting to
23575  # unix format.
23576  path="$BOOT_JDK"
23577  new_path=`$CYGPATH -u "$path"`
23578
23579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23582  # "foo.exe" is OK but "foo" is an error.
23583  #
23584  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23585  # It is also a way to make sure we got the proper file name for the real test later on.
23586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23587  if test "x$test_shortpath" = x; then
23588    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23589$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23590    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23591  fi
23592
23593  # Call helper function which possibly converts this using DOS-style short mode.
23594  # If so, the updated path is stored in $new_path.
23595
23596  input_path="$new_path"
23597  # Check if we need to convert this using DOS-style short mode. If the path
23598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23599  # take no chances and rewrite it.
23600  # Note: m4 eats our [], so we need to use [ and ] instead.
23601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23602  if test "x$has_forbidden_chars" != x; then
23603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23607      # Going to short mode and back again did indeed matter. Since short mode is
23608      # case insensitive, let's make it lowercase to improve readability.
23609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23610      # Now convert it back to Unix-stile (cygpath)
23611      input_path=`$CYGPATH -u "$shortmode_path"`
23612      new_path="$input_path"
23613    fi
23614  fi
23615
23616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23617  if test "x$test_cygdrive_prefix" = x; then
23618    # As a simple fix, exclude /usr/bin since it's not a real path.
23619    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23621      # a path prefixed by /cygdrive for fixpath to work.
23622      new_path="$CYGWIN_ROOT_PATH$input_path"
23623    fi
23624  fi
23625
23626
23627  if test "x$path" != "x$new_path"; then
23628    BOOT_JDK="$new_path"
23629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23630$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23631  fi
23632
23633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23634
23635  path="$BOOT_JDK"
23636  has_colon=`$ECHO $path | $GREP ^.:`
23637  new_path="$path"
23638  if test "x$has_colon" = x; then
23639    # Not in mixed or Windows style, start by that.
23640    new_path=`cmd //c echo $path`
23641  fi
23642
23643
23644  input_path="$new_path"
23645  # Check if we need to convert this using DOS-style short mode. If the path
23646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23647  # take no chances and rewrite it.
23648  # Note: m4 eats our [], so we need to use [ and ] instead.
23649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23650  if test "x$has_forbidden_chars" != x; then
23651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23653  fi
23654
23655
23656  windows_path="$new_path"
23657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23658    unix_path=`$CYGPATH -u "$windows_path"`
23659    new_path="$unix_path"
23660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23662    new_path="$unix_path"
23663  fi
23664
23665  if test "x$path" != "x$new_path"; then
23666    BOOT_JDK="$new_path"
23667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23668$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23669  fi
23670
23671  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23672  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23673
23674  else
23675    # We're on a posix platform. Hooray! :)
23676    path="$BOOT_JDK"
23677    has_space=`$ECHO "$path" | $GREP " "`
23678    if test "x$has_space" != x; then
23679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23680$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23681      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23682    fi
23683
23684    # Use eval to expand a potential ~
23685    eval path="$path"
23686    if test ! -f "$path" && test ! -d "$path"; then
23687      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23688    fi
23689
23690    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23691  fi
23692
23693              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23694$as_echo_n "checking for Boot JDK... " >&6; }
23695              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23696$as_echo "$BOOT_JDK" >&6; }
23697              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23698$as_echo_n "checking Boot JDK version... " >&6; }
23699              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23700              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23701$as_echo "$BOOT_JDK_VERSION" >&6; }
23702            fi # end check jdk version
23703          fi # end check rt.jar
23704        fi # end check javac
23705      fi # end check java
23706    fi # end check boot jdk found
23707  fi
23708
23709    done
23710  fi
23711
23712
23713    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23714    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23715      # Do we have a bin/java?
23716      if test ! -x "$BOOT_JDK/bin/java"; then
23717        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23719        BOOT_JDK_FOUND=no
23720      else
23721        # Do we have a bin/javac?
23722        if test ! -x "$BOOT_JDK/bin/javac"; then
23723          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23724$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23725          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23726$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23727          BOOT_JDK_FOUND=no
23728        else
23729          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23730          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23731            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23733            BOOT_JDK_FOUND=no
23734          else
23735            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23736            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23737
23738            # Extra M4 quote needed to protect [] in grep expression.
23739            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23740            if test "x$FOUND_CORRECT_VERSION" = x; then
23741              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23743              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23744$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23745              BOOT_JDK_FOUND=no
23746            else
23747              # We're done! :-)
23748              BOOT_JDK_FOUND=yes
23749
23750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23751
23752  # Input might be given as Windows format, start by converting to
23753  # unix format.
23754  path="$BOOT_JDK"
23755  new_path=`$CYGPATH -u "$path"`
23756
23757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23760  # "foo.exe" is OK but "foo" is an error.
23761  #
23762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23763  # It is also a way to make sure we got the proper file name for the real test later on.
23764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23765  if test "x$test_shortpath" = x; then
23766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23767$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23768    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23769  fi
23770
23771  # Call helper function which possibly converts this using DOS-style short mode.
23772  # If so, the updated path is stored in $new_path.
23773
23774  input_path="$new_path"
23775  # Check if we need to convert this using DOS-style short mode. If the path
23776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23777  # take no chances and rewrite it.
23778  # Note: m4 eats our [], so we need to use [ and ] instead.
23779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23780  if test "x$has_forbidden_chars" != x; then
23781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23785      # Going to short mode and back again did indeed matter. Since short mode is
23786      # case insensitive, let's make it lowercase to improve readability.
23787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23788      # Now convert it back to Unix-stile (cygpath)
23789      input_path=`$CYGPATH -u "$shortmode_path"`
23790      new_path="$input_path"
23791    fi
23792  fi
23793
23794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23795  if test "x$test_cygdrive_prefix" = x; then
23796    # As a simple fix, exclude /usr/bin since it's not a real path.
23797    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23799      # a path prefixed by /cygdrive for fixpath to work.
23800      new_path="$CYGWIN_ROOT_PATH$input_path"
23801    fi
23802  fi
23803
23804
23805  if test "x$path" != "x$new_path"; then
23806    BOOT_JDK="$new_path"
23807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23808$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23809  fi
23810
23811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23812
23813  path="$BOOT_JDK"
23814  has_colon=`$ECHO $path | $GREP ^.:`
23815  new_path="$path"
23816  if test "x$has_colon" = x; then
23817    # Not in mixed or Windows style, start by that.
23818    new_path=`cmd //c echo $path`
23819  fi
23820
23821
23822  input_path="$new_path"
23823  # Check if we need to convert this using DOS-style short mode. If the path
23824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23825  # take no chances and rewrite it.
23826  # Note: m4 eats our [], so we need to use [ and ] instead.
23827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23828  if test "x$has_forbidden_chars" != x; then
23829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23831  fi
23832
23833
23834  windows_path="$new_path"
23835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23836    unix_path=`$CYGPATH -u "$windows_path"`
23837    new_path="$unix_path"
23838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23840    new_path="$unix_path"
23841  fi
23842
23843  if test "x$path" != "x$new_path"; then
23844    BOOT_JDK="$new_path"
23845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23846$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23847  fi
23848
23849  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23850  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23851
23852  else
23853    # We're on a posix platform. Hooray! :)
23854    path="$BOOT_JDK"
23855    has_space=`$ECHO "$path" | $GREP " "`
23856    if test "x$has_space" != x; then
23857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23858$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23859      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23860    fi
23861
23862    # Use eval to expand a potential ~
23863    eval path="$path"
23864    if test ! -f "$path" && test ! -d "$path"; then
23865      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23866    fi
23867
23868    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23869  fi
23870
23871              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23872$as_echo_n "checking for Boot JDK... " >&6; }
23873              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23874$as_echo "$BOOT_JDK" >&6; }
23875              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23876$as_echo_n "checking Boot JDK version... " >&6; }
23877              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23878              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23879$as_echo "$BOOT_JDK_VERSION" >&6; }
23880            fi # end check jdk version
23881          fi # end check rt.jar
23882        fi # end check javac
23883      fi # end check java
23884    fi # end check boot jdk found
23885  fi
23886
23887  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23888
23889  if test "x$BOOT_JDK_FOUND" = xno; then
23890    # Now execute the test
23891
23892  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23893  BOOT_JDK_SUFFIX="/Contents/Home"
23894  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23895  if test "x$ALL_JDKS_FOUND" != x; then
23896    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23897
23898  if test "x$BOOT_JDK_FOUND" = xno; then
23899    # Now execute the test
23900
23901        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23902        if test -d "$BOOT_JDK"; then
23903          BOOT_JDK_FOUND=maybe
23904          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23905$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23906        fi
23907
23908
23909    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23910    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23911      # Do we have a bin/java?
23912      if test ! -x "$BOOT_JDK/bin/java"; then
23913        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23914$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23915        BOOT_JDK_FOUND=no
23916      else
23917        # Do we have a bin/javac?
23918        if test ! -x "$BOOT_JDK/bin/javac"; then
23919          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23920$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23921          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23922$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23923          BOOT_JDK_FOUND=no
23924        else
23925          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23926          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23927            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23929            BOOT_JDK_FOUND=no
23930          else
23931            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23932            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23933
23934            # Extra M4 quote needed to protect [] in grep expression.
23935            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23936            if test "x$FOUND_CORRECT_VERSION" = x; then
23937              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23938$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23939              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23940$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23941              BOOT_JDK_FOUND=no
23942            else
23943              # We're done! :-)
23944              BOOT_JDK_FOUND=yes
23945
23946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23947
23948  # Input might be given as Windows format, start by converting to
23949  # unix format.
23950  path="$BOOT_JDK"
23951  new_path=`$CYGPATH -u "$path"`
23952
23953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23956  # "foo.exe" is OK but "foo" is an error.
23957  #
23958  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23959  # It is also a way to make sure we got the proper file name for the real test later on.
23960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23961  if test "x$test_shortpath" = x; then
23962    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23963$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23964    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23965  fi
23966
23967  # Call helper function which possibly converts this using DOS-style short mode.
23968  # If so, the updated path is stored in $new_path.
23969
23970  input_path="$new_path"
23971  # Check if we need to convert this using DOS-style short mode. If the path
23972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23973  # take no chances and rewrite it.
23974  # Note: m4 eats our [], so we need to use [ and ] instead.
23975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23976  if test "x$has_forbidden_chars" != x; then
23977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23978    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23981      # Going to short mode and back again did indeed matter. Since short mode is
23982      # case insensitive, let's make it lowercase to improve readability.
23983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23984      # Now convert it back to Unix-stile (cygpath)
23985      input_path=`$CYGPATH -u "$shortmode_path"`
23986      new_path="$input_path"
23987    fi
23988  fi
23989
23990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23991  if test "x$test_cygdrive_prefix" = x; then
23992    # As a simple fix, exclude /usr/bin since it's not a real path.
23993    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23995      # a path prefixed by /cygdrive for fixpath to work.
23996      new_path="$CYGWIN_ROOT_PATH$input_path"
23997    fi
23998  fi
23999
24000
24001  if test "x$path" != "x$new_path"; then
24002    BOOT_JDK="$new_path"
24003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24004$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24005  fi
24006
24007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24008
24009  path="$BOOT_JDK"
24010  has_colon=`$ECHO $path | $GREP ^.:`
24011  new_path="$path"
24012  if test "x$has_colon" = x; then
24013    # Not in mixed or Windows style, start by that.
24014    new_path=`cmd //c echo $path`
24015  fi
24016
24017
24018  input_path="$new_path"
24019  # Check if we need to convert this using DOS-style short mode. If the path
24020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24021  # take no chances and rewrite it.
24022  # Note: m4 eats our [], so we need to use [ and ] instead.
24023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24024  if test "x$has_forbidden_chars" != x; then
24025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24027  fi
24028
24029
24030  windows_path="$new_path"
24031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24032    unix_path=`$CYGPATH -u "$windows_path"`
24033    new_path="$unix_path"
24034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24036    new_path="$unix_path"
24037  fi
24038
24039  if test "x$path" != "x$new_path"; then
24040    BOOT_JDK="$new_path"
24041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24042$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24043  fi
24044
24045  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24046  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24047
24048  else
24049    # We're on a posix platform. Hooray! :)
24050    path="$BOOT_JDK"
24051    has_space=`$ECHO "$path" | $GREP " "`
24052    if test "x$has_space" != x; then
24053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24054$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24055      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24056    fi
24057
24058    # Use eval to expand a potential ~
24059    eval path="$path"
24060    if test ! -f "$path" && test ! -d "$path"; then
24061      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24062    fi
24063
24064    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24065  fi
24066
24067              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24068$as_echo_n "checking for Boot JDK... " >&6; }
24069              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24070$as_echo "$BOOT_JDK" >&6; }
24071              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24072$as_echo_n "checking Boot JDK version... " >&6; }
24073              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24074              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24075$as_echo "$BOOT_JDK_VERSION" >&6; }
24076            fi # end check jdk version
24077          fi # end check rt.jar
24078        fi # end check javac
24079      fi # end check java
24080    fi # end check boot jdk found
24081  fi
24082
24083    done
24084  fi
24085
24086
24087    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24088    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24089      # Do we have a bin/java?
24090      if test ! -x "$BOOT_JDK/bin/java"; then
24091        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24093        BOOT_JDK_FOUND=no
24094      else
24095        # Do we have a bin/javac?
24096        if test ! -x "$BOOT_JDK/bin/javac"; then
24097          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24098$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24099          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24100$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24101          BOOT_JDK_FOUND=no
24102        else
24103          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24104          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24105            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24107            BOOT_JDK_FOUND=no
24108          else
24109            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24110            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24111
24112            # Extra M4 quote needed to protect [] in grep expression.
24113            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24114            if test "x$FOUND_CORRECT_VERSION" = x; then
24115              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24116$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24117              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24118$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24119              BOOT_JDK_FOUND=no
24120            else
24121              # We're done! :-)
24122              BOOT_JDK_FOUND=yes
24123
24124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24125
24126  # Input might be given as Windows format, start by converting to
24127  # unix format.
24128  path="$BOOT_JDK"
24129  new_path=`$CYGPATH -u "$path"`
24130
24131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24134  # "foo.exe" is OK but "foo" is an error.
24135  #
24136  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24137  # It is also a way to make sure we got the proper file name for the real test later on.
24138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24139  if test "x$test_shortpath" = x; then
24140    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24141$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24142    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24143  fi
24144
24145  # Call helper function which possibly converts this using DOS-style short mode.
24146  # If so, the updated path is stored in $new_path.
24147
24148  input_path="$new_path"
24149  # Check if we need to convert this using DOS-style short mode. If the path
24150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24151  # take no chances and rewrite it.
24152  # Note: m4 eats our [], so we need to use [ and ] instead.
24153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24154  if test "x$has_forbidden_chars" != x; then
24155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24159      # Going to short mode and back again did indeed matter. Since short mode is
24160      # case insensitive, let's make it lowercase to improve readability.
24161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24162      # Now convert it back to Unix-stile (cygpath)
24163      input_path=`$CYGPATH -u "$shortmode_path"`
24164      new_path="$input_path"
24165    fi
24166  fi
24167
24168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24169  if test "x$test_cygdrive_prefix" = x; then
24170    # As a simple fix, exclude /usr/bin since it's not a real path.
24171    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24173      # a path prefixed by /cygdrive for fixpath to work.
24174      new_path="$CYGWIN_ROOT_PATH$input_path"
24175    fi
24176  fi
24177
24178
24179  if test "x$path" != "x$new_path"; then
24180    BOOT_JDK="$new_path"
24181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24182$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24183  fi
24184
24185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24186
24187  path="$BOOT_JDK"
24188  has_colon=`$ECHO $path | $GREP ^.:`
24189  new_path="$path"
24190  if test "x$has_colon" = x; then
24191    # Not in mixed or Windows style, start by that.
24192    new_path=`cmd //c echo $path`
24193  fi
24194
24195
24196  input_path="$new_path"
24197  # Check if we need to convert this using DOS-style short mode. If the path
24198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24199  # take no chances and rewrite it.
24200  # Note: m4 eats our [], so we need to use [ and ] instead.
24201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24202  if test "x$has_forbidden_chars" != x; then
24203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24205  fi
24206
24207
24208  windows_path="$new_path"
24209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24210    unix_path=`$CYGPATH -u "$windows_path"`
24211    new_path="$unix_path"
24212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24214    new_path="$unix_path"
24215  fi
24216
24217  if test "x$path" != "x$new_path"; then
24218    BOOT_JDK="$new_path"
24219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24220$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24221  fi
24222
24223  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24224  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24225
24226  else
24227    # We're on a posix platform. Hooray! :)
24228    path="$BOOT_JDK"
24229    has_space=`$ECHO "$path" | $GREP " "`
24230    if test "x$has_space" != x; then
24231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24233      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24234    fi
24235
24236    # Use eval to expand a potential ~
24237    eval path="$path"
24238    if test ! -f "$path" && test ! -d "$path"; then
24239      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24240    fi
24241
24242    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24243  fi
24244
24245              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24246$as_echo_n "checking for Boot JDK... " >&6; }
24247              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24248$as_echo "$BOOT_JDK" >&6; }
24249              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24250$as_echo_n "checking Boot JDK version... " >&6; }
24251              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24252              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24253$as_echo "$BOOT_JDK_VERSION" >&6; }
24254            fi # end check jdk version
24255          fi # end check rt.jar
24256        fi # end check javac
24257      fi # end check java
24258    fi # end check boot jdk found
24259  fi
24260
24261
24262  if test "x$BOOT_JDK_FOUND" = xno; then
24263    # Now execute the test
24264
24265  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24266  BOOT_JDK_SUFFIX="/Contents/Home"
24267  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24268  if test "x$ALL_JDKS_FOUND" != x; then
24269    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24270
24271  if test "x$BOOT_JDK_FOUND" = xno; then
24272    # Now execute the test
24273
24274        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24275        if test -d "$BOOT_JDK"; then
24276          BOOT_JDK_FOUND=maybe
24277          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24278$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24279        fi
24280
24281
24282    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24283    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24284      # Do we have a bin/java?
24285      if test ! -x "$BOOT_JDK/bin/java"; then
24286        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24288        BOOT_JDK_FOUND=no
24289      else
24290        # Do we have a bin/javac?
24291        if test ! -x "$BOOT_JDK/bin/javac"; then
24292          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24294          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24295$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24296          BOOT_JDK_FOUND=no
24297        else
24298          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24299          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24300            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24301$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24302            BOOT_JDK_FOUND=no
24303          else
24304            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24305            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24306
24307            # Extra M4 quote needed to protect [] in grep expression.
24308            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24309            if test "x$FOUND_CORRECT_VERSION" = x; then
24310              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24312              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24313$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24314              BOOT_JDK_FOUND=no
24315            else
24316              # We're done! :-)
24317              BOOT_JDK_FOUND=yes
24318
24319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24320
24321  # Input might be given as Windows format, start by converting to
24322  # unix format.
24323  path="$BOOT_JDK"
24324  new_path=`$CYGPATH -u "$path"`
24325
24326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24329  # "foo.exe" is OK but "foo" is an error.
24330  #
24331  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24332  # It is also a way to make sure we got the proper file name for the real test later on.
24333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24334  if test "x$test_shortpath" = x; then
24335    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24336$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24337    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24338  fi
24339
24340  # Call helper function which possibly converts this using DOS-style short mode.
24341  # If so, the updated path is stored in $new_path.
24342
24343  input_path="$new_path"
24344  # Check if we need to convert this using DOS-style short mode. If the path
24345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24346  # take no chances and rewrite it.
24347  # Note: m4 eats our [], so we need to use [ and ] instead.
24348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24349  if test "x$has_forbidden_chars" != x; then
24350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24354      # Going to short mode and back again did indeed matter. Since short mode is
24355      # case insensitive, let's make it lowercase to improve readability.
24356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24357      # Now convert it back to Unix-stile (cygpath)
24358      input_path=`$CYGPATH -u "$shortmode_path"`
24359      new_path="$input_path"
24360    fi
24361  fi
24362
24363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24364  if test "x$test_cygdrive_prefix" = x; then
24365    # As a simple fix, exclude /usr/bin since it's not a real path.
24366    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24368      # a path prefixed by /cygdrive for fixpath to work.
24369      new_path="$CYGWIN_ROOT_PATH$input_path"
24370    fi
24371  fi
24372
24373
24374  if test "x$path" != "x$new_path"; then
24375    BOOT_JDK="$new_path"
24376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24377$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24378  fi
24379
24380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24381
24382  path="$BOOT_JDK"
24383  has_colon=`$ECHO $path | $GREP ^.:`
24384  new_path="$path"
24385  if test "x$has_colon" = x; then
24386    # Not in mixed or Windows style, start by that.
24387    new_path=`cmd //c echo $path`
24388  fi
24389
24390
24391  input_path="$new_path"
24392  # Check if we need to convert this using DOS-style short mode. If the path
24393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24394  # take no chances and rewrite it.
24395  # Note: m4 eats our [], so we need to use [ and ] instead.
24396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24397  if test "x$has_forbidden_chars" != x; then
24398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24400  fi
24401
24402
24403  windows_path="$new_path"
24404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24405    unix_path=`$CYGPATH -u "$windows_path"`
24406    new_path="$unix_path"
24407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24409    new_path="$unix_path"
24410  fi
24411
24412  if test "x$path" != "x$new_path"; then
24413    BOOT_JDK="$new_path"
24414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24415$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24416  fi
24417
24418  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24419  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24420
24421  else
24422    # We're on a posix platform. Hooray! :)
24423    path="$BOOT_JDK"
24424    has_space=`$ECHO "$path" | $GREP " "`
24425    if test "x$has_space" != x; then
24426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24427$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24428      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24429    fi
24430
24431    # Use eval to expand a potential ~
24432    eval path="$path"
24433    if test ! -f "$path" && test ! -d "$path"; then
24434      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24435    fi
24436
24437    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24438  fi
24439
24440              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24441$as_echo_n "checking for Boot JDK... " >&6; }
24442              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24443$as_echo "$BOOT_JDK" >&6; }
24444              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24445$as_echo_n "checking Boot JDK version... " >&6; }
24446              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24447              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24448$as_echo "$BOOT_JDK_VERSION" >&6; }
24449            fi # end check jdk version
24450          fi # end check rt.jar
24451        fi # end check javac
24452      fi # end check java
24453    fi # end check boot jdk found
24454  fi
24455
24456    done
24457  fi
24458
24459
24460    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24461    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24462      # Do we have a bin/java?
24463      if test ! -x "$BOOT_JDK/bin/java"; then
24464        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24465$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24466        BOOT_JDK_FOUND=no
24467      else
24468        # Do we have a bin/javac?
24469        if test ! -x "$BOOT_JDK/bin/javac"; then
24470          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24471$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24472          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24473$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24474          BOOT_JDK_FOUND=no
24475        else
24476          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24477          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24478            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24479$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24480            BOOT_JDK_FOUND=no
24481          else
24482            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24483            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24484
24485            # Extra M4 quote needed to protect [] in grep expression.
24486            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24487            if test "x$FOUND_CORRECT_VERSION" = x; then
24488              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24490              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24491$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24492              BOOT_JDK_FOUND=no
24493            else
24494              # We're done! :-)
24495              BOOT_JDK_FOUND=yes
24496
24497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24498
24499  # Input might be given as Windows format, start by converting to
24500  # unix format.
24501  path="$BOOT_JDK"
24502  new_path=`$CYGPATH -u "$path"`
24503
24504  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24505  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24506  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24507  # "foo.exe" is OK but "foo" is an error.
24508  #
24509  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24510  # It is also a way to make sure we got the proper file name for the real test later on.
24511  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24512  if test "x$test_shortpath" = x; then
24513    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24514$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24515    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24516  fi
24517
24518  # Call helper function which possibly converts this using DOS-style short mode.
24519  # If so, the updated path is stored in $new_path.
24520
24521  input_path="$new_path"
24522  # Check if we need to convert this using DOS-style short mode. If the path
24523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24524  # take no chances and rewrite it.
24525  # Note: m4 eats our [], so we need to use [ and ] instead.
24526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24527  if test "x$has_forbidden_chars" != x; then
24528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24529    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24530    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24531    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24532      # Going to short mode and back again did indeed matter. Since short mode is
24533      # case insensitive, let's make it lowercase to improve readability.
24534      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24535      # Now convert it back to Unix-stile (cygpath)
24536      input_path=`$CYGPATH -u "$shortmode_path"`
24537      new_path="$input_path"
24538    fi
24539  fi
24540
24541  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24542  if test "x$test_cygdrive_prefix" = x; then
24543    # As a simple fix, exclude /usr/bin since it's not a real path.
24544    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24545      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24546      # a path prefixed by /cygdrive for fixpath to work.
24547      new_path="$CYGWIN_ROOT_PATH$input_path"
24548    fi
24549  fi
24550
24551
24552  if test "x$path" != "x$new_path"; then
24553    BOOT_JDK="$new_path"
24554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24555$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24556  fi
24557
24558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24559
24560  path="$BOOT_JDK"
24561  has_colon=`$ECHO $path | $GREP ^.:`
24562  new_path="$path"
24563  if test "x$has_colon" = x; then
24564    # Not in mixed or Windows style, start by that.
24565    new_path=`cmd //c echo $path`
24566  fi
24567
24568
24569  input_path="$new_path"
24570  # Check if we need to convert this using DOS-style short mode. If the path
24571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24572  # take no chances and rewrite it.
24573  # Note: m4 eats our [], so we need to use [ and ] instead.
24574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24575  if test "x$has_forbidden_chars" != x; then
24576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24578  fi
24579
24580
24581  windows_path="$new_path"
24582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24583    unix_path=`$CYGPATH -u "$windows_path"`
24584    new_path="$unix_path"
24585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24587    new_path="$unix_path"
24588  fi
24589
24590  if test "x$path" != "x$new_path"; then
24591    BOOT_JDK="$new_path"
24592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24593$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24594  fi
24595
24596  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24597  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24598
24599  else
24600    # We're on a posix platform. Hooray! :)
24601    path="$BOOT_JDK"
24602    has_space=`$ECHO "$path" | $GREP " "`
24603    if test "x$has_space" != x; then
24604      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24605$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24606      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24607    fi
24608
24609    # Use eval to expand a potential ~
24610    eval path="$path"
24611    if test ! -f "$path" && test ! -d "$path"; then
24612      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24613    fi
24614
24615    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24616  fi
24617
24618              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24619$as_echo_n "checking for Boot JDK... " >&6; }
24620              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24621$as_echo "$BOOT_JDK" >&6; }
24622              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24623$as_echo_n "checking Boot JDK version... " >&6; }
24624              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24625              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24626$as_echo "$BOOT_JDK_VERSION" >&6; }
24627            fi # end check jdk version
24628          fi # end check rt.jar
24629        fi # end check javac
24630      fi # end check java
24631    fi # end check boot jdk found
24632  fi
24633
24634  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24635
24636  if test "x$BOOT_JDK_FOUND" = xno; then
24637    # Now execute the test
24638
24639  BOOT_JDK_PREFIX="/usr/lib/jvm"
24640  BOOT_JDK_SUFFIX=""
24641  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24642  if test "x$ALL_JDKS_FOUND" != x; then
24643    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24644
24645  if test "x$BOOT_JDK_FOUND" = xno; then
24646    # Now execute the test
24647
24648        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24649        if test -d "$BOOT_JDK"; then
24650          BOOT_JDK_FOUND=maybe
24651          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24652$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24653        fi
24654
24655
24656    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24657    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24658      # Do we have a bin/java?
24659      if test ! -x "$BOOT_JDK/bin/java"; then
24660        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24662        BOOT_JDK_FOUND=no
24663      else
24664        # Do we have a bin/javac?
24665        if test ! -x "$BOOT_JDK/bin/javac"; then
24666          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24667$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24668          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24669$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24670          BOOT_JDK_FOUND=no
24671        else
24672          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24673          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24674            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24675$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24676            BOOT_JDK_FOUND=no
24677          else
24678            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24679            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24680
24681            # Extra M4 quote needed to protect [] in grep expression.
24682            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24683            if test "x$FOUND_CORRECT_VERSION" = x; then
24684              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24686              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24687$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24688              BOOT_JDK_FOUND=no
24689            else
24690              # We're done! :-)
24691              BOOT_JDK_FOUND=yes
24692
24693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24694
24695  # Input might be given as Windows format, start by converting to
24696  # unix format.
24697  path="$BOOT_JDK"
24698  new_path=`$CYGPATH -u "$path"`
24699
24700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24703  # "foo.exe" is OK but "foo" is an error.
24704  #
24705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24706  # It is also a way to make sure we got the proper file name for the real test later on.
24707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24708  if test "x$test_shortpath" = x; then
24709    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24710$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24711    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24712  fi
24713
24714  # Call helper function which possibly converts this using DOS-style short mode.
24715  # If so, the updated path is stored in $new_path.
24716
24717  input_path="$new_path"
24718  # Check if we need to convert this using DOS-style short mode. If the path
24719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24720  # take no chances and rewrite it.
24721  # Note: m4 eats our [], so we need to use [ and ] instead.
24722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24723  if test "x$has_forbidden_chars" != x; then
24724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24728      # Going to short mode and back again did indeed matter. Since short mode is
24729      # case insensitive, let's make it lowercase to improve readability.
24730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24731      # Now convert it back to Unix-stile (cygpath)
24732      input_path=`$CYGPATH -u "$shortmode_path"`
24733      new_path="$input_path"
24734    fi
24735  fi
24736
24737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24738  if test "x$test_cygdrive_prefix" = x; then
24739    # As a simple fix, exclude /usr/bin since it's not a real path.
24740    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24742      # a path prefixed by /cygdrive for fixpath to work.
24743      new_path="$CYGWIN_ROOT_PATH$input_path"
24744    fi
24745  fi
24746
24747
24748  if test "x$path" != "x$new_path"; then
24749    BOOT_JDK="$new_path"
24750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24751$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24752  fi
24753
24754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24755
24756  path="$BOOT_JDK"
24757  has_colon=`$ECHO $path | $GREP ^.:`
24758  new_path="$path"
24759  if test "x$has_colon" = x; then
24760    # Not in mixed or Windows style, start by that.
24761    new_path=`cmd //c echo $path`
24762  fi
24763
24764
24765  input_path="$new_path"
24766  # Check if we need to convert this using DOS-style short mode. If the path
24767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24768  # take no chances and rewrite it.
24769  # Note: m4 eats our [], so we need to use [ and ] instead.
24770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24771  if test "x$has_forbidden_chars" != x; then
24772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24774  fi
24775
24776
24777  windows_path="$new_path"
24778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24779    unix_path=`$CYGPATH -u "$windows_path"`
24780    new_path="$unix_path"
24781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24783    new_path="$unix_path"
24784  fi
24785
24786  if test "x$path" != "x$new_path"; then
24787    BOOT_JDK="$new_path"
24788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24789$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24790  fi
24791
24792  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24793  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24794
24795  else
24796    # We're on a posix platform. Hooray! :)
24797    path="$BOOT_JDK"
24798    has_space=`$ECHO "$path" | $GREP " "`
24799    if test "x$has_space" != x; then
24800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24801$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24802      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24803    fi
24804
24805    # Use eval to expand a potential ~
24806    eval path="$path"
24807    if test ! -f "$path" && test ! -d "$path"; then
24808      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24809    fi
24810
24811    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24812  fi
24813
24814              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24815$as_echo_n "checking for Boot JDK... " >&6; }
24816              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24817$as_echo "$BOOT_JDK" >&6; }
24818              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24819$as_echo_n "checking Boot JDK version... " >&6; }
24820              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24821              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24822$as_echo "$BOOT_JDK_VERSION" >&6; }
24823            fi # end check jdk version
24824          fi # end check rt.jar
24825        fi # end check javac
24826      fi # end check java
24827    fi # end check boot jdk found
24828  fi
24829
24830    done
24831  fi
24832
24833
24834    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24835    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24836      # Do we have a bin/java?
24837      if test ! -x "$BOOT_JDK/bin/java"; then
24838        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24840        BOOT_JDK_FOUND=no
24841      else
24842        # Do we have a bin/javac?
24843        if test ! -x "$BOOT_JDK/bin/javac"; then
24844          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24845$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24846          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24847$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24848          BOOT_JDK_FOUND=no
24849        else
24850          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24851          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24852            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24853$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24854            BOOT_JDK_FOUND=no
24855          else
24856            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24857            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24858
24859            # Extra M4 quote needed to protect [] in grep expression.
24860            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24861            if test "x$FOUND_CORRECT_VERSION" = x; then
24862              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24864              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24865$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24866              BOOT_JDK_FOUND=no
24867            else
24868              # We're done! :-)
24869              BOOT_JDK_FOUND=yes
24870
24871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24872
24873  # Input might be given as Windows format, start by converting to
24874  # unix format.
24875  path="$BOOT_JDK"
24876  new_path=`$CYGPATH -u "$path"`
24877
24878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24881  # "foo.exe" is OK but "foo" is an error.
24882  #
24883  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24884  # It is also a way to make sure we got the proper file name for the real test later on.
24885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24886  if test "x$test_shortpath" = x; then
24887    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24888$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24889    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24890  fi
24891
24892  # Call helper function which possibly converts this using DOS-style short mode.
24893  # If so, the updated path is stored in $new_path.
24894
24895  input_path="$new_path"
24896  # Check if we need to convert this using DOS-style short mode. If the path
24897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24898  # take no chances and rewrite it.
24899  # Note: m4 eats our [], so we need to use [ and ] instead.
24900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24901  if test "x$has_forbidden_chars" != x; then
24902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24906      # Going to short mode and back again did indeed matter. Since short mode is
24907      # case insensitive, let's make it lowercase to improve readability.
24908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24909      # Now convert it back to Unix-stile (cygpath)
24910      input_path=`$CYGPATH -u "$shortmode_path"`
24911      new_path="$input_path"
24912    fi
24913  fi
24914
24915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24916  if test "x$test_cygdrive_prefix" = x; then
24917    # As a simple fix, exclude /usr/bin since it's not a real path.
24918    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24920      # a path prefixed by /cygdrive for fixpath to work.
24921      new_path="$CYGWIN_ROOT_PATH$input_path"
24922    fi
24923  fi
24924
24925
24926  if test "x$path" != "x$new_path"; then
24927    BOOT_JDK="$new_path"
24928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24929$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24930  fi
24931
24932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24933
24934  path="$BOOT_JDK"
24935  has_colon=`$ECHO $path | $GREP ^.:`
24936  new_path="$path"
24937  if test "x$has_colon" = x; then
24938    # Not in mixed or Windows style, start by that.
24939    new_path=`cmd //c echo $path`
24940  fi
24941
24942
24943  input_path="$new_path"
24944  # Check if we need to convert this using DOS-style short mode. If the path
24945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24946  # take no chances and rewrite it.
24947  # Note: m4 eats our [], so we need to use [ and ] instead.
24948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24949  if test "x$has_forbidden_chars" != x; then
24950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24952  fi
24953
24954
24955  windows_path="$new_path"
24956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24957    unix_path=`$CYGPATH -u "$windows_path"`
24958    new_path="$unix_path"
24959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24961    new_path="$unix_path"
24962  fi
24963
24964  if test "x$path" != "x$new_path"; then
24965    BOOT_JDK="$new_path"
24966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24967$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24968  fi
24969
24970  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24971  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24972
24973  else
24974    # We're on a posix platform. Hooray! :)
24975    path="$BOOT_JDK"
24976    has_space=`$ECHO "$path" | $GREP " "`
24977    if test "x$has_space" != x; then
24978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24979$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24980      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24981    fi
24982
24983    # Use eval to expand a potential ~
24984    eval path="$path"
24985    if test ! -f "$path" && test ! -d "$path"; then
24986      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24987    fi
24988
24989    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24990  fi
24991
24992              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24993$as_echo_n "checking for Boot JDK... " >&6; }
24994              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24995$as_echo "$BOOT_JDK" >&6; }
24996              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24997$as_echo_n "checking Boot JDK version... " >&6; }
24998              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24999              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25000$as_echo "$BOOT_JDK_VERSION" >&6; }
25001            fi # end check jdk version
25002          fi # end check rt.jar
25003        fi # end check javac
25004      fi # end check java
25005    fi # end check boot jdk found
25006  fi
25007
25008  fi
25009
25010
25011    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25012    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25013      # Do we have a bin/java?
25014      if test ! -x "$BOOT_JDK/bin/java"; then
25015        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25016$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25017        BOOT_JDK_FOUND=no
25018      else
25019        # Do we have a bin/javac?
25020        if test ! -x "$BOOT_JDK/bin/javac"; then
25021          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25022$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25023          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25024$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25025          BOOT_JDK_FOUND=no
25026        else
25027          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25028          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25029            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25031            BOOT_JDK_FOUND=no
25032          else
25033            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25034            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25035
25036            # Extra M4 quote needed to protect [] in grep expression.
25037            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25038            if test "x$FOUND_CORRECT_VERSION" = x; then
25039              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25041              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25042$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25043              BOOT_JDK_FOUND=no
25044            else
25045              # We're done! :-)
25046              BOOT_JDK_FOUND=yes
25047
25048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25049
25050  # Input might be given as Windows format, start by converting to
25051  # unix format.
25052  path="$BOOT_JDK"
25053  new_path=`$CYGPATH -u "$path"`
25054
25055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25058  # "foo.exe" is OK but "foo" is an error.
25059  #
25060  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25061  # It is also a way to make sure we got the proper file name for the real test later on.
25062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25063  if test "x$test_shortpath" = x; then
25064    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25065$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25066    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25067  fi
25068
25069  # Call helper function which possibly converts this using DOS-style short mode.
25070  # If so, the updated path is stored in $new_path.
25071
25072  input_path="$new_path"
25073  # Check if we need to convert this using DOS-style short mode. If the path
25074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25075  # take no chances and rewrite it.
25076  # Note: m4 eats our [], so we need to use [ and ] instead.
25077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25078  if test "x$has_forbidden_chars" != x; then
25079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25083      # Going to short mode and back again did indeed matter. Since short mode is
25084      # case insensitive, let's make it lowercase to improve readability.
25085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25086      # Now convert it back to Unix-stile (cygpath)
25087      input_path=`$CYGPATH -u "$shortmode_path"`
25088      new_path="$input_path"
25089    fi
25090  fi
25091
25092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25093  if test "x$test_cygdrive_prefix" = x; then
25094    # As a simple fix, exclude /usr/bin since it's not a real path.
25095    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25097      # a path prefixed by /cygdrive for fixpath to work.
25098      new_path="$CYGWIN_ROOT_PATH$input_path"
25099    fi
25100  fi
25101
25102
25103  if test "x$path" != "x$new_path"; then
25104    BOOT_JDK="$new_path"
25105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25106$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25107  fi
25108
25109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25110
25111  path="$BOOT_JDK"
25112  has_colon=`$ECHO $path | $GREP ^.:`
25113  new_path="$path"
25114  if test "x$has_colon" = x; then
25115    # Not in mixed or Windows style, start by that.
25116    new_path=`cmd //c echo $path`
25117  fi
25118
25119
25120  input_path="$new_path"
25121  # Check if we need to convert this using DOS-style short mode. If the path
25122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25123  # take no chances and rewrite it.
25124  # Note: m4 eats our [], so we need to use [ and ] instead.
25125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25126  if test "x$has_forbidden_chars" != x; then
25127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25129  fi
25130
25131
25132  windows_path="$new_path"
25133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25134    unix_path=`$CYGPATH -u "$windows_path"`
25135    new_path="$unix_path"
25136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25138    new_path="$unix_path"
25139  fi
25140
25141  if test "x$path" != "x$new_path"; then
25142    BOOT_JDK="$new_path"
25143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25144$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25145  fi
25146
25147  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25148  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25149
25150  else
25151    # We're on a posix platform. Hooray! :)
25152    path="$BOOT_JDK"
25153    has_space=`$ECHO "$path" | $GREP " "`
25154    if test "x$has_space" != x; then
25155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25156$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25157      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25158    fi
25159
25160    # Use eval to expand a potential ~
25161    eval path="$path"
25162    if test ! -f "$path" && test ! -d "$path"; then
25163      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25164    fi
25165
25166    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25167  fi
25168
25169              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25170$as_echo_n "checking for Boot JDK... " >&6; }
25171              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25172$as_echo "$BOOT_JDK" >&6; }
25173              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25174$as_echo_n "checking Boot JDK version... " >&6; }
25175              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25176              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25177$as_echo "$BOOT_JDK_VERSION" >&6; }
25178            fi # end check jdk version
25179          fi # end check rt.jar
25180        fi # end check javac
25181      fi # end check java
25182    fi # end check boot jdk found
25183  fi
25184
25185
25186  # If we haven't found anything yet, we've truly lost. Give up.
25187  if test "x$BOOT_JDK_FOUND" = xno; then
25188
25189  # Print a helpful message on how to acquire the necessary build dependency.
25190  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25191  MISSING_DEPENDENCY=openjdk
25192
25193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25194    cygwin_help $MISSING_DEPENDENCY
25195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25196    msys_help $MISSING_DEPENDENCY
25197  else
25198    PKGHANDLER_COMMAND=
25199
25200    case $PKGHANDLER in
25201      apt-get)
25202        apt_help     $MISSING_DEPENDENCY ;;
25203      yum)
25204        yum_help     $MISSING_DEPENDENCY ;;
25205      port)
25206        port_help    $MISSING_DEPENDENCY ;;
25207      pkgutil)
25208        pkgutil_help $MISSING_DEPENDENCY ;;
25209      pkgadd)
25210        pkgadd_help  $MISSING_DEPENDENCY ;;
25211    esac
25212
25213    if test "x$PKGHANDLER_COMMAND" != x; then
25214      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25215    fi
25216  fi
25217
25218    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25219$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25220    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25221$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25222    as_fn_error $? "Cannot continue" "$LINENO" 5
25223  fi
25224
25225  # Setup proper paths for what we found
25226  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25227  if test ! -f "$BOOT_RTJAR"; then
25228    # On MacOSX it is called classes.jar
25229    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25230    if test -f "$BOOT_RTJAR"; then
25231      # Remove the ..
25232      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25233    fi
25234  fi
25235  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25236  BOOT_JDK="$BOOT_JDK"
25237
25238
25239
25240
25241  # Setup tools from the Boot JDK.
25242
25243  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25244
25245  # Publish this variable in the help.
25246
25247
25248  if test "x$JAVA" = x; then
25249    # The variable is not set by user, try to locate tool using the code snippet
25250
25251      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25252$as_echo_n "checking for java in Boot JDK... " >&6; }
25253      JAVA=$BOOT_JDK/bin/java
25254      if test ! -x $JAVA; then
25255        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25256$as_echo "not found" >&6; }
25257        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25258$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25259        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25260      fi
25261      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25262$as_echo "ok" >&6; }
25263
25264
25265  else
25266    # The variable is set, but is it from the command line or the environment?
25267
25268    # Try to remove the string !JAVA! from our list.
25269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25271      # If it failed, the variable was not from the command line. Ignore it,
25272      # but warn the user (except for BASH, which is always set by the calling BASH).
25273      if test "xJAVA" != xBASH; then
25274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25275$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25276      fi
25277      # Try to locate tool using the code snippet
25278
25279      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25280$as_echo_n "checking for java in Boot JDK... " >&6; }
25281      JAVA=$BOOT_JDK/bin/java
25282      if test ! -x $JAVA; then
25283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25284$as_echo "not found" >&6; }
25285        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25286$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25287        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25288      fi
25289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25290$as_echo "ok" >&6; }
25291
25292
25293    else
25294      # If it succeeded, then it was overridden by the user. We will use it
25295      # for the tool.
25296
25297      # First remove it from the list of overridden variables, so we can test
25298      # for unknown variables in the end.
25299      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25300
25301      # Check if the provided tool contains a complete path.
25302      tool_specified="$JAVA"
25303      tool_basename="${tool_specified##*/}"
25304      if test "x$tool_basename" = "x$tool_specified"; then
25305        # A command without a complete path is provided, search $PATH.
25306        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25307$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25308        # Extract the first word of "$tool_basename", so it can be a program name with args.
25309set dummy $tool_basename; ac_word=$2
25310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25311$as_echo_n "checking for $ac_word... " >&6; }
25312if ${ac_cv_path_JAVA+:} false; then :
25313  $as_echo_n "(cached) " >&6
25314else
25315  case $JAVA in
25316  [\\/]* | ?:[\\/]*)
25317  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25318  ;;
25319  *)
25320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25321for as_dir in $PATH
25322do
25323  IFS=$as_save_IFS
25324  test -z "$as_dir" && as_dir=.
25325    for ac_exec_ext in '' $ac_executable_extensions; do
25326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25327    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25329    break 2
25330  fi
25331done
25332  done
25333IFS=$as_save_IFS
25334
25335  ;;
25336esac
25337fi
25338JAVA=$ac_cv_path_JAVA
25339if test -n "$JAVA"; then
25340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25341$as_echo "$JAVA" >&6; }
25342else
25343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25344$as_echo "no" >&6; }
25345fi
25346
25347
25348        if test "x$JAVA" = x; then
25349          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25350        fi
25351      else
25352        # Otherwise we believe it is a complete path. Use it as it is.
25353        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25354$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25355        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25356$as_echo_n "checking for JAVA... " >&6; }
25357        if test ! -x "$tool_specified"; then
25358          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25359$as_echo "not found" >&6; }
25360          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25361        fi
25362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25363$as_echo "$tool_specified" >&6; }
25364      fi
25365    fi
25366  fi
25367
25368
25369
25370  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25371
25372  # Publish this variable in the help.
25373
25374
25375  if test "x$JAVAC" = x; then
25376    # The variable is not set by user, try to locate tool using the code snippet
25377
25378      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25379$as_echo_n "checking for javac in Boot JDK... " >&6; }
25380      JAVAC=$BOOT_JDK/bin/javac
25381      if test ! -x $JAVAC; then
25382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25383$as_echo "not found" >&6; }
25384        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25385$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25386        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25387      fi
25388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25389$as_echo "ok" >&6; }
25390
25391
25392  else
25393    # The variable is set, but is it from the command line or the environment?
25394
25395    # Try to remove the string !JAVAC! from our list.
25396    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25397    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25398      # If it failed, the variable was not from the command line. Ignore it,
25399      # but warn the user (except for BASH, which is always set by the calling BASH).
25400      if test "xJAVAC" != xBASH; then
25401        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25402$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25403      fi
25404      # Try to locate tool using the code snippet
25405
25406      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25407$as_echo_n "checking for javac in Boot JDK... " >&6; }
25408      JAVAC=$BOOT_JDK/bin/javac
25409      if test ! -x $JAVAC; then
25410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25411$as_echo "not found" >&6; }
25412        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25413$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25414        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25415      fi
25416      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25417$as_echo "ok" >&6; }
25418
25419
25420    else
25421      # If it succeeded, then it was overridden by the user. We will use it
25422      # for the tool.
25423
25424      # First remove it from the list of overridden variables, so we can test
25425      # for unknown variables in the end.
25426      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25427
25428      # Check if the provided tool contains a complete path.
25429      tool_specified="$JAVAC"
25430      tool_basename="${tool_specified##*/}"
25431      if test "x$tool_basename" = "x$tool_specified"; then
25432        # A command without a complete path is provided, search $PATH.
25433        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25434$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25435        # Extract the first word of "$tool_basename", so it can be a program name with args.
25436set dummy $tool_basename; ac_word=$2
25437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25438$as_echo_n "checking for $ac_word... " >&6; }
25439if ${ac_cv_path_JAVAC+:} false; then :
25440  $as_echo_n "(cached) " >&6
25441else
25442  case $JAVAC in
25443  [\\/]* | ?:[\\/]*)
25444  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25445  ;;
25446  *)
25447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25448for as_dir in $PATH
25449do
25450  IFS=$as_save_IFS
25451  test -z "$as_dir" && as_dir=.
25452    for ac_exec_ext in '' $ac_executable_extensions; do
25453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25454    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25456    break 2
25457  fi
25458done
25459  done
25460IFS=$as_save_IFS
25461
25462  ;;
25463esac
25464fi
25465JAVAC=$ac_cv_path_JAVAC
25466if test -n "$JAVAC"; then
25467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25468$as_echo "$JAVAC" >&6; }
25469else
25470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25471$as_echo "no" >&6; }
25472fi
25473
25474
25475        if test "x$JAVAC" = x; then
25476          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25477        fi
25478      else
25479        # Otherwise we believe it is a complete path. Use it as it is.
25480        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25481$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25482        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25483$as_echo_n "checking for JAVAC... " >&6; }
25484        if test ! -x "$tool_specified"; then
25485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25486$as_echo "not found" >&6; }
25487          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25488        fi
25489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25490$as_echo "$tool_specified" >&6; }
25491      fi
25492    fi
25493  fi
25494
25495
25496
25497  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25498
25499  # Publish this variable in the help.
25500
25501
25502  if test "x$JAVAH" = x; then
25503    # The variable is not set by user, try to locate tool using the code snippet
25504
25505      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25506$as_echo_n "checking for javah in Boot JDK... " >&6; }
25507      JAVAH=$BOOT_JDK/bin/javah
25508      if test ! -x $JAVAH; then
25509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25510$as_echo "not found" >&6; }
25511        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25512$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25513        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25514      fi
25515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25516$as_echo "ok" >&6; }
25517
25518
25519  else
25520    # The variable is set, but is it from the command line or the environment?
25521
25522    # Try to remove the string !JAVAH! from our list.
25523    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25524    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25525      # If it failed, the variable was not from the command line. Ignore it,
25526      # but warn the user (except for BASH, which is always set by the calling BASH).
25527      if test "xJAVAH" != xBASH; then
25528        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25529$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25530      fi
25531      # Try to locate tool using the code snippet
25532
25533      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25534$as_echo_n "checking for javah in Boot JDK... " >&6; }
25535      JAVAH=$BOOT_JDK/bin/javah
25536      if test ! -x $JAVAH; then
25537        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25538$as_echo "not found" >&6; }
25539        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25540$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25541        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25542      fi
25543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25544$as_echo "ok" >&6; }
25545
25546
25547    else
25548      # If it succeeded, then it was overridden by the user. We will use it
25549      # for the tool.
25550
25551      # First remove it from the list of overridden variables, so we can test
25552      # for unknown variables in the end.
25553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25554
25555      # Check if the provided tool contains a complete path.
25556      tool_specified="$JAVAH"
25557      tool_basename="${tool_specified##*/}"
25558      if test "x$tool_basename" = "x$tool_specified"; then
25559        # A command without a complete path is provided, search $PATH.
25560        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25561$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25562        # Extract the first word of "$tool_basename", so it can be a program name with args.
25563set dummy $tool_basename; ac_word=$2
25564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25565$as_echo_n "checking for $ac_word... " >&6; }
25566if ${ac_cv_path_JAVAH+:} false; then :
25567  $as_echo_n "(cached) " >&6
25568else
25569  case $JAVAH in
25570  [\\/]* | ?:[\\/]*)
25571  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25572  ;;
25573  *)
25574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25575for as_dir in $PATH
25576do
25577  IFS=$as_save_IFS
25578  test -z "$as_dir" && as_dir=.
25579    for ac_exec_ext in '' $ac_executable_extensions; do
25580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25581    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25583    break 2
25584  fi
25585done
25586  done
25587IFS=$as_save_IFS
25588
25589  ;;
25590esac
25591fi
25592JAVAH=$ac_cv_path_JAVAH
25593if test -n "$JAVAH"; then
25594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25595$as_echo "$JAVAH" >&6; }
25596else
25597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25598$as_echo "no" >&6; }
25599fi
25600
25601
25602        if test "x$JAVAH" = x; then
25603          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25604        fi
25605      else
25606        # Otherwise we believe it is a complete path. Use it as it is.
25607        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25608$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25610$as_echo_n "checking for JAVAH... " >&6; }
25611        if test ! -x "$tool_specified"; then
25612          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25613$as_echo "not found" >&6; }
25614          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25615        fi
25616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25617$as_echo "$tool_specified" >&6; }
25618      fi
25619    fi
25620  fi
25621
25622
25623
25624  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25625
25626  # Publish this variable in the help.
25627
25628
25629  if test "x$JAR" = x; then
25630    # The variable is not set by user, try to locate tool using the code snippet
25631
25632      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25633$as_echo_n "checking for jar in Boot JDK... " >&6; }
25634      JAR=$BOOT_JDK/bin/jar
25635      if test ! -x $JAR; then
25636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25637$as_echo "not found" >&6; }
25638        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25639$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25640        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25641      fi
25642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25643$as_echo "ok" >&6; }
25644
25645
25646  else
25647    # The variable is set, but is it from the command line or the environment?
25648
25649    # Try to remove the string !JAR! from our list.
25650    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25651    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25652      # If it failed, the variable was not from the command line. Ignore it,
25653      # but warn the user (except for BASH, which is always set by the calling BASH).
25654      if test "xJAR" != xBASH; then
25655        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25656$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25657      fi
25658      # Try to locate tool using the code snippet
25659
25660      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25661$as_echo_n "checking for jar in Boot JDK... " >&6; }
25662      JAR=$BOOT_JDK/bin/jar
25663      if test ! -x $JAR; then
25664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25665$as_echo "not found" >&6; }
25666        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25667$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25668        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25669      fi
25670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25671$as_echo "ok" >&6; }
25672
25673
25674    else
25675      # If it succeeded, then it was overridden by the user. We will use it
25676      # for the tool.
25677
25678      # First remove it from the list of overridden variables, so we can test
25679      # for unknown variables in the end.
25680      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25681
25682      # Check if the provided tool contains a complete path.
25683      tool_specified="$JAR"
25684      tool_basename="${tool_specified##*/}"
25685      if test "x$tool_basename" = "x$tool_specified"; then
25686        # A command without a complete path is provided, search $PATH.
25687        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25688$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25689        # Extract the first word of "$tool_basename", so it can be a program name with args.
25690set dummy $tool_basename; ac_word=$2
25691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25692$as_echo_n "checking for $ac_word... " >&6; }
25693if ${ac_cv_path_JAR+:} false; then :
25694  $as_echo_n "(cached) " >&6
25695else
25696  case $JAR in
25697  [\\/]* | ?:[\\/]*)
25698  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25699  ;;
25700  *)
25701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25702for as_dir in $PATH
25703do
25704  IFS=$as_save_IFS
25705  test -z "$as_dir" && as_dir=.
25706    for ac_exec_ext in '' $ac_executable_extensions; do
25707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25708    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25710    break 2
25711  fi
25712done
25713  done
25714IFS=$as_save_IFS
25715
25716  ;;
25717esac
25718fi
25719JAR=$ac_cv_path_JAR
25720if test -n "$JAR"; then
25721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25722$as_echo "$JAR" >&6; }
25723else
25724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25725$as_echo "no" >&6; }
25726fi
25727
25728
25729        if test "x$JAR" = x; then
25730          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25731        fi
25732      else
25733        # Otherwise we believe it is a complete path. Use it as it is.
25734        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25735$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25736        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25737$as_echo_n "checking for JAR... " >&6; }
25738        if test ! -x "$tool_specified"; then
25739          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25740$as_echo "not found" >&6; }
25741          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25742        fi
25743        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25744$as_echo "$tool_specified" >&6; }
25745      fi
25746    fi
25747  fi
25748
25749
25750
25751  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25752
25753  # Publish this variable in the help.
25754
25755
25756  if test "x$NATIVE2ASCII" = x; then
25757    # The variable is not set by user, try to locate tool using the code snippet
25758
25759      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25760$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25761      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25762      if test ! -x $NATIVE2ASCII; then
25763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25764$as_echo "not found" >&6; }
25765        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25766$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25767        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25768      fi
25769      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25770$as_echo "ok" >&6; }
25771
25772
25773  else
25774    # The variable is set, but is it from the command line or the environment?
25775
25776    # Try to remove the string !NATIVE2ASCII! from our list.
25777    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25778    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25779      # If it failed, the variable was not from the command line. Ignore it,
25780      # but warn the user (except for BASH, which is always set by the calling BASH).
25781      if test "xNATIVE2ASCII" != xBASH; then
25782        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25783$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25784      fi
25785      # Try to locate tool using the code snippet
25786
25787      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25788$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25789      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25790      if test ! -x $NATIVE2ASCII; then
25791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25792$as_echo "not found" >&6; }
25793        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25794$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25795        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25796      fi
25797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25798$as_echo "ok" >&6; }
25799
25800
25801    else
25802      # If it succeeded, then it was overridden by the user. We will use it
25803      # for the tool.
25804
25805      # First remove it from the list of overridden variables, so we can test
25806      # for unknown variables in the end.
25807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25808
25809      # Check if the provided tool contains a complete path.
25810      tool_specified="$NATIVE2ASCII"
25811      tool_basename="${tool_specified##*/}"
25812      if test "x$tool_basename" = "x$tool_specified"; then
25813        # A command without a complete path is provided, search $PATH.
25814        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25815$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25816        # Extract the first word of "$tool_basename", so it can be a program name with args.
25817set dummy $tool_basename; ac_word=$2
25818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25819$as_echo_n "checking for $ac_word... " >&6; }
25820if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25821  $as_echo_n "(cached) " >&6
25822else
25823  case $NATIVE2ASCII in
25824  [\\/]* | ?:[\\/]*)
25825  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25826  ;;
25827  *)
25828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25829for as_dir in $PATH
25830do
25831  IFS=$as_save_IFS
25832  test -z "$as_dir" && as_dir=.
25833    for ac_exec_ext in '' $ac_executable_extensions; do
25834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25835    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25837    break 2
25838  fi
25839done
25840  done
25841IFS=$as_save_IFS
25842
25843  ;;
25844esac
25845fi
25846NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25847if test -n "$NATIVE2ASCII"; then
25848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25849$as_echo "$NATIVE2ASCII" >&6; }
25850else
25851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25852$as_echo "no" >&6; }
25853fi
25854
25855
25856        if test "x$NATIVE2ASCII" = x; then
25857          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25858        fi
25859      else
25860        # Otherwise we believe it is a complete path. Use it as it is.
25861        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25862$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25863        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25864$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25865        if test ! -x "$tool_specified"; then
25866          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25867$as_echo "not found" >&6; }
25868          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25869        fi
25870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25871$as_echo "$tool_specified" >&6; }
25872      fi
25873    fi
25874  fi
25875
25876
25877
25878  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25879
25880  # Publish this variable in the help.
25881
25882
25883  if test "x$JARSIGNER" = x; then
25884    # The variable is not set by user, try to locate tool using the code snippet
25885
25886      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25887$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25888      JARSIGNER=$BOOT_JDK/bin/jarsigner
25889      if test ! -x $JARSIGNER; then
25890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25891$as_echo "not found" >&6; }
25892        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25893$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25894        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25895      fi
25896      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25897$as_echo "ok" >&6; }
25898
25899
25900  else
25901    # The variable is set, but is it from the command line or the environment?
25902
25903    # Try to remove the string !JARSIGNER! from our list.
25904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25906      # If it failed, the variable was not from the command line. Ignore it,
25907      # but warn the user (except for BASH, which is always set by the calling BASH).
25908      if test "xJARSIGNER" != xBASH; then
25909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25910$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25911      fi
25912      # Try to locate tool using the code snippet
25913
25914      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25915$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25916      JARSIGNER=$BOOT_JDK/bin/jarsigner
25917      if test ! -x $JARSIGNER; then
25918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25919$as_echo "not found" >&6; }
25920        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25921$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25922        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25923      fi
25924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25925$as_echo "ok" >&6; }
25926
25927
25928    else
25929      # If it succeeded, then it was overridden by the user. We will use it
25930      # for the tool.
25931
25932      # First remove it from the list of overridden variables, so we can test
25933      # for unknown variables in the end.
25934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25935
25936      # Check if the provided tool contains a complete path.
25937      tool_specified="$JARSIGNER"
25938      tool_basename="${tool_specified##*/}"
25939      if test "x$tool_basename" = "x$tool_specified"; then
25940        # A command without a complete path is provided, search $PATH.
25941        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25942$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25943        # Extract the first word of "$tool_basename", so it can be a program name with args.
25944set dummy $tool_basename; ac_word=$2
25945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25946$as_echo_n "checking for $ac_word... " >&6; }
25947if ${ac_cv_path_JARSIGNER+:} false; then :
25948  $as_echo_n "(cached) " >&6
25949else
25950  case $JARSIGNER in
25951  [\\/]* | ?:[\\/]*)
25952  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25953  ;;
25954  *)
25955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25956for as_dir in $PATH
25957do
25958  IFS=$as_save_IFS
25959  test -z "$as_dir" && as_dir=.
25960    for ac_exec_ext in '' $ac_executable_extensions; do
25961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25962    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25964    break 2
25965  fi
25966done
25967  done
25968IFS=$as_save_IFS
25969
25970  ;;
25971esac
25972fi
25973JARSIGNER=$ac_cv_path_JARSIGNER
25974if test -n "$JARSIGNER"; then
25975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25976$as_echo "$JARSIGNER" >&6; }
25977else
25978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25979$as_echo "no" >&6; }
25980fi
25981
25982
25983        if test "x$JARSIGNER" = x; then
25984          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25985        fi
25986      else
25987        # Otherwise we believe it is a complete path. Use it as it is.
25988        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25989$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25990        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25991$as_echo_n "checking for JARSIGNER... " >&6; }
25992        if test ! -x "$tool_specified"; then
25993          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25994$as_echo "not found" >&6; }
25995          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25996        fi
25997        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25998$as_echo "$tool_specified" >&6; }
25999      fi
26000    fi
26001  fi
26002
26003
26004
26005  # Finally, set some other options...
26006
26007  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26008  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26009
26010
26011
26012
26013  ##############################################################################
26014  #
26015  # Specify jvm options for anything that is run with the Boot JDK.
26016  # Not all JVM:s accept the same arguments on the command line.
26017  #
26018
26019# Check whether --with-boot-jdk-jvmargs was given.
26020if test "${with_boot_jdk_jvmargs+set}" = set; then :
26021  withval=$with_boot_jdk_jvmargs;
26022fi
26023
26024
26025  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
26026$as_echo_n "checking flags for boot jdk java command ... " >&6; }
26027
26028  # Disable special log output when a debug build is used as Boot JDK...
26029
26030  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
26031  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
26032  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
26033  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26034  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26035  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26036    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
26037    JVM_ARG_OK=true
26038  else
26039    $ECHO "Arg failed:" >&5
26040    $ECHO "$OUTPUT" >&5
26041    JVM_ARG_OK=false
26042  fi
26043
26044
26045  # Apply user provided options.
26046
26047  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
26048  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
26049  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
26050  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26051  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26052  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26053    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
26054    JVM_ARG_OK=true
26055  else
26056    $ECHO "Arg failed:" >&5
26057    $ECHO "$OUTPUT" >&5
26058    JVM_ARG_OK=false
26059  fi
26060
26061
26062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
26063$as_echo "$boot_jdk_jvmargs" >&6; }
26064
26065  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
26066  JAVA_FLAGS=$boot_jdk_jvmargs
26067
26068
26069
26070  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
26071$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
26072
26073  # Starting amount of heap memory.
26074
26075  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
26076  $ECHO "Command: $JAVA -Xms64M -version" >&5
26077  OUTPUT=`$JAVA -Xms64M -version 2>&1`
26078  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26079  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26080  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26081    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
26082    JVM_ARG_OK=true
26083  else
26084    $ECHO "Arg failed:" >&5
26085    $ECHO "$OUTPUT" >&5
26086    JVM_ARG_OK=false
26087  fi
26088
26089
26090  # Maximum amount of heap memory.
26091  # Maximum stack size.
26092  if test "x$BUILD_NUM_BITS" = x32; then
26093    JVM_MAX_HEAP=1100M
26094    STACK_SIZE=768
26095  else
26096    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
26097    # pointers are used. Apparently, we need to increase the heap and stack
26098    # space for the jvm. More specifically, when running javac to build huge
26099    # jdk batch
26100    JVM_MAX_HEAP=1600M
26101    STACK_SIZE=1536
26102  fi
26103
26104  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
26105  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
26106  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
26107  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26108  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26109  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26110    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
26111    JVM_ARG_OK=true
26112  else
26113    $ECHO "Arg failed:" >&5
26114    $ECHO "$OUTPUT" >&5
26115    JVM_ARG_OK=false
26116  fi
26117
26118
26119  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
26120  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
26121  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
26122  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26123  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26124  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26125    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
26126    JVM_ARG_OK=true
26127  else
26128    $ECHO "Arg failed:" >&5
26129    $ECHO "$OUTPUT" >&5
26130    JVM_ARG_OK=false
26131  fi
26132
26133
26134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
26135$as_echo "$boot_jdk_jvmargs_big" >&6; }
26136
26137  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
26138
26139
26140
26141  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
26142$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
26143
26144  # Use serial gc for small short lived tools if possible
26145
26146  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
26147  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
26148  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
26149  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26150  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26151  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26152    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
26153    JVM_ARG_OK=true
26154  else
26155    $ECHO "Arg failed:" >&5
26156    $ECHO "$OUTPUT" >&5
26157    JVM_ARG_OK=false
26158  fi
26159
26160
26161  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
26162  $ECHO "Command: $JAVA -Xms32M -version" >&5
26163  OUTPUT=`$JAVA -Xms32M -version 2>&1`
26164  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26165  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26166  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26167    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
26168    JVM_ARG_OK=true
26169  else
26170    $ECHO "Arg failed:" >&5
26171    $ECHO "$OUTPUT" >&5
26172    JVM_ARG_OK=false
26173  fi
26174
26175
26176  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
26177  $ECHO "Command: $JAVA -Xmx512M -version" >&5
26178  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
26179  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26180  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26181  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26182    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
26183    JVM_ARG_OK=true
26184  else
26185    $ECHO "Arg failed:" >&5
26186    $ECHO "$OUTPUT" >&5
26187    JVM_ARG_OK=false
26188  fi
26189
26190
26191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
26192$as_echo "$boot_jdk_jvmargs_small" >&6; }
26193
26194  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
26195
26196
26197
26198###############################################################################
26199#
26200# Configure the sources to use. We can add or override individual directories.
26201#
26202###############################################################################
26203
26204
26205  # Where are the sources. Any of these can be overridden
26206  # using --with-override-corba and the likes.
26207  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26208  CORBA_TOPDIR="$SRC_ROOT/corba"
26209  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26210  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26211  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26212  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26213  JDK_TOPDIR="$SRC_ROOT/jdk"
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223
26224  ###############################################################################
26225  #
26226  # Pickup additional source for a component from outside of the source root
26227  # or override source for a component.
26228  #
26229
26230# Check whether --with-add-source-root was given.
26231if test "${with_add_source_root+set}" = set; then :
26232  withval=$with_add_source_root;
26233fi
26234
26235
26236
26237# Check whether --with-override-source-root was given.
26238if test "${with_override_source_root+set}" = set; then :
26239  withval=$with_override_source_root;
26240fi
26241
26242
26243
26244# Check whether --with-adds-and-overrides was given.
26245if test "${with_adds_and_overrides+set}" = set; then :
26246  withval=$with_adds_and_overrides;
26247fi
26248
26249
26250  if test "x$with_adds_and_overrides" != x; then
26251    with_add_source_root="$with_adds_and_overrides/adds"
26252    with_override_source_root="$with_adds_and_overrides/overrides"
26253  fi
26254
26255  if test "x$with_add_source_root" != x; then
26256    if ! test -d $with_add_source_root; then
26257      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26258    fi
26259    CURDIR="$PWD"
26260    cd "$with_add_source_root"
26261    ADD_SRC_ROOT="`pwd`"
26262    cd "$CURDIR"
26263    # Verify that the addon source root does not have any root makefiles.
26264    # If it does, then it is usually an error, prevent this.
26265    if test -f $with_add_source_root/langtools/make/Makefile; then
26266      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
26267    fi
26268    if test -f $with_add_source_root/corba/make/Makefile; then
26269      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
26270    fi
26271    if test -f $with_add_source_root/jaxp/make/Makefile; then
26272      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
26273    fi
26274    if test -f $with_add_source_root/jaxws/make/Makefile; then
26275      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
26276    fi
26277    if test -f $with_add_source_root/hotspot/make/Makefile; then
26278      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
26279    fi
26280    if test -f $with_add_source_root/nashorn/make/Makefile; then
26281      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
26282    fi
26283    if test -f $with_add_source_root/jdk/make/Makefile; then
26284      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
26285    fi
26286  fi
26287
26288
26289  if test "x$with_override_source_root" != x; then
26290    if ! test -d $with_override_source_root; then
26291      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26292    fi
26293    CURDIR="$PWD"
26294    cd "$with_override_source_root"
26295    OVERRIDE_SRC_ROOT="`pwd`"
26296    cd "$CURDIR"
26297    if test -f $with_override_source_root/langtools/make/Makefile; then
26298      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
26299    fi
26300    if test -f $with_override_source_root/corba/make/Makefile; then
26301      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
26302    fi
26303    if test -f $with_override_source_root/jaxp/make/Makefile; then
26304      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
26305    fi
26306    if test -f $with_override_source_root/jaxws/make/Makefile; then
26307      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
26308    fi
26309    if test -f $with_override_source_root/hotspot/make/Makefile; then
26310      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
26311    fi
26312    if test -f $with_override_source_root/nashorn/make/Makefile; then
26313      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
26314    fi
26315    if test -f $with_override_source_root/jdk/make/Makefile; then
26316      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
26317    fi
26318  fi
26319
26320
26321  ###############################################################################
26322  #
26323  # Override a repo completely, this is used for example when you have 3 small
26324  # development sandboxes of the langtools sources and want to avoid having 3 full
26325  # OpenJDK sources checked out on disk.
26326  #
26327  # Assuming that the 3 langtools sandboxes are located here:
26328  # /home/fredrik/sandbox1/langtools
26329  # /home/fredrik/sandbox2/langtools
26330  # /home/fredrik/sandbox3/langtools
26331  #
26332  # From the source root you create build subdirs manually:
26333  #     mkdir -p build1 build2 build3
26334  # in each build directory run:
26335  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26336  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26337  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26338  #
26339
26340
26341# Check whether --with-override-langtools was given.
26342if test "${with_override_langtools+set}" = set; then :
26343  withval=$with_override_langtools;
26344fi
26345
26346
26347
26348# Check whether --with-override-corba was given.
26349if test "${with_override_corba+set}" = set; then :
26350  withval=$with_override_corba;
26351fi
26352
26353
26354
26355# Check whether --with-override-jaxp was given.
26356if test "${with_override_jaxp+set}" = set; then :
26357  withval=$with_override_jaxp;
26358fi
26359
26360
26361
26362# Check whether --with-override-jaxws was given.
26363if test "${with_override_jaxws+set}" = set; then :
26364  withval=$with_override_jaxws;
26365fi
26366
26367
26368
26369# Check whether --with-override-hotspot was given.
26370if test "${with_override_hotspot+set}" = set; then :
26371  withval=$with_override_hotspot;
26372fi
26373
26374
26375
26376# Check whether --with-override-nashorn was given.
26377if test "${with_override_nashorn+set}" = set; then :
26378  withval=$with_override_nashorn;
26379fi
26380
26381
26382
26383# Check whether --with-override-jdk was given.
26384if test "${with_override_jdk+set}" = set; then :
26385  withval=$with_override_jdk;
26386fi
26387
26388
26389  if test "x$with_override_langtools" != x; then
26390    CURDIR="$PWD"
26391    cd "$with_override_langtools"
26392    LANGTOOLS_TOPDIR="`pwd`"
26393    cd "$CURDIR"
26394    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26395      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26396    fi
26397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26398$as_echo_n "checking if langtools should be overridden... " >&6; }
26399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26400$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26401  fi
26402  if test "x$with_override_corba" != x; then
26403    CURDIR="$PWD"
26404    cd "$with_override_corba"
26405    CORBA_TOPDIR="`pwd`"
26406    cd "$CURDIR"
26407    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26408      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26409    fi
26410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26411$as_echo_n "checking if corba should be overridden... " >&6; }
26412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26413$as_echo "yes with $CORBA_TOPDIR" >&6; }
26414  fi
26415  if test "x$with_override_jaxp" != x; then
26416    CURDIR="$PWD"
26417    cd "$with_override_jaxp"
26418    JAXP_TOPDIR="`pwd`"
26419    cd "$CURDIR"
26420    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26421      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26422    fi
26423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26424$as_echo_n "checking if jaxp should be overridden... " >&6; }
26425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26426$as_echo "yes with $JAXP_TOPDIR" >&6; }
26427  fi
26428  if test "x$with_override_jaxws" != x; then
26429    CURDIR="$PWD"
26430    cd "$with_override_jaxws"
26431    JAXWS_TOPDIR="`pwd`"
26432    cd "$CURDIR"
26433    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26434      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26435    fi
26436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26437$as_echo_n "checking if jaxws should be overridden... " >&6; }
26438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26439$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26440  fi
26441  if test "x$with_override_hotspot" != x; then
26442    CURDIR="$PWD"
26443    cd "$with_override_hotspot"
26444    HOTSPOT_TOPDIR="`pwd`"
26445    cd "$CURDIR"
26446    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26447      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26448    fi
26449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26450$as_echo_n "checking if hotspot should be overridden... " >&6; }
26451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26452$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26453  fi
26454  if test "x$with_override_nashorn" != x; then
26455    CURDIR="$PWD"
26456    cd "$with_override_nashorn"
26457    NASHORN_TOPDIR="`pwd`"
26458    cd "$CURDIR"
26459    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26460      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26461    fi
26462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26463$as_echo_n "checking if nashorn should be overridden... " >&6; }
26464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26465$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26466  fi
26467  if test "x$with_override_jdk" != x; then
26468    CURDIR="$PWD"
26469    cd "$with_override_jdk"
26470    JDK_TOPDIR="`pwd`"
26471    cd "$CURDIR"
26472    if ! test -f $JDK_TOPDIR/make/Makefile; then
26473      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26474    fi
26475    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26476$as_echo_n "checking if JDK should be overridden... " >&6; }
26477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26478$as_echo "yes with $JDK_TOPDIR" >&6; }
26479  fi
26480
26481
26482  BUILD_OUTPUT="$OUTPUT_ROOT"
26483
26484
26485  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26486  BUILD_HOTSPOT=true
26487
26488
26489
26490# Check whether --with-import-hotspot was given.
26491if test "${with_import_hotspot+set}" = set; then :
26492  withval=$with_import_hotspot;
26493fi
26494
26495  if test "x$with_import_hotspot" != x; then
26496    CURDIR="$PWD"
26497    cd "$with_import_hotspot"
26498    HOTSPOT_DIST="`pwd`"
26499    cd "$CURDIR"
26500    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26501      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26502    fi
26503    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26504$as_echo_n "checking if hotspot should be imported... " >&6; }
26505    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26506$as_echo "yes from $HOTSPOT_DIST" >&6; }
26507    BUILD_HOTSPOT=false
26508  fi
26509
26510  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26511
26512
26513###############################################################################
26514#
26515# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26516# native code.
26517#
26518###############################################################################
26519
26520# First determine the toolchain type (compiler family)
26521
26522
26523# Check whether --with-toolchain-type was given.
26524if test "${with_toolchain_type+set}" = set; then :
26525  withval=$with_toolchain_type;
26526fi
26527
26528
26529  # Use indirect variable referencing
26530  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26531  VALID_TOOLCHAINS=${!toolchain_var_name}
26532
26533  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26534    # On Mac OS X, default toolchain to clang after Xcode 5
26535    XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
26536    $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26537    if test $? -ne 0; then
26538      as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26539    fi
26540    XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26541        $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26542        $CUT -f 1 -d .`
26543    { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26544$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26545    if test $XCODE_MAJOR_VERSION -ge 5; then
26546        DEFAULT_TOOLCHAIN="clang"
26547    else
26548        DEFAULT_TOOLCHAIN="gcc"
26549    fi
26550  else
26551    # First toolchain type in the list is the default
26552    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26553  fi
26554
26555  if test "x$with_toolchain_type" = xlist; then
26556    # List all toolchains
26557    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26558$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26559    for toolchain in $VALID_TOOLCHAINS; do
26560      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26561      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26562      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26563    done
26564
26565    exit 0
26566  elif test "x$with_toolchain_type" != x; then
26567    # User override; check that it is valid
26568    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26569      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26570$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26571      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26572$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26573      as_fn_error $? "Cannot continue." "$LINENO" 5
26574    fi
26575    TOOLCHAIN_TYPE=$with_toolchain_type
26576  else
26577    # No flag given, use default
26578    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26579  fi
26580
26581
26582  TOOLCHAIN_CC_BINARY_clang="clang"
26583  TOOLCHAIN_CC_BINARY_gcc="gcc"
26584  TOOLCHAIN_CC_BINARY_microsoft="cl"
26585  TOOLCHAIN_CC_BINARY_solstudio="cc"
26586  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26587
26588  TOOLCHAIN_CXX_BINARY_clang="clang++"
26589  TOOLCHAIN_CXX_BINARY_gcc="g++"
26590  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26591  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26592  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26593
26594  # Use indirect variable referencing
26595  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26596  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26597  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26598  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26599  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26600  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26601
26602
26603  # Define filename patterns
26604  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26605    LIBRARY_PREFIX=
26606    SHARED_LIBRARY_SUFFIX='.dll'
26607    STATIC_LIBRARY_SUFFIX='.lib'
26608    SHARED_LIBRARY='$1.dll'
26609    STATIC_LIBRARY='$1.lib'
26610    OBJ_SUFFIX='.obj'
26611    EXE_SUFFIX='.exe'
26612  else
26613    LIBRARY_PREFIX=lib
26614    SHARED_LIBRARY_SUFFIX='.so'
26615    STATIC_LIBRARY_SUFFIX='.a'
26616    SHARED_LIBRARY='lib$1.so'
26617    STATIC_LIBRARY='lib$1.a'
26618    OBJ_SUFFIX='.o'
26619    EXE_SUFFIX=''
26620    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26621      SHARED_LIBRARY='lib$1.dylib'
26622      SHARED_LIBRARY_SUFFIX='.dylib'
26623    fi
26624  fi
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26636    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26637$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26638  else
26639    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26640$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26641  fi
26642
26643
26644# Then detect the actual binaries needed
26645
26646  # FIXME: Is this needed?
26647  ac_ext=cpp
26648ac_cpp='$CXXCPP $CPPFLAGS'
26649ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26650ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26651ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26652
26653
26654  # Store the CFLAGS etc passed to the configure script.
26655  ORG_CFLAGS="$CFLAGS"
26656  ORG_CXXFLAGS="$CXXFLAGS"
26657  ORG_OBJCFLAGS="$OBJCFLAGS"
26658
26659  # On Windows, we need to detect the visual studio installation first.
26660  # This will change the PATH, but we need to keep that new PATH even
26661  # after toolchain detection is done, since the compiler (on x86) uses
26662  # it for DLL resolution in runtime.
26663  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26664
26665  # Store path to cygwin link.exe to help excluding it when searching for
26666  # VS linker. This must be done before changing the PATH when looking for VS.
26667  # Extract the first word of "link", so it can be a program name with args.
26668set dummy link; ac_word=$2
26669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26670$as_echo_n "checking for $ac_word... " >&6; }
26671if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26672  $as_echo_n "(cached) " >&6
26673else
26674  case $CYGWIN_LINK in
26675  [\\/]* | ?:[\\/]*)
26676  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26677  ;;
26678  *)
26679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26680for as_dir in $PATH
26681do
26682  IFS=$as_save_IFS
26683  test -z "$as_dir" && as_dir=.
26684    for ac_exec_ext in '' $ac_executable_extensions; do
26685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26686    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26688    break 2
26689  fi
26690done
26691  done
26692IFS=$as_save_IFS
26693
26694  ;;
26695esac
26696fi
26697CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26698if test -n "$CYGWIN_LINK"; then
26699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26700$as_echo "$CYGWIN_LINK" >&6; }
26701else
26702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26703$as_echo "no" >&6; }
26704fi
26705
26706
26707  if test "x$CYGWIN_LINK" != x; then
26708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26709$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26710    "$CYGWIN_LINK" --version > /dev/null
26711    if test $? -eq 0 ; then
26712      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26713$as_echo "yes" >&6; }
26714    else
26715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26716$as_echo "no" >&6; }
26717      # This might be the VS linker. Don't exclude it later on.
26718      CYGWIN_LINK=""
26719    fi
26720  fi
26721
26722  # First-hand choice is to locate and run the vsvars bat file.
26723
26724  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26725    VCVARSFILE="vc/bin/vcvars32.bat"
26726  else
26727    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26728  fi
26729
26730  VS_ENV_CMD=""
26731  VS_ENV_ARGS=""
26732  if test "x$with_toolsdir" != x; then
26733
26734  if test "x$VS_ENV_CMD" = x; then
26735    VS100BASE="$with_toolsdir/../.."
26736    METHOD="--with-tools-dir"
26737
26738  windows_path="$VS100BASE"
26739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26740    unix_path=`$CYGPATH -u "$windows_path"`
26741    VS100BASE="$unix_path"
26742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26744    VS100BASE="$unix_path"
26745  fi
26746
26747    if test -d "$VS100BASE"; then
26748      if test -f "$VS100BASE/$VCVARSFILE"; then
26749        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26750$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26751        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26752      else
26753        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26754$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26755        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26756$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26757      fi
26758    fi
26759  fi
26760
26761  fi
26762
26763  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26764    # Having specified an argument which is incorrect will produce an instant failure;
26765    # we should not go on looking
26766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26767$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26768    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26769$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26770    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26771  fi
26772
26773  if test "x$VS100COMNTOOLS" != x; then
26774
26775  if test "x$VS_ENV_CMD" = x; then
26776    VS100BASE="$VS100COMNTOOLS/../.."
26777    METHOD="VS100COMNTOOLS variable"
26778
26779  windows_path="$VS100BASE"
26780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26781    unix_path=`$CYGPATH -u "$windows_path"`
26782    VS100BASE="$unix_path"
26783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26785    VS100BASE="$unix_path"
26786  fi
26787
26788    if test -d "$VS100BASE"; then
26789      if test -f "$VS100BASE/$VCVARSFILE"; then
26790        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26791$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26792        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26793      else
26794        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26795$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26796        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26797$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26798      fi
26799    fi
26800  fi
26801
26802  fi
26803  if test "x$PROGRAMFILES" != x; then
26804
26805  if test "x$VS_ENV_CMD" = x; then
26806    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26807    METHOD="well-known name"
26808
26809  windows_path="$VS100BASE"
26810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26811    unix_path=`$CYGPATH -u "$windows_path"`
26812    VS100BASE="$unix_path"
26813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26815    VS100BASE="$unix_path"
26816  fi
26817
26818    if test -d "$VS100BASE"; then
26819      if test -f "$VS100BASE/$VCVARSFILE"; then
26820        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26821$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26822        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26823      else
26824        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26825$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26826        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26827$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26828      fi
26829    fi
26830  fi
26831
26832  fi
26833
26834  if test "x$VS_ENV_CMD" = x; then
26835    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26836    METHOD="well-known name"
26837
26838  windows_path="$VS100BASE"
26839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26840    unix_path=`$CYGPATH -u "$windows_path"`
26841    VS100BASE="$unix_path"
26842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26844    VS100BASE="$unix_path"
26845  fi
26846
26847    if test -d "$VS100BASE"; then
26848      if test -f "$VS100BASE/$VCVARSFILE"; then
26849        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26850$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26851        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26852      else
26853        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26854$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26855        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26856$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26857      fi
26858    fi
26859  fi
26860
26861
26862  if test "x$VS_ENV_CMD" = x; then
26863    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26864    METHOD="well-known name"
26865
26866  windows_path="$VS100BASE"
26867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26868    unix_path=`$CYGPATH -u "$windows_path"`
26869    VS100BASE="$unix_path"
26870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26872    VS100BASE="$unix_path"
26873  fi
26874
26875    if test -d "$VS100BASE"; then
26876      if test -f "$VS100BASE/$VCVARSFILE"; then
26877        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26878$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26879        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26880      else
26881        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26882$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26883        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26884$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26885      fi
26886    fi
26887  fi
26888
26889
26890  if test "x$ProgramW6432" != x; then
26891
26892  if test "x$VS_ENV_CMD" = x; then
26893    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26894    METHOD="well-known name"
26895
26896  windows_path="$WIN_SDK_BASE"
26897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26898    unix_path=`$CYGPATH -u "$windows_path"`
26899    WIN_SDK_BASE="$unix_path"
26900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26902    WIN_SDK_BASE="$unix_path"
26903  fi
26904
26905    if test -d "$WIN_SDK_BASE"; then
26906      # There have been cases of partial or broken SDK installations. A missing
26907      # lib dir is not going to work.
26908      if test ! -d "$WIN_SDK_BASE/../lib"; then
26909        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26910$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26911        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26912$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26913      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26914        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26915$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26916        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26917        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26918          VS_ENV_ARGS="/x86"
26919        else
26920          VS_ENV_ARGS="/x64"
26921        fi
26922      else
26923        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26924$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26925        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26926$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26927      fi
26928    fi
26929  fi
26930
26931  fi
26932  if test "x$PROGRAMW6432" != x; then
26933
26934  if test "x$VS_ENV_CMD" = x; then
26935    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26936    METHOD="well-known name"
26937
26938  windows_path="$WIN_SDK_BASE"
26939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26940    unix_path=`$CYGPATH -u "$windows_path"`
26941    WIN_SDK_BASE="$unix_path"
26942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26944    WIN_SDK_BASE="$unix_path"
26945  fi
26946
26947    if test -d "$WIN_SDK_BASE"; then
26948      # There have been cases of partial or broken SDK installations. A missing
26949      # lib dir is not going to work.
26950      if test ! -d "$WIN_SDK_BASE/../lib"; then
26951        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26952$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26953        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26954$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26955      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26956        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26957$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26958        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26959        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26960          VS_ENV_ARGS="/x86"
26961        else
26962          VS_ENV_ARGS="/x64"
26963        fi
26964      else
26965        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26966$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26967        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26968$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26969      fi
26970    fi
26971  fi
26972
26973  fi
26974  if test "x$PROGRAMFILES" != x; then
26975
26976  if test "x$VS_ENV_CMD" = x; then
26977    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26978    METHOD="well-known name"
26979
26980  windows_path="$WIN_SDK_BASE"
26981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26982    unix_path=`$CYGPATH -u "$windows_path"`
26983    WIN_SDK_BASE="$unix_path"
26984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26986    WIN_SDK_BASE="$unix_path"
26987  fi
26988
26989    if test -d "$WIN_SDK_BASE"; then
26990      # There have been cases of partial or broken SDK installations. A missing
26991      # lib dir is not going to work.
26992      if test ! -d "$WIN_SDK_BASE/../lib"; then
26993        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26994$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26995        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26996$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26997      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26998        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26999$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27000        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27001        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27002          VS_ENV_ARGS="/x86"
27003        else
27004          VS_ENV_ARGS="/x64"
27005        fi
27006      else
27007        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27008$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27009        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27010$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27011      fi
27012    fi
27013  fi
27014
27015  fi
27016
27017  if test "x$VS_ENV_CMD" = x; then
27018    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27019    METHOD="well-known name"
27020
27021  windows_path="$WIN_SDK_BASE"
27022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27023    unix_path=`$CYGPATH -u "$windows_path"`
27024    WIN_SDK_BASE="$unix_path"
27025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27027    WIN_SDK_BASE="$unix_path"
27028  fi
27029
27030    if test -d "$WIN_SDK_BASE"; then
27031      # There have been cases of partial or broken SDK installations. A missing
27032      # lib dir is not going to work.
27033      if test ! -d "$WIN_SDK_BASE/../lib"; then
27034        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27035$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27036        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27037$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27038      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27039        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27040$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27041        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27042        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27043          VS_ENV_ARGS="/x86"
27044        else
27045          VS_ENV_ARGS="/x64"
27046        fi
27047      else
27048        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27049$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27050        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27051$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27052      fi
27053    fi
27054  fi
27055
27056
27057  if test "x$VS_ENV_CMD" = x; then
27058    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27059    METHOD="well-known name"
27060
27061  windows_path="$WIN_SDK_BASE"
27062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27063    unix_path=`$CYGPATH -u "$windows_path"`
27064    WIN_SDK_BASE="$unix_path"
27065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27067    WIN_SDK_BASE="$unix_path"
27068  fi
27069
27070    if test -d "$WIN_SDK_BASE"; then
27071      # There have been cases of partial or broken SDK installations. A missing
27072      # lib dir is not going to work.
27073      if test ! -d "$WIN_SDK_BASE/../lib"; then
27074        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27075$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27076        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27077$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27078      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27079        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27080$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27081        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27082        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27083          VS_ENV_ARGS="/x86"
27084        else
27085          VS_ENV_ARGS="/x64"
27086        fi
27087      else
27088        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27089$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27090        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27091$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27092      fi
27093    fi
27094  fi
27095
27096
27097  if test "x$VS_ENV_CMD" != x; then
27098    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27099
27100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27101
27102  # First separate the path from the arguments. This will split at the first
27103  # space.
27104  complete="$VS_ENV_CMD"
27105  path="${complete%% *}"
27106  tmp="$complete EOL"
27107  arguments="${tmp#* }"
27108
27109  # Input might be given as Windows format, start by converting to
27110  # unix format.
27111  new_path=`$CYGPATH -u "$path"`
27112
27113  # Now try to locate executable using which
27114  new_path=`$WHICH "$new_path" 2> /dev/null`
27115  # bat and cmd files are not always considered executable in cygwin causing which
27116  # to not find them
27117  if test "x$new_path" = x \
27118      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27119      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27120    new_path=`$CYGPATH -u "$path"`
27121  fi
27122  if test "x$new_path" = x; then
27123    # Oops. Which didn't find the executable.
27124    # The splitting of arguments from the executable at a space might have been incorrect,
27125    # since paths with space are more likely in Windows. Give it another try with the whole
27126    # argument.
27127    path="$complete"
27128    arguments="EOL"
27129    new_path=`$CYGPATH -u "$path"`
27130    new_path=`$WHICH "$new_path" 2> /dev/null`
27131    # bat and cmd files are not always considered executable in cygwin causing which
27132    # to not find them
27133    if test "x$new_path" = x \
27134        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27135        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27136      new_path=`$CYGPATH -u "$path"`
27137    fi
27138    if test "x$new_path" = x; then
27139      # It's still not found. Now this is an unrecoverable error.
27140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27141$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27142      has_space=`$ECHO "$complete" | $GREP " "`
27143      if test "x$has_space" != x; then
27144        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27145$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27146      fi
27147      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27148    fi
27149  fi
27150
27151  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27152  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27153  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27154  # "foo.exe" is OK but "foo" is an error.
27155  #
27156  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27157  # It is also a way to make sure we got the proper file name for the real test later on.
27158  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27159  if test "x$test_shortpath" = x; then
27160    # Short path failed, file does not exist as specified.
27161    # Try adding .exe or .cmd
27162    if test -f "${new_path}.exe"; then
27163      input_to_shortpath="${new_path}.exe"
27164    elif test -f "${new_path}.cmd"; then
27165      input_to_shortpath="${new_path}.cmd"
27166    else
27167      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27168$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27169      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27170$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27171      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27172    fi
27173  else
27174    input_to_shortpath="$new_path"
27175  fi
27176
27177  # Call helper function which possibly converts this using DOS-style short mode.
27178  # If so, the updated path is stored in $new_path.
27179  new_path="$input_to_shortpath"
27180
27181  input_path="$input_to_shortpath"
27182  # Check if we need to convert this using DOS-style short mode. If the path
27183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27184  # take no chances and rewrite it.
27185  # Note: m4 eats our [], so we need to use [ and ] instead.
27186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27187  if test "x$has_forbidden_chars" != x; then
27188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27192      # Going to short mode and back again did indeed matter. Since short mode is
27193      # case insensitive, let's make it lowercase to improve readability.
27194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27195      # Now convert it back to Unix-stile (cygpath)
27196      input_path=`$CYGPATH -u "$shortmode_path"`
27197      new_path="$input_path"
27198    fi
27199  fi
27200
27201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27202  if test "x$test_cygdrive_prefix" = x; then
27203    # As a simple fix, exclude /usr/bin since it's not a real path.
27204    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27206      # a path prefixed by /cygdrive for fixpath to work.
27207      new_path="$CYGWIN_ROOT_PATH$input_path"
27208    fi
27209  fi
27210
27211  # remove trailing .exe if any
27212  new_path="${new_path/%.exe/}"
27213
27214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27215
27216  # First separate the path from the arguments. This will split at the first
27217  # space.
27218  complete="$VS_ENV_CMD"
27219  path="${complete%% *}"
27220  tmp="$complete EOL"
27221  arguments="${tmp#* }"
27222
27223  # Input might be given as Windows format, start by converting to
27224  # unix format.
27225  new_path="$path"
27226
27227  windows_path="$new_path"
27228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27229    unix_path=`$CYGPATH -u "$windows_path"`
27230    new_path="$unix_path"
27231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27233    new_path="$unix_path"
27234  fi
27235
27236
27237  # Now try to locate executable using which
27238  new_path=`$WHICH "$new_path" 2> /dev/null`
27239
27240  if test "x$new_path" = x; then
27241    # Oops. Which didn't find the executable.
27242    # The splitting of arguments from the executable at a space might have been incorrect,
27243    # since paths with space are more likely in Windows. Give it another try with the whole
27244    # argument.
27245    path="$complete"
27246    arguments="EOL"
27247    new_path="$path"
27248
27249  windows_path="$new_path"
27250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27251    unix_path=`$CYGPATH -u "$windows_path"`
27252    new_path="$unix_path"
27253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27255    new_path="$unix_path"
27256  fi
27257
27258
27259    new_path=`$WHICH "$new_path" 2> /dev/null`
27260
27261    if test "x$new_path" = x; then
27262      # It's still not found. Now this is an unrecoverable error.
27263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27264$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27265      has_space=`$ECHO "$complete" | $GREP " "`
27266      if test "x$has_space" != x; then
27267        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27268$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27269      fi
27270      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27271    fi
27272  fi
27273
27274  # Now new_path has a complete unix path to the binary
27275  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27276    # Keep paths in /bin as-is, but remove trailing .exe if any
27277    new_path="${new_path/%.exe/}"
27278    # Do not save /bin paths to all_fixpath_prefixes!
27279  else
27280    # Not in mixed or Windows style, start by that.
27281    new_path=`cmd //c echo $new_path`
27282
27283  input_path="$new_path"
27284  # Check if we need to convert this using DOS-style short mode. If the path
27285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27286  # take no chances and rewrite it.
27287  # Note: m4 eats our [], so we need to use [ and ] instead.
27288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27289  if test "x$has_forbidden_chars" != x; then
27290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27292  fi
27293
27294    # Output is in $new_path
27295
27296  windows_path="$new_path"
27297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27298    unix_path=`$CYGPATH -u "$windows_path"`
27299    new_path="$unix_path"
27300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27302    new_path="$unix_path"
27303  fi
27304
27305    # remove trailing .exe if any
27306    new_path="${new_path/%.exe/}"
27307
27308    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27309    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27310  fi
27311
27312  else
27313    # We're on a posix platform. Hooray! :)
27314    # First separate the path from the arguments. This will split at the first
27315    # space.
27316    complete="$VS_ENV_CMD"
27317    path="${complete%% *}"
27318    tmp="$complete EOL"
27319    arguments="${tmp#* }"
27320
27321    # Cannot rely on the command "which" here since it doesn't always work.
27322    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27323    if test -z "$is_absolute_path"; then
27324      # Path to executable is not absolute. Find it.
27325      IFS_save="$IFS"
27326      IFS=:
27327      for p in $PATH; do
27328        if test -f "$p/$path" && test -x "$p/$path"; then
27329          new_path="$p/$path"
27330          break
27331        fi
27332      done
27333      IFS="$IFS_save"
27334    else
27335      # This is an absolute path, we can use it without further modifications.
27336      new_path="$path"
27337    fi
27338
27339    if test "x$new_path" = x; then
27340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27341$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27342      has_space=`$ECHO "$complete" | $GREP " "`
27343      if test "x$has_space" != x; then
27344        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27345$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27346      fi
27347      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27348    fi
27349  fi
27350
27351  # Now join together the path and the arguments once again
27352  if test "x$arguments" != xEOL; then
27353    new_complete="$new_path ${arguments% *}"
27354  else
27355    new_complete="$new_path"
27356  fi
27357
27358  if test "x$complete" != "x$new_complete"; then
27359    VS_ENV_CMD="$new_complete"
27360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27361$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27362  fi
27363
27364
27365    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27366    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27367$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27368
27369    # We need to create a couple of temporary files.
27370    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27371    $MKDIR -p $VS_ENV_TMP_DIR
27372
27373    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27374    # Instead create a shell script which will set the relevant variables when run.
27375    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27376
27377  unix_path="$WINPATH_VS_ENV_CMD"
27378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27379    windows_path=`$CYGPATH -m "$unix_path"`
27380    WINPATH_VS_ENV_CMD="$windows_path"
27381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27382    windows_path=`cmd //c echo $unix_path`
27383    WINPATH_VS_ENV_CMD="$windows_path"
27384  fi
27385
27386    WINPATH_BASH="$BASH"
27387
27388  unix_path="$WINPATH_BASH"
27389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27390    windows_path=`$CYGPATH -m "$unix_path"`
27391    WINPATH_BASH="$windows_path"
27392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27393    windows_path=`cmd //c echo $unix_path`
27394    WINPATH_BASH="$windows_path"
27395  fi
27396
27397
27398    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27399    # script (executable by bash) that will setup the important variables.
27400    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27401    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27402    # This will end up something like:
27403    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27404    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27405    # These will end up something like:
27406    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27407    # The trailing space for everyone except PATH is no typo, but is needed due
27408    # to trailing \ in the Windows paths. These will be stripped later.
27409    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27410    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27411    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27412    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27413    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27414    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27415
27416    # Now execute the newly created bat file.
27417    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27418    # Change directory so we don't need to mess with Windows paths in redirects.
27419    cd $VS_ENV_TMP_DIR
27420    cmd /c extract-vs-env.bat | $CAT
27421    cd $CURDIR
27422
27423    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27424      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27425$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27426      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27427$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27428      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27429$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27430      as_fn_error $? "Cannot continue" "$LINENO" 5
27431    fi
27432
27433    # Now set all paths and other env variables. This will allow the rest of
27434    # the configure script to find and run the compiler in the proper way.
27435    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27436$as_echo "$as_me: Setting extracted environment variables" >&6;}
27437    . $VS_ENV_TMP_DIR/set-vs-env.sh
27438    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27439    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27440  else
27441    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27442    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27443$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27444  fi
27445
27446  # At this point, we should have correct variables in the environment, or we can't continue.
27447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27448$as_echo_n "checking for Visual Studio variables... " >&6; }
27449
27450  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27451    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27452      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27453$as_echo "present but broken" >&6; }
27454      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27455    else
27456      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27457$as_echo "ok" >&6; }
27458      # Remove any trailing "\" and " " from the variables.
27459      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27460      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27461      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27462      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27463      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27464      # Remove any paths containing # (typically F#) as that messes up make. This
27465      # is needed if visual studio was installed with F# support.
27466      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27467
27468
27469
27470
27471    fi
27472  else
27473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27474$as_echo "not found" >&6; }
27475
27476    if test "x$VS_ENV_CMD" = x; then
27477      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27478$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27479      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27480$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27481    else
27482      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27483$as_echo "$as_me: Running the extraction script failed." >&6;}
27484    fi
27485    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27486$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27487    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27488$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27489    as_fn_error $? "Cannot continue" "$LINENO" 5
27490  fi
27491
27492    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27493    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27494    PATH="$VS_PATH"
27495    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27496    export INCLUDE="$VS_INCLUDE"
27497    export LIB="$VS_LIB"
27498  fi
27499
27500  # autoconf magic only relies on PATH, so update it if tools dir is specified
27501  OLD_PATH="$PATH"
27502
27503  # For solaris we really need solaris tools, and not the GNU equivalent.
27504  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27505  # so add that to path before starting to probe.
27506  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27507  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27508    PATH="/usr/ccs/bin:$PATH"
27509  fi
27510
27511  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27512  # override all other locations.
27513  if test "x$TOOLCHAIN_PATH" != x; then
27514    PATH=$TOOLCHAIN_PATH:$PATH
27515  fi
27516
27517
27518  #
27519  # Setup the compilers (CC and CXX)
27520  #
27521
27522  COMPILER_NAME=C
27523  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27524
27525  if test "x$CC" != x; then
27526    # User has supplied compiler name already, always let that override.
27527    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27528$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27529    if test "x`basename $CC`" = "x$CC"; then
27530      # A command without a complete path is provided, search $PATH.
27531
27532      for ac_prog in $CC
27533do
27534  # Extract the first word of "$ac_prog", so it can be a program name with args.
27535set dummy $ac_prog; ac_word=$2
27536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27537$as_echo_n "checking for $ac_word... " >&6; }
27538if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27539  $as_echo_n "(cached) " >&6
27540else
27541  case $POTENTIAL_CC in
27542  [\\/]* | ?:[\\/]*)
27543  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27544  ;;
27545  *)
27546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27547for as_dir in $PATH
27548do
27549  IFS=$as_save_IFS
27550  test -z "$as_dir" && as_dir=.
27551    for ac_exec_ext in '' $ac_executable_extensions; do
27552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27553    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27555    break 2
27556  fi
27557done
27558  done
27559IFS=$as_save_IFS
27560
27561  ;;
27562esac
27563fi
27564POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27565if test -n "$POTENTIAL_CC"; then
27566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27567$as_echo "$POTENTIAL_CC" >&6; }
27568else
27569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27570$as_echo "no" >&6; }
27571fi
27572
27573
27574  test -n "$POTENTIAL_CC" && break
27575done
27576
27577      if test "x$POTENTIAL_CC" != x; then
27578        CC=$POTENTIAL_CC
27579      else
27580        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27581      fi
27582    else
27583      # Otherwise it might already be a complete path
27584      if test ! -x "$CC"; then
27585        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27586      fi
27587    fi
27588  else
27589    # No user supplied value. Locate compiler ourselves.
27590
27591    # If we are cross compiling, assume cross compilation tools follows the
27592    # cross compilation standard where they are prefixed with the autoconf
27593    # standard name for the target. For example the binary
27594    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27595    # If we are not cross compiling, then the default compiler name will be
27596    # used.
27597
27598    CC=
27599    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27600    # before checking the rest of the PATH.
27601    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27602    # step, this should not be necessary.
27603    if test -n "$TOOLCHAIN_PATH"; then
27604      PATH_save="$PATH"
27605      PATH="$TOOLCHAIN_PATH"
27606      for ac_prog in $SEARCH_LIST
27607do
27608  # Extract the first word of "$ac_prog", so it can be a program name with args.
27609set dummy $ac_prog; ac_word=$2
27610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27611$as_echo_n "checking for $ac_word... " >&6; }
27612if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27613  $as_echo_n "(cached) " >&6
27614else
27615  case $TOOLCHAIN_PATH_CC in
27616  [\\/]* | ?:[\\/]*)
27617  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27618  ;;
27619  *)
27620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27621for as_dir in $PATH
27622do
27623  IFS=$as_save_IFS
27624  test -z "$as_dir" && as_dir=.
27625    for ac_exec_ext in '' $ac_executable_extensions; do
27626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27627    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27629    break 2
27630  fi
27631done
27632  done
27633IFS=$as_save_IFS
27634
27635  ;;
27636esac
27637fi
27638TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27639if test -n "$TOOLCHAIN_PATH_CC"; then
27640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27641$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27642else
27643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27644$as_echo "no" >&6; }
27645fi
27646
27647
27648  test -n "$TOOLCHAIN_PATH_CC" && break
27649done
27650
27651      CC=$TOOLCHAIN_PATH_CC
27652      PATH="$PATH_save"
27653    fi
27654
27655    # AC_PATH_PROGS can't be run multiple times with the same variable,
27656    # so create a new name for this run.
27657    if test "x$CC" = x; then
27658      for ac_prog in $SEARCH_LIST
27659do
27660  # Extract the first word of "$ac_prog", so it can be a program name with args.
27661set dummy $ac_prog; ac_word=$2
27662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27663$as_echo_n "checking for $ac_word... " >&6; }
27664if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27665  $as_echo_n "(cached) " >&6
27666else
27667  case $POTENTIAL_CC in
27668  [\\/]* | ?:[\\/]*)
27669  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27670  ;;
27671  *)
27672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27673for as_dir in $PATH
27674do
27675  IFS=$as_save_IFS
27676  test -z "$as_dir" && as_dir=.
27677    for ac_exec_ext in '' $ac_executable_extensions; do
27678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27679    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27681    break 2
27682  fi
27683done
27684  done
27685IFS=$as_save_IFS
27686
27687  ;;
27688esac
27689fi
27690POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27691if test -n "$POTENTIAL_CC"; then
27692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27693$as_echo "$POTENTIAL_CC" >&6; }
27694else
27695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27696$as_echo "no" >&6; }
27697fi
27698
27699
27700  test -n "$POTENTIAL_CC" && break
27701done
27702
27703      CC=$POTENTIAL_CC
27704    fi
27705
27706    if test "x$CC" = x; then
27707
27708  # Print a helpful message on how to acquire the necessary build dependency.
27709  # devkit is the help tag: freetype, cups, pulse, alsa etc
27710  MISSING_DEPENDENCY=devkit
27711
27712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27713    cygwin_help $MISSING_DEPENDENCY
27714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27715    msys_help $MISSING_DEPENDENCY
27716  else
27717    PKGHANDLER_COMMAND=
27718
27719    case $PKGHANDLER in
27720      apt-get)
27721        apt_help     $MISSING_DEPENDENCY ;;
27722      yum)
27723        yum_help     $MISSING_DEPENDENCY ;;
27724      port)
27725        port_help    $MISSING_DEPENDENCY ;;
27726      pkgutil)
27727        pkgutil_help $MISSING_DEPENDENCY ;;
27728      pkgadd)
27729        pkgadd_help  $MISSING_DEPENDENCY ;;
27730    esac
27731
27732    if test "x$PKGHANDLER_COMMAND" != x; then
27733      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27734    fi
27735  fi
27736
27737      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27738    fi
27739  fi
27740
27741  # Now we have a compiler binary in CC. Make sure it's okay.
27742
27743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27744
27745  # First separate the path from the arguments. This will split at the first
27746  # space.
27747  complete="$CC"
27748  path="${complete%% *}"
27749  tmp="$complete EOL"
27750  arguments="${tmp#* }"
27751
27752  # Input might be given as Windows format, start by converting to
27753  # unix format.
27754  new_path=`$CYGPATH -u "$path"`
27755
27756  # Now try to locate executable using which
27757  new_path=`$WHICH "$new_path" 2> /dev/null`
27758  # bat and cmd files are not always considered executable in cygwin causing which
27759  # to not find them
27760  if test "x$new_path" = x \
27761      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27762      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27763    new_path=`$CYGPATH -u "$path"`
27764  fi
27765  if test "x$new_path" = x; then
27766    # Oops. Which didn't find the executable.
27767    # The splitting of arguments from the executable at a space might have been incorrect,
27768    # since paths with space are more likely in Windows. Give it another try with the whole
27769    # argument.
27770    path="$complete"
27771    arguments="EOL"
27772    new_path=`$CYGPATH -u "$path"`
27773    new_path=`$WHICH "$new_path" 2> /dev/null`
27774    # bat and cmd files are not always considered executable in cygwin causing which
27775    # to not find them
27776    if test "x$new_path" = x \
27777        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27778        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27779      new_path=`$CYGPATH -u "$path"`
27780    fi
27781    if test "x$new_path" = x; then
27782      # It's still not found. Now this is an unrecoverable error.
27783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27784$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27785      has_space=`$ECHO "$complete" | $GREP " "`
27786      if test "x$has_space" != x; then
27787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27789      fi
27790      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27791    fi
27792  fi
27793
27794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27797  # "foo.exe" is OK but "foo" is an error.
27798  #
27799  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27800  # It is also a way to make sure we got the proper file name for the real test later on.
27801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27802  if test "x$test_shortpath" = x; then
27803    # Short path failed, file does not exist as specified.
27804    # Try adding .exe or .cmd
27805    if test -f "${new_path}.exe"; then
27806      input_to_shortpath="${new_path}.exe"
27807    elif test -f "${new_path}.cmd"; then
27808      input_to_shortpath="${new_path}.cmd"
27809    else
27810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27811$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27812      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27813$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27814      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27815    fi
27816  else
27817    input_to_shortpath="$new_path"
27818  fi
27819
27820  # Call helper function which possibly converts this using DOS-style short mode.
27821  # If so, the updated path is stored in $new_path.
27822  new_path="$input_to_shortpath"
27823
27824  input_path="$input_to_shortpath"
27825  # Check if we need to convert this using DOS-style short mode. If the path
27826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27827  # take no chances and rewrite it.
27828  # Note: m4 eats our [], so we need to use [ and ] instead.
27829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27830  if test "x$has_forbidden_chars" != x; then
27831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27835      # Going to short mode and back again did indeed matter. Since short mode is
27836      # case insensitive, let's make it lowercase to improve readability.
27837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27838      # Now convert it back to Unix-stile (cygpath)
27839      input_path=`$CYGPATH -u "$shortmode_path"`
27840      new_path="$input_path"
27841    fi
27842  fi
27843
27844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27845  if test "x$test_cygdrive_prefix" = x; then
27846    # As a simple fix, exclude /usr/bin since it's not a real path.
27847    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27849      # a path prefixed by /cygdrive for fixpath to work.
27850      new_path="$CYGWIN_ROOT_PATH$input_path"
27851    fi
27852  fi
27853
27854  # remove trailing .exe if any
27855  new_path="${new_path/%.exe/}"
27856
27857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27858
27859  # First separate the path from the arguments. This will split at the first
27860  # space.
27861  complete="$CC"
27862  path="${complete%% *}"
27863  tmp="$complete EOL"
27864  arguments="${tmp#* }"
27865
27866  # Input might be given as Windows format, start by converting to
27867  # unix format.
27868  new_path="$path"
27869
27870  windows_path="$new_path"
27871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27872    unix_path=`$CYGPATH -u "$windows_path"`
27873    new_path="$unix_path"
27874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27876    new_path="$unix_path"
27877  fi
27878
27879
27880  # Now try to locate executable using which
27881  new_path=`$WHICH "$new_path" 2> /dev/null`
27882
27883  if test "x$new_path" = x; then
27884    # Oops. Which didn't find the executable.
27885    # The splitting of arguments from the executable at a space might have been incorrect,
27886    # since paths with space are more likely in Windows. Give it another try with the whole
27887    # argument.
27888    path="$complete"
27889    arguments="EOL"
27890    new_path="$path"
27891
27892  windows_path="$new_path"
27893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27894    unix_path=`$CYGPATH -u "$windows_path"`
27895    new_path="$unix_path"
27896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27898    new_path="$unix_path"
27899  fi
27900
27901
27902    new_path=`$WHICH "$new_path" 2> /dev/null`
27903
27904    if test "x$new_path" = x; then
27905      # It's still not found. Now this is an unrecoverable error.
27906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27907$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27908      has_space=`$ECHO "$complete" | $GREP " "`
27909      if test "x$has_space" != x; then
27910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27912      fi
27913      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27914    fi
27915  fi
27916
27917  # Now new_path has a complete unix path to the binary
27918  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27919    # Keep paths in /bin as-is, but remove trailing .exe if any
27920    new_path="${new_path/%.exe/}"
27921    # Do not save /bin paths to all_fixpath_prefixes!
27922  else
27923    # Not in mixed or Windows style, start by that.
27924    new_path=`cmd //c echo $new_path`
27925
27926  input_path="$new_path"
27927  # Check if we need to convert this using DOS-style short mode. If the path
27928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27929  # take no chances and rewrite it.
27930  # Note: m4 eats our [], so we need to use [ and ] instead.
27931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27932  if test "x$has_forbidden_chars" != x; then
27933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27935  fi
27936
27937    # Output is in $new_path
27938
27939  windows_path="$new_path"
27940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27941    unix_path=`$CYGPATH -u "$windows_path"`
27942    new_path="$unix_path"
27943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27945    new_path="$unix_path"
27946  fi
27947
27948    # remove trailing .exe if any
27949    new_path="${new_path/%.exe/}"
27950
27951    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27952    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27953  fi
27954
27955  else
27956    # We're on a posix platform. Hooray! :)
27957    # First separate the path from the arguments. This will split at the first
27958    # space.
27959    complete="$CC"
27960    path="${complete%% *}"
27961    tmp="$complete EOL"
27962    arguments="${tmp#* }"
27963
27964    # Cannot rely on the command "which" here since it doesn't always work.
27965    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27966    if test -z "$is_absolute_path"; then
27967      # Path to executable is not absolute. Find it.
27968      IFS_save="$IFS"
27969      IFS=:
27970      for p in $PATH; do
27971        if test -f "$p/$path" && test -x "$p/$path"; then
27972          new_path="$p/$path"
27973          break
27974        fi
27975      done
27976      IFS="$IFS_save"
27977    else
27978      # This is an absolute path, we can use it without further modifications.
27979      new_path="$path"
27980    fi
27981
27982    if test "x$new_path" = x; then
27983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27984$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27985      has_space=`$ECHO "$complete" | $GREP " "`
27986      if test "x$has_space" != x; then
27987        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27988$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27989      fi
27990      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27991    fi
27992  fi
27993
27994  # Now join together the path and the arguments once again
27995  if test "x$arguments" != xEOL; then
27996    new_complete="$new_path ${arguments% *}"
27997  else
27998    new_complete="$new_path"
27999  fi
28000
28001  if test "x$complete" != "x$new_complete"; then
28002    CC="$new_complete"
28003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28004$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28005  fi
28006
28007  TEST_COMPILER="$CC"
28008  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28009  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28010  if test "x$OPENJDK_BUILD_OS" != xaix; then
28011    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28013$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28014
28015  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28016    # Follow a chain of symbolic links. Use readlink
28017    # where it exists, else fall back to horribly
28018    # complicated shell code.
28019    if test "x$READLINK_TESTED" != yes; then
28020      # On MacOSX there is a readlink tool with a different
28021      # purpose than the GNU readlink tool. Check the found readlink.
28022      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28023      if test "x$ISGNU" = x; then
28024        # A readlink that we do not know how to use.
28025        # Are there other non-GNU readlinks out there?
28026        READLINK_TESTED=yes
28027        READLINK=
28028      fi
28029    fi
28030
28031    if test "x$READLINK" != x; then
28032      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28033    else
28034      # Save the current directory for restoring afterwards
28035      STARTDIR=$PWD
28036      COUNTER=0
28037      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28038      sym_link_file=`$BASENAME $TEST_COMPILER`
28039      cd $sym_link_dir
28040      # Use -P flag to resolve symlinks in directories.
28041      cd `$THEPWDCMD -P`
28042      sym_link_dir=`$THEPWDCMD -P`
28043      # Resolve file symlinks
28044      while test $COUNTER -lt 20; do
28045        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28046        if test "x$ISLINK" == x; then
28047          # This is not a symbolic link! We are done!
28048          break
28049        fi
28050        # Again resolve directory symlinks since the target of the just found
28051        # link could be in a different directory
28052        cd `$DIRNAME $ISLINK`
28053        sym_link_dir=`$THEPWDCMD -P`
28054        sym_link_file=`$BASENAME $ISLINK`
28055        let COUNTER=COUNTER+1
28056      done
28057      cd $STARTDIR
28058      TEST_COMPILER=$sym_link_dir/$sym_link_file
28059    fi
28060  fi
28061
28062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28063$as_echo "$TEST_COMPILER" >&6; }
28064  fi
28065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28066$as_echo_n "checking if CC is disguised ccache... " >&6; }
28067
28068  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28069  if test "x$COMPILER_BASENAME" = "xccache"; then
28070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28071$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28072    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28073    # We want to control ccache invocation ourselves, so ignore this cc and try
28074    # searching again.
28075
28076    # Remove the path to the fake ccache cc from the PATH
28077    RETRY_COMPILER_SAVED_PATH="$PATH"
28078    COMPILER_DIRNAME=`$DIRNAME $CC`
28079    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28080
28081    # Try again looking for our compiler
28082    if test -n "$ac_tool_prefix"; then
28083  for ac_prog in $TOOLCHAIN_CC_BINARY
28084  do
28085    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28086set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28088$as_echo_n "checking for $ac_word... " >&6; }
28089if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28090  $as_echo_n "(cached) " >&6
28091else
28092  if test -n "$PROPER_COMPILER_CC"; then
28093  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28094else
28095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28096for as_dir in $PATH
28097do
28098  IFS=$as_save_IFS
28099  test -z "$as_dir" && as_dir=.
28100    for ac_exec_ext in '' $ac_executable_extensions; do
28101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28102    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28104    break 2
28105  fi
28106done
28107  done
28108IFS=$as_save_IFS
28109
28110fi
28111fi
28112PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28113if test -n "$PROPER_COMPILER_CC"; then
28114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28115$as_echo "$PROPER_COMPILER_CC" >&6; }
28116else
28117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28118$as_echo "no" >&6; }
28119fi
28120
28121
28122    test -n "$PROPER_COMPILER_CC" && break
28123  done
28124fi
28125if test -z "$PROPER_COMPILER_CC"; then
28126  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28127  for ac_prog in $TOOLCHAIN_CC_BINARY
28128do
28129  # Extract the first word of "$ac_prog", so it can be a program name with args.
28130set dummy $ac_prog; ac_word=$2
28131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28132$as_echo_n "checking for $ac_word... " >&6; }
28133if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28134  $as_echo_n "(cached) " >&6
28135else
28136  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28137  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28138else
28139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28140for as_dir in $PATH
28141do
28142  IFS=$as_save_IFS
28143  test -z "$as_dir" && as_dir=.
28144    for ac_exec_ext in '' $ac_executable_extensions; do
28145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28146    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28148    break 2
28149  fi
28150done
28151  done
28152IFS=$as_save_IFS
28153
28154fi
28155fi
28156ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28157if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28159$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28160else
28161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28162$as_echo "no" >&6; }
28163fi
28164
28165
28166  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28167done
28168
28169  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28170    PROPER_COMPILER_CC=""
28171  else
28172    case $cross_compiling:$ac_tool_warned in
28173yes:)
28174{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28175$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28176ac_tool_warned=yes ;;
28177esac
28178    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28179  fi
28180fi
28181
28182
28183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28184
28185  # First separate the path from the arguments. This will split at the first
28186  # space.
28187  complete="$PROPER_COMPILER_CC"
28188  path="${complete%% *}"
28189  tmp="$complete EOL"
28190  arguments="${tmp#* }"
28191
28192  # Input might be given as Windows format, start by converting to
28193  # unix format.
28194  new_path=`$CYGPATH -u "$path"`
28195
28196  # Now try to locate executable using which
28197  new_path=`$WHICH "$new_path" 2> /dev/null`
28198  # bat and cmd files are not always considered executable in cygwin causing which
28199  # to not find them
28200  if test "x$new_path" = x \
28201      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28202      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28203    new_path=`$CYGPATH -u "$path"`
28204  fi
28205  if test "x$new_path" = x; then
28206    # Oops. Which didn't find the executable.
28207    # The splitting of arguments from the executable at a space might have been incorrect,
28208    # since paths with space are more likely in Windows. Give it another try with the whole
28209    # argument.
28210    path="$complete"
28211    arguments="EOL"
28212    new_path=`$CYGPATH -u "$path"`
28213    new_path=`$WHICH "$new_path" 2> /dev/null`
28214    # bat and cmd files are not always considered executable in cygwin causing which
28215    # to not find them
28216    if test "x$new_path" = x \
28217        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28218        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28219      new_path=`$CYGPATH -u "$path"`
28220    fi
28221    if test "x$new_path" = x; then
28222      # It's still not found. Now this is an unrecoverable error.
28223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28224$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28225      has_space=`$ECHO "$complete" | $GREP " "`
28226      if test "x$has_space" != x; then
28227        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28228$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28229      fi
28230      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28231    fi
28232  fi
28233
28234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28237  # "foo.exe" is OK but "foo" is an error.
28238  #
28239  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28240  # It is also a way to make sure we got the proper file name for the real test later on.
28241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28242  if test "x$test_shortpath" = x; then
28243    # Short path failed, file does not exist as specified.
28244    # Try adding .exe or .cmd
28245    if test -f "${new_path}.exe"; then
28246      input_to_shortpath="${new_path}.exe"
28247    elif test -f "${new_path}.cmd"; then
28248      input_to_shortpath="${new_path}.cmd"
28249    else
28250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28251$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28252      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28253$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28254      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28255    fi
28256  else
28257    input_to_shortpath="$new_path"
28258  fi
28259
28260  # Call helper function which possibly converts this using DOS-style short mode.
28261  # If so, the updated path is stored in $new_path.
28262  new_path="$input_to_shortpath"
28263
28264  input_path="$input_to_shortpath"
28265  # Check if we need to convert this using DOS-style short mode. If the path
28266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28267  # take no chances and rewrite it.
28268  # Note: m4 eats our [], so we need to use [ and ] instead.
28269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28270  if test "x$has_forbidden_chars" != x; then
28271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28272    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28273    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28274    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28275      # Going to short mode and back again did indeed matter. Since short mode is
28276      # case insensitive, let's make it lowercase to improve readability.
28277      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28278      # Now convert it back to Unix-stile (cygpath)
28279      input_path=`$CYGPATH -u "$shortmode_path"`
28280      new_path="$input_path"
28281    fi
28282  fi
28283
28284  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28285  if test "x$test_cygdrive_prefix" = x; then
28286    # As a simple fix, exclude /usr/bin since it's not a real path.
28287    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28288      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28289      # a path prefixed by /cygdrive for fixpath to work.
28290      new_path="$CYGWIN_ROOT_PATH$input_path"
28291    fi
28292  fi
28293
28294  # remove trailing .exe if any
28295  new_path="${new_path/%.exe/}"
28296
28297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28298
28299  # First separate the path from the arguments. This will split at the first
28300  # space.
28301  complete="$PROPER_COMPILER_CC"
28302  path="${complete%% *}"
28303  tmp="$complete EOL"
28304  arguments="${tmp#* }"
28305
28306  # Input might be given as Windows format, start by converting to
28307  # unix format.
28308  new_path="$path"
28309
28310  windows_path="$new_path"
28311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28312    unix_path=`$CYGPATH -u "$windows_path"`
28313    new_path="$unix_path"
28314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28316    new_path="$unix_path"
28317  fi
28318
28319
28320  # Now try to locate executable using which
28321  new_path=`$WHICH "$new_path" 2> /dev/null`
28322
28323  if test "x$new_path" = x; then
28324    # Oops. Which didn't find the executable.
28325    # The splitting of arguments from the executable at a space might have been incorrect,
28326    # since paths with space are more likely in Windows. Give it another try with the whole
28327    # argument.
28328    path="$complete"
28329    arguments="EOL"
28330    new_path="$path"
28331
28332  windows_path="$new_path"
28333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28334    unix_path=`$CYGPATH -u "$windows_path"`
28335    new_path="$unix_path"
28336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28338    new_path="$unix_path"
28339  fi
28340
28341
28342    new_path=`$WHICH "$new_path" 2> /dev/null`
28343
28344    if test "x$new_path" = x; then
28345      # It's still not found. Now this is an unrecoverable error.
28346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28347$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28348      has_space=`$ECHO "$complete" | $GREP " "`
28349      if test "x$has_space" != x; then
28350        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28351$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28352      fi
28353      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28354    fi
28355  fi
28356
28357  # Now new_path has a complete unix path to the binary
28358  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28359    # Keep paths in /bin as-is, but remove trailing .exe if any
28360    new_path="${new_path/%.exe/}"
28361    # Do not save /bin paths to all_fixpath_prefixes!
28362  else
28363    # Not in mixed or Windows style, start by that.
28364    new_path=`cmd //c echo $new_path`
28365
28366  input_path="$new_path"
28367  # Check if we need to convert this using DOS-style short mode. If the path
28368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28369  # take no chances and rewrite it.
28370  # Note: m4 eats our [], so we need to use [ and ] instead.
28371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28372  if test "x$has_forbidden_chars" != x; then
28373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28374    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28375  fi
28376
28377    # Output is in $new_path
28378
28379  windows_path="$new_path"
28380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28381    unix_path=`$CYGPATH -u "$windows_path"`
28382    new_path="$unix_path"
28383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28385    new_path="$unix_path"
28386  fi
28387
28388    # remove trailing .exe if any
28389    new_path="${new_path/%.exe/}"
28390
28391    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28392    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28393  fi
28394
28395  else
28396    # We're on a posix platform. Hooray! :)
28397    # First separate the path from the arguments. This will split at the first
28398    # space.
28399    complete="$PROPER_COMPILER_CC"
28400    path="${complete%% *}"
28401    tmp="$complete EOL"
28402    arguments="${tmp#* }"
28403
28404    # Cannot rely on the command "which" here since it doesn't always work.
28405    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28406    if test -z "$is_absolute_path"; then
28407      # Path to executable is not absolute. Find it.
28408      IFS_save="$IFS"
28409      IFS=:
28410      for p in $PATH; do
28411        if test -f "$p/$path" && test -x "$p/$path"; then
28412          new_path="$p/$path"
28413          break
28414        fi
28415      done
28416      IFS="$IFS_save"
28417    else
28418      # This is an absolute path, we can use it without further modifications.
28419      new_path="$path"
28420    fi
28421
28422    if test "x$new_path" = x; then
28423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28424$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28425      has_space=`$ECHO "$complete" | $GREP " "`
28426      if test "x$has_space" != x; then
28427        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28428$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28429      fi
28430      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28431    fi
28432  fi
28433
28434  # Now join together the path and the arguments once again
28435  if test "x$arguments" != xEOL; then
28436    new_complete="$new_path ${arguments% *}"
28437  else
28438    new_complete="$new_path"
28439  fi
28440
28441  if test "x$complete" != "x$new_complete"; then
28442    PROPER_COMPILER_CC="$new_complete"
28443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28444$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28445  fi
28446
28447    PATH="$RETRY_COMPILER_SAVED_PATH"
28448
28449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28450$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28451
28452  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28453    # Follow a chain of symbolic links. Use readlink
28454    # where it exists, else fall back to horribly
28455    # complicated shell code.
28456    if test "x$READLINK_TESTED" != yes; then
28457      # On MacOSX there is a readlink tool with a different
28458      # purpose than the GNU readlink tool. Check the found readlink.
28459      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28460      if test "x$ISGNU" = x; then
28461        # A readlink that we do not know how to use.
28462        # Are there other non-GNU readlinks out there?
28463        READLINK_TESTED=yes
28464        READLINK=
28465      fi
28466    fi
28467
28468    if test "x$READLINK" != x; then
28469      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28470    else
28471      # Save the current directory for restoring afterwards
28472      STARTDIR=$PWD
28473      COUNTER=0
28474      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28475      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28476      cd $sym_link_dir
28477      # Use -P flag to resolve symlinks in directories.
28478      cd `$THEPWDCMD -P`
28479      sym_link_dir=`$THEPWDCMD -P`
28480      # Resolve file symlinks
28481      while test $COUNTER -lt 20; do
28482        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28483        if test "x$ISLINK" == x; then
28484          # This is not a symbolic link! We are done!
28485          break
28486        fi
28487        # Again resolve directory symlinks since the target of the just found
28488        # link could be in a different directory
28489        cd `$DIRNAME $ISLINK`
28490        sym_link_dir=`$THEPWDCMD -P`
28491        sym_link_file=`$BASENAME $ISLINK`
28492        let COUNTER=COUNTER+1
28493      done
28494      cd $STARTDIR
28495      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28496    fi
28497  fi
28498
28499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28500$as_echo "$PROPER_COMPILER_CC" >&6; }
28501    CC="$PROPER_COMPILER_CC"
28502  else
28503    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28504$as_echo "no, keeping CC" >&6; }
28505  fi
28506
28507
28508  COMPILER=$CC
28509  COMPILER_NAME=$COMPILER_NAME
28510
28511  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28512    # cc -V output typically looks like
28513    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28514    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28515    # Check that this is likely to be the Solaris Studio cc.
28516    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28517    if test $? -ne 0; then
28518      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28519      { $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
28520$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28521      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28522$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28523      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28524$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28525      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28526    fi
28527    # Remove usage instructions (if present), and
28528    # collapse compiler output into a single line
28529    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28530        $SED -e 's/ *[Uu]sage:.*//'`
28531    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28532        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28533  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28534    # xlc -qversion output typically looks like
28535    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28536    #     Version: 11.01.0000.0015
28537    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28538    # Check that this is likely to be the IBM XL C compiler.
28539    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28540    if test $? -ne 0; then
28541      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28542      { $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
28543$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28544      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28545$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28546      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28547$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28548      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28549    fi
28550    # Collapse compiler output into a single line
28551    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28552    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28553        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28554  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28555    # There is no specific version flag, but all output starts with a version string.
28556    # First line typically looks something like:
28557    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28558    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28559    # Check that this is likely to be Microsoft CL.EXE.
28560    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28561    if test $? -ne 0; then
28562      { $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
28563$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28564      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28565$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28566      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28567    fi
28568    # Collapse compiler output into a single line
28569    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28570    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28571        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28572  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28573    # gcc --version output typically looks like
28574    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28575    #     Copyright (C) 2013 Free Software Foundation, Inc.
28576    #     This is free software; see the source for copying conditions.  There is NO
28577    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28578    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28579    # Check that this is likely to be GCC.
28580    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28581    if test $? -ne 0; then
28582      { $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
28583$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28584      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28585$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28586      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28587    fi
28588    # Remove Copyright and legalese from version string, and
28589    # collapse into a single line
28590    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28591        $SED -e 's/ *Copyright .*//'`
28592    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28593        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28594  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28595    # clang --version output typically looks like
28596    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28597    #    clang version 3.3 (tags/RELEASE_33/final)
28598    # or
28599    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28600    #    Target: x86_64-pc-linux-gnu
28601    #    Thread model: posix
28602    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28603    # Check that this is likely to be clang
28604    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28605    if test $? -ne 0; then
28606      { $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
28607$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28608      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28609$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28610      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28611    fi
28612    # Collapse compiler output into a single line
28613    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28614    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28615        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28616  else
28617      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28618  fi
28619  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28620  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28621  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28622  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28623
28624  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28625$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28626
28627
28628  # Now that we have resolved CC ourself, let autoconf have its go at it
28629  ac_ext=c
28630ac_cpp='$CPP $CPPFLAGS'
28631ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28632ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28633ac_compiler_gnu=$ac_cv_c_compiler_gnu
28634if test -n "$ac_tool_prefix"; then
28635  for ac_prog in $CC
28636  do
28637    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28638set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28640$as_echo_n "checking for $ac_word... " >&6; }
28641if ${ac_cv_prog_CC+:} false; then :
28642  $as_echo_n "(cached) " >&6
28643else
28644  if test -n "$CC"; then
28645  ac_cv_prog_CC="$CC" # Let the user override the test.
28646else
28647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28648for as_dir in $PATH
28649do
28650  IFS=$as_save_IFS
28651  test -z "$as_dir" && as_dir=.
28652    for ac_exec_ext in '' $ac_executable_extensions; do
28653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28654    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28656    break 2
28657  fi
28658done
28659  done
28660IFS=$as_save_IFS
28661
28662fi
28663fi
28664CC=$ac_cv_prog_CC
28665if test -n "$CC"; then
28666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28667$as_echo "$CC" >&6; }
28668else
28669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28670$as_echo "no" >&6; }
28671fi
28672
28673
28674    test -n "$CC" && break
28675  done
28676fi
28677if test -z "$CC"; then
28678  ac_ct_CC=$CC
28679  for ac_prog in $CC
28680do
28681  # Extract the first word of "$ac_prog", so it can be a program name with args.
28682set dummy $ac_prog; ac_word=$2
28683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28684$as_echo_n "checking for $ac_word... " >&6; }
28685if ${ac_cv_prog_ac_ct_CC+:} false; then :
28686  $as_echo_n "(cached) " >&6
28687else
28688  if test -n "$ac_ct_CC"; then
28689  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28690else
28691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28692for as_dir in $PATH
28693do
28694  IFS=$as_save_IFS
28695  test -z "$as_dir" && as_dir=.
28696    for ac_exec_ext in '' $ac_executable_extensions; do
28697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28698    ac_cv_prog_ac_ct_CC="$ac_prog"
28699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28700    break 2
28701  fi
28702done
28703  done
28704IFS=$as_save_IFS
28705
28706fi
28707fi
28708ac_ct_CC=$ac_cv_prog_ac_ct_CC
28709if test -n "$ac_ct_CC"; then
28710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28711$as_echo "$ac_ct_CC" >&6; }
28712else
28713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28714$as_echo "no" >&6; }
28715fi
28716
28717
28718  test -n "$ac_ct_CC" && break
28719done
28720
28721  if test "x$ac_ct_CC" = x; then
28722    CC=""
28723  else
28724    case $cross_compiling:$ac_tool_warned in
28725yes:)
28726{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28727$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28728ac_tool_warned=yes ;;
28729esac
28730    CC=$ac_ct_CC
28731  fi
28732fi
28733
28734
28735test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28737as_fn_error $? "no acceptable C compiler found in \$PATH
28738See \`config.log' for more details" "$LINENO" 5; }
28739
28740# Provide some information about the compiler.
28741$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28742set X $ac_compile
28743ac_compiler=$2
28744for ac_option in --version -v -V -qversion; do
28745  { { ac_try="$ac_compiler $ac_option >&5"
28746case "(($ac_try" in
28747  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28748  *) ac_try_echo=$ac_try;;
28749esac
28750eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28751$as_echo "$ac_try_echo"; } >&5
28752  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28753  ac_status=$?
28754  if test -s conftest.err; then
28755    sed '10a\
28756... rest of stderr output deleted ...
28757         10q' conftest.err >conftest.er1
28758    cat conftest.er1 >&5
28759  fi
28760  rm -f conftest.er1 conftest.err
28761  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28762  test $ac_status = 0; }
28763done
28764
28765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28766/* end confdefs.h.  */
28767
28768int
28769main ()
28770{
28771
28772  ;
28773  return 0;
28774}
28775_ACEOF
28776ac_clean_files_save=$ac_clean_files
28777ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28778# Try to create an executable without -o first, disregard a.out.
28779# It will help us diagnose broken compilers, and finding out an intuition
28780# of exeext.
28781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28782$as_echo_n "checking whether the C compiler works... " >&6; }
28783ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28784
28785# The possible output files:
28786ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28787
28788ac_rmfiles=
28789for ac_file in $ac_files
28790do
28791  case $ac_file in
28792    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28793    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28794  esac
28795done
28796rm -f $ac_rmfiles
28797
28798if { { ac_try="$ac_link_default"
28799case "(($ac_try" in
28800  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28801  *) ac_try_echo=$ac_try;;
28802esac
28803eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28804$as_echo "$ac_try_echo"; } >&5
28805  (eval "$ac_link_default") 2>&5
28806  ac_status=$?
28807  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28808  test $ac_status = 0; }; then :
28809  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28810# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28811# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28812# so that the user can short-circuit this test for compilers unknown to
28813# Autoconf.
28814for ac_file in $ac_files ''
28815do
28816  test -f "$ac_file" || continue
28817  case $ac_file in
28818    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28819	;;
28820    [ab].out )
28821	# We found the default executable, but exeext='' is most
28822	# certainly right.
28823	break;;
28824    *.* )
28825	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28826	then :; else
28827	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28828	fi
28829	# We set ac_cv_exeext here because the later test for it is not
28830	# safe: cross compilers may not add the suffix if given an `-o'
28831	# argument, so we may need to know it at that point already.
28832	# Even if this section looks crufty: it has the advantage of
28833	# actually working.
28834	break;;
28835    * )
28836	break;;
28837  esac
28838done
28839test "$ac_cv_exeext" = no && ac_cv_exeext=
28840
28841else
28842  ac_file=''
28843fi
28844if test -z "$ac_file"; then :
28845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28846$as_echo "no" >&6; }
28847$as_echo "$as_me: failed program was:" >&5
28848sed 's/^/| /' conftest.$ac_ext >&5
28849
28850{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28851$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28852as_fn_error 77 "C compiler cannot create executables
28853See \`config.log' for more details" "$LINENO" 5; }
28854else
28855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28856$as_echo "yes" >&6; }
28857fi
28858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28859$as_echo_n "checking for C compiler default output file name... " >&6; }
28860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28861$as_echo "$ac_file" >&6; }
28862ac_exeext=$ac_cv_exeext
28863
28864rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28865ac_clean_files=$ac_clean_files_save
28866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28867$as_echo_n "checking for suffix of executables... " >&6; }
28868if { { ac_try="$ac_link"
28869case "(($ac_try" in
28870  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28871  *) ac_try_echo=$ac_try;;
28872esac
28873eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28874$as_echo "$ac_try_echo"; } >&5
28875  (eval "$ac_link") 2>&5
28876  ac_status=$?
28877  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28878  test $ac_status = 0; }; then :
28879  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28880# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28881# work properly (i.e., refer to `conftest.exe'), while it won't with
28882# `rm'.
28883for ac_file in conftest.exe conftest conftest.*; do
28884  test -f "$ac_file" || continue
28885  case $ac_file in
28886    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28887    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28888	  break;;
28889    * ) break;;
28890  esac
28891done
28892else
28893  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28895as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28896See \`config.log' for more details" "$LINENO" 5; }
28897fi
28898rm -f conftest conftest$ac_cv_exeext
28899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28900$as_echo "$ac_cv_exeext" >&6; }
28901
28902rm -f conftest.$ac_ext
28903EXEEXT=$ac_cv_exeext
28904ac_exeext=$EXEEXT
28905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28906/* end confdefs.h.  */
28907#include <stdio.h>
28908int
28909main ()
28910{
28911FILE *f = fopen ("conftest.out", "w");
28912 return ferror (f) || fclose (f) != 0;
28913
28914  ;
28915  return 0;
28916}
28917_ACEOF
28918ac_clean_files="$ac_clean_files conftest.out"
28919# Check that the compiler produces executables we can run.  If not, either
28920# the compiler is broken, or we cross compile.
28921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28922$as_echo_n "checking whether we are cross compiling... " >&6; }
28923if test "$cross_compiling" != yes; then
28924  { { ac_try="$ac_link"
28925case "(($ac_try" in
28926  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28927  *) ac_try_echo=$ac_try;;
28928esac
28929eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28930$as_echo "$ac_try_echo"; } >&5
28931  (eval "$ac_link") 2>&5
28932  ac_status=$?
28933  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28934  test $ac_status = 0; }
28935  if { ac_try='./conftest$ac_cv_exeext'
28936  { { case "(($ac_try" in
28937  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28938  *) ac_try_echo=$ac_try;;
28939esac
28940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28941$as_echo "$ac_try_echo"; } >&5
28942  (eval "$ac_try") 2>&5
28943  ac_status=$?
28944  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28945  test $ac_status = 0; }; }; then
28946    cross_compiling=no
28947  else
28948    if test "$cross_compiling" = maybe; then
28949	cross_compiling=yes
28950    else
28951	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28952$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28953as_fn_error $? "cannot run C compiled programs.
28954If you meant to cross compile, use \`--host'.
28955See \`config.log' for more details" "$LINENO" 5; }
28956    fi
28957  fi
28958fi
28959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28960$as_echo "$cross_compiling" >&6; }
28961
28962rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28963ac_clean_files=$ac_clean_files_save
28964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28965$as_echo_n "checking for suffix of object files... " >&6; }
28966if ${ac_cv_objext+:} false; then :
28967  $as_echo_n "(cached) " >&6
28968else
28969  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28970/* end confdefs.h.  */
28971
28972int
28973main ()
28974{
28975
28976  ;
28977  return 0;
28978}
28979_ACEOF
28980rm -f conftest.o conftest.obj
28981if { { ac_try="$ac_compile"
28982case "(($ac_try" in
28983  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28984  *) ac_try_echo=$ac_try;;
28985esac
28986eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28987$as_echo "$ac_try_echo"; } >&5
28988  (eval "$ac_compile") 2>&5
28989  ac_status=$?
28990  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28991  test $ac_status = 0; }; then :
28992  for ac_file in conftest.o conftest.obj conftest.*; do
28993  test -f "$ac_file" || continue;
28994  case $ac_file in
28995    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28996    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28997       break;;
28998  esac
28999done
29000else
29001  $as_echo "$as_me: failed program was:" >&5
29002sed 's/^/| /' conftest.$ac_ext >&5
29003
29004{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29005$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29006as_fn_error $? "cannot compute suffix of object files: cannot compile
29007See \`config.log' for more details" "$LINENO" 5; }
29008fi
29009rm -f conftest.$ac_cv_objext conftest.$ac_ext
29010fi
29011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29012$as_echo "$ac_cv_objext" >&6; }
29013OBJEXT=$ac_cv_objext
29014ac_objext=$OBJEXT
29015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29016$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29017if ${ac_cv_c_compiler_gnu+:} false; then :
29018  $as_echo_n "(cached) " >&6
29019else
29020  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29021/* end confdefs.h.  */
29022
29023int
29024main ()
29025{
29026#ifndef __GNUC__
29027       choke me
29028#endif
29029
29030  ;
29031  return 0;
29032}
29033_ACEOF
29034if ac_fn_c_try_compile "$LINENO"; then :
29035  ac_compiler_gnu=yes
29036else
29037  ac_compiler_gnu=no
29038fi
29039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29040ac_cv_c_compiler_gnu=$ac_compiler_gnu
29041
29042fi
29043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29044$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29045if test $ac_compiler_gnu = yes; then
29046  GCC=yes
29047else
29048  GCC=
29049fi
29050ac_test_CFLAGS=${CFLAGS+set}
29051ac_save_CFLAGS=$CFLAGS
29052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29053$as_echo_n "checking whether $CC accepts -g... " >&6; }
29054if ${ac_cv_prog_cc_g+:} false; then :
29055  $as_echo_n "(cached) " >&6
29056else
29057  ac_save_c_werror_flag=$ac_c_werror_flag
29058   ac_c_werror_flag=yes
29059   ac_cv_prog_cc_g=no
29060   CFLAGS="-g"
29061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29062/* end confdefs.h.  */
29063
29064int
29065main ()
29066{
29067
29068  ;
29069  return 0;
29070}
29071_ACEOF
29072if ac_fn_c_try_compile "$LINENO"; then :
29073  ac_cv_prog_cc_g=yes
29074else
29075  CFLAGS=""
29076      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29077/* end confdefs.h.  */
29078
29079int
29080main ()
29081{
29082
29083  ;
29084  return 0;
29085}
29086_ACEOF
29087if ac_fn_c_try_compile "$LINENO"; then :
29088
29089else
29090  ac_c_werror_flag=$ac_save_c_werror_flag
29091	 CFLAGS="-g"
29092	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29093/* end confdefs.h.  */
29094
29095int
29096main ()
29097{
29098
29099  ;
29100  return 0;
29101}
29102_ACEOF
29103if ac_fn_c_try_compile "$LINENO"; then :
29104  ac_cv_prog_cc_g=yes
29105fi
29106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29107fi
29108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29109fi
29110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29111   ac_c_werror_flag=$ac_save_c_werror_flag
29112fi
29113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29114$as_echo "$ac_cv_prog_cc_g" >&6; }
29115if test "$ac_test_CFLAGS" = set; then
29116  CFLAGS=$ac_save_CFLAGS
29117elif test $ac_cv_prog_cc_g = yes; then
29118  if test "$GCC" = yes; then
29119    CFLAGS="-g -O2"
29120  else
29121    CFLAGS="-g"
29122  fi
29123else
29124  if test "$GCC" = yes; then
29125    CFLAGS="-O2"
29126  else
29127    CFLAGS=
29128  fi
29129fi
29130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29131$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29132if ${ac_cv_prog_cc_c89+:} false; then :
29133  $as_echo_n "(cached) " >&6
29134else
29135  ac_cv_prog_cc_c89=no
29136ac_save_CC=$CC
29137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29138/* end confdefs.h.  */
29139#include <stdarg.h>
29140#include <stdio.h>
29141struct stat;
29142/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29143struct buf { int x; };
29144FILE * (*rcsopen) (struct buf *, struct stat *, int);
29145static char *e (p, i)
29146     char **p;
29147     int i;
29148{
29149  return p[i];
29150}
29151static char *f (char * (*g) (char **, int), char **p, ...)
29152{
29153  char *s;
29154  va_list v;
29155  va_start (v,p);
29156  s = g (p, va_arg (v,int));
29157  va_end (v);
29158  return s;
29159}
29160
29161/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29162   function prototypes and stuff, but not '\xHH' hex character constants.
29163   These don't provoke an error unfortunately, instead are silently treated
29164   as 'x'.  The following induces an error, until -std is added to get
29165   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29166   array size at least.  It's necessary to write '\x00'==0 to get something
29167   that's true only with -std.  */
29168int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29169
29170/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29171   inside strings and character constants.  */
29172#define FOO(x) 'x'
29173int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29174
29175int test (int i, double x);
29176struct s1 {int (*f) (int a);};
29177struct s2 {int (*f) (double a);};
29178int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29179int argc;
29180char **argv;
29181int
29182main ()
29183{
29184return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29185  ;
29186  return 0;
29187}
29188_ACEOF
29189for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29190	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29191do
29192  CC="$ac_save_CC $ac_arg"
29193  if ac_fn_c_try_compile "$LINENO"; then :
29194  ac_cv_prog_cc_c89=$ac_arg
29195fi
29196rm -f core conftest.err conftest.$ac_objext
29197  test "x$ac_cv_prog_cc_c89" != "xno" && break
29198done
29199rm -f conftest.$ac_ext
29200CC=$ac_save_CC
29201
29202fi
29203# AC_CACHE_VAL
29204case "x$ac_cv_prog_cc_c89" in
29205  x)
29206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29207$as_echo "none needed" >&6; } ;;
29208  xno)
29209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29210$as_echo "unsupported" >&6; } ;;
29211  *)
29212    CC="$CC $ac_cv_prog_cc_c89"
29213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29214$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29215esac
29216if test "x$ac_cv_prog_cc_c89" != xno; then :
29217
29218fi
29219
29220ac_ext=cpp
29221ac_cpp='$CXXCPP $CPPFLAGS'
29222ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29223ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29224ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29225
29226
29227
29228  COMPILER_NAME=C++
29229  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29230
29231  if test "x$CXX" != x; then
29232    # User has supplied compiler name already, always let that override.
29233    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29234$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29235    if test "x`basename $CXX`" = "x$CXX"; then
29236      # A command without a complete path is provided, search $PATH.
29237
29238      for ac_prog in $CXX
29239do
29240  # Extract the first word of "$ac_prog", so it can be a program name with args.
29241set dummy $ac_prog; ac_word=$2
29242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29243$as_echo_n "checking for $ac_word... " >&6; }
29244if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29245  $as_echo_n "(cached) " >&6
29246else
29247  case $POTENTIAL_CXX in
29248  [\\/]* | ?:[\\/]*)
29249  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29250  ;;
29251  *)
29252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29253for as_dir in $PATH
29254do
29255  IFS=$as_save_IFS
29256  test -z "$as_dir" && as_dir=.
29257    for ac_exec_ext in '' $ac_executable_extensions; do
29258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29259    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29261    break 2
29262  fi
29263done
29264  done
29265IFS=$as_save_IFS
29266
29267  ;;
29268esac
29269fi
29270POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29271if test -n "$POTENTIAL_CXX"; then
29272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29273$as_echo "$POTENTIAL_CXX" >&6; }
29274else
29275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29276$as_echo "no" >&6; }
29277fi
29278
29279
29280  test -n "$POTENTIAL_CXX" && break
29281done
29282
29283      if test "x$POTENTIAL_CXX" != x; then
29284        CXX=$POTENTIAL_CXX
29285      else
29286        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29287      fi
29288    else
29289      # Otherwise it might already be a complete path
29290      if test ! -x "$CXX"; then
29291        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29292      fi
29293    fi
29294  else
29295    # No user supplied value. Locate compiler ourselves.
29296
29297    # If we are cross compiling, assume cross compilation tools follows the
29298    # cross compilation standard where they are prefixed with the autoconf
29299    # standard name for the target. For example the binary
29300    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29301    # If we are not cross compiling, then the default compiler name will be
29302    # used.
29303
29304    CXX=
29305    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29306    # before checking the rest of the PATH.
29307    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29308    # step, this should not be necessary.
29309    if test -n "$TOOLCHAIN_PATH"; then
29310      PATH_save="$PATH"
29311      PATH="$TOOLCHAIN_PATH"
29312      for ac_prog in $SEARCH_LIST
29313do
29314  # Extract the first word of "$ac_prog", so it can be a program name with args.
29315set dummy $ac_prog; ac_word=$2
29316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29317$as_echo_n "checking for $ac_word... " >&6; }
29318if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29319  $as_echo_n "(cached) " >&6
29320else
29321  case $TOOLCHAIN_PATH_CXX in
29322  [\\/]* | ?:[\\/]*)
29323  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29324  ;;
29325  *)
29326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29327for as_dir in $PATH
29328do
29329  IFS=$as_save_IFS
29330  test -z "$as_dir" && as_dir=.
29331    for ac_exec_ext in '' $ac_executable_extensions; do
29332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29333    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29335    break 2
29336  fi
29337done
29338  done
29339IFS=$as_save_IFS
29340
29341  ;;
29342esac
29343fi
29344TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29345if test -n "$TOOLCHAIN_PATH_CXX"; then
29346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29347$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29348else
29349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29350$as_echo "no" >&6; }
29351fi
29352
29353
29354  test -n "$TOOLCHAIN_PATH_CXX" && break
29355done
29356
29357      CXX=$TOOLCHAIN_PATH_CXX
29358      PATH="$PATH_save"
29359    fi
29360
29361    # AC_PATH_PROGS can't be run multiple times with the same variable,
29362    # so create a new name for this run.
29363    if test "x$CXX" = x; then
29364      for ac_prog in $SEARCH_LIST
29365do
29366  # Extract the first word of "$ac_prog", so it can be a program name with args.
29367set dummy $ac_prog; ac_word=$2
29368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29369$as_echo_n "checking for $ac_word... " >&6; }
29370if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29371  $as_echo_n "(cached) " >&6
29372else
29373  case $POTENTIAL_CXX in
29374  [\\/]* | ?:[\\/]*)
29375  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29376  ;;
29377  *)
29378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29379for as_dir in $PATH
29380do
29381  IFS=$as_save_IFS
29382  test -z "$as_dir" && as_dir=.
29383    for ac_exec_ext in '' $ac_executable_extensions; do
29384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29385    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29387    break 2
29388  fi
29389done
29390  done
29391IFS=$as_save_IFS
29392
29393  ;;
29394esac
29395fi
29396POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29397if test -n "$POTENTIAL_CXX"; then
29398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29399$as_echo "$POTENTIAL_CXX" >&6; }
29400else
29401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29402$as_echo "no" >&6; }
29403fi
29404
29405
29406  test -n "$POTENTIAL_CXX" && break
29407done
29408
29409      CXX=$POTENTIAL_CXX
29410    fi
29411
29412    if test "x$CXX" = x; then
29413
29414  # Print a helpful message on how to acquire the necessary build dependency.
29415  # devkit is the help tag: freetype, cups, pulse, alsa etc
29416  MISSING_DEPENDENCY=devkit
29417
29418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29419    cygwin_help $MISSING_DEPENDENCY
29420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29421    msys_help $MISSING_DEPENDENCY
29422  else
29423    PKGHANDLER_COMMAND=
29424
29425    case $PKGHANDLER in
29426      apt-get)
29427        apt_help     $MISSING_DEPENDENCY ;;
29428      yum)
29429        yum_help     $MISSING_DEPENDENCY ;;
29430      port)
29431        port_help    $MISSING_DEPENDENCY ;;
29432      pkgutil)
29433        pkgutil_help $MISSING_DEPENDENCY ;;
29434      pkgadd)
29435        pkgadd_help  $MISSING_DEPENDENCY ;;
29436    esac
29437
29438    if test "x$PKGHANDLER_COMMAND" != x; then
29439      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29440    fi
29441  fi
29442
29443      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29444    fi
29445  fi
29446
29447  # Now we have a compiler binary in CXX. Make sure it's okay.
29448
29449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29450
29451  # First separate the path from the arguments. This will split at the first
29452  # space.
29453  complete="$CXX"
29454  path="${complete%% *}"
29455  tmp="$complete EOL"
29456  arguments="${tmp#* }"
29457
29458  # Input might be given as Windows format, start by converting to
29459  # unix format.
29460  new_path=`$CYGPATH -u "$path"`
29461
29462  # Now try to locate executable using which
29463  new_path=`$WHICH "$new_path" 2> /dev/null`
29464  # bat and cmd files are not always considered executable in cygwin causing which
29465  # to not find them
29466  if test "x$new_path" = x \
29467      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29468      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29469    new_path=`$CYGPATH -u "$path"`
29470  fi
29471  if test "x$new_path" = x; then
29472    # Oops. Which didn't find the executable.
29473    # The splitting of arguments from the executable at a space might have been incorrect,
29474    # since paths with space are more likely in Windows. Give it another try with the whole
29475    # argument.
29476    path="$complete"
29477    arguments="EOL"
29478    new_path=`$CYGPATH -u "$path"`
29479    new_path=`$WHICH "$new_path" 2> /dev/null`
29480    # bat and cmd files are not always considered executable in cygwin causing which
29481    # to not find them
29482    if test "x$new_path" = x \
29483        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29484        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29485      new_path=`$CYGPATH -u "$path"`
29486    fi
29487    if test "x$new_path" = x; then
29488      # It's still not found. Now this is an unrecoverable error.
29489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29490$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29491      has_space=`$ECHO "$complete" | $GREP " "`
29492      if test "x$has_space" != x; then
29493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29495      fi
29496      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29497    fi
29498  fi
29499
29500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29503  # "foo.exe" is OK but "foo" is an error.
29504  #
29505  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29506  # It is also a way to make sure we got the proper file name for the real test later on.
29507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29508  if test "x$test_shortpath" = x; then
29509    # Short path failed, file does not exist as specified.
29510    # Try adding .exe or .cmd
29511    if test -f "${new_path}.exe"; then
29512      input_to_shortpath="${new_path}.exe"
29513    elif test -f "${new_path}.cmd"; then
29514      input_to_shortpath="${new_path}.cmd"
29515    else
29516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29517$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29518      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29519$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29520      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29521    fi
29522  else
29523    input_to_shortpath="$new_path"
29524  fi
29525
29526  # Call helper function which possibly converts this using DOS-style short mode.
29527  # If so, the updated path is stored in $new_path.
29528  new_path="$input_to_shortpath"
29529
29530  input_path="$input_to_shortpath"
29531  # Check if we need to convert this using DOS-style short mode. If the path
29532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29533  # take no chances and rewrite it.
29534  # Note: m4 eats our [], so we need to use [ and ] instead.
29535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29536  if test "x$has_forbidden_chars" != x; then
29537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29541      # Going to short mode and back again did indeed matter. Since short mode is
29542      # case insensitive, let's make it lowercase to improve readability.
29543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29544      # Now convert it back to Unix-stile (cygpath)
29545      input_path=`$CYGPATH -u "$shortmode_path"`
29546      new_path="$input_path"
29547    fi
29548  fi
29549
29550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29551  if test "x$test_cygdrive_prefix" = x; then
29552    # As a simple fix, exclude /usr/bin since it's not a real path.
29553    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29555      # a path prefixed by /cygdrive for fixpath to work.
29556      new_path="$CYGWIN_ROOT_PATH$input_path"
29557    fi
29558  fi
29559
29560  # remove trailing .exe if any
29561  new_path="${new_path/%.exe/}"
29562
29563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29564
29565  # First separate the path from the arguments. This will split at the first
29566  # space.
29567  complete="$CXX"
29568  path="${complete%% *}"
29569  tmp="$complete EOL"
29570  arguments="${tmp#* }"
29571
29572  # Input might be given as Windows format, start by converting to
29573  # unix format.
29574  new_path="$path"
29575
29576  windows_path="$new_path"
29577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29578    unix_path=`$CYGPATH -u "$windows_path"`
29579    new_path="$unix_path"
29580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29582    new_path="$unix_path"
29583  fi
29584
29585
29586  # Now try to locate executable using which
29587  new_path=`$WHICH "$new_path" 2> /dev/null`
29588
29589  if test "x$new_path" = x; then
29590    # Oops. Which didn't find the executable.
29591    # The splitting of arguments from the executable at a space might have been incorrect,
29592    # since paths with space are more likely in Windows. Give it another try with the whole
29593    # argument.
29594    path="$complete"
29595    arguments="EOL"
29596    new_path="$path"
29597
29598  windows_path="$new_path"
29599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29600    unix_path=`$CYGPATH -u "$windows_path"`
29601    new_path="$unix_path"
29602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29604    new_path="$unix_path"
29605  fi
29606
29607
29608    new_path=`$WHICH "$new_path" 2> /dev/null`
29609
29610    if test "x$new_path" = x; then
29611      # It's still not found. Now this is an unrecoverable error.
29612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29613$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29614      has_space=`$ECHO "$complete" | $GREP " "`
29615      if test "x$has_space" != x; then
29616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29618      fi
29619      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29620    fi
29621  fi
29622
29623  # Now new_path has a complete unix path to the binary
29624  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29625    # Keep paths in /bin as-is, but remove trailing .exe if any
29626    new_path="${new_path/%.exe/}"
29627    # Do not save /bin paths to all_fixpath_prefixes!
29628  else
29629    # Not in mixed or Windows style, start by that.
29630    new_path=`cmd //c echo $new_path`
29631
29632  input_path="$new_path"
29633  # Check if we need to convert this using DOS-style short mode. If the path
29634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29635  # take no chances and rewrite it.
29636  # Note: m4 eats our [], so we need to use [ and ] instead.
29637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29638  if test "x$has_forbidden_chars" != x; then
29639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29641  fi
29642
29643    # Output is in $new_path
29644
29645  windows_path="$new_path"
29646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29647    unix_path=`$CYGPATH -u "$windows_path"`
29648    new_path="$unix_path"
29649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29651    new_path="$unix_path"
29652  fi
29653
29654    # remove trailing .exe if any
29655    new_path="${new_path/%.exe/}"
29656
29657    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29658    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29659  fi
29660
29661  else
29662    # We're on a posix platform. Hooray! :)
29663    # First separate the path from the arguments. This will split at the first
29664    # space.
29665    complete="$CXX"
29666    path="${complete%% *}"
29667    tmp="$complete EOL"
29668    arguments="${tmp#* }"
29669
29670    # Cannot rely on the command "which" here since it doesn't always work.
29671    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29672    if test -z "$is_absolute_path"; then
29673      # Path to executable is not absolute. Find it.
29674      IFS_save="$IFS"
29675      IFS=:
29676      for p in $PATH; do
29677        if test -f "$p/$path" && test -x "$p/$path"; then
29678          new_path="$p/$path"
29679          break
29680        fi
29681      done
29682      IFS="$IFS_save"
29683    else
29684      # This is an absolute path, we can use it without further modifications.
29685      new_path="$path"
29686    fi
29687
29688    if test "x$new_path" = x; then
29689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29690$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29691      has_space=`$ECHO "$complete" | $GREP " "`
29692      if test "x$has_space" != x; then
29693        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29694$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29695      fi
29696      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29697    fi
29698  fi
29699
29700  # Now join together the path and the arguments once again
29701  if test "x$arguments" != xEOL; then
29702    new_complete="$new_path ${arguments% *}"
29703  else
29704    new_complete="$new_path"
29705  fi
29706
29707  if test "x$complete" != "x$new_complete"; then
29708    CXX="$new_complete"
29709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29710$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29711  fi
29712
29713  TEST_COMPILER="$CXX"
29714  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29715  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29716  if test "x$OPENJDK_BUILD_OS" != xaix; then
29717    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29719$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29720
29721  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29722    # Follow a chain of symbolic links. Use readlink
29723    # where it exists, else fall back to horribly
29724    # complicated shell code.
29725    if test "x$READLINK_TESTED" != yes; then
29726      # On MacOSX there is a readlink tool with a different
29727      # purpose than the GNU readlink tool. Check the found readlink.
29728      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29729      if test "x$ISGNU" = x; then
29730        # A readlink that we do not know how to use.
29731        # Are there other non-GNU readlinks out there?
29732        READLINK_TESTED=yes
29733        READLINK=
29734      fi
29735    fi
29736
29737    if test "x$READLINK" != x; then
29738      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29739    else
29740      # Save the current directory for restoring afterwards
29741      STARTDIR=$PWD
29742      COUNTER=0
29743      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29744      sym_link_file=`$BASENAME $TEST_COMPILER`
29745      cd $sym_link_dir
29746      # Use -P flag to resolve symlinks in directories.
29747      cd `$THEPWDCMD -P`
29748      sym_link_dir=`$THEPWDCMD -P`
29749      # Resolve file symlinks
29750      while test $COUNTER -lt 20; do
29751        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29752        if test "x$ISLINK" == x; then
29753          # This is not a symbolic link! We are done!
29754          break
29755        fi
29756        # Again resolve directory symlinks since the target of the just found
29757        # link could be in a different directory
29758        cd `$DIRNAME $ISLINK`
29759        sym_link_dir=`$THEPWDCMD -P`
29760        sym_link_file=`$BASENAME $ISLINK`
29761        let COUNTER=COUNTER+1
29762      done
29763      cd $STARTDIR
29764      TEST_COMPILER=$sym_link_dir/$sym_link_file
29765    fi
29766  fi
29767
29768    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29769$as_echo "$TEST_COMPILER" >&6; }
29770  fi
29771  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29772$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29773
29774  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29775  if test "x$COMPILER_BASENAME" = "xccache"; then
29776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29777$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29778    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29779    # We want to control ccache invocation ourselves, so ignore this cc and try
29780    # searching again.
29781
29782    # Remove the path to the fake ccache cc from the PATH
29783    RETRY_COMPILER_SAVED_PATH="$PATH"
29784    COMPILER_DIRNAME=`$DIRNAME $CXX`
29785    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29786
29787    # Try again looking for our compiler
29788    if test -n "$ac_tool_prefix"; then
29789  for ac_prog in $TOOLCHAIN_CXX_BINARY
29790  do
29791    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29792set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29794$as_echo_n "checking for $ac_word... " >&6; }
29795if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29796  $as_echo_n "(cached) " >&6
29797else
29798  if test -n "$PROPER_COMPILER_CXX"; then
29799  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29800else
29801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29802for as_dir in $PATH
29803do
29804  IFS=$as_save_IFS
29805  test -z "$as_dir" && as_dir=.
29806    for ac_exec_ext in '' $ac_executable_extensions; do
29807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29808    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29810    break 2
29811  fi
29812done
29813  done
29814IFS=$as_save_IFS
29815
29816fi
29817fi
29818PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29819if test -n "$PROPER_COMPILER_CXX"; then
29820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29821$as_echo "$PROPER_COMPILER_CXX" >&6; }
29822else
29823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29824$as_echo "no" >&6; }
29825fi
29826
29827
29828    test -n "$PROPER_COMPILER_CXX" && break
29829  done
29830fi
29831if test -z "$PROPER_COMPILER_CXX"; then
29832  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29833  for ac_prog in $TOOLCHAIN_CXX_BINARY
29834do
29835  # Extract the first word of "$ac_prog", so it can be a program name with args.
29836set dummy $ac_prog; ac_word=$2
29837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29838$as_echo_n "checking for $ac_word... " >&6; }
29839if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29840  $as_echo_n "(cached) " >&6
29841else
29842  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29843  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29844else
29845as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29846for as_dir in $PATH
29847do
29848  IFS=$as_save_IFS
29849  test -z "$as_dir" && as_dir=.
29850    for ac_exec_ext in '' $ac_executable_extensions; do
29851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29852    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29854    break 2
29855  fi
29856done
29857  done
29858IFS=$as_save_IFS
29859
29860fi
29861fi
29862ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29863if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29865$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29866else
29867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29868$as_echo "no" >&6; }
29869fi
29870
29871
29872  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29873done
29874
29875  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29876    PROPER_COMPILER_CXX=""
29877  else
29878    case $cross_compiling:$ac_tool_warned in
29879yes:)
29880{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29881$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29882ac_tool_warned=yes ;;
29883esac
29884    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29885  fi
29886fi
29887
29888
29889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29890
29891  # First separate the path from the arguments. This will split at the first
29892  # space.
29893  complete="$PROPER_COMPILER_CXX"
29894  path="${complete%% *}"
29895  tmp="$complete EOL"
29896  arguments="${tmp#* }"
29897
29898  # Input might be given as Windows format, start by converting to
29899  # unix format.
29900  new_path=`$CYGPATH -u "$path"`
29901
29902  # Now try to locate executable using which
29903  new_path=`$WHICH "$new_path" 2> /dev/null`
29904  # bat and cmd files are not always considered executable in cygwin causing which
29905  # to not find them
29906  if test "x$new_path" = x \
29907      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29908      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29909    new_path=`$CYGPATH -u "$path"`
29910  fi
29911  if test "x$new_path" = x; then
29912    # Oops. Which didn't find the executable.
29913    # The splitting of arguments from the executable at a space might have been incorrect,
29914    # since paths with space are more likely in Windows. Give it another try with the whole
29915    # argument.
29916    path="$complete"
29917    arguments="EOL"
29918    new_path=`$CYGPATH -u "$path"`
29919    new_path=`$WHICH "$new_path" 2> /dev/null`
29920    # bat and cmd files are not always considered executable in cygwin causing which
29921    # to not find them
29922    if test "x$new_path" = x \
29923        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29924        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29925      new_path=`$CYGPATH -u "$path"`
29926    fi
29927    if test "x$new_path" = x; then
29928      # It's still not found. Now this is an unrecoverable error.
29929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29930$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29931      has_space=`$ECHO "$complete" | $GREP " "`
29932      if test "x$has_space" != x; then
29933        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29934$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29935      fi
29936      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29937    fi
29938  fi
29939
29940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29943  # "foo.exe" is OK but "foo" is an error.
29944  #
29945  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29946  # It is also a way to make sure we got the proper file name for the real test later on.
29947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29948  if test "x$test_shortpath" = x; then
29949    # Short path failed, file does not exist as specified.
29950    # Try adding .exe or .cmd
29951    if test -f "${new_path}.exe"; then
29952      input_to_shortpath="${new_path}.exe"
29953    elif test -f "${new_path}.cmd"; then
29954      input_to_shortpath="${new_path}.cmd"
29955    else
29956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29957$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29958      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29959$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29960      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29961    fi
29962  else
29963    input_to_shortpath="$new_path"
29964  fi
29965
29966  # Call helper function which possibly converts this using DOS-style short mode.
29967  # If so, the updated path is stored in $new_path.
29968  new_path="$input_to_shortpath"
29969
29970  input_path="$input_to_shortpath"
29971  # Check if we need to convert this using DOS-style short mode. If the path
29972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29973  # take no chances and rewrite it.
29974  # Note: m4 eats our [], so we need to use [ and ] instead.
29975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29976  if test "x$has_forbidden_chars" != x; then
29977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29978    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29981      # Going to short mode and back again did indeed matter. Since short mode is
29982      # case insensitive, let's make it lowercase to improve readability.
29983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29984      # Now convert it back to Unix-stile (cygpath)
29985      input_path=`$CYGPATH -u "$shortmode_path"`
29986      new_path="$input_path"
29987    fi
29988  fi
29989
29990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29991  if test "x$test_cygdrive_prefix" = x; then
29992    # As a simple fix, exclude /usr/bin since it's not a real path.
29993    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29995      # a path prefixed by /cygdrive for fixpath to work.
29996      new_path="$CYGWIN_ROOT_PATH$input_path"
29997    fi
29998  fi
29999
30000  # remove trailing .exe if any
30001  new_path="${new_path/%.exe/}"
30002
30003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30004
30005  # First separate the path from the arguments. This will split at the first
30006  # space.
30007  complete="$PROPER_COMPILER_CXX"
30008  path="${complete%% *}"
30009  tmp="$complete EOL"
30010  arguments="${tmp#* }"
30011
30012  # Input might be given as Windows format, start by converting to
30013  # unix format.
30014  new_path="$path"
30015
30016  windows_path="$new_path"
30017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30018    unix_path=`$CYGPATH -u "$windows_path"`
30019    new_path="$unix_path"
30020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30022    new_path="$unix_path"
30023  fi
30024
30025
30026  # Now try to locate executable using which
30027  new_path=`$WHICH "$new_path" 2> /dev/null`
30028
30029  if test "x$new_path" = x; then
30030    # Oops. Which didn't find the executable.
30031    # The splitting of arguments from the executable at a space might have been incorrect,
30032    # since paths with space are more likely in Windows. Give it another try with the whole
30033    # argument.
30034    path="$complete"
30035    arguments="EOL"
30036    new_path="$path"
30037
30038  windows_path="$new_path"
30039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30040    unix_path=`$CYGPATH -u "$windows_path"`
30041    new_path="$unix_path"
30042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30044    new_path="$unix_path"
30045  fi
30046
30047
30048    new_path=`$WHICH "$new_path" 2> /dev/null`
30049
30050    if test "x$new_path" = x; then
30051      # It's still not found. Now this is an unrecoverable error.
30052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30053$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30054      has_space=`$ECHO "$complete" | $GREP " "`
30055      if test "x$has_space" != x; then
30056        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30058      fi
30059      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30060    fi
30061  fi
30062
30063  # Now new_path has a complete unix path to the binary
30064  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30065    # Keep paths in /bin as-is, but remove trailing .exe if any
30066    new_path="${new_path/%.exe/}"
30067    # Do not save /bin paths to all_fixpath_prefixes!
30068  else
30069    # Not in mixed or Windows style, start by that.
30070    new_path=`cmd //c echo $new_path`
30071
30072  input_path="$new_path"
30073  # Check if we need to convert this using DOS-style short mode. If the path
30074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30075  # take no chances and rewrite it.
30076  # Note: m4 eats our [], so we need to use [ and ] instead.
30077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30078  if test "x$has_forbidden_chars" != x; then
30079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30081  fi
30082
30083    # Output is in $new_path
30084
30085  windows_path="$new_path"
30086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30087    unix_path=`$CYGPATH -u "$windows_path"`
30088    new_path="$unix_path"
30089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30091    new_path="$unix_path"
30092  fi
30093
30094    # remove trailing .exe if any
30095    new_path="${new_path/%.exe/}"
30096
30097    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30098    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30099  fi
30100
30101  else
30102    # We're on a posix platform. Hooray! :)
30103    # First separate the path from the arguments. This will split at the first
30104    # space.
30105    complete="$PROPER_COMPILER_CXX"
30106    path="${complete%% *}"
30107    tmp="$complete EOL"
30108    arguments="${tmp#* }"
30109
30110    # Cannot rely on the command "which" here since it doesn't always work.
30111    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30112    if test -z "$is_absolute_path"; then
30113      # Path to executable is not absolute. Find it.
30114      IFS_save="$IFS"
30115      IFS=:
30116      for p in $PATH; do
30117        if test -f "$p/$path" && test -x "$p/$path"; then
30118          new_path="$p/$path"
30119          break
30120        fi
30121      done
30122      IFS="$IFS_save"
30123    else
30124      # This is an absolute path, we can use it without further modifications.
30125      new_path="$path"
30126    fi
30127
30128    if test "x$new_path" = x; then
30129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30130$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30131      has_space=`$ECHO "$complete" | $GREP " "`
30132      if test "x$has_space" != x; then
30133        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30134$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30135      fi
30136      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30137    fi
30138  fi
30139
30140  # Now join together the path and the arguments once again
30141  if test "x$arguments" != xEOL; then
30142    new_complete="$new_path ${arguments% *}"
30143  else
30144    new_complete="$new_path"
30145  fi
30146
30147  if test "x$complete" != "x$new_complete"; then
30148    PROPER_COMPILER_CXX="$new_complete"
30149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30150$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30151  fi
30152
30153    PATH="$RETRY_COMPILER_SAVED_PATH"
30154
30155    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30156$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30157
30158  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30159    # Follow a chain of symbolic links. Use readlink
30160    # where it exists, else fall back to horribly
30161    # complicated shell code.
30162    if test "x$READLINK_TESTED" != yes; then
30163      # On MacOSX there is a readlink tool with a different
30164      # purpose than the GNU readlink tool. Check the found readlink.
30165      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30166      if test "x$ISGNU" = x; then
30167        # A readlink that we do not know how to use.
30168        # Are there other non-GNU readlinks out there?
30169        READLINK_TESTED=yes
30170        READLINK=
30171      fi
30172    fi
30173
30174    if test "x$READLINK" != x; then
30175      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30176    else
30177      # Save the current directory for restoring afterwards
30178      STARTDIR=$PWD
30179      COUNTER=0
30180      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30181      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30182      cd $sym_link_dir
30183      # Use -P flag to resolve symlinks in directories.
30184      cd `$THEPWDCMD -P`
30185      sym_link_dir=`$THEPWDCMD -P`
30186      # Resolve file symlinks
30187      while test $COUNTER -lt 20; do
30188        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30189        if test "x$ISLINK" == x; then
30190          # This is not a symbolic link! We are done!
30191          break
30192        fi
30193        # Again resolve directory symlinks since the target of the just found
30194        # link could be in a different directory
30195        cd `$DIRNAME $ISLINK`
30196        sym_link_dir=`$THEPWDCMD -P`
30197        sym_link_file=`$BASENAME $ISLINK`
30198        let COUNTER=COUNTER+1
30199      done
30200      cd $STARTDIR
30201      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30202    fi
30203  fi
30204
30205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30206$as_echo "$PROPER_COMPILER_CXX" >&6; }
30207    CXX="$PROPER_COMPILER_CXX"
30208  else
30209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30210$as_echo "no, keeping CXX" >&6; }
30211  fi
30212
30213
30214  COMPILER=$CXX
30215  COMPILER_NAME=$COMPILER_NAME
30216
30217  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30218    # cc -V output typically looks like
30219    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30220    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30221    # Check that this is likely to be the Solaris Studio cc.
30222    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30223    if test $? -ne 0; then
30224      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30225      { $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
30226$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30227      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30228$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30229      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30230$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30231      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30232    fi
30233    # Remove usage instructions (if present), and
30234    # collapse compiler output into a single line
30235    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30236        $SED -e 's/ *[Uu]sage:.*//'`
30237    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30238        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30239  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30240    # xlc -qversion output typically looks like
30241    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30242    #     Version: 11.01.0000.0015
30243    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30244    # Check that this is likely to be the IBM XL C compiler.
30245    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30246    if test $? -ne 0; then
30247      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30248      { $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
30249$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30250      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30251$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30252      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30253$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30254      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30255    fi
30256    # Collapse compiler output into a single line
30257    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30258    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30259        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30260  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30261    # There is no specific version flag, but all output starts with a version string.
30262    # First line typically looks something like:
30263    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30264    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30265    # Check that this is likely to be Microsoft CL.EXE.
30266    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30267    if test $? -ne 0; then
30268      { $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
30269$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30270      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30271$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30272      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30273    fi
30274    # Collapse compiler output into a single line
30275    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30276    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30277        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30278  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30279    # gcc --version output typically looks like
30280    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30281    #     Copyright (C) 2013 Free Software Foundation, Inc.
30282    #     This is free software; see the source for copying conditions.  There is NO
30283    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30284    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30285    # Check that this is likely to be GCC.
30286    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30287    if test $? -ne 0; then
30288      { $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
30289$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30290      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30291$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30292      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30293    fi
30294    # Remove Copyright and legalese from version string, and
30295    # collapse into a single line
30296    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30297        $SED -e 's/ *Copyright .*//'`
30298    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30299        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30300  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30301    # clang --version output typically looks like
30302    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30303    #    clang version 3.3 (tags/RELEASE_33/final)
30304    # or
30305    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30306    #    Target: x86_64-pc-linux-gnu
30307    #    Thread model: posix
30308    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30309    # Check that this is likely to be clang
30310    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30311    if test $? -ne 0; then
30312      { $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
30313$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30314      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30315$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30316      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30317    fi
30318    # Collapse compiler output into a single line
30319    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30320    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30321        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30322  else
30323      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30324  fi
30325  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30326  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30327  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30328  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30329
30330  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30331$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30332
30333
30334  # Now that we have resolved CXX ourself, let autoconf have its go at it
30335  ac_ext=cpp
30336ac_cpp='$CXXCPP $CPPFLAGS'
30337ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30338ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30339ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30340if test -z "$CXX"; then
30341  if test -n "$CCC"; then
30342    CXX=$CCC
30343  else
30344    if test -n "$ac_tool_prefix"; then
30345  for ac_prog in $CXX
30346  do
30347    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30348set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30350$as_echo_n "checking for $ac_word... " >&6; }
30351if ${ac_cv_prog_CXX+:} false; then :
30352  $as_echo_n "(cached) " >&6
30353else
30354  if test -n "$CXX"; then
30355  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30356else
30357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30358for as_dir in $PATH
30359do
30360  IFS=$as_save_IFS
30361  test -z "$as_dir" && as_dir=.
30362    for ac_exec_ext in '' $ac_executable_extensions; do
30363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30364    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30366    break 2
30367  fi
30368done
30369  done
30370IFS=$as_save_IFS
30371
30372fi
30373fi
30374CXX=$ac_cv_prog_CXX
30375if test -n "$CXX"; then
30376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30377$as_echo "$CXX" >&6; }
30378else
30379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30380$as_echo "no" >&6; }
30381fi
30382
30383
30384    test -n "$CXX" && break
30385  done
30386fi
30387if test -z "$CXX"; then
30388  ac_ct_CXX=$CXX
30389  for ac_prog in $CXX
30390do
30391  # Extract the first word of "$ac_prog", so it can be a program name with args.
30392set dummy $ac_prog; ac_word=$2
30393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30394$as_echo_n "checking for $ac_word... " >&6; }
30395if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30396  $as_echo_n "(cached) " >&6
30397else
30398  if test -n "$ac_ct_CXX"; then
30399  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30400else
30401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30402for as_dir in $PATH
30403do
30404  IFS=$as_save_IFS
30405  test -z "$as_dir" && as_dir=.
30406    for ac_exec_ext in '' $ac_executable_extensions; do
30407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30408    ac_cv_prog_ac_ct_CXX="$ac_prog"
30409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30410    break 2
30411  fi
30412done
30413  done
30414IFS=$as_save_IFS
30415
30416fi
30417fi
30418ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30419if test -n "$ac_ct_CXX"; then
30420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30421$as_echo "$ac_ct_CXX" >&6; }
30422else
30423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30424$as_echo "no" >&6; }
30425fi
30426
30427
30428  test -n "$ac_ct_CXX" && break
30429done
30430
30431  if test "x$ac_ct_CXX" = x; then
30432    CXX="g++"
30433  else
30434    case $cross_compiling:$ac_tool_warned in
30435yes:)
30436{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30437$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30438ac_tool_warned=yes ;;
30439esac
30440    CXX=$ac_ct_CXX
30441  fi
30442fi
30443
30444  fi
30445fi
30446# Provide some information about the compiler.
30447$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30448set X $ac_compile
30449ac_compiler=$2
30450for ac_option in --version -v -V -qversion; do
30451  { { ac_try="$ac_compiler $ac_option >&5"
30452case "(($ac_try" in
30453  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30454  *) ac_try_echo=$ac_try;;
30455esac
30456eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30457$as_echo "$ac_try_echo"; } >&5
30458  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30459  ac_status=$?
30460  if test -s conftest.err; then
30461    sed '10a\
30462... rest of stderr output deleted ...
30463         10q' conftest.err >conftest.er1
30464    cat conftest.er1 >&5
30465  fi
30466  rm -f conftest.er1 conftest.err
30467  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30468  test $ac_status = 0; }
30469done
30470
30471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30472$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30473if ${ac_cv_cxx_compiler_gnu+:} false; then :
30474  $as_echo_n "(cached) " >&6
30475else
30476  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30477/* end confdefs.h.  */
30478
30479int
30480main ()
30481{
30482#ifndef __GNUC__
30483       choke me
30484#endif
30485
30486  ;
30487  return 0;
30488}
30489_ACEOF
30490if ac_fn_cxx_try_compile "$LINENO"; then :
30491  ac_compiler_gnu=yes
30492else
30493  ac_compiler_gnu=no
30494fi
30495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30496ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30497
30498fi
30499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30500$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30501if test $ac_compiler_gnu = yes; then
30502  GXX=yes
30503else
30504  GXX=
30505fi
30506ac_test_CXXFLAGS=${CXXFLAGS+set}
30507ac_save_CXXFLAGS=$CXXFLAGS
30508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30509$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30510if ${ac_cv_prog_cxx_g+:} false; then :
30511  $as_echo_n "(cached) " >&6
30512else
30513  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30514   ac_cxx_werror_flag=yes
30515   ac_cv_prog_cxx_g=no
30516   CXXFLAGS="-g"
30517   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30518/* end confdefs.h.  */
30519
30520int
30521main ()
30522{
30523
30524  ;
30525  return 0;
30526}
30527_ACEOF
30528if ac_fn_cxx_try_compile "$LINENO"; then :
30529  ac_cv_prog_cxx_g=yes
30530else
30531  CXXFLAGS=""
30532      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30533/* end confdefs.h.  */
30534
30535int
30536main ()
30537{
30538
30539  ;
30540  return 0;
30541}
30542_ACEOF
30543if ac_fn_cxx_try_compile "$LINENO"; then :
30544
30545else
30546  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30547	 CXXFLAGS="-g"
30548	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30549/* end confdefs.h.  */
30550
30551int
30552main ()
30553{
30554
30555  ;
30556  return 0;
30557}
30558_ACEOF
30559if ac_fn_cxx_try_compile "$LINENO"; then :
30560  ac_cv_prog_cxx_g=yes
30561fi
30562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30563fi
30564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30565fi
30566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30567   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30568fi
30569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30570$as_echo "$ac_cv_prog_cxx_g" >&6; }
30571if test "$ac_test_CXXFLAGS" = set; then
30572  CXXFLAGS=$ac_save_CXXFLAGS
30573elif test $ac_cv_prog_cxx_g = yes; then
30574  if test "$GXX" = yes; then
30575    CXXFLAGS="-g -O2"
30576  else
30577    CXXFLAGS="-g"
30578  fi
30579else
30580  if test "$GXX" = yes; then
30581    CXXFLAGS="-O2"
30582  else
30583    CXXFLAGS=
30584  fi
30585fi
30586ac_ext=cpp
30587ac_cpp='$CXXCPP $CPPFLAGS'
30588ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30589ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30590ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30591
30592
30593  #
30594  # Setup the preprocessor (CPP and CXXCPP)
30595  #
30596  ac_ext=c
30597ac_cpp='$CPP $CPPFLAGS'
30598ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30599ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30600ac_compiler_gnu=$ac_cv_c_compiler_gnu
30601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30602$as_echo_n "checking how to run the C preprocessor... " >&6; }
30603# On Suns, sometimes $CPP names a directory.
30604if test -n "$CPP" && test -d "$CPP"; then
30605  CPP=
30606fi
30607if test -z "$CPP"; then
30608  if ${ac_cv_prog_CPP+:} false; then :
30609  $as_echo_n "(cached) " >&6
30610else
30611      # Double quotes because CPP needs to be expanded
30612    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30613    do
30614      ac_preproc_ok=false
30615for ac_c_preproc_warn_flag in '' yes
30616do
30617  # Use a header file that comes with gcc, so configuring glibc
30618  # with a fresh cross-compiler works.
30619  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30620  # <limits.h> exists even on freestanding compilers.
30621  # On the NeXT, cc -E runs the code through the compiler's parser,
30622  # not just through cpp. "Syntax error" is here to catch this case.
30623  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30624/* end confdefs.h.  */
30625#ifdef __STDC__
30626# include <limits.h>
30627#else
30628# include <assert.h>
30629#endif
30630		     Syntax error
30631_ACEOF
30632if ac_fn_c_try_cpp "$LINENO"; then :
30633
30634else
30635  # Broken: fails on valid input.
30636continue
30637fi
30638rm -f conftest.err conftest.i conftest.$ac_ext
30639
30640  # OK, works on sane cases.  Now check whether nonexistent headers
30641  # can be detected and how.
30642  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30643/* end confdefs.h.  */
30644#include <ac_nonexistent.h>
30645_ACEOF
30646if ac_fn_c_try_cpp "$LINENO"; then :
30647  # Broken: success on invalid input.
30648continue
30649else
30650  # Passes both tests.
30651ac_preproc_ok=:
30652break
30653fi
30654rm -f conftest.err conftest.i conftest.$ac_ext
30655
30656done
30657# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30658rm -f conftest.i conftest.err conftest.$ac_ext
30659if $ac_preproc_ok; then :
30660  break
30661fi
30662
30663    done
30664    ac_cv_prog_CPP=$CPP
30665
30666fi
30667  CPP=$ac_cv_prog_CPP
30668else
30669  ac_cv_prog_CPP=$CPP
30670fi
30671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30672$as_echo "$CPP" >&6; }
30673ac_preproc_ok=false
30674for ac_c_preproc_warn_flag in '' yes
30675do
30676  # Use a header file that comes with gcc, so configuring glibc
30677  # with a fresh cross-compiler works.
30678  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30679  # <limits.h> exists even on freestanding compilers.
30680  # On the NeXT, cc -E runs the code through the compiler's parser,
30681  # not just through cpp. "Syntax error" is here to catch this case.
30682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30683/* end confdefs.h.  */
30684#ifdef __STDC__
30685# include <limits.h>
30686#else
30687# include <assert.h>
30688#endif
30689		     Syntax error
30690_ACEOF
30691if ac_fn_c_try_cpp "$LINENO"; then :
30692
30693else
30694  # Broken: fails on valid input.
30695continue
30696fi
30697rm -f conftest.err conftest.i conftest.$ac_ext
30698
30699  # OK, works on sane cases.  Now check whether nonexistent headers
30700  # can be detected and how.
30701  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30702/* end confdefs.h.  */
30703#include <ac_nonexistent.h>
30704_ACEOF
30705if ac_fn_c_try_cpp "$LINENO"; then :
30706  # Broken: success on invalid input.
30707continue
30708else
30709  # Passes both tests.
30710ac_preproc_ok=:
30711break
30712fi
30713rm -f conftest.err conftest.i conftest.$ac_ext
30714
30715done
30716# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30717rm -f conftest.i conftest.err conftest.$ac_ext
30718if $ac_preproc_ok; then :
30719
30720else
30721  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30723as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30724See \`config.log' for more details" "$LINENO" 5; }
30725fi
30726
30727ac_ext=cpp
30728ac_cpp='$CXXCPP $CPPFLAGS'
30729ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30730ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30731ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30732
30733
30734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30735
30736  # First separate the path from the arguments. This will split at the first
30737  # space.
30738  complete="$CPP"
30739  path="${complete%% *}"
30740  tmp="$complete EOL"
30741  arguments="${tmp#* }"
30742
30743  # Input might be given as Windows format, start by converting to
30744  # unix format.
30745  new_path=`$CYGPATH -u "$path"`
30746
30747  # Now try to locate executable using which
30748  new_path=`$WHICH "$new_path" 2> /dev/null`
30749  # bat and cmd files are not always considered executable in cygwin causing which
30750  # to not find them
30751  if test "x$new_path" = x \
30752      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30753      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30754    new_path=`$CYGPATH -u "$path"`
30755  fi
30756  if test "x$new_path" = x; then
30757    # Oops. Which didn't find the executable.
30758    # The splitting of arguments from the executable at a space might have been incorrect,
30759    # since paths with space are more likely in Windows. Give it another try with the whole
30760    # argument.
30761    path="$complete"
30762    arguments="EOL"
30763    new_path=`$CYGPATH -u "$path"`
30764    new_path=`$WHICH "$new_path" 2> /dev/null`
30765    # bat and cmd files are not always considered executable in cygwin causing which
30766    # to not find them
30767    if test "x$new_path" = x \
30768        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30769        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30770      new_path=`$CYGPATH -u "$path"`
30771    fi
30772    if test "x$new_path" = x; then
30773      # It's still not found. Now this is an unrecoverable error.
30774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30775$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30776      has_space=`$ECHO "$complete" | $GREP " "`
30777      if test "x$has_space" != x; then
30778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30780      fi
30781      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30782    fi
30783  fi
30784
30785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30788  # "foo.exe" is OK but "foo" is an error.
30789  #
30790  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30791  # It is also a way to make sure we got the proper file name for the real test later on.
30792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30793  if test "x$test_shortpath" = x; then
30794    # Short path failed, file does not exist as specified.
30795    # Try adding .exe or .cmd
30796    if test -f "${new_path}.exe"; then
30797      input_to_shortpath="${new_path}.exe"
30798    elif test -f "${new_path}.cmd"; then
30799      input_to_shortpath="${new_path}.cmd"
30800    else
30801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30802$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30803      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30804$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30805      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30806    fi
30807  else
30808    input_to_shortpath="$new_path"
30809  fi
30810
30811  # Call helper function which possibly converts this using DOS-style short mode.
30812  # If so, the updated path is stored in $new_path.
30813  new_path="$input_to_shortpath"
30814
30815  input_path="$input_to_shortpath"
30816  # Check if we need to convert this using DOS-style short mode. If the path
30817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30818  # take no chances and rewrite it.
30819  # Note: m4 eats our [], so we need to use [ and ] instead.
30820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30821  if test "x$has_forbidden_chars" != x; then
30822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30826      # Going to short mode and back again did indeed matter. Since short mode is
30827      # case insensitive, let's make it lowercase to improve readability.
30828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30829      # Now convert it back to Unix-stile (cygpath)
30830      input_path=`$CYGPATH -u "$shortmode_path"`
30831      new_path="$input_path"
30832    fi
30833  fi
30834
30835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30836  if test "x$test_cygdrive_prefix" = x; then
30837    # As a simple fix, exclude /usr/bin since it's not a real path.
30838    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30840      # a path prefixed by /cygdrive for fixpath to work.
30841      new_path="$CYGWIN_ROOT_PATH$input_path"
30842    fi
30843  fi
30844
30845  # remove trailing .exe if any
30846  new_path="${new_path/%.exe/}"
30847
30848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30849
30850  # First separate the path from the arguments. This will split at the first
30851  # space.
30852  complete="$CPP"
30853  path="${complete%% *}"
30854  tmp="$complete EOL"
30855  arguments="${tmp#* }"
30856
30857  # Input might be given as Windows format, start by converting to
30858  # unix format.
30859  new_path="$path"
30860
30861  windows_path="$new_path"
30862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30863    unix_path=`$CYGPATH -u "$windows_path"`
30864    new_path="$unix_path"
30865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30867    new_path="$unix_path"
30868  fi
30869
30870
30871  # Now try to locate executable using which
30872  new_path=`$WHICH "$new_path" 2> /dev/null`
30873
30874  if test "x$new_path" = x; then
30875    # Oops. Which didn't find the executable.
30876    # The splitting of arguments from the executable at a space might have been incorrect,
30877    # since paths with space are more likely in Windows. Give it another try with the whole
30878    # argument.
30879    path="$complete"
30880    arguments="EOL"
30881    new_path="$path"
30882
30883  windows_path="$new_path"
30884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30885    unix_path=`$CYGPATH -u "$windows_path"`
30886    new_path="$unix_path"
30887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30889    new_path="$unix_path"
30890  fi
30891
30892
30893    new_path=`$WHICH "$new_path" 2> /dev/null`
30894
30895    if test "x$new_path" = x; then
30896      # It's still not found. Now this is an unrecoverable error.
30897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30898$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30899      has_space=`$ECHO "$complete" | $GREP " "`
30900      if test "x$has_space" != x; then
30901        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30902$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30903      fi
30904      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30905    fi
30906  fi
30907
30908  # Now new_path has a complete unix path to the binary
30909  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30910    # Keep paths in /bin as-is, but remove trailing .exe if any
30911    new_path="${new_path/%.exe/}"
30912    # Do not save /bin paths to all_fixpath_prefixes!
30913  else
30914    # Not in mixed or Windows style, start by that.
30915    new_path=`cmd //c echo $new_path`
30916
30917  input_path="$new_path"
30918  # Check if we need to convert this using DOS-style short mode. If the path
30919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30920  # take no chances and rewrite it.
30921  # Note: m4 eats our [], so we need to use [ and ] instead.
30922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30923  if test "x$has_forbidden_chars" != x; then
30924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30926  fi
30927
30928    # Output is in $new_path
30929
30930  windows_path="$new_path"
30931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30932    unix_path=`$CYGPATH -u "$windows_path"`
30933    new_path="$unix_path"
30934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30936    new_path="$unix_path"
30937  fi
30938
30939    # remove trailing .exe if any
30940    new_path="${new_path/%.exe/}"
30941
30942    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30943    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30944  fi
30945
30946  else
30947    # We're on a posix platform. Hooray! :)
30948    # First separate the path from the arguments. This will split at the first
30949    # space.
30950    complete="$CPP"
30951    path="${complete%% *}"
30952    tmp="$complete EOL"
30953    arguments="${tmp#* }"
30954
30955    # Cannot rely on the command "which" here since it doesn't always work.
30956    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30957    if test -z "$is_absolute_path"; then
30958      # Path to executable is not absolute. Find it.
30959      IFS_save="$IFS"
30960      IFS=:
30961      for p in $PATH; do
30962        if test -f "$p/$path" && test -x "$p/$path"; then
30963          new_path="$p/$path"
30964          break
30965        fi
30966      done
30967      IFS="$IFS_save"
30968    else
30969      # This is an absolute path, we can use it without further modifications.
30970      new_path="$path"
30971    fi
30972
30973    if test "x$new_path" = x; then
30974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30975$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30976      has_space=`$ECHO "$complete" | $GREP " "`
30977      if test "x$has_space" != x; then
30978        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30979$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30980      fi
30981      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30982    fi
30983  fi
30984
30985  # Now join together the path and the arguments once again
30986  if test "x$arguments" != xEOL; then
30987    new_complete="$new_path ${arguments% *}"
30988  else
30989    new_complete="$new_path"
30990  fi
30991
30992  if test "x$complete" != "x$new_complete"; then
30993    CPP="$new_complete"
30994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30995$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30996  fi
30997
30998  ac_ext=cpp
30999ac_cpp='$CXXCPP $CPPFLAGS'
31000ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31001ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31002ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31004$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31005if test -z "$CXXCPP"; then
31006  if ${ac_cv_prog_CXXCPP+:} false; then :
31007  $as_echo_n "(cached) " >&6
31008else
31009      # Double quotes because CXXCPP needs to be expanded
31010    for CXXCPP in "$CXX -E" "/lib/cpp"
31011    do
31012      ac_preproc_ok=false
31013for ac_cxx_preproc_warn_flag in '' yes
31014do
31015  # Use a header file that comes with gcc, so configuring glibc
31016  # with a fresh cross-compiler works.
31017  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31018  # <limits.h> exists even on freestanding compilers.
31019  # On the NeXT, cc -E runs the code through the compiler's parser,
31020  # not just through cpp. "Syntax error" is here to catch this case.
31021  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31022/* end confdefs.h.  */
31023#ifdef __STDC__
31024# include <limits.h>
31025#else
31026# include <assert.h>
31027#endif
31028		     Syntax error
31029_ACEOF
31030if ac_fn_cxx_try_cpp "$LINENO"; then :
31031
31032else
31033  # Broken: fails on valid input.
31034continue
31035fi
31036rm -f conftest.err conftest.i conftest.$ac_ext
31037
31038  # OK, works on sane cases.  Now check whether nonexistent headers
31039  # can be detected and how.
31040  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31041/* end confdefs.h.  */
31042#include <ac_nonexistent.h>
31043_ACEOF
31044if ac_fn_cxx_try_cpp "$LINENO"; then :
31045  # Broken: success on invalid input.
31046continue
31047else
31048  # Passes both tests.
31049ac_preproc_ok=:
31050break
31051fi
31052rm -f conftest.err conftest.i conftest.$ac_ext
31053
31054done
31055# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31056rm -f conftest.i conftest.err conftest.$ac_ext
31057if $ac_preproc_ok; then :
31058  break
31059fi
31060
31061    done
31062    ac_cv_prog_CXXCPP=$CXXCPP
31063
31064fi
31065  CXXCPP=$ac_cv_prog_CXXCPP
31066else
31067  ac_cv_prog_CXXCPP=$CXXCPP
31068fi
31069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31070$as_echo "$CXXCPP" >&6; }
31071ac_preproc_ok=false
31072for ac_cxx_preproc_warn_flag in '' yes
31073do
31074  # Use a header file that comes with gcc, so configuring glibc
31075  # with a fresh cross-compiler works.
31076  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31077  # <limits.h> exists even on freestanding compilers.
31078  # On the NeXT, cc -E runs the code through the compiler's parser,
31079  # not just through cpp. "Syntax error" is here to catch this case.
31080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31081/* end confdefs.h.  */
31082#ifdef __STDC__
31083# include <limits.h>
31084#else
31085# include <assert.h>
31086#endif
31087		     Syntax error
31088_ACEOF
31089if ac_fn_cxx_try_cpp "$LINENO"; then :
31090
31091else
31092  # Broken: fails on valid input.
31093continue
31094fi
31095rm -f conftest.err conftest.i conftest.$ac_ext
31096
31097  # OK, works on sane cases.  Now check whether nonexistent headers
31098  # can be detected and how.
31099  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31100/* end confdefs.h.  */
31101#include <ac_nonexistent.h>
31102_ACEOF
31103if ac_fn_cxx_try_cpp "$LINENO"; then :
31104  # Broken: success on invalid input.
31105continue
31106else
31107  # Passes both tests.
31108ac_preproc_ok=:
31109break
31110fi
31111rm -f conftest.err conftest.i conftest.$ac_ext
31112
31113done
31114# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31115rm -f conftest.i conftest.err conftest.$ac_ext
31116if $ac_preproc_ok; then :
31117
31118else
31119  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31120$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31121as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31122See \`config.log' for more details" "$LINENO" 5; }
31123fi
31124
31125ac_ext=cpp
31126ac_cpp='$CXXCPP $CPPFLAGS'
31127ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31128ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31129ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31130
31131
31132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31133
31134  # First separate the path from the arguments. This will split at the first
31135  # space.
31136  complete="$CXXCPP"
31137  path="${complete%% *}"
31138  tmp="$complete EOL"
31139  arguments="${tmp#* }"
31140
31141  # Input might be given as Windows format, start by converting to
31142  # unix format.
31143  new_path=`$CYGPATH -u "$path"`
31144
31145  # Now try to locate executable using which
31146  new_path=`$WHICH "$new_path" 2> /dev/null`
31147  # bat and cmd files are not always considered executable in cygwin causing which
31148  # to not find them
31149  if test "x$new_path" = x \
31150      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31151      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31152    new_path=`$CYGPATH -u "$path"`
31153  fi
31154  if test "x$new_path" = x; then
31155    # Oops. Which didn't find the executable.
31156    # The splitting of arguments from the executable at a space might have been incorrect,
31157    # since paths with space are more likely in Windows. Give it another try with the whole
31158    # argument.
31159    path="$complete"
31160    arguments="EOL"
31161    new_path=`$CYGPATH -u "$path"`
31162    new_path=`$WHICH "$new_path" 2> /dev/null`
31163    # bat and cmd files are not always considered executable in cygwin causing which
31164    # to not find them
31165    if test "x$new_path" = x \
31166        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31167        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31168      new_path=`$CYGPATH -u "$path"`
31169    fi
31170    if test "x$new_path" = x; then
31171      # It's still not found. Now this is an unrecoverable error.
31172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31173$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31174      has_space=`$ECHO "$complete" | $GREP " "`
31175      if test "x$has_space" != x; then
31176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31178      fi
31179      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31180    fi
31181  fi
31182
31183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31186  # "foo.exe" is OK but "foo" is an error.
31187  #
31188  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31189  # It is also a way to make sure we got the proper file name for the real test later on.
31190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31191  if test "x$test_shortpath" = x; then
31192    # Short path failed, file does not exist as specified.
31193    # Try adding .exe or .cmd
31194    if test -f "${new_path}.exe"; then
31195      input_to_shortpath="${new_path}.exe"
31196    elif test -f "${new_path}.cmd"; then
31197      input_to_shortpath="${new_path}.cmd"
31198    else
31199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31200$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31201      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31202$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31203      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31204    fi
31205  else
31206    input_to_shortpath="$new_path"
31207  fi
31208
31209  # Call helper function which possibly converts this using DOS-style short mode.
31210  # If so, the updated path is stored in $new_path.
31211  new_path="$input_to_shortpath"
31212
31213  input_path="$input_to_shortpath"
31214  # Check if we need to convert this using DOS-style short mode. If the path
31215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31216  # take no chances and rewrite it.
31217  # Note: m4 eats our [], so we need to use [ and ] instead.
31218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31219  if test "x$has_forbidden_chars" != x; then
31220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31221    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31222    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31223    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31224      # Going to short mode and back again did indeed matter. Since short mode is
31225      # case insensitive, let's make it lowercase to improve readability.
31226      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31227      # Now convert it back to Unix-stile (cygpath)
31228      input_path=`$CYGPATH -u "$shortmode_path"`
31229      new_path="$input_path"
31230    fi
31231  fi
31232
31233  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31234  if test "x$test_cygdrive_prefix" = x; then
31235    # As a simple fix, exclude /usr/bin since it's not a real path.
31236    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31237      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31238      # a path prefixed by /cygdrive for fixpath to work.
31239      new_path="$CYGWIN_ROOT_PATH$input_path"
31240    fi
31241  fi
31242
31243  # remove trailing .exe if any
31244  new_path="${new_path/%.exe/}"
31245
31246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31247
31248  # First separate the path from the arguments. This will split at the first
31249  # space.
31250  complete="$CXXCPP"
31251  path="${complete%% *}"
31252  tmp="$complete EOL"
31253  arguments="${tmp#* }"
31254
31255  # Input might be given as Windows format, start by converting to
31256  # unix format.
31257  new_path="$path"
31258
31259  windows_path="$new_path"
31260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31261    unix_path=`$CYGPATH -u "$windows_path"`
31262    new_path="$unix_path"
31263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31265    new_path="$unix_path"
31266  fi
31267
31268
31269  # Now try to locate executable using which
31270  new_path=`$WHICH "$new_path" 2> /dev/null`
31271
31272  if test "x$new_path" = x; then
31273    # Oops. Which didn't find the executable.
31274    # The splitting of arguments from the executable at a space might have been incorrect,
31275    # since paths with space are more likely in Windows. Give it another try with the whole
31276    # argument.
31277    path="$complete"
31278    arguments="EOL"
31279    new_path="$path"
31280
31281  windows_path="$new_path"
31282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31283    unix_path=`$CYGPATH -u "$windows_path"`
31284    new_path="$unix_path"
31285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31287    new_path="$unix_path"
31288  fi
31289
31290
31291    new_path=`$WHICH "$new_path" 2> /dev/null`
31292
31293    if test "x$new_path" = x; then
31294      # It's still not found. Now this is an unrecoverable error.
31295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31296$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31297      has_space=`$ECHO "$complete" | $GREP " "`
31298      if test "x$has_space" != x; then
31299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31301      fi
31302      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31303    fi
31304  fi
31305
31306  # Now new_path has a complete unix path to the binary
31307  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31308    # Keep paths in /bin as-is, but remove trailing .exe if any
31309    new_path="${new_path/%.exe/}"
31310    # Do not save /bin paths to all_fixpath_prefixes!
31311  else
31312    # Not in mixed or Windows style, start by that.
31313    new_path=`cmd //c echo $new_path`
31314
31315  input_path="$new_path"
31316  # Check if we need to convert this using DOS-style short mode. If the path
31317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31318  # take no chances and rewrite it.
31319  # Note: m4 eats our [], so we need to use [ and ] instead.
31320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31321  if test "x$has_forbidden_chars" != x; then
31322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31323    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31324  fi
31325
31326    # Output is in $new_path
31327
31328  windows_path="$new_path"
31329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31330    unix_path=`$CYGPATH -u "$windows_path"`
31331    new_path="$unix_path"
31332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31334    new_path="$unix_path"
31335  fi
31336
31337    # remove trailing .exe if any
31338    new_path="${new_path/%.exe/}"
31339
31340    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31341    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31342  fi
31343
31344  else
31345    # We're on a posix platform. Hooray! :)
31346    # First separate the path from the arguments. This will split at the first
31347    # space.
31348    complete="$CXXCPP"
31349    path="${complete%% *}"
31350    tmp="$complete EOL"
31351    arguments="${tmp#* }"
31352
31353    # Cannot rely on the command "which" here since it doesn't always work.
31354    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31355    if test -z "$is_absolute_path"; then
31356      # Path to executable is not absolute. Find it.
31357      IFS_save="$IFS"
31358      IFS=:
31359      for p in $PATH; do
31360        if test -f "$p/$path" && test -x "$p/$path"; then
31361          new_path="$p/$path"
31362          break
31363        fi
31364      done
31365      IFS="$IFS_save"
31366    else
31367      # This is an absolute path, we can use it without further modifications.
31368      new_path="$path"
31369    fi
31370
31371    if test "x$new_path" = x; then
31372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31373$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31374      has_space=`$ECHO "$complete" | $GREP " "`
31375      if test "x$has_space" != x; then
31376        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31377$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31378      fi
31379      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31380    fi
31381  fi
31382
31383  # Now join together the path and the arguments once again
31384  if test "x$arguments" != xEOL; then
31385    new_complete="$new_path ${arguments% *}"
31386  else
31387    new_complete="$new_path"
31388  fi
31389
31390  if test "x$complete" != "x$new_complete"; then
31391    CXXCPP="$new_complete"
31392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31393$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31394  fi
31395
31396
31397  #
31398  # Setup the linker (LD)
31399  #
31400  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31401    # In the Microsoft toolchain we have a separate LD command "link".
31402    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31403    # a cygwin program for something completely different.
31404    # Extract the first word of "link", so it can be a program name with args.
31405set dummy link; ac_word=$2
31406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31407$as_echo_n "checking for $ac_word... " >&6; }
31408if ${ac_cv_prog_LD+:} false; then :
31409  $as_echo_n "(cached) " >&6
31410else
31411  if test -n "$LD"; then
31412  ac_cv_prog_LD="$LD" # Let the user override the test.
31413else
31414  ac_prog_rejected=no
31415as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31416for as_dir in $PATH
31417do
31418  IFS=$as_save_IFS
31419  test -z "$as_dir" && as_dir=.
31420    for ac_exec_ext in '' $ac_executable_extensions; do
31421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31422    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31423       ac_prog_rejected=yes
31424       continue
31425     fi
31426    ac_cv_prog_LD="link"
31427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31428    break 2
31429  fi
31430done
31431  done
31432IFS=$as_save_IFS
31433
31434if test $ac_prog_rejected = yes; then
31435  # We found a bogon in the path, so make sure we never use it.
31436  set dummy $ac_cv_prog_LD
31437  shift
31438  if test $# != 0; then
31439    # We chose a different compiler from the bogus one.
31440    # However, it has the same basename, so the bogon will be chosen
31441    # first if we set LD to just the basename; use the full file name.
31442    shift
31443    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31444  fi
31445fi
31446fi
31447fi
31448LD=$ac_cv_prog_LD
31449if test -n "$LD"; then
31450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31451$as_echo "$LD" >&6; }
31452else
31453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31454$as_echo "no" >&6; }
31455fi
31456
31457
31458
31459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31460
31461  # First separate the path from the arguments. This will split at the first
31462  # space.
31463  complete="$LD"
31464  path="${complete%% *}"
31465  tmp="$complete EOL"
31466  arguments="${tmp#* }"
31467
31468  # Input might be given as Windows format, start by converting to
31469  # unix format.
31470  new_path=`$CYGPATH -u "$path"`
31471
31472  # Now try to locate executable using which
31473  new_path=`$WHICH "$new_path" 2> /dev/null`
31474  # bat and cmd files are not always considered executable in cygwin causing which
31475  # to not find them
31476  if test "x$new_path" = x \
31477      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31478      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31479    new_path=`$CYGPATH -u "$path"`
31480  fi
31481  if test "x$new_path" = x; then
31482    # Oops. Which didn't find the executable.
31483    # The splitting of arguments from the executable at a space might have been incorrect,
31484    # since paths with space are more likely in Windows. Give it another try with the whole
31485    # argument.
31486    path="$complete"
31487    arguments="EOL"
31488    new_path=`$CYGPATH -u "$path"`
31489    new_path=`$WHICH "$new_path" 2> /dev/null`
31490    # bat and cmd files are not always considered executable in cygwin causing which
31491    # to not find them
31492    if test "x$new_path" = x \
31493        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31494        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31495      new_path=`$CYGPATH -u "$path"`
31496    fi
31497    if test "x$new_path" = x; then
31498      # It's still not found. Now this is an unrecoverable error.
31499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31500$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31501      has_space=`$ECHO "$complete" | $GREP " "`
31502      if test "x$has_space" != x; then
31503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31505      fi
31506      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31507    fi
31508  fi
31509
31510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31513  # "foo.exe" is OK but "foo" is an error.
31514  #
31515  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31516  # It is also a way to make sure we got the proper file name for the real test later on.
31517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31518  if test "x$test_shortpath" = x; then
31519    # Short path failed, file does not exist as specified.
31520    # Try adding .exe or .cmd
31521    if test -f "${new_path}.exe"; then
31522      input_to_shortpath="${new_path}.exe"
31523    elif test -f "${new_path}.cmd"; then
31524      input_to_shortpath="${new_path}.cmd"
31525    else
31526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31527$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31528      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31529$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31530      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31531    fi
31532  else
31533    input_to_shortpath="$new_path"
31534  fi
31535
31536  # Call helper function which possibly converts this using DOS-style short mode.
31537  # If so, the updated path is stored in $new_path.
31538  new_path="$input_to_shortpath"
31539
31540  input_path="$input_to_shortpath"
31541  # Check if we need to convert this using DOS-style short mode. If the path
31542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31543  # take no chances and rewrite it.
31544  # Note: m4 eats our [], so we need to use [ and ] instead.
31545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31546  if test "x$has_forbidden_chars" != x; then
31547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31551      # Going to short mode and back again did indeed matter. Since short mode is
31552      # case insensitive, let's make it lowercase to improve readability.
31553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31554      # Now convert it back to Unix-stile (cygpath)
31555      input_path=`$CYGPATH -u "$shortmode_path"`
31556      new_path="$input_path"
31557    fi
31558  fi
31559
31560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31561  if test "x$test_cygdrive_prefix" = x; then
31562    # As a simple fix, exclude /usr/bin since it's not a real path.
31563    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31565      # a path prefixed by /cygdrive for fixpath to work.
31566      new_path="$CYGWIN_ROOT_PATH$input_path"
31567    fi
31568  fi
31569
31570  # remove trailing .exe if any
31571  new_path="${new_path/%.exe/}"
31572
31573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31574
31575  # First separate the path from the arguments. This will split at the first
31576  # space.
31577  complete="$LD"
31578  path="${complete%% *}"
31579  tmp="$complete EOL"
31580  arguments="${tmp#* }"
31581
31582  # Input might be given as Windows format, start by converting to
31583  # unix format.
31584  new_path="$path"
31585
31586  windows_path="$new_path"
31587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31588    unix_path=`$CYGPATH -u "$windows_path"`
31589    new_path="$unix_path"
31590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31592    new_path="$unix_path"
31593  fi
31594
31595
31596  # Now try to locate executable using which
31597  new_path=`$WHICH "$new_path" 2> /dev/null`
31598
31599  if test "x$new_path" = x; then
31600    # Oops. Which didn't find the executable.
31601    # The splitting of arguments from the executable at a space might have been incorrect,
31602    # since paths with space are more likely in Windows. Give it another try with the whole
31603    # argument.
31604    path="$complete"
31605    arguments="EOL"
31606    new_path="$path"
31607
31608  windows_path="$new_path"
31609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31610    unix_path=`$CYGPATH -u "$windows_path"`
31611    new_path="$unix_path"
31612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31614    new_path="$unix_path"
31615  fi
31616
31617
31618    new_path=`$WHICH "$new_path" 2> /dev/null`
31619
31620    if test "x$new_path" = x; then
31621      # It's still not found. Now this is an unrecoverable error.
31622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31623$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31624      has_space=`$ECHO "$complete" | $GREP " "`
31625      if test "x$has_space" != x; then
31626        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31628      fi
31629      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31630    fi
31631  fi
31632
31633  # Now new_path has a complete unix path to the binary
31634  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31635    # Keep paths in /bin as-is, but remove trailing .exe if any
31636    new_path="${new_path/%.exe/}"
31637    # Do not save /bin paths to all_fixpath_prefixes!
31638  else
31639    # Not in mixed or Windows style, start by that.
31640    new_path=`cmd //c echo $new_path`
31641
31642  input_path="$new_path"
31643  # Check if we need to convert this using DOS-style short mode. If the path
31644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31645  # take no chances and rewrite it.
31646  # Note: m4 eats our [], so we need to use [ and ] instead.
31647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31648  if test "x$has_forbidden_chars" != x; then
31649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31651  fi
31652
31653    # Output is in $new_path
31654
31655  windows_path="$new_path"
31656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31657    unix_path=`$CYGPATH -u "$windows_path"`
31658    new_path="$unix_path"
31659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31661    new_path="$unix_path"
31662  fi
31663
31664    # remove trailing .exe if any
31665    new_path="${new_path/%.exe/}"
31666
31667    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31668    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31669  fi
31670
31671  else
31672    # We're on a posix platform. Hooray! :)
31673    # First separate the path from the arguments. This will split at the first
31674    # space.
31675    complete="$LD"
31676    path="${complete%% *}"
31677    tmp="$complete EOL"
31678    arguments="${tmp#* }"
31679
31680    # Cannot rely on the command "which" here since it doesn't always work.
31681    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31682    if test -z "$is_absolute_path"; then
31683      # Path to executable is not absolute. Find it.
31684      IFS_save="$IFS"
31685      IFS=:
31686      for p in $PATH; do
31687        if test -f "$p/$path" && test -x "$p/$path"; then
31688          new_path="$p/$path"
31689          break
31690        fi
31691      done
31692      IFS="$IFS_save"
31693    else
31694      # This is an absolute path, we can use it without further modifications.
31695      new_path="$path"
31696    fi
31697
31698    if test "x$new_path" = x; then
31699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31700$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31701      has_space=`$ECHO "$complete" | $GREP " "`
31702      if test "x$has_space" != x; then
31703        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31704$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31705      fi
31706      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31707    fi
31708  fi
31709
31710  # Now join together the path and the arguments once again
31711  if test "x$arguments" != xEOL; then
31712    new_complete="$new_path ${arguments% *}"
31713  else
31714    new_complete="$new_path"
31715  fi
31716
31717  if test "x$complete" != "x$new_complete"; then
31718    LD="$new_complete"
31719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31720$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31721  fi
31722
31723    # Verify that we indeed succeeded with this trick.
31724    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31725$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31726    "$LD" --version > /dev/null
31727    if test $? -eq 0 ; then
31728      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31729$as_echo "no" >&6; }
31730      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31731    else
31732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31733$as_echo "yes" >&6; }
31734    fi
31735    LDCXX="$LD"
31736  else
31737    # All other toolchains use the compiler to link.
31738    LD="$CC"
31739    LDCXX="$CXX"
31740  fi
31741
31742  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31743
31744
31745  #
31746  # Setup the assembler (AS)
31747  #
31748  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31749    # FIXME: should this really be solaris, or solstudio?
31750
31751
31752  # Publish this variable in the help.
31753
31754
31755  if test "x$AS" = x; then
31756    # The variable is not set by user, try to locate tool using the code snippet
31757    for ac_prog in as
31758do
31759  # Extract the first word of "$ac_prog", so it can be a program name with args.
31760set dummy $ac_prog; ac_word=$2
31761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31762$as_echo_n "checking for $ac_word... " >&6; }
31763if ${ac_cv_path_AS+:} false; then :
31764  $as_echo_n "(cached) " >&6
31765else
31766  case $AS in
31767  [\\/]* | ?:[\\/]*)
31768  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31769  ;;
31770  *)
31771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31772for as_dir in $PATH
31773do
31774  IFS=$as_save_IFS
31775  test -z "$as_dir" && as_dir=.
31776    for ac_exec_ext in '' $ac_executable_extensions; do
31777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31778    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31780    break 2
31781  fi
31782done
31783  done
31784IFS=$as_save_IFS
31785
31786  ;;
31787esac
31788fi
31789AS=$ac_cv_path_AS
31790if test -n "$AS"; then
31791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31792$as_echo "$AS" >&6; }
31793else
31794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31795$as_echo "no" >&6; }
31796fi
31797
31798
31799  test -n "$AS" && break
31800done
31801
31802  else
31803    # The variable is set, but is it from the command line or the environment?
31804
31805    # Try to remove the string !AS! from our list.
31806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31808      # If it failed, the variable was not from the command line. Ignore it,
31809      # but warn the user (except for BASH, which is always set by the calling BASH).
31810      if test "xAS" != xBASH; then
31811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31812$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31813      fi
31814      # Try to locate tool using the code snippet
31815      for ac_prog in as
31816do
31817  # Extract the first word of "$ac_prog", so it can be a program name with args.
31818set dummy $ac_prog; ac_word=$2
31819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31820$as_echo_n "checking for $ac_word... " >&6; }
31821if ${ac_cv_path_AS+:} false; then :
31822  $as_echo_n "(cached) " >&6
31823else
31824  case $AS in
31825  [\\/]* | ?:[\\/]*)
31826  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31827  ;;
31828  *)
31829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31830for as_dir in $PATH
31831do
31832  IFS=$as_save_IFS
31833  test -z "$as_dir" && as_dir=.
31834    for ac_exec_ext in '' $ac_executable_extensions; do
31835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31836    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31838    break 2
31839  fi
31840done
31841  done
31842IFS=$as_save_IFS
31843
31844  ;;
31845esac
31846fi
31847AS=$ac_cv_path_AS
31848if test -n "$AS"; then
31849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31850$as_echo "$AS" >&6; }
31851else
31852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31853$as_echo "no" >&6; }
31854fi
31855
31856
31857  test -n "$AS" && break
31858done
31859
31860    else
31861      # If it succeeded, then it was overridden by the user. We will use it
31862      # for the tool.
31863
31864      # First remove it from the list of overridden variables, so we can test
31865      # for unknown variables in the end.
31866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31867
31868      # Check if the provided tool contains a complete path.
31869      tool_specified="$AS"
31870      tool_basename="${tool_specified##*/}"
31871      if test "x$tool_basename" = "x$tool_specified"; then
31872        # A command without a complete path is provided, search $PATH.
31873        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31874$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31875        # Extract the first word of "$tool_basename", so it can be a program name with args.
31876set dummy $tool_basename; ac_word=$2
31877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31878$as_echo_n "checking for $ac_word... " >&6; }
31879if ${ac_cv_path_AS+:} false; then :
31880  $as_echo_n "(cached) " >&6
31881else
31882  case $AS in
31883  [\\/]* | ?:[\\/]*)
31884  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31885  ;;
31886  *)
31887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31888for as_dir in $PATH
31889do
31890  IFS=$as_save_IFS
31891  test -z "$as_dir" && as_dir=.
31892    for ac_exec_ext in '' $ac_executable_extensions; do
31893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31894    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31896    break 2
31897  fi
31898done
31899  done
31900IFS=$as_save_IFS
31901
31902  ;;
31903esac
31904fi
31905AS=$ac_cv_path_AS
31906if test -n "$AS"; then
31907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31908$as_echo "$AS" >&6; }
31909else
31910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31911$as_echo "no" >&6; }
31912fi
31913
31914
31915        if test "x$AS" = x; then
31916          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31917        fi
31918      else
31919        # Otherwise we believe it is a complete path. Use it as it is.
31920        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31921$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31922        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31923$as_echo_n "checking for AS... " >&6; }
31924        if test ! -x "$tool_specified"; then
31925          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31926$as_echo "not found" >&6; }
31927          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31928        fi
31929        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31930$as_echo "$tool_specified" >&6; }
31931      fi
31932    fi
31933  fi
31934
31935
31936
31937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31938
31939  # First separate the path from the arguments. This will split at the first
31940  # space.
31941  complete="$AS"
31942  path="${complete%% *}"
31943  tmp="$complete EOL"
31944  arguments="${tmp#* }"
31945
31946  # Input might be given as Windows format, start by converting to
31947  # unix format.
31948  new_path=`$CYGPATH -u "$path"`
31949
31950  # Now try to locate executable using which
31951  new_path=`$WHICH "$new_path" 2> /dev/null`
31952  # bat and cmd files are not always considered executable in cygwin causing which
31953  # to not find them
31954  if test "x$new_path" = x \
31955      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31956      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31957    new_path=`$CYGPATH -u "$path"`
31958  fi
31959  if test "x$new_path" = x; then
31960    # Oops. Which didn't find the executable.
31961    # The splitting of arguments from the executable at a space might have been incorrect,
31962    # since paths with space are more likely in Windows. Give it another try with the whole
31963    # argument.
31964    path="$complete"
31965    arguments="EOL"
31966    new_path=`$CYGPATH -u "$path"`
31967    new_path=`$WHICH "$new_path" 2> /dev/null`
31968    # bat and cmd files are not always considered executable in cygwin causing which
31969    # to not find them
31970    if test "x$new_path" = x \
31971        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31972        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31973      new_path=`$CYGPATH -u "$path"`
31974    fi
31975    if test "x$new_path" = x; then
31976      # It's still not found. Now this is an unrecoverable error.
31977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31978$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31979      has_space=`$ECHO "$complete" | $GREP " "`
31980      if test "x$has_space" != x; then
31981        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31982$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31983      fi
31984      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31985    fi
31986  fi
31987
31988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31991  # "foo.exe" is OK but "foo" is an error.
31992  #
31993  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31994  # It is also a way to make sure we got the proper file name for the real test later on.
31995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31996  if test "x$test_shortpath" = x; then
31997    # Short path failed, file does not exist as specified.
31998    # Try adding .exe or .cmd
31999    if test -f "${new_path}.exe"; then
32000      input_to_shortpath="${new_path}.exe"
32001    elif test -f "${new_path}.cmd"; then
32002      input_to_shortpath="${new_path}.cmd"
32003    else
32004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32005$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32006      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32007$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32008      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32009    fi
32010  else
32011    input_to_shortpath="$new_path"
32012  fi
32013
32014  # Call helper function which possibly converts this using DOS-style short mode.
32015  # If so, the updated path is stored in $new_path.
32016  new_path="$input_to_shortpath"
32017
32018  input_path="$input_to_shortpath"
32019  # Check if we need to convert this using DOS-style short mode. If the path
32020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32021  # take no chances and rewrite it.
32022  # Note: m4 eats our [], so we need to use [ and ] instead.
32023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32024  if test "x$has_forbidden_chars" != x; then
32025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32029      # Going to short mode and back again did indeed matter. Since short mode is
32030      # case insensitive, let's make it lowercase to improve readability.
32031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32032      # Now convert it back to Unix-stile (cygpath)
32033      input_path=`$CYGPATH -u "$shortmode_path"`
32034      new_path="$input_path"
32035    fi
32036  fi
32037
32038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32039  if test "x$test_cygdrive_prefix" = x; then
32040    # As a simple fix, exclude /usr/bin since it's not a real path.
32041    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32043      # a path prefixed by /cygdrive for fixpath to work.
32044      new_path="$CYGWIN_ROOT_PATH$input_path"
32045    fi
32046  fi
32047
32048  # remove trailing .exe if any
32049  new_path="${new_path/%.exe/}"
32050
32051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32052
32053  # First separate the path from the arguments. This will split at the first
32054  # space.
32055  complete="$AS"
32056  path="${complete%% *}"
32057  tmp="$complete EOL"
32058  arguments="${tmp#* }"
32059
32060  # Input might be given as Windows format, start by converting to
32061  # unix format.
32062  new_path="$path"
32063
32064  windows_path="$new_path"
32065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32066    unix_path=`$CYGPATH -u "$windows_path"`
32067    new_path="$unix_path"
32068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32070    new_path="$unix_path"
32071  fi
32072
32073
32074  # Now try to locate executable using which
32075  new_path=`$WHICH "$new_path" 2> /dev/null`
32076
32077  if test "x$new_path" = x; then
32078    # Oops. Which didn't find the executable.
32079    # The splitting of arguments from the executable at a space might have been incorrect,
32080    # since paths with space are more likely in Windows. Give it another try with the whole
32081    # argument.
32082    path="$complete"
32083    arguments="EOL"
32084    new_path="$path"
32085
32086  windows_path="$new_path"
32087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32088    unix_path=`$CYGPATH -u "$windows_path"`
32089    new_path="$unix_path"
32090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32092    new_path="$unix_path"
32093  fi
32094
32095
32096    new_path=`$WHICH "$new_path" 2> /dev/null`
32097
32098    if test "x$new_path" = x; then
32099      # It's still not found. Now this is an unrecoverable error.
32100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32101$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32102      has_space=`$ECHO "$complete" | $GREP " "`
32103      if test "x$has_space" != x; then
32104        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32105$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32106      fi
32107      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32108    fi
32109  fi
32110
32111  # Now new_path has a complete unix path to the binary
32112  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32113    # Keep paths in /bin as-is, but remove trailing .exe if any
32114    new_path="${new_path/%.exe/}"
32115    # Do not save /bin paths to all_fixpath_prefixes!
32116  else
32117    # Not in mixed or Windows style, start by that.
32118    new_path=`cmd //c echo $new_path`
32119
32120  input_path="$new_path"
32121  # Check if we need to convert this using DOS-style short mode. If the path
32122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32123  # take no chances and rewrite it.
32124  # Note: m4 eats our [], so we need to use [ and ] instead.
32125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32126  if test "x$has_forbidden_chars" != x; then
32127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32129  fi
32130
32131    # Output is in $new_path
32132
32133  windows_path="$new_path"
32134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32135    unix_path=`$CYGPATH -u "$windows_path"`
32136    new_path="$unix_path"
32137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32139    new_path="$unix_path"
32140  fi
32141
32142    # remove trailing .exe if any
32143    new_path="${new_path/%.exe/}"
32144
32145    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32146    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32147  fi
32148
32149  else
32150    # We're on a posix platform. Hooray! :)
32151    # First separate the path from the arguments. This will split at the first
32152    # space.
32153    complete="$AS"
32154    path="${complete%% *}"
32155    tmp="$complete EOL"
32156    arguments="${tmp#* }"
32157
32158    # Cannot rely on the command "which" here since it doesn't always work.
32159    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32160    if test -z "$is_absolute_path"; then
32161      # Path to executable is not absolute. Find it.
32162      IFS_save="$IFS"
32163      IFS=:
32164      for p in $PATH; do
32165        if test -f "$p/$path" && test -x "$p/$path"; then
32166          new_path="$p/$path"
32167          break
32168        fi
32169      done
32170      IFS="$IFS_save"
32171    else
32172      # This is an absolute path, we can use it without further modifications.
32173      new_path="$path"
32174    fi
32175
32176    if test "x$new_path" = x; then
32177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32178$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32179      has_space=`$ECHO "$complete" | $GREP " "`
32180      if test "x$has_space" != x; then
32181        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32182$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32183      fi
32184      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32185    fi
32186  fi
32187
32188  # Now join together the path and the arguments once again
32189  if test "x$arguments" != xEOL; then
32190    new_complete="$new_path ${arguments% *}"
32191  else
32192    new_complete="$new_path"
32193  fi
32194
32195  if test "x$complete" != "x$new_complete"; then
32196    AS="$new_complete"
32197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32198$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32199  fi
32200
32201  else
32202    # FIXME: is this correct for microsoft?
32203    AS="$CC -c"
32204  fi
32205
32206
32207  #
32208  # Setup the archiver (AR)
32209  #
32210  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32211    # The corresponding ar tool is lib.exe (used to create static libraries)
32212    # Extract the first word of "lib", so it can be a program name with args.
32213set dummy lib; ac_word=$2
32214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32215$as_echo_n "checking for $ac_word... " >&6; }
32216if ${ac_cv_prog_AR+:} false; then :
32217  $as_echo_n "(cached) " >&6
32218else
32219  if test -n "$AR"; then
32220  ac_cv_prog_AR="$AR" # Let the user override the test.
32221else
32222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32223for as_dir in $PATH
32224do
32225  IFS=$as_save_IFS
32226  test -z "$as_dir" && as_dir=.
32227    for ac_exec_ext in '' $ac_executable_extensions; do
32228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32229    ac_cv_prog_AR="lib"
32230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32231    break 2
32232  fi
32233done
32234  done
32235IFS=$as_save_IFS
32236
32237fi
32238fi
32239AR=$ac_cv_prog_AR
32240if test -n "$AR"; then
32241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32242$as_echo "$AR" >&6; }
32243else
32244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32245$as_echo "no" >&6; }
32246fi
32247
32248
32249  else
32250
32251
32252  # Publish this variable in the help.
32253
32254
32255  if test "x$AR" = x; then
32256    # The variable is not set by user, try to locate tool using the code snippet
32257    if test -n "$ac_tool_prefix"; then
32258  for ac_prog in ar
32259  do
32260    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32261set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32263$as_echo_n "checking for $ac_word... " >&6; }
32264if ${ac_cv_prog_AR+:} false; then :
32265  $as_echo_n "(cached) " >&6
32266else
32267  if test -n "$AR"; then
32268  ac_cv_prog_AR="$AR" # Let the user override the test.
32269else
32270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32271for as_dir in $PATH
32272do
32273  IFS=$as_save_IFS
32274  test -z "$as_dir" && as_dir=.
32275    for ac_exec_ext in '' $ac_executable_extensions; do
32276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32277    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32279    break 2
32280  fi
32281done
32282  done
32283IFS=$as_save_IFS
32284
32285fi
32286fi
32287AR=$ac_cv_prog_AR
32288if test -n "$AR"; then
32289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32290$as_echo "$AR" >&6; }
32291else
32292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32293$as_echo "no" >&6; }
32294fi
32295
32296
32297    test -n "$AR" && break
32298  done
32299fi
32300if test -z "$AR"; then
32301  ac_ct_AR=$AR
32302  for ac_prog in ar
32303do
32304  # Extract the first word of "$ac_prog", so it can be a program name with args.
32305set dummy $ac_prog; ac_word=$2
32306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32307$as_echo_n "checking for $ac_word... " >&6; }
32308if ${ac_cv_prog_ac_ct_AR+:} false; then :
32309  $as_echo_n "(cached) " >&6
32310else
32311  if test -n "$ac_ct_AR"; then
32312  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32313else
32314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32315for as_dir in $PATH
32316do
32317  IFS=$as_save_IFS
32318  test -z "$as_dir" && as_dir=.
32319    for ac_exec_ext in '' $ac_executable_extensions; do
32320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32321    ac_cv_prog_ac_ct_AR="$ac_prog"
32322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32323    break 2
32324  fi
32325done
32326  done
32327IFS=$as_save_IFS
32328
32329fi
32330fi
32331ac_ct_AR=$ac_cv_prog_ac_ct_AR
32332if test -n "$ac_ct_AR"; then
32333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32334$as_echo "$ac_ct_AR" >&6; }
32335else
32336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32337$as_echo "no" >&6; }
32338fi
32339
32340
32341  test -n "$ac_ct_AR" && break
32342done
32343
32344  if test "x$ac_ct_AR" = x; then
32345    AR=""
32346  else
32347    case $cross_compiling:$ac_tool_warned in
32348yes:)
32349{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32350$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32351ac_tool_warned=yes ;;
32352esac
32353    AR=$ac_ct_AR
32354  fi
32355fi
32356
32357  else
32358    # The variable is set, but is it from the command line or the environment?
32359
32360    # Try to remove the string !AR! from our list.
32361    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32362    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32363      # If it failed, the variable was not from the command line. Ignore it,
32364      # but warn the user (except for BASH, which is always set by the calling BASH).
32365      if test "xAR" != xBASH; then
32366        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32367$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32368      fi
32369      # Try to locate tool using the code snippet
32370      if test -n "$ac_tool_prefix"; then
32371  for ac_prog in ar
32372  do
32373    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32374set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32376$as_echo_n "checking for $ac_word... " >&6; }
32377if ${ac_cv_prog_AR+:} false; then :
32378  $as_echo_n "(cached) " >&6
32379else
32380  if test -n "$AR"; then
32381  ac_cv_prog_AR="$AR" # Let the user override the test.
32382else
32383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32384for as_dir in $PATH
32385do
32386  IFS=$as_save_IFS
32387  test -z "$as_dir" && as_dir=.
32388    for ac_exec_ext in '' $ac_executable_extensions; do
32389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32390    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32392    break 2
32393  fi
32394done
32395  done
32396IFS=$as_save_IFS
32397
32398fi
32399fi
32400AR=$ac_cv_prog_AR
32401if test -n "$AR"; then
32402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32403$as_echo "$AR" >&6; }
32404else
32405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32406$as_echo "no" >&6; }
32407fi
32408
32409
32410    test -n "$AR" && break
32411  done
32412fi
32413if test -z "$AR"; then
32414  ac_ct_AR=$AR
32415  for ac_prog in ar
32416do
32417  # Extract the first word of "$ac_prog", so it can be a program name with args.
32418set dummy $ac_prog; ac_word=$2
32419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32420$as_echo_n "checking for $ac_word... " >&6; }
32421if ${ac_cv_prog_ac_ct_AR+:} false; then :
32422  $as_echo_n "(cached) " >&6
32423else
32424  if test -n "$ac_ct_AR"; then
32425  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32426else
32427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32428for as_dir in $PATH
32429do
32430  IFS=$as_save_IFS
32431  test -z "$as_dir" && as_dir=.
32432    for ac_exec_ext in '' $ac_executable_extensions; do
32433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32434    ac_cv_prog_ac_ct_AR="$ac_prog"
32435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32436    break 2
32437  fi
32438done
32439  done
32440IFS=$as_save_IFS
32441
32442fi
32443fi
32444ac_ct_AR=$ac_cv_prog_ac_ct_AR
32445if test -n "$ac_ct_AR"; then
32446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32447$as_echo "$ac_ct_AR" >&6; }
32448else
32449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32450$as_echo "no" >&6; }
32451fi
32452
32453
32454  test -n "$ac_ct_AR" && break
32455done
32456
32457  if test "x$ac_ct_AR" = x; then
32458    AR=""
32459  else
32460    case $cross_compiling:$ac_tool_warned in
32461yes:)
32462{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32463$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32464ac_tool_warned=yes ;;
32465esac
32466    AR=$ac_ct_AR
32467  fi
32468fi
32469
32470    else
32471      # If it succeeded, then it was overridden by the user. We will use it
32472      # for the tool.
32473
32474      # First remove it from the list of overridden variables, so we can test
32475      # for unknown variables in the end.
32476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32477
32478      # Check if the provided tool contains a complete path.
32479      tool_specified="$AR"
32480      tool_basename="${tool_specified##*/}"
32481      if test "x$tool_basename" = "x$tool_specified"; then
32482        # A command without a complete path is provided, search $PATH.
32483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32484$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32485        # Extract the first word of "$tool_basename", so it can be a program name with args.
32486set dummy $tool_basename; ac_word=$2
32487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32488$as_echo_n "checking for $ac_word... " >&6; }
32489if ${ac_cv_path_AR+:} false; then :
32490  $as_echo_n "(cached) " >&6
32491else
32492  case $AR in
32493  [\\/]* | ?:[\\/]*)
32494  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32495  ;;
32496  *)
32497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32498for as_dir in $PATH
32499do
32500  IFS=$as_save_IFS
32501  test -z "$as_dir" && as_dir=.
32502    for ac_exec_ext in '' $ac_executable_extensions; do
32503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32504    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32506    break 2
32507  fi
32508done
32509  done
32510IFS=$as_save_IFS
32511
32512  ;;
32513esac
32514fi
32515AR=$ac_cv_path_AR
32516if test -n "$AR"; then
32517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32518$as_echo "$AR" >&6; }
32519else
32520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32521$as_echo "no" >&6; }
32522fi
32523
32524
32525        if test "x$AR" = x; then
32526          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32527        fi
32528      else
32529        # Otherwise we believe it is a complete path. Use it as it is.
32530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32531$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32533$as_echo_n "checking for AR... " >&6; }
32534        if test ! -x "$tool_specified"; then
32535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32536$as_echo "not found" >&6; }
32537          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32538        fi
32539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32540$as_echo "$tool_specified" >&6; }
32541      fi
32542    fi
32543  fi
32544
32545
32546  fi
32547
32548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32549
32550  # First separate the path from the arguments. This will split at the first
32551  # space.
32552  complete="$AR"
32553  path="${complete%% *}"
32554  tmp="$complete EOL"
32555  arguments="${tmp#* }"
32556
32557  # Input might be given as Windows format, start by converting to
32558  # unix format.
32559  new_path=`$CYGPATH -u "$path"`
32560
32561  # Now try to locate executable using which
32562  new_path=`$WHICH "$new_path" 2> /dev/null`
32563  # bat and cmd files are not always considered executable in cygwin causing which
32564  # to not find them
32565  if test "x$new_path" = x \
32566      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32567      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32568    new_path=`$CYGPATH -u "$path"`
32569  fi
32570  if test "x$new_path" = x; then
32571    # Oops. Which didn't find the executable.
32572    # The splitting of arguments from the executable at a space might have been incorrect,
32573    # since paths with space are more likely in Windows. Give it another try with the whole
32574    # argument.
32575    path="$complete"
32576    arguments="EOL"
32577    new_path=`$CYGPATH -u "$path"`
32578    new_path=`$WHICH "$new_path" 2> /dev/null`
32579    # bat and cmd files are not always considered executable in cygwin causing which
32580    # to not find them
32581    if test "x$new_path" = x \
32582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32584      new_path=`$CYGPATH -u "$path"`
32585    fi
32586    if test "x$new_path" = x; then
32587      # It's still not found. Now this is an unrecoverable error.
32588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32589$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32590      has_space=`$ECHO "$complete" | $GREP " "`
32591      if test "x$has_space" != x; then
32592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32594      fi
32595      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32596    fi
32597  fi
32598
32599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32602  # "foo.exe" is OK but "foo" is an error.
32603  #
32604  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32605  # It is also a way to make sure we got the proper file name for the real test later on.
32606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32607  if test "x$test_shortpath" = x; then
32608    # Short path failed, file does not exist as specified.
32609    # Try adding .exe or .cmd
32610    if test -f "${new_path}.exe"; then
32611      input_to_shortpath="${new_path}.exe"
32612    elif test -f "${new_path}.cmd"; then
32613      input_to_shortpath="${new_path}.cmd"
32614    else
32615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32616$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32617      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32618$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32619      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32620    fi
32621  else
32622    input_to_shortpath="$new_path"
32623  fi
32624
32625  # Call helper function which possibly converts this using DOS-style short mode.
32626  # If so, the updated path is stored in $new_path.
32627  new_path="$input_to_shortpath"
32628
32629  input_path="$input_to_shortpath"
32630  # Check if we need to convert this using DOS-style short mode. If the path
32631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32632  # take no chances and rewrite it.
32633  # Note: m4 eats our [], so we need to use [ and ] instead.
32634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32635  if test "x$has_forbidden_chars" != x; then
32636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32640      # Going to short mode and back again did indeed matter. Since short mode is
32641      # case insensitive, let's make it lowercase to improve readability.
32642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32643      # Now convert it back to Unix-stile (cygpath)
32644      input_path=`$CYGPATH -u "$shortmode_path"`
32645      new_path="$input_path"
32646    fi
32647  fi
32648
32649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32650  if test "x$test_cygdrive_prefix" = x; then
32651    # As a simple fix, exclude /usr/bin since it's not a real path.
32652    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32654      # a path prefixed by /cygdrive for fixpath to work.
32655      new_path="$CYGWIN_ROOT_PATH$input_path"
32656    fi
32657  fi
32658
32659  # remove trailing .exe if any
32660  new_path="${new_path/%.exe/}"
32661
32662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32663
32664  # First separate the path from the arguments. This will split at the first
32665  # space.
32666  complete="$AR"
32667  path="${complete%% *}"
32668  tmp="$complete EOL"
32669  arguments="${tmp#* }"
32670
32671  # Input might be given as Windows format, start by converting to
32672  # unix format.
32673  new_path="$path"
32674
32675  windows_path="$new_path"
32676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32677    unix_path=`$CYGPATH -u "$windows_path"`
32678    new_path="$unix_path"
32679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32681    new_path="$unix_path"
32682  fi
32683
32684
32685  # Now try to locate executable using which
32686  new_path=`$WHICH "$new_path" 2> /dev/null`
32687
32688  if test "x$new_path" = x; then
32689    # Oops. Which didn't find the executable.
32690    # The splitting of arguments from the executable at a space might have been incorrect,
32691    # since paths with space are more likely in Windows. Give it another try with the whole
32692    # argument.
32693    path="$complete"
32694    arguments="EOL"
32695    new_path="$path"
32696
32697  windows_path="$new_path"
32698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32699    unix_path=`$CYGPATH -u "$windows_path"`
32700    new_path="$unix_path"
32701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32703    new_path="$unix_path"
32704  fi
32705
32706
32707    new_path=`$WHICH "$new_path" 2> /dev/null`
32708
32709    if test "x$new_path" = x; then
32710      # It's still not found. Now this is an unrecoverable error.
32711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32712$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32713      has_space=`$ECHO "$complete" | $GREP " "`
32714      if test "x$has_space" != x; then
32715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32717      fi
32718      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32719    fi
32720  fi
32721
32722  # Now new_path has a complete unix path to the binary
32723  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32724    # Keep paths in /bin as-is, but remove trailing .exe if any
32725    new_path="${new_path/%.exe/}"
32726    # Do not save /bin paths to all_fixpath_prefixes!
32727  else
32728    # Not in mixed or Windows style, start by that.
32729    new_path=`cmd //c echo $new_path`
32730
32731  input_path="$new_path"
32732  # Check if we need to convert this using DOS-style short mode. If the path
32733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32734  # take no chances and rewrite it.
32735  # Note: m4 eats our [], so we need to use [ and ] instead.
32736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32737  if test "x$has_forbidden_chars" != x; then
32738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32740  fi
32741
32742    # Output is in $new_path
32743
32744  windows_path="$new_path"
32745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32746    unix_path=`$CYGPATH -u "$windows_path"`
32747    new_path="$unix_path"
32748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32750    new_path="$unix_path"
32751  fi
32752
32753    # remove trailing .exe if any
32754    new_path="${new_path/%.exe/}"
32755
32756    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32757    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32758  fi
32759
32760  else
32761    # We're on a posix platform. Hooray! :)
32762    # First separate the path from the arguments. This will split at the first
32763    # space.
32764    complete="$AR"
32765    path="${complete%% *}"
32766    tmp="$complete EOL"
32767    arguments="${tmp#* }"
32768
32769    # Cannot rely on the command "which" here since it doesn't always work.
32770    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32771    if test -z "$is_absolute_path"; then
32772      # Path to executable is not absolute. Find it.
32773      IFS_save="$IFS"
32774      IFS=:
32775      for p in $PATH; do
32776        if test -f "$p/$path" && test -x "$p/$path"; then
32777          new_path="$p/$path"
32778          break
32779        fi
32780      done
32781      IFS="$IFS_save"
32782    else
32783      # This is an absolute path, we can use it without further modifications.
32784      new_path="$path"
32785    fi
32786
32787    if test "x$new_path" = x; then
32788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32789$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32790      has_space=`$ECHO "$complete" | $GREP " "`
32791      if test "x$has_space" != x; then
32792        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32793$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32794      fi
32795      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32796    fi
32797  fi
32798
32799  # Now join together the path and the arguments once again
32800  if test "x$arguments" != xEOL; then
32801    new_complete="$new_path ${arguments% *}"
32802  else
32803    new_complete="$new_path"
32804  fi
32805
32806  if test "x$complete" != "x$new_complete"; then
32807    AR="$new_complete"
32808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32809$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32810  fi
32811
32812
32813
32814  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32815    ac_ext=m
32816ac_cpp='$OBJCPP $CPPFLAGS'
32817ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32818ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32819ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32820if test -n "$ac_tool_prefix"; then
32821  for ac_prog in gcc objcc objc cc CC
32822  do
32823    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32824set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32826$as_echo_n "checking for $ac_word... " >&6; }
32827if ${ac_cv_prog_OBJC+:} false; then :
32828  $as_echo_n "(cached) " >&6
32829else
32830  if test -n "$OBJC"; then
32831  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32832else
32833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32834for as_dir in $PATH
32835do
32836  IFS=$as_save_IFS
32837  test -z "$as_dir" && as_dir=.
32838    for ac_exec_ext in '' $ac_executable_extensions; do
32839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32840    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32842    break 2
32843  fi
32844done
32845  done
32846IFS=$as_save_IFS
32847
32848fi
32849fi
32850OBJC=$ac_cv_prog_OBJC
32851if test -n "$OBJC"; then
32852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32853$as_echo "$OBJC" >&6; }
32854else
32855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32856$as_echo "no" >&6; }
32857fi
32858
32859
32860    test -n "$OBJC" && break
32861  done
32862fi
32863if test -z "$OBJC"; then
32864  ac_ct_OBJC=$OBJC
32865  for ac_prog in gcc objcc objc cc CC
32866do
32867  # Extract the first word of "$ac_prog", so it can be a program name with args.
32868set dummy $ac_prog; ac_word=$2
32869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32870$as_echo_n "checking for $ac_word... " >&6; }
32871if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32872  $as_echo_n "(cached) " >&6
32873else
32874  if test -n "$ac_ct_OBJC"; then
32875  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32876else
32877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32878for as_dir in $PATH
32879do
32880  IFS=$as_save_IFS
32881  test -z "$as_dir" && as_dir=.
32882    for ac_exec_ext in '' $ac_executable_extensions; do
32883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32884    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32886    break 2
32887  fi
32888done
32889  done
32890IFS=$as_save_IFS
32891
32892fi
32893fi
32894ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32895if test -n "$ac_ct_OBJC"; then
32896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32897$as_echo "$ac_ct_OBJC" >&6; }
32898else
32899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32900$as_echo "no" >&6; }
32901fi
32902
32903
32904  test -n "$ac_ct_OBJC" && break
32905done
32906
32907  if test "x$ac_ct_OBJC" = x; then
32908    OBJC="gcc"
32909  else
32910    case $cross_compiling:$ac_tool_warned in
32911yes:)
32912{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32913$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32914ac_tool_warned=yes ;;
32915esac
32916    OBJC=$ac_ct_OBJC
32917  fi
32918fi
32919
32920# Provide some information about the compiler.
32921$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32922set X $ac_compile
32923ac_compiler=$2
32924for ac_option in --version -v -V -qversion; do
32925  { { ac_try="$ac_compiler $ac_option >&5"
32926case "(($ac_try" in
32927  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32928  *) ac_try_echo=$ac_try;;
32929esac
32930eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32931$as_echo "$ac_try_echo"; } >&5
32932  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32933  ac_status=$?
32934  if test -s conftest.err; then
32935    sed '10a\
32936... rest of stderr output deleted ...
32937         10q' conftest.err >conftest.er1
32938    cat conftest.er1 >&5
32939  fi
32940  rm -f conftest.er1 conftest.err
32941  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32942  test $ac_status = 0; }
32943done
32944
32945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32946$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32947if ${ac_cv_objc_compiler_gnu+:} false; then :
32948  $as_echo_n "(cached) " >&6
32949else
32950  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32951/* end confdefs.h.  */
32952
32953int
32954main ()
32955{
32956#ifndef __GNUC__
32957       choke me
32958#endif
32959
32960  ;
32961  return 0;
32962}
32963_ACEOF
32964if ac_fn_objc_try_compile "$LINENO"; then :
32965  ac_compiler_gnu=yes
32966else
32967  ac_compiler_gnu=no
32968fi
32969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32970ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32971
32972fi
32973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32974$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32975if test $ac_compiler_gnu = yes; then
32976  GOBJC=yes
32977else
32978  GOBJC=
32979fi
32980ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32981ac_save_OBJCFLAGS=$OBJCFLAGS
32982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32983$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32984if ${ac_cv_prog_objc_g+:} false; then :
32985  $as_echo_n "(cached) " >&6
32986else
32987  ac_save_objc_werror_flag=$ac_objc_werror_flag
32988   ac_objc_werror_flag=yes
32989   ac_cv_prog_objc_g=no
32990   OBJCFLAGS="-g"
32991   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32992/* end confdefs.h.  */
32993
32994int
32995main ()
32996{
32997
32998  ;
32999  return 0;
33000}
33001_ACEOF
33002if ac_fn_objc_try_compile "$LINENO"; then :
33003  ac_cv_prog_objc_g=yes
33004else
33005  OBJCFLAGS=""
33006      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33007/* end confdefs.h.  */
33008
33009int
33010main ()
33011{
33012
33013  ;
33014  return 0;
33015}
33016_ACEOF
33017if ac_fn_objc_try_compile "$LINENO"; then :
33018
33019else
33020  ac_objc_werror_flag=$ac_save_objc_werror_flag
33021	 OBJCFLAGS="-g"
33022	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33023/* end confdefs.h.  */
33024
33025int
33026main ()
33027{
33028
33029  ;
33030  return 0;
33031}
33032_ACEOF
33033if ac_fn_objc_try_compile "$LINENO"; then :
33034  ac_cv_prog_objc_g=yes
33035fi
33036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33037fi
33038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33039fi
33040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33041   ac_objc_werror_flag=$ac_save_objc_werror_flag
33042fi
33043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33044$as_echo "$ac_cv_prog_objc_g" >&6; }
33045if test "$ac_test_OBJCFLAGS" = set; then
33046  OBJCFLAGS=$ac_save_OBJCFLAGS
33047elif test $ac_cv_prog_objc_g = yes; then
33048  if test "$GOBJC" = yes; then
33049    OBJCFLAGS="-g -O2"
33050  else
33051    OBJCFLAGS="-g"
33052  fi
33053else
33054  if test "$GOBJC" = yes; then
33055    OBJCFLAGS="-O2"
33056  else
33057    OBJCFLAGS=
33058  fi
33059fi
33060ac_ext=cpp
33061ac_cpp='$CXXCPP $CPPFLAGS'
33062ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33063ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33064ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33065
33066
33067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33068
33069  # First separate the path from the arguments. This will split at the first
33070  # space.
33071  complete="$OBJC"
33072  path="${complete%% *}"
33073  tmp="$complete EOL"
33074  arguments="${tmp#* }"
33075
33076  # Input might be given as Windows format, start by converting to
33077  # unix format.
33078  new_path=`$CYGPATH -u "$path"`
33079
33080  # Now try to locate executable using which
33081  new_path=`$WHICH "$new_path" 2> /dev/null`
33082  # bat and cmd files are not always considered executable in cygwin causing which
33083  # to not find them
33084  if test "x$new_path" = x \
33085      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33086      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33087    new_path=`$CYGPATH -u "$path"`
33088  fi
33089  if test "x$new_path" = x; then
33090    # Oops. Which didn't find the executable.
33091    # The splitting of arguments from the executable at a space might have been incorrect,
33092    # since paths with space are more likely in Windows. Give it another try with the whole
33093    # argument.
33094    path="$complete"
33095    arguments="EOL"
33096    new_path=`$CYGPATH -u "$path"`
33097    new_path=`$WHICH "$new_path" 2> /dev/null`
33098    # bat and cmd files are not always considered executable in cygwin causing which
33099    # to not find them
33100    if test "x$new_path" = x \
33101        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33102        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33103      new_path=`$CYGPATH -u "$path"`
33104    fi
33105    if test "x$new_path" = x; then
33106      # It's still not found. Now this is an unrecoverable error.
33107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33108$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33109      has_space=`$ECHO "$complete" | $GREP " "`
33110      if test "x$has_space" != x; then
33111        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33112$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33113      fi
33114      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33115    fi
33116  fi
33117
33118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33121  # "foo.exe" is OK but "foo" is an error.
33122  #
33123  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33124  # It is also a way to make sure we got the proper file name for the real test later on.
33125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33126  if test "x$test_shortpath" = x; then
33127    # Short path failed, file does not exist as specified.
33128    # Try adding .exe or .cmd
33129    if test -f "${new_path}.exe"; then
33130      input_to_shortpath="${new_path}.exe"
33131    elif test -f "${new_path}.cmd"; then
33132      input_to_shortpath="${new_path}.cmd"
33133    else
33134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33135$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33136      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33137$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33138      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33139    fi
33140  else
33141    input_to_shortpath="$new_path"
33142  fi
33143
33144  # Call helper function which possibly converts this using DOS-style short mode.
33145  # If so, the updated path is stored in $new_path.
33146  new_path="$input_to_shortpath"
33147
33148  input_path="$input_to_shortpath"
33149  # Check if we need to convert this using DOS-style short mode. If the path
33150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33151  # take no chances and rewrite it.
33152  # Note: m4 eats our [], so we need to use [ and ] instead.
33153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33154  if test "x$has_forbidden_chars" != x; then
33155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33159      # Going to short mode and back again did indeed matter. Since short mode is
33160      # case insensitive, let's make it lowercase to improve readability.
33161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33162      # Now convert it back to Unix-stile (cygpath)
33163      input_path=`$CYGPATH -u "$shortmode_path"`
33164      new_path="$input_path"
33165    fi
33166  fi
33167
33168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33169  if test "x$test_cygdrive_prefix" = x; then
33170    # As a simple fix, exclude /usr/bin since it's not a real path.
33171    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33173      # a path prefixed by /cygdrive for fixpath to work.
33174      new_path="$CYGWIN_ROOT_PATH$input_path"
33175    fi
33176  fi
33177
33178  # remove trailing .exe if any
33179  new_path="${new_path/%.exe/}"
33180
33181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33182
33183  # First separate the path from the arguments. This will split at the first
33184  # space.
33185  complete="$OBJC"
33186  path="${complete%% *}"
33187  tmp="$complete EOL"
33188  arguments="${tmp#* }"
33189
33190  # Input might be given as Windows format, start by converting to
33191  # unix format.
33192  new_path="$path"
33193
33194  windows_path="$new_path"
33195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33196    unix_path=`$CYGPATH -u "$windows_path"`
33197    new_path="$unix_path"
33198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33200    new_path="$unix_path"
33201  fi
33202
33203
33204  # Now try to locate executable using which
33205  new_path=`$WHICH "$new_path" 2> /dev/null`
33206
33207  if test "x$new_path" = x; then
33208    # Oops. Which didn't find the executable.
33209    # The splitting of arguments from the executable at a space might have been incorrect,
33210    # since paths with space are more likely in Windows. Give it another try with the whole
33211    # argument.
33212    path="$complete"
33213    arguments="EOL"
33214    new_path="$path"
33215
33216  windows_path="$new_path"
33217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33218    unix_path=`$CYGPATH -u "$windows_path"`
33219    new_path="$unix_path"
33220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33222    new_path="$unix_path"
33223  fi
33224
33225
33226    new_path=`$WHICH "$new_path" 2> /dev/null`
33227
33228    if test "x$new_path" = x; then
33229      # It's still not found. Now this is an unrecoverable error.
33230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33231$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33232      has_space=`$ECHO "$complete" | $GREP " "`
33233      if test "x$has_space" != x; then
33234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33236      fi
33237      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33238    fi
33239  fi
33240
33241  # Now new_path has a complete unix path to the binary
33242  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33243    # Keep paths in /bin as-is, but remove trailing .exe if any
33244    new_path="${new_path/%.exe/}"
33245    # Do not save /bin paths to all_fixpath_prefixes!
33246  else
33247    # Not in mixed or Windows style, start by that.
33248    new_path=`cmd //c echo $new_path`
33249
33250  input_path="$new_path"
33251  # Check if we need to convert this using DOS-style short mode. If the path
33252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33253  # take no chances and rewrite it.
33254  # Note: m4 eats our [], so we need to use [ and ] instead.
33255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33256  if test "x$has_forbidden_chars" != x; then
33257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33259  fi
33260
33261    # Output is in $new_path
33262
33263  windows_path="$new_path"
33264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33265    unix_path=`$CYGPATH -u "$windows_path"`
33266    new_path="$unix_path"
33267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33269    new_path="$unix_path"
33270  fi
33271
33272    # remove trailing .exe if any
33273    new_path="${new_path/%.exe/}"
33274
33275    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33276    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33277  fi
33278
33279  else
33280    # We're on a posix platform. Hooray! :)
33281    # First separate the path from the arguments. This will split at the first
33282    # space.
33283    complete="$OBJC"
33284    path="${complete%% *}"
33285    tmp="$complete EOL"
33286    arguments="${tmp#* }"
33287
33288    # Cannot rely on the command "which" here since it doesn't always work.
33289    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33290    if test -z "$is_absolute_path"; then
33291      # Path to executable is not absolute. Find it.
33292      IFS_save="$IFS"
33293      IFS=:
33294      for p in $PATH; do
33295        if test -f "$p/$path" && test -x "$p/$path"; then
33296          new_path="$p/$path"
33297          break
33298        fi
33299      done
33300      IFS="$IFS_save"
33301    else
33302      # This is an absolute path, we can use it without further modifications.
33303      new_path="$path"
33304    fi
33305
33306    if test "x$new_path" = x; then
33307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33308$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33309      has_space=`$ECHO "$complete" | $GREP " "`
33310      if test "x$has_space" != x; then
33311        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33312$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33313      fi
33314      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33315    fi
33316  fi
33317
33318  # Now join together the path and the arguments once again
33319  if test "x$arguments" != xEOL; then
33320    new_complete="$new_path ${arguments% *}"
33321  else
33322    new_complete="$new_path"
33323  fi
33324
33325  if test "x$complete" != "x$new_complete"; then
33326    OBJC="$new_complete"
33327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33328$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33329  fi
33330
33331
33332
33333  # Publish this variable in the help.
33334
33335
33336  if test "x$LIPO" = x; then
33337    # The variable is not set by user, try to locate tool using the code snippet
33338    for ac_prog in lipo
33339do
33340  # Extract the first word of "$ac_prog", so it can be a program name with args.
33341set dummy $ac_prog; ac_word=$2
33342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33343$as_echo_n "checking for $ac_word... " >&6; }
33344if ${ac_cv_path_LIPO+:} false; then :
33345  $as_echo_n "(cached) " >&6
33346else
33347  case $LIPO in
33348  [\\/]* | ?:[\\/]*)
33349  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33350  ;;
33351  *)
33352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33353for as_dir in $PATH
33354do
33355  IFS=$as_save_IFS
33356  test -z "$as_dir" && as_dir=.
33357    for ac_exec_ext in '' $ac_executable_extensions; do
33358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33359    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33361    break 2
33362  fi
33363done
33364  done
33365IFS=$as_save_IFS
33366
33367  ;;
33368esac
33369fi
33370LIPO=$ac_cv_path_LIPO
33371if test -n "$LIPO"; then
33372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33373$as_echo "$LIPO" >&6; }
33374else
33375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33376$as_echo "no" >&6; }
33377fi
33378
33379
33380  test -n "$LIPO" && break
33381done
33382
33383  else
33384    # The variable is set, but is it from the command line or the environment?
33385
33386    # Try to remove the string !LIPO! from our list.
33387    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33388    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33389      # If it failed, the variable was not from the command line. Ignore it,
33390      # but warn the user (except for BASH, which is always set by the calling BASH).
33391      if test "xLIPO" != xBASH; then
33392        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33393$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33394      fi
33395      # Try to locate tool using the code snippet
33396      for ac_prog in lipo
33397do
33398  # Extract the first word of "$ac_prog", so it can be a program name with args.
33399set dummy $ac_prog; ac_word=$2
33400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33401$as_echo_n "checking for $ac_word... " >&6; }
33402if ${ac_cv_path_LIPO+:} false; then :
33403  $as_echo_n "(cached) " >&6
33404else
33405  case $LIPO in
33406  [\\/]* | ?:[\\/]*)
33407  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33408  ;;
33409  *)
33410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33411for as_dir in $PATH
33412do
33413  IFS=$as_save_IFS
33414  test -z "$as_dir" && as_dir=.
33415    for ac_exec_ext in '' $ac_executable_extensions; do
33416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33417    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33419    break 2
33420  fi
33421done
33422  done
33423IFS=$as_save_IFS
33424
33425  ;;
33426esac
33427fi
33428LIPO=$ac_cv_path_LIPO
33429if test -n "$LIPO"; then
33430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33431$as_echo "$LIPO" >&6; }
33432else
33433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33434$as_echo "no" >&6; }
33435fi
33436
33437
33438  test -n "$LIPO" && break
33439done
33440
33441    else
33442      # If it succeeded, then it was overridden by the user. We will use it
33443      # for the tool.
33444
33445      # First remove it from the list of overridden variables, so we can test
33446      # for unknown variables in the end.
33447      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33448
33449      # Check if the provided tool contains a complete path.
33450      tool_specified="$LIPO"
33451      tool_basename="${tool_specified##*/}"
33452      if test "x$tool_basename" = "x$tool_specified"; then
33453        # A command without a complete path is provided, search $PATH.
33454        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33455$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33456        # Extract the first word of "$tool_basename", so it can be a program name with args.
33457set dummy $tool_basename; ac_word=$2
33458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33459$as_echo_n "checking for $ac_word... " >&6; }
33460if ${ac_cv_path_LIPO+:} false; then :
33461  $as_echo_n "(cached) " >&6
33462else
33463  case $LIPO in
33464  [\\/]* | ?:[\\/]*)
33465  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33466  ;;
33467  *)
33468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33469for as_dir in $PATH
33470do
33471  IFS=$as_save_IFS
33472  test -z "$as_dir" && as_dir=.
33473    for ac_exec_ext in '' $ac_executable_extensions; do
33474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33475    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33477    break 2
33478  fi
33479done
33480  done
33481IFS=$as_save_IFS
33482
33483  ;;
33484esac
33485fi
33486LIPO=$ac_cv_path_LIPO
33487if test -n "$LIPO"; then
33488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33489$as_echo "$LIPO" >&6; }
33490else
33491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33492$as_echo "no" >&6; }
33493fi
33494
33495
33496        if test "x$LIPO" = x; then
33497          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33498        fi
33499      else
33500        # Otherwise we believe it is a complete path. Use it as it is.
33501        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33502$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33503        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33504$as_echo_n "checking for LIPO... " >&6; }
33505        if test ! -x "$tool_specified"; then
33506          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33507$as_echo "not found" >&6; }
33508          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33509        fi
33510        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33511$as_echo "$tool_specified" >&6; }
33512      fi
33513    fi
33514  fi
33515
33516
33517
33518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33519
33520  # First separate the path from the arguments. This will split at the first
33521  # space.
33522  complete="$LIPO"
33523  path="${complete%% *}"
33524  tmp="$complete EOL"
33525  arguments="${tmp#* }"
33526
33527  # Input might be given as Windows format, start by converting to
33528  # unix format.
33529  new_path=`$CYGPATH -u "$path"`
33530
33531  # Now try to locate executable using which
33532  new_path=`$WHICH "$new_path" 2> /dev/null`
33533  # bat and cmd files are not always considered executable in cygwin causing which
33534  # to not find them
33535  if test "x$new_path" = x \
33536      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33537      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33538    new_path=`$CYGPATH -u "$path"`
33539  fi
33540  if test "x$new_path" = x; then
33541    # Oops. Which didn't find the executable.
33542    # The splitting of arguments from the executable at a space might have been incorrect,
33543    # since paths with space are more likely in Windows. Give it another try with the whole
33544    # argument.
33545    path="$complete"
33546    arguments="EOL"
33547    new_path=`$CYGPATH -u "$path"`
33548    new_path=`$WHICH "$new_path" 2> /dev/null`
33549    # bat and cmd files are not always considered executable in cygwin causing which
33550    # to not find them
33551    if test "x$new_path" = x \
33552        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33553        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33554      new_path=`$CYGPATH -u "$path"`
33555    fi
33556    if test "x$new_path" = x; then
33557      # It's still not found. Now this is an unrecoverable error.
33558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33559$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33560      has_space=`$ECHO "$complete" | $GREP " "`
33561      if test "x$has_space" != x; then
33562        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33563$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33564      fi
33565      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33566    fi
33567  fi
33568
33569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33572  # "foo.exe" is OK but "foo" is an error.
33573  #
33574  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33575  # It is also a way to make sure we got the proper file name for the real test later on.
33576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33577  if test "x$test_shortpath" = x; then
33578    # Short path failed, file does not exist as specified.
33579    # Try adding .exe or .cmd
33580    if test -f "${new_path}.exe"; then
33581      input_to_shortpath="${new_path}.exe"
33582    elif test -f "${new_path}.cmd"; then
33583      input_to_shortpath="${new_path}.cmd"
33584    else
33585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33586$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33587      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33588$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33589      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33590    fi
33591  else
33592    input_to_shortpath="$new_path"
33593  fi
33594
33595  # Call helper function which possibly converts this using DOS-style short mode.
33596  # If so, the updated path is stored in $new_path.
33597  new_path="$input_to_shortpath"
33598
33599  input_path="$input_to_shortpath"
33600  # Check if we need to convert this using DOS-style short mode. If the path
33601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33602  # take no chances and rewrite it.
33603  # Note: m4 eats our [], so we need to use [ and ] instead.
33604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33605  if test "x$has_forbidden_chars" != x; then
33606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33610      # Going to short mode and back again did indeed matter. Since short mode is
33611      # case insensitive, let's make it lowercase to improve readability.
33612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33613      # Now convert it back to Unix-stile (cygpath)
33614      input_path=`$CYGPATH -u "$shortmode_path"`
33615      new_path="$input_path"
33616    fi
33617  fi
33618
33619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33620  if test "x$test_cygdrive_prefix" = x; then
33621    # As a simple fix, exclude /usr/bin since it's not a real path.
33622    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33624      # a path prefixed by /cygdrive for fixpath to work.
33625      new_path="$CYGWIN_ROOT_PATH$input_path"
33626    fi
33627  fi
33628
33629  # remove trailing .exe if any
33630  new_path="${new_path/%.exe/}"
33631
33632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33633
33634  # First separate the path from the arguments. This will split at the first
33635  # space.
33636  complete="$LIPO"
33637  path="${complete%% *}"
33638  tmp="$complete EOL"
33639  arguments="${tmp#* }"
33640
33641  # Input might be given as Windows format, start by converting to
33642  # unix format.
33643  new_path="$path"
33644
33645  windows_path="$new_path"
33646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33647    unix_path=`$CYGPATH -u "$windows_path"`
33648    new_path="$unix_path"
33649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33651    new_path="$unix_path"
33652  fi
33653
33654
33655  # Now try to locate executable using which
33656  new_path=`$WHICH "$new_path" 2> /dev/null`
33657
33658  if test "x$new_path" = x; then
33659    # Oops. Which didn't find the executable.
33660    # The splitting of arguments from the executable at a space might have been incorrect,
33661    # since paths with space are more likely in Windows. Give it another try with the whole
33662    # argument.
33663    path="$complete"
33664    arguments="EOL"
33665    new_path="$path"
33666
33667  windows_path="$new_path"
33668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33669    unix_path=`$CYGPATH -u "$windows_path"`
33670    new_path="$unix_path"
33671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33673    new_path="$unix_path"
33674  fi
33675
33676
33677    new_path=`$WHICH "$new_path" 2> /dev/null`
33678
33679    if test "x$new_path" = x; then
33680      # It's still not found. Now this is an unrecoverable error.
33681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33682$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33683      has_space=`$ECHO "$complete" | $GREP " "`
33684      if test "x$has_space" != x; then
33685        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33686$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33687      fi
33688      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33689    fi
33690  fi
33691
33692  # Now new_path has a complete unix path to the binary
33693  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33694    # Keep paths in /bin as-is, but remove trailing .exe if any
33695    new_path="${new_path/%.exe/}"
33696    # Do not save /bin paths to all_fixpath_prefixes!
33697  else
33698    # Not in mixed or Windows style, start by that.
33699    new_path=`cmd //c echo $new_path`
33700
33701  input_path="$new_path"
33702  # Check if we need to convert this using DOS-style short mode. If the path
33703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33704  # take no chances and rewrite it.
33705  # Note: m4 eats our [], so we need to use [ and ] instead.
33706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33707  if test "x$has_forbidden_chars" != x; then
33708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33710  fi
33711
33712    # Output is in $new_path
33713
33714  windows_path="$new_path"
33715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33716    unix_path=`$CYGPATH -u "$windows_path"`
33717    new_path="$unix_path"
33718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33720    new_path="$unix_path"
33721  fi
33722
33723    # remove trailing .exe if any
33724    new_path="${new_path/%.exe/}"
33725
33726    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33727    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33728  fi
33729
33730  else
33731    # We're on a posix platform. Hooray! :)
33732    # First separate the path from the arguments. This will split at the first
33733    # space.
33734    complete="$LIPO"
33735    path="${complete%% *}"
33736    tmp="$complete EOL"
33737    arguments="${tmp#* }"
33738
33739    # Cannot rely on the command "which" here since it doesn't always work.
33740    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33741    if test -z "$is_absolute_path"; then
33742      # Path to executable is not absolute. Find it.
33743      IFS_save="$IFS"
33744      IFS=:
33745      for p in $PATH; do
33746        if test -f "$p/$path" && test -x "$p/$path"; then
33747          new_path="$p/$path"
33748          break
33749        fi
33750      done
33751      IFS="$IFS_save"
33752    else
33753      # This is an absolute path, we can use it without further modifications.
33754      new_path="$path"
33755    fi
33756
33757    if test "x$new_path" = x; then
33758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33759$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33760      has_space=`$ECHO "$complete" | $GREP " "`
33761      if test "x$has_space" != x; then
33762        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33763$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33764      fi
33765      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33766    fi
33767  fi
33768
33769  # Now join together the path and the arguments once again
33770  if test "x$arguments" != xEOL; then
33771    new_complete="$new_path ${arguments% *}"
33772  else
33773    new_complete="$new_path"
33774  fi
33775
33776  if test "x$complete" != "x$new_complete"; then
33777    LIPO="$new_complete"
33778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33779$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33780  fi
33781
33782  else
33783    OBJC=
33784  fi
33785
33786  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33787    # Extract the first word of "mt", so it can be a program name with args.
33788set dummy mt; ac_word=$2
33789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33790$as_echo_n "checking for $ac_word... " >&6; }
33791if ${ac_cv_prog_MT+:} false; then :
33792  $as_echo_n "(cached) " >&6
33793else
33794  if test -n "$MT"; then
33795  ac_cv_prog_MT="$MT" # Let the user override the test.
33796else
33797  ac_prog_rejected=no
33798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33799for as_dir in $PATH
33800do
33801  IFS=$as_save_IFS
33802  test -z "$as_dir" && as_dir=.
33803    for ac_exec_ext in '' $ac_executable_extensions; do
33804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33805    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33806       ac_prog_rejected=yes
33807       continue
33808     fi
33809    ac_cv_prog_MT="mt"
33810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33811    break 2
33812  fi
33813done
33814  done
33815IFS=$as_save_IFS
33816
33817if test $ac_prog_rejected = yes; then
33818  # We found a bogon in the path, so make sure we never use it.
33819  set dummy $ac_cv_prog_MT
33820  shift
33821  if test $# != 0; then
33822    # We chose a different compiler from the bogus one.
33823    # However, it has the same basename, so the bogon will be chosen
33824    # first if we set MT to just the basename; use the full file name.
33825    shift
33826    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33827  fi
33828fi
33829fi
33830fi
33831MT=$ac_cv_prog_MT
33832if test -n "$MT"; then
33833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33834$as_echo "$MT" >&6; }
33835else
33836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33837$as_echo "no" >&6; }
33838fi
33839
33840
33841
33842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33843
33844  # First separate the path from the arguments. This will split at the first
33845  # space.
33846  complete="$MT"
33847  path="${complete%% *}"
33848  tmp="$complete EOL"
33849  arguments="${tmp#* }"
33850
33851  # Input might be given as Windows format, start by converting to
33852  # unix format.
33853  new_path=`$CYGPATH -u "$path"`
33854
33855  # Now try to locate executable using which
33856  new_path=`$WHICH "$new_path" 2> /dev/null`
33857  # bat and cmd files are not always considered executable in cygwin causing which
33858  # to not find them
33859  if test "x$new_path" = x \
33860      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33861      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33862    new_path=`$CYGPATH -u "$path"`
33863  fi
33864  if test "x$new_path" = x; then
33865    # Oops. Which didn't find the executable.
33866    # The splitting of arguments from the executable at a space might have been incorrect,
33867    # since paths with space are more likely in Windows. Give it another try with the whole
33868    # argument.
33869    path="$complete"
33870    arguments="EOL"
33871    new_path=`$CYGPATH -u "$path"`
33872    new_path=`$WHICH "$new_path" 2> /dev/null`
33873    # bat and cmd files are not always considered executable in cygwin causing which
33874    # to not find them
33875    if test "x$new_path" = x \
33876        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33877        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33878      new_path=`$CYGPATH -u "$path"`
33879    fi
33880    if test "x$new_path" = x; then
33881      # It's still not found. Now this is an unrecoverable error.
33882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33883$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33884      has_space=`$ECHO "$complete" | $GREP " "`
33885      if test "x$has_space" != x; then
33886        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33887$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33888      fi
33889      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33890    fi
33891  fi
33892
33893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33896  # "foo.exe" is OK but "foo" is an error.
33897  #
33898  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33899  # It is also a way to make sure we got the proper file name for the real test later on.
33900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33901  if test "x$test_shortpath" = x; then
33902    # Short path failed, file does not exist as specified.
33903    # Try adding .exe or .cmd
33904    if test -f "${new_path}.exe"; then
33905      input_to_shortpath="${new_path}.exe"
33906    elif test -f "${new_path}.cmd"; then
33907      input_to_shortpath="${new_path}.cmd"
33908    else
33909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33910$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33911      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33912$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33913      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33914    fi
33915  else
33916    input_to_shortpath="$new_path"
33917  fi
33918
33919  # Call helper function which possibly converts this using DOS-style short mode.
33920  # If so, the updated path is stored in $new_path.
33921  new_path="$input_to_shortpath"
33922
33923  input_path="$input_to_shortpath"
33924  # Check if we need to convert this using DOS-style short mode. If the path
33925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33926  # take no chances and rewrite it.
33927  # Note: m4 eats our [], so we need to use [ and ] instead.
33928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33929  if test "x$has_forbidden_chars" != x; then
33930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33931    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33932    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33933    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33934      # Going to short mode and back again did indeed matter. Since short mode is
33935      # case insensitive, let's make it lowercase to improve readability.
33936      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33937      # Now convert it back to Unix-stile (cygpath)
33938      input_path=`$CYGPATH -u "$shortmode_path"`
33939      new_path="$input_path"
33940    fi
33941  fi
33942
33943  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33944  if test "x$test_cygdrive_prefix" = x; then
33945    # As a simple fix, exclude /usr/bin since it's not a real path.
33946    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33947      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33948      # a path prefixed by /cygdrive for fixpath to work.
33949      new_path="$CYGWIN_ROOT_PATH$input_path"
33950    fi
33951  fi
33952
33953  # remove trailing .exe if any
33954  new_path="${new_path/%.exe/}"
33955
33956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33957
33958  # First separate the path from the arguments. This will split at the first
33959  # space.
33960  complete="$MT"
33961  path="${complete%% *}"
33962  tmp="$complete EOL"
33963  arguments="${tmp#* }"
33964
33965  # Input might be given as Windows format, start by converting to
33966  # unix format.
33967  new_path="$path"
33968
33969  windows_path="$new_path"
33970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33971    unix_path=`$CYGPATH -u "$windows_path"`
33972    new_path="$unix_path"
33973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33975    new_path="$unix_path"
33976  fi
33977
33978
33979  # Now try to locate executable using which
33980  new_path=`$WHICH "$new_path" 2> /dev/null`
33981
33982  if test "x$new_path" = x; then
33983    # Oops. Which didn't find the executable.
33984    # The splitting of arguments from the executable at a space might have been incorrect,
33985    # since paths with space are more likely in Windows. Give it another try with the whole
33986    # argument.
33987    path="$complete"
33988    arguments="EOL"
33989    new_path="$path"
33990
33991  windows_path="$new_path"
33992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33993    unix_path=`$CYGPATH -u "$windows_path"`
33994    new_path="$unix_path"
33995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33997    new_path="$unix_path"
33998  fi
33999
34000
34001    new_path=`$WHICH "$new_path" 2> /dev/null`
34002
34003    if test "x$new_path" = x; then
34004      # It's still not found. Now this is an unrecoverable error.
34005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34006$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34007      has_space=`$ECHO "$complete" | $GREP " "`
34008      if test "x$has_space" != x; then
34009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34011      fi
34012      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34013    fi
34014  fi
34015
34016  # Now new_path has a complete unix path to the binary
34017  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34018    # Keep paths in /bin as-is, but remove trailing .exe if any
34019    new_path="${new_path/%.exe/}"
34020    # Do not save /bin paths to all_fixpath_prefixes!
34021  else
34022    # Not in mixed or Windows style, start by that.
34023    new_path=`cmd //c echo $new_path`
34024
34025  input_path="$new_path"
34026  # Check if we need to convert this using DOS-style short mode. If the path
34027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34028  # take no chances and rewrite it.
34029  # Note: m4 eats our [], so we need to use [ and ] instead.
34030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34031  if test "x$has_forbidden_chars" != x; then
34032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34034  fi
34035
34036    # Output is in $new_path
34037
34038  windows_path="$new_path"
34039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34040    unix_path=`$CYGPATH -u "$windows_path"`
34041    new_path="$unix_path"
34042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34044    new_path="$unix_path"
34045  fi
34046
34047    # remove trailing .exe if any
34048    new_path="${new_path/%.exe/}"
34049
34050    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34051    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34052  fi
34053
34054  else
34055    # We're on a posix platform. Hooray! :)
34056    # First separate the path from the arguments. This will split at the first
34057    # space.
34058    complete="$MT"
34059    path="${complete%% *}"
34060    tmp="$complete EOL"
34061    arguments="${tmp#* }"
34062
34063    # Cannot rely on the command "which" here since it doesn't always work.
34064    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34065    if test -z "$is_absolute_path"; then
34066      # Path to executable is not absolute. Find it.
34067      IFS_save="$IFS"
34068      IFS=:
34069      for p in $PATH; do
34070        if test -f "$p/$path" && test -x "$p/$path"; then
34071          new_path="$p/$path"
34072          break
34073        fi
34074      done
34075      IFS="$IFS_save"
34076    else
34077      # This is an absolute path, we can use it without further modifications.
34078      new_path="$path"
34079    fi
34080
34081    if test "x$new_path" = x; then
34082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34083$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34084      has_space=`$ECHO "$complete" | $GREP " "`
34085      if test "x$has_space" != x; then
34086        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34087$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34088      fi
34089      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34090    fi
34091  fi
34092
34093  # Now join together the path and the arguments once again
34094  if test "x$arguments" != xEOL; then
34095    new_complete="$new_path ${arguments% *}"
34096  else
34097    new_complete="$new_path"
34098  fi
34099
34100  if test "x$complete" != "x$new_complete"; then
34101    MT="$new_complete"
34102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34103$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34104  fi
34105
34106    # Setup the resource compiler (RC)
34107    # Extract the first word of "rc", so it can be a program name with args.
34108set dummy rc; ac_word=$2
34109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34110$as_echo_n "checking for $ac_word... " >&6; }
34111if ${ac_cv_prog_RC+:} false; then :
34112  $as_echo_n "(cached) " >&6
34113else
34114  if test -n "$RC"; then
34115  ac_cv_prog_RC="$RC" # Let the user override the test.
34116else
34117  ac_prog_rejected=no
34118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34119for as_dir in $PATH
34120do
34121  IFS=$as_save_IFS
34122  test -z "$as_dir" && as_dir=.
34123    for ac_exec_ext in '' $ac_executable_extensions; do
34124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34125    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34126       ac_prog_rejected=yes
34127       continue
34128     fi
34129    ac_cv_prog_RC="rc"
34130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34131    break 2
34132  fi
34133done
34134  done
34135IFS=$as_save_IFS
34136
34137if test $ac_prog_rejected = yes; then
34138  # We found a bogon in the path, so make sure we never use it.
34139  set dummy $ac_cv_prog_RC
34140  shift
34141  if test $# != 0; then
34142    # We chose a different compiler from the bogus one.
34143    # However, it has the same basename, so the bogon will be chosen
34144    # first if we set RC to just the basename; use the full file name.
34145    shift
34146    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34147  fi
34148fi
34149fi
34150fi
34151RC=$ac_cv_prog_RC
34152if test -n "$RC"; then
34153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34154$as_echo "$RC" >&6; }
34155else
34156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34157$as_echo "no" >&6; }
34158fi
34159
34160
34161
34162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34163
34164  # First separate the path from the arguments. This will split at the first
34165  # space.
34166  complete="$RC"
34167  path="${complete%% *}"
34168  tmp="$complete EOL"
34169  arguments="${tmp#* }"
34170
34171  # Input might be given as Windows format, start by converting to
34172  # unix format.
34173  new_path=`$CYGPATH -u "$path"`
34174
34175  # Now try to locate executable using which
34176  new_path=`$WHICH "$new_path" 2> /dev/null`
34177  # bat and cmd files are not always considered executable in cygwin causing which
34178  # to not find them
34179  if test "x$new_path" = x \
34180      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34181      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34182    new_path=`$CYGPATH -u "$path"`
34183  fi
34184  if test "x$new_path" = x; then
34185    # Oops. Which didn't find the executable.
34186    # The splitting of arguments from the executable at a space might have been incorrect,
34187    # since paths with space are more likely in Windows. Give it another try with the whole
34188    # argument.
34189    path="$complete"
34190    arguments="EOL"
34191    new_path=`$CYGPATH -u "$path"`
34192    new_path=`$WHICH "$new_path" 2> /dev/null`
34193    # bat and cmd files are not always considered executable in cygwin causing which
34194    # to not find them
34195    if test "x$new_path" = x \
34196        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34197        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34198      new_path=`$CYGPATH -u "$path"`
34199    fi
34200    if test "x$new_path" = x; then
34201      # It's still not found. Now this is an unrecoverable error.
34202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34203$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34204      has_space=`$ECHO "$complete" | $GREP " "`
34205      if test "x$has_space" != x; then
34206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34208      fi
34209      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34210    fi
34211  fi
34212
34213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34216  # "foo.exe" is OK but "foo" is an error.
34217  #
34218  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34219  # It is also a way to make sure we got the proper file name for the real test later on.
34220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34221  if test "x$test_shortpath" = x; then
34222    # Short path failed, file does not exist as specified.
34223    # Try adding .exe or .cmd
34224    if test -f "${new_path}.exe"; then
34225      input_to_shortpath="${new_path}.exe"
34226    elif test -f "${new_path}.cmd"; then
34227      input_to_shortpath="${new_path}.cmd"
34228    else
34229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34230$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34231      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34232$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34233      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34234    fi
34235  else
34236    input_to_shortpath="$new_path"
34237  fi
34238
34239  # Call helper function which possibly converts this using DOS-style short mode.
34240  # If so, the updated path is stored in $new_path.
34241  new_path="$input_to_shortpath"
34242
34243  input_path="$input_to_shortpath"
34244  # Check if we need to convert this using DOS-style short mode. If the path
34245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34246  # take no chances and rewrite it.
34247  # Note: m4 eats our [], so we need to use [ and ] instead.
34248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34249  if test "x$has_forbidden_chars" != x; then
34250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34254      # Going to short mode and back again did indeed matter. Since short mode is
34255      # case insensitive, let's make it lowercase to improve readability.
34256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34257      # Now convert it back to Unix-stile (cygpath)
34258      input_path=`$CYGPATH -u "$shortmode_path"`
34259      new_path="$input_path"
34260    fi
34261  fi
34262
34263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34264  if test "x$test_cygdrive_prefix" = x; then
34265    # As a simple fix, exclude /usr/bin since it's not a real path.
34266    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34268      # a path prefixed by /cygdrive for fixpath to work.
34269      new_path="$CYGWIN_ROOT_PATH$input_path"
34270    fi
34271  fi
34272
34273  # remove trailing .exe if any
34274  new_path="${new_path/%.exe/}"
34275
34276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34277
34278  # First separate the path from the arguments. This will split at the first
34279  # space.
34280  complete="$RC"
34281  path="${complete%% *}"
34282  tmp="$complete EOL"
34283  arguments="${tmp#* }"
34284
34285  # Input might be given as Windows format, start by converting to
34286  # unix format.
34287  new_path="$path"
34288
34289  windows_path="$new_path"
34290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34291    unix_path=`$CYGPATH -u "$windows_path"`
34292    new_path="$unix_path"
34293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34295    new_path="$unix_path"
34296  fi
34297
34298
34299  # Now try to locate executable using which
34300  new_path=`$WHICH "$new_path" 2> /dev/null`
34301
34302  if test "x$new_path" = x; then
34303    # Oops. Which didn't find the executable.
34304    # The splitting of arguments from the executable at a space might have been incorrect,
34305    # since paths with space are more likely in Windows. Give it another try with the whole
34306    # argument.
34307    path="$complete"
34308    arguments="EOL"
34309    new_path="$path"
34310
34311  windows_path="$new_path"
34312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34313    unix_path=`$CYGPATH -u "$windows_path"`
34314    new_path="$unix_path"
34315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34317    new_path="$unix_path"
34318  fi
34319
34320
34321    new_path=`$WHICH "$new_path" 2> /dev/null`
34322
34323    if test "x$new_path" = x; then
34324      # It's still not found. Now this is an unrecoverable error.
34325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34326$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34327      has_space=`$ECHO "$complete" | $GREP " "`
34328      if test "x$has_space" != x; then
34329        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34330$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34331      fi
34332      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34333    fi
34334  fi
34335
34336  # Now new_path has a complete unix path to the binary
34337  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34338    # Keep paths in /bin as-is, but remove trailing .exe if any
34339    new_path="${new_path/%.exe/}"
34340    # Do not save /bin paths to all_fixpath_prefixes!
34341  else
34342    # Not in mixed or Windows style, start by that.
34343    new_path=`cmd //c echo $new_path`
34344
34345  input_path="$new_path"
34346  # Check if we need to convert this using DOS-style short mode. If the path
34347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34348  # take no chances and rewrite it.
34349  # Note: m4 eats our [], so we need to use [ and ] instead.
34350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34351  if test "x$has_forbidden_chars" != x; then
34352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34354  fi
34355
34356    # Output is in $new_path
34357
34358  windows_path="$new_path"
34359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34360    unix_path=`$CYGPATH -u "$windows_path"`
34361    new_path="$unix_path"
34362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34364    new_path="$unix_path"
34365  fi
34366
34367    # remove trailing .exe if any
34368    new_path="${new_path/%.exe/}"
34369
34370    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34371    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34372  fi
34373
34374  else
34375    # We're on a posix platform. Hooray! :)
34376    # First separate the path from the arguments. This will split at the first
34377    # space.
34378    complete="$RC"
34379    path="${complete%% *}"
34380    tmp="$complete EOL"
34381    arguments="${tmp#* }"
34382
34383    # Cannot rely on the command "which" here since it doesn't always work.
34384    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34385    if test -z "$is_absolute_path"; then
34386      # Path to executable is not absolute. Find it.
34387      IFS_save="$IFS"
34388      IFS=:
34389      for p in $PATH; do
34390        if test -f "$p/$path" && test -x "$p/$path"; then
34391          new_path="$p/$path"
34392          break
34393        fi
34394      done
34395      IFS="$IFS_save"
34396    else
34397      # This is an absolute path, we can use it without further modifications.
34398      new_path="$path"
34399    fi
34400
34401    if test "x$new_path" = x; then
34402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34403$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34404      has_space=`$ECHO "$complete" | $GREP " "`
34405      if test "x$has_space" != x; then
34406        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34407$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34408      fi
34409      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34410    fi
34411  fi
34412
34413  # Now join together the path and the arguments once again
34414  if test "x$arguments" != xEOL; then
34415    new_complete="$new_path ${arguments% *}"
34416  else
34417    new_complete="$new_path"
34418  fi
34419
34420  if test "x$complete" != "x$new_complete"; then
34421    RC="$new_complete"
34422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34423$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34424  fi
34425
34426    # Extract the first word of "dumpbin", so it can be a program name with args.
34427set dummy dumpbin; ac_word=$2
34428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34429$as_echo_n "checking for $ac_word... " >&6; }
34430if ${ac_cv_prog_DUMPBIN+:} false; then :
34431  $as_echo_n "(cached) " >&6
34432else
34433  if test -n "$DUMPBIN"; then
34434  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34435else
34436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34437for as_dir in $PATH
34438do
34439  IFS=$as_save_IFS
34440  test -z "$as_dir" && as_dir=.
34441    for ac_exec_ext in '' $ac_executable_extensions; do
34442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34443    ac_cv_prog_DUMPBIN="dumpbin"
34444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34445    break 2
34446  fi
34447done
34448  done
34449IFS=$as_save_IFS
34450
34451fi
34452fi
34453DUMPBIN=$ac_cv_prog_DUMPBIN
34454if test -n "$DUMPBIN"; then
34455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34456$as_echo "$DUMPBIN" >&6; }
34457else
34458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34459$as_echo "no" >&6; }
34460fi
34461
34462
34463
34464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34465
34466  # First separate the path from the arguments. This will split at the first
34467  # space.
34468  complete="$DUMPBIN"
34469  path="${complete%% *}"
34470  tmp="$complete EOL"
34471  arguments="${tmp#* }"
34472
34473  # Input might be given as Windows format, start by converting to
34474  # unix format.
34475  new_path=`$CYGPATH -u "$path"`
34476
34477  # Now try to locate executable using which
34478  new_path=`$WHICH "$new_path" 2> /dev/null`
34479  # bat and cmd files are not always considered executable in cygwin causing which
34480  # to not find them
34481  if test "x$new_path" = x \
34482      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34483      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34484    new_path=`$CYGPATH -u "$path"`
34485  fi
34486  if test "x$new_path" = x; then
34487    # Oops. Which didn't find the executable.
34488    # The splitting of arguments from the executable at a space might have been incorrect,
34489    # since paths with space are more likely in Windows. Give it another try with the whole
34490    # argument.
34491    path="$complete"
34492    arguments="EOL"
34493    new_path=`$CYGPATH -u "$path"`
34494    new_path=`$WHICH "$new_path" 2> /dev/null`
34495    # bat and cmd files are not always considered executable in cygwin causing which
34496    # to not find them
34497    if test "x$new_path" = x \
34498        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34499        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34500      new_path=`$CYGPATH -u "$path"`
34501    fi
34502    if test "x$new_path" = x; then
34503      # It's still not found. Now this is an unrecoverable error.
34504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34505$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34506      has_space=`$ECHO "$complete" | $GREP " "`
34507      if test "x$has_space" != x; then
34508        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34509$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34510      fi
34511      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34512    fi
34513  fi
34514
34515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34518  # "foo.exe" is OK but "foo" is an error.
34519  #
34520  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34521  # It is also a way to make sure we got the proper file name for the real test later on.
34522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34523  if test "x$test_shortpath" = x; then
34524    # Short path failed, file does not exist as specified.
34525    # Try adding .exe or .cmd
34526    if test -f "${new_path}.exe"; then
34527      input_to_shortpath="${new_path}.exe"
34528    elif test -f "${new_path}.cmd"; then
34529      input_to_shortpath="${new_path}.cmd"
34530    else
34531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34532$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34533      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34534$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34535      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34536    fi
34537  else
34538    input_to_shortpath="$new_path"
34539  fi
34540
34541  # Call helper function which possibly converts this using DOS-style short mode.
34542  # If so, the updated path is stored in $new_path.
34543  new_path="$input_to_shortpath"
34544
34545  input_path="$input_to_shortpath"
34546  # Check if we need to convert this using DOS-style short mode. If the path
34547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34548  # take no chances and rewrite it.
34549  # Note: m4 eats our [], so we need to use [ and ] instead.
34550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34551  if test "x$has_forbidden_chars" != x; then
34552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34556      # Going to short mode and back again did indeed matter. Since short mode is
34557      # case insensitive, let's make it lowercase to improve readability.
34558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34559      # Now convert it back to Unix-stile (cygpath)
34560      input_path=`$CYGPATH -u "$shortmode_path"`
34561      new_path="$input_path"
34562    fi
34563  fi
34564
34565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34566  if test "x$test_cygdrive_prefix" = x; then
34567    # As a simple fix, exclude /usr/bin since it's not a real path.
34568    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34570      # a path prefixed by /cygdrive for fixpath to work.
34571      new_path="$CYGWIN_ROOT_PATH$input_path"
34572    fi
34573  fi
34574
34575  # remove trailing .exe if any
34576  new_path="${new_path/%.exe/}"
34577
34578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34579
34580  # First separate the path from the arguments. This will split at the first
34581  # space.
34582  complete="$DUMPBIN"
34583  path="${complete%% *}"
34584  tmp="$complete EOL"
34585  arguments="${tmp#* }"
34586
34587  # Input might be given as Windows format, start by converting to
34588  # unix format.
34589  new_path="$path"
34590
34591  windows_path="$new_path"
34592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34593    unix_path=`$CYGPATH -u "$windows_path"`
34594    new_path="$unix_path"
34595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34597    new_path="$unix_path"
34598  fi
34599
34600
34601  # Now try to locate executable using which
34602  new_path=`$WHICH "$new_path" 2> /dev/null`
34603
34604  if test "x$new_path" = x; then
34605    # Oops. Which didn't find the executable.
34606    # The splitting of arguments from the executable at a space might have been incorrect,
34607    # since paths with space are more likely in Windows. Give it another try with the whole
34608    # argument.
34609    path="$complete"
34610    arguments="EOL"
34611    new_path="$path"
34612
34613  windows_path="$new_path"
34614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34615    unix_path=`$CYGPATH -u "$windows_path"`
34616    new_path="$unix_path"
34617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34619    new_path="$unix_path"
34620  fi
34621
34622
34623    new_path=`$WHICH "$new_path" 2> /dev/null`
34624
34625    if test "x$new_path" = x; then
34626      # It's still not found. Now this is an unrecoverable error.
34627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34628$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34629      has_space=`$ECHO "$complete" | $GREP " "`
34630      if test "x$has_space" != x; then
34631        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34632$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34633      fi
34634      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34635    fi
34636  fi
34637
34638  # Now new_path has a complete unix path to the binary
34639  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34640    # Keep paths in /bin as-is, but remove trailing .exe if any
34641    new_path="${new_path/%.exe/}"
34642    # Do not save /bin paths to all_fixpath_prefixes!
34643  else
34644    # Not in mixed or Windows style, start by that.
34645    new_path=`cmd //c echo $new_path`
34646
34647  input_path="$new_path"
34648  # Check if we need to convert this using DOS-style short mode. If the path
34649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34650  # take no chances and rewrite it.
34651  # Note: m4 eats our [], so we need to use [ and ] instead.
34652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34653  if test "x$has_forbidden_chars" != x; then
34654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34656  fi
34657
34658    # Output is in $new_path
34659
34660  windows_path="$new_path"
34661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34662    unix_path=`$CYGPATH -u "$windows_path"`
34663    new_path="$unix_path"
34664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34666    new_path="$unix_path"
34667  fi
34668
34669    # remove trailing .exe if any
34670    new_path="${new_path/%.exe/}"
34671
34672    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34673    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34674  fi
34675
34676  else
34677    # We're on a posix platform. Hooray! :)
34678    # First separate the path from the arguments. This will split at the first
34679    # space.
34680    complete="$DUMPBIN"
34681    path="${complete%% *}"
34682    tmp="$complete EOL"
34683    arguments="${tmp#* }"
34684
34685    # Cannot rely on the command "which" here since it doesn't always work.
34686    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34687    if test -z "$is_absolute_path"; then
34688      # Path to executable is not absolute. Find it.
34689      IFS_save="$IFS"
34690      IFS=:
34691      for p in $PATH; do
34692        if test -f "$p/$path" && test -x "$p/$path"; then
34693          new_path="$p/$path"
34694          break
34695        fi
34696      done
34697      IFS="$IFS_save"
34698    else
34699      # This is an absolute path, we can use it without further modifications.
34700      new_path="$path"
34701    fi
34702
34703    if test "x$new_path" = x; then
34704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34705$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34706      has_space=`$ECHO "$complete" | $GREP " "`
34707      if test "x$has_space" != x; then
34708        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34709$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34710      fi
34711      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34712    fi
34713  fi
34714
34715  # Now join together the path and the arguments once again
34716  if test "x$arguments" != xEOL; then
34717    new_complete="$new_path ${arguments% *}"
34718  else
34719    new_complete="$new_path"
34720  fi
34721
34722  if test "x$complete" != "x$new_complete"; then
34723    DUMPBIN="$new_complete"
34724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34725$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34726  fi
34727
34728  fi
34729
34730  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34731
34732
34733  # Publish this variable in the help.
34734
34735
34736  if test "x$STRIP" = x; then
34737    # The variable is not set by user, try to locate tool using the code snippet
34738    for ac_prog in strip
34739do
34740  # Extract the first word of "$ac_prog", so it can be a program name with args.
34741set dummy $ac_prog; ac_word=$2
34742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34743$as_echo_n "checking for $ac_word... " >&6; }
34744if ${ac_cv_path_STRIP+:} false; then :
34745  $as_echo_n "(cached) " >&6
34746else
34747  case $STRIP in
34748  [\\/]* | ?:[\\/]*)
34749  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34750  ;;
34751  *)
34752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34753for as_dir in $PATH
34754do
34755  IFS=$as_save_IFS
34756  test -z "$as_dir" && as_dir=.
34757    for ac_exec_ext in '' $ac_executable_extensions; do
34758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34759    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34761    break 2
34762  fi
34763done
34764  done
34765IFS=$as_save_IFS
34766
34767  ;;
34768esac
34769fi
34770STRIP=$ac_cv_path_STRIP
34771if test -n "$STRIP"; then
34772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34773$as_echo "$STRIP" >&6; }
34774else
34775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34776$as_echo "no" >&6; }
34777fi
34778
34779
34780  test -n "$STRIP" && break
34781done
34782
34783  else
34784    # The variable is set, but is it from the command line or the environment?
34785
34786    # Try to remove the string !STRIP! from our list.
34787    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34788    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34789      # If it failed, the variable was not from the command line. Ignore it,
34790      # but warn the user (except for BASH, which is always set by the calling BASH).
34791      if test "xSTRIP" != xBASH; then
34792        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34793$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34794      fi
34795      # Try to locate tool using the code snippet
34796      for ac_prog in strip
34797do
34798  # Extract the first word of "$ac_prog", so it can be a program name with args.
34799set dummy $ac_prog; ac_word=$2
34800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34801$as_echo_n "checking for $ac_word... " >&6; }
34802if ${ac_cv_path_STRIP+:} false; then :
34803  $as_echo_n "(cached) " >&6
34804else
34805  case $STRIP in
34806  [\\/]* | ?:[\\/]*)
34807  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34808  ;;
34809  *)
34810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34811for as_dir in $PATH
34812do
34813  IFS=$as_save_IFS
34814  test -z "$as_dir" && as_dir=.
34815    for ac_exec_ext in '' $ac_executable_extensions; do
34816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34817    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34819    break 2
34820  fi
34821done
34822  done
34823IFS=$as_save_IFS
34824
34825  ;;
34826esac
34827fi
34828STRIP=$ac_cv_path_STRIP
34829if test -n "$STRIP"; then
34830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34831$as_echo "$STRIP" >&6; }
34832else
34833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34834$as_echo "no" >&6; }
34835fi
34836
34837
34838  test -n "$STRIP" && break
34839done
34840
34841    else
34842      # If it succeeded, then it was overridden by the user. We will use it
34843      # for the tool.
34844
34845      # First remove it from the list of overridden variables, so we can test
34846      # for unknown variables in the end.
34847      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34848
34849      # Check if the provided tool contains a complete path.
34850      tool_specified="$STRIP"
34851      tool_basename="${tool_specified##*/}"
34852      if test "x$tool_basename" = "x$tool_specified"; then
34853        # A command without a complete path is provided, search $PATH.
34854        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34855$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34856        # Extract the first word of "$tool_basename", so it can be a program name with args.
34857set dummy $tool_basename; ac_word=$2
34858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34859$as_echo_n "checking for $ac_word... " >&6; }
34860if ${ac_cv_path_STRIP+:} false; then :
34861  $as_echo_n "(cached) " >&6
34862else
34863  case $STRIP in
34864  [\\/]* | ?:[\\/]*)
34865  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34866  ;;
34867  *)
34868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34869for as_dir in $PATH
34870do
34871  IFS=$as_save_IFS
34872  test -z "$as_dir" && as_dir=.
34873    for ac_exec_ext in '' $ac_executable_extensions; do
34874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34875    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34877    break 2
34878  fi
34879done
34880  done
34881IFS=$as_save_IFS
34882
34883  ;;
34884esac
34885fi
34886STRIP=$ac_cv_path_STRIP
34887if test -n "$STRIP"; then
34888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34889$as_echo "$STRIP" >&6; }
34890else
34891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34892$as_echo "no" >&6; }
34893fi
34894
34895
34896        if test "x$STRIP" = x; then
34897          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34898        fi
34899      else
34900        # Otherwise we believe it is a complete path. Use it as it is.
34901        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34902$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34903        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34904$as_echo_n "checking for STRIP... " >&6; }
34905        if test ! -x "$tool_specified"; then
34906          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34907$as_echo "not found" >&6; }
34908          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34909        fi
34910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34911$as_echo "$tool_specified" >&6; }
34912      fi
34913    fi
34914  fi
34915
34916
34917
34918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34919
34920  # First separate the path from the arguments. This will split at the first
34921  # space.
34922  complete="$STRIP"
34923  path="${complete%% *}"
34924  tmp="$complete EOL"
34925  arguments="${tmp#* }"
34926
34927  # Input might be given as Windows format, start by converting to
34928  # unix format.
34929  new_path=`$CYGPATH -u "$path"`
34930
34931  # Now try to locate executable using which
34932  new_path=`$WHICH "$new_path" 2> /dev/null`
34933  # bat and cmd files are not always considered executable in cygwin causing which
34934  # to not find them
34935  if test "x$new_path" = x \
34936      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34937      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34938    new_path=`$CYGPATH -u "$path"`
34939  fi
34940  if test "x$new_path" = x; then
34941    # Oops. Which didn't find the executable.
34942    # The splitting of arguments from the executable at a space might have been incorrect,
34943    # since paths with space are more likely in Windows. Give it another try with the whole
34944    # argument.
34945    path="$complete"
34946    arguments="EOL"
34947    new_path=`$CYGPATH -u "$path"`
34948    new_path=`$WHICH "$new_path" 2> /dev/null`
34949    # bat and cmd files are not always considered executable in cygwin causing which
34950    # to not find them
34951    if test "x$new_path" = x \
34952        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34953        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34954      new_path=`$CYGPATH -u "$path"`
34955    fi
34956    if test "x$new_path" = x; then
34957      # It's still not found. Now this is an unrecoverable error.
34958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34959$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34960      has_space=`$ECHO "$complete" | $GREP " "`
34961      if test "x$has_space" != x; then
34962        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34963$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34964      fi
34965      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34966    fi
34967  fi
34968
34969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34972  # "foo.exe" is OK but "foo" is an error.
34973  #
34974  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34975  # It is also a way to make sure we got the proper file name for the real test later on.
34976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34977  if test "x$test_shortpath" = x; then
34978    # Short path failed, file does not exist as specified.
34979    # Try adding .exe or .cmd
34980    if test -f "${new_path}.exe"; then
34981      input_to_shortpath="${new_path}.exe"
34982    elif test -f "${new_path}.cmd"; then
34983      input_to_shortpath="${new_path}.cmd"
34984    else
34985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34986$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34987      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34988$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34989      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34990    fi
34991  else
34992    input_to_shortpath="$new_path"
34993  fi
34994
34995  # Call helper function which possibly converts this using DOS-style short mode.
34996  # If so, the updated path is stored in $new_path.
34997  new_path="$input_to_shortpath"
34998
34999  input_path="$input_to_shortpath"
35000  # Check if we need to convert this using DOS-style short mode. If the path
35001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35002  # take no chances and rewrite it.
35003  # Note: m4 eats our [], so we need to use [ and ] instead.
35004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35005  if test "x$has_forbidden_chars" != x; then
35006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35007    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35008    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35009    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35010      # Going to short mode and back again did indeed matter. Since short mode is
35011      # case insensitive, let's make it lowercase to improve readability.
35012      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35013      # Now convert it back to Unix-stile (cygpath)
35014      input_path=`$CYGPATH -u "$shortmode_path"`
35015      new_path="$input_path"
35016    fi
35017  fi
35018
35019  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35020  if test "x$test_cygdrive_prefix" = x; then
35021    # As a simple fix, exclude /usr/bin since it's not a real path.
35022    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35023      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35024      # a path prefixed by /cygdrive for fixpath to work.
35025      new_path="$CYGWIN_ROOT_PATH$input_path"
35026    fi
35027  fi
35028
35029  # remove trailing .exe if any
35030  new_path="${new_path/%.exe/}"
35031
35032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35033
35034  # First separate the path from the arguments. This will split at the first
35035  # space.
35036  complete="$STRIP"
35037  path="${complete%% *}"
35038  tmp="$complete EOL"
35039  arguments="${tmp#* }"
35040
35041  # Input might be given as Windows format, start by converting to
35042  # unix format.
35043  new_path="$path"
35044
35045  windows_path="$new_path"
35046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35047    unix_path=`$CYGPATH -u "$windows_path"`
35048    new_path="$unix_path"
35049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35051    new_path="$unix_path"
35052  fi
35053
35054
35055  # Now try to locate executable using which
35056  new_path=`$WHICH "$new_path" 2> /dev/null`
35057
35058  if test "x$new_path" = x; then
35059    # Oops. Which didn't find the executable.
35060    # The splitting of arguments from the executable at a space might have been incorrect,
35061    # since paths with space are more likely in Windows. Give it another try with the whole
35062    # argument.
35063    path="$complete"
35064    arguments="EOL"
35065    new_path="$path"
35066
35067  windows_path="$new_path"
35068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35069    unix_path=`$CYGPATH -u "$windows_path"`
35070    new_path="$unix_path"
35071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35073    new_path="$unix_path"
35074  fi
35075
35076
35077    new_path=`$WHICH "$new_path" 2> /dev/null`
35078
35079    if test "x$new_path" = x; then
35080      # It's still not found. Now this is an unrecoverable error.
35081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35082$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35083      has_space=`$ECHO "$complete" | $GREP " "`
35084      if test "x$has_space" != x; then
35085        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35086$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35087      fi
35088      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35089    fi
35090  fi
35091
35092  # Now new_path has a complete unix path to the binary
35093  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35094    # Keep paths in /bin as-is, but remove trailing .exe if any
35095    new_path="${new_path/%.exe/}"
35096    # Do not save /bin paths to all_fixpath_prefixes!
35097  else
35098    # Not in mixed or Windows style, start by that.
35099    new_path=`cmd //c echo $new_path`
35100
35101  input_path="$new_path"
35102  # Check if we need to convert this using DOS-style short mode. If the path
35103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35104  # take no chances and rewrite it.
35105  # Note: m4 eats our [], so we need to use [ and ] instead.
35106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35107  if test "x$has_forbidden_chars" != x; then
35108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35110  fi
35111
35112    # Output is in $new_path
35113
35114  windows_path="$new_path"
35115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35116    unix_path=`$CYGPATH -u "$windows_path"`
35117    new_path="$unix_path"
35118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35120    new_path="$unix_path"
35121  fi
35122
35123    # remove trailing .exe if any
35124    new_path="${new_path/%.exe/}"
35125
35126    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35127    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35128  fi
35129
35130  else
35131    # We're on a posix platform. Hooray! :)
35132    # First separate the path from the arguments. This will split at the first
35133    # space.
35134    complete="$STRIP"
35135    path="${complete%% *}"
35136    tmp="$complete EOL"
35137    arguments="${tmp#* }"
35138
35139    # Cannot rely on the command "which" here since it doesn't always work.
35140    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35141    if test -z "$is_absolute_path"; then
35142      # Path to executable is not absolute. Find it.
35143      IFS_save="$IFS"
35144      IFS=:
35145      for p in $PATH; do
35146        if test -f "$p/$path" && test -x "$p/$path"; then
35147          new_path="$p/$path"
35148          break
35149        fi
35150      done
35151      IFS="$IFS_save"
35152    else
35153      # This is an absolute path, we can use it without further modifications.
35154      new_path="$path"
35155    fi
35156
35157    if test "x$new_path" = x; then
35158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35159$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35160      has_space=`$ECHO "$complete" | $GREP " "`
35161      if test "x$has_space" != x; then
35162        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35163$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35164      fi
35165      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35166    fi
35167  fi
35168
35169  # Now join together the path and the arguments once again
35170  if test "x$arguments" != xEOL; then
35171    new_complete="$new_path ${arguments% *}"
35172  else
35173    new_complete="$new_path"
35174  fi
35175
35176  if test "x$complete" != "x$new_complete"; then
35177    STRIP="$new_complete"
35178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35179$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35180  fi
35181
35182
35183
35184  # Publish this variable in the help.
35185
35186
35187  if test "x$NM" = x; then
35188    # The variable is not set by user, try to locate tool using the code snippet
35189    for ac_prog in nm
35190do
35191  # Extract the first word of "$ac_prog", so it can be a program name with args.
35192set dummy $ac_prog; ac_word=$2
35193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35194$as_echo_n "checking for $ac_word... " >&6; }
35195if ${ac_cv_path_NM+:} false; then :
35196  $as_echo_n "(cached) " >&6
35197else
35198  case $NM in
35199  [\\/]* | ?:[\\/]*)
35200  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35201  ;;
35202  *)
35203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35204for as_dir in $PATH
35205do
35206  IFS=$as_save_IFS
35207  test -z "$as_dir" && as_dir=.
35208    for ac_exec_ext in '' $ac_executable_extensions; do
35209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35210    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35212    break 2
35213  fi
35214done
35215  done
35216IFS=$as_save_IFS
35217
35218  ;;
35219esac
35220fi
35221NM=$ac_cv_path_NM
35222if test -n "$NM"; then
35223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35224$as_echo "$NM" >&6; }
35225else
35226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35227$as_echo "no" >&6; }
35228fi
35229
35230
35231  test -n "$NM" && break
35232done
35233
35234  else
35235    # The variable is set, but is it from the command line or the environment?
35236
35237    # Try to remove the string !NM! from our list.
35238    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35239    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35240      # If it failed, the variable was not from the command line. Ignore it,
35241      # but warn the user (except for BASH, which is always set by the calling BASH).
35242      if test "xNM" != xBASH; then
35243        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35244$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35245      fi
35246      # Try to locate tool using the code snippet
35247      for ac_prog in nm
35248do
35249  # Extract the first word of "$ac_prog", so it can be a program name with args.
35250set dummy $ac_prog; ac_word=$2
35251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35252$as_echo_n "checking for $ac_word... " >&6; }
35253if ${ac_cv_path_NM+:} false; then :
35254  $as_echo_n "(cached) " >&6
35255else
35256  case $NM in
35257  [\\/]* | ?:[\\/]*)
35258  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35259  ;;
35260  *)
35261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35262for as_dir in $PATH
35263do
35264  IFS=$as_save_IFS
35265  test -z "$as_dir" && as_dir=.
35266    for ac_exec_ext in '' $ac_executable_extensions; do
35267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35268    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35270    break 2
35271  fi
35272done
35273  done
35274IFS=$as_save_IFS
35275
35276  ;;
35277esac
35278fi
35279NM=$ac_cv_path_NM
35280if test -n "$NM"; then
35281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35282$as_echo "$NM" >&6; }
35283else
35284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35285$as_echo "no" >&6; }
35286fi
35287
35288
35289  test -n "$NM" && break
35290done
35291
35292    else
35293      # If it succeeded, then it was overridden by the user. We will use it
35294      # for the tool.
35295
35296      # First remove it from the list of overridden variables, so we can test
35297      # for unknown variables in the end.
35298      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35299
35300      # Check if the provided tool contains a complete path.
35301      tool_specified="$NM"
35302      tool_basename="${tool_specified##*/}"
35303      if test "x$tool_basename" = "x$tool_specified"; then
35304        # A command without a complete path is provided, search $PATH.
35305        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35306$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35307        # Extract the first word of "$tool_basename", so it can be a program name with args.
35308set dummy $tool_basename; ac_word=$2
35309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35310$as_echo_n "checking for $ac_word... " >&6; }
35311if ${ac_cv_path_NM+:} false; then :
35312  $as_echo_n "(cached) " >&6
35313else
35314  case $NM in
35315  [\\/]* | ?:[\\/]*)
35316  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35317  ;;
35318  *)
35319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35320for as_dir in $PATH
35321do
35322  IFS=$as_save_IFS
35323  test -z "$as_dir" && as_dir=.
35324    for ac_exec_ext in '' $ac_executable_extensions; do
35325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35326    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35328    break 2
35329  fi
35330done
35331  done
35332IFS=$as_save_IFS
35333
35334  ;;
35335esac
35336fi
35337NM=$ac_cv_path_NM
35338if test -n "$NM"; then
35339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35340$as_echo "$NM" >&6; }
35341else
35342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35343$as_echo "no" >&6; }
35344fi
35345
35346
35347        if test "x$NM" = x; then
35348          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35349        fi
35350      else
35351        # Otherwise we believe it is a complete path. Use it as it is.
35352        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35353$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35355$as_echo_n "checking for NM... " >&6; }
35356        if test ! -x "$tool_specified"; then
35357          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35358$as_echo "not found" >&6; }
35359          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35360        fi
35361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35362$as_echo "$tool_specified" >&6; }
35363      fi
35364    fi
35365  fi
35366
35367
35368
35369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35370
35371  # First separate the path from the arguments. This will split at the first
35372  # space.
35373  complete="$NM"
35374  path="${complete%% *}"
35375  tmp="$complete EOL"
35376  arguments="${tmp#* }"
35377
35378  # Input might be given as Windows format, start by converting to
35379  # unix format.
35380  new_path=`$CYGPATH -u "$path"`
35381
35382  # Now try to locate executable using which
35383  new_path=`$WHICH "$new_path" 2> /dev/null`
35384  # bat and cmd files are not always considered executable in cygwin causing which
35385  # to not find them
35386  if test "x$new_path" = x \
35387      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35388      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35389    new_path=`$CYGPATH -u "$path"`
35390  fi
35391  if test "x$new_path" = x; then
35392    # Oops. Which didn't find the executable.
35393    # The splitting of arguments from the executable at a space might have been incorrect,
35394    # since paths with space are more likely in Windows. Give it another try with the whole
35395    # argument.
35396    path="$complete"
35397    arguments="EOL"
35398    new_path=`$CYGPATH -u "$path"`
35399    new_path=`$WHICH "$new_path" 2> /dev/null`
35400    # bat and cmd files are not always considered executable in cygwin causing which
35401    # to not find them
35402    if test "x$new_path" = x \
35403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35405      new_path=`$CYGPATH -u "$path"`
35406    fi
35407    if test "x$new_path" = x; then
35408      # It's still not found. Now this is an unrecoverable error.
35409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35410$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35411      has_space=`$ECHO "$complete" | $GREP " "`
35412      if test "x$has_space" != x; then
35413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35415      fi
35416      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35417    fi
35418  fi
35419
35420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35423  # "foo.exe" is OK but "foo" is an error.
35424  #
35425  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35426  # It is also a way to make sure we got the proper file name for the real test later on.
35427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35428  if test "x$test_shortpath" = x; then
35429    # Short path failed, file does not exist as specified.
35430    # Try adding .exe or .cmd
35431    if test -f "${new_path}.exe"; then
35432      input_to_shortpath="${new_path}.exe"
35433    elif test -f "${new_path}.cmd"; then
35434      input_to_shortpath="${new_path}.cmd"
35435    else
35436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35437$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35438      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35439$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35440      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35441    fi
35442  else
35443    input_to_shortpath="$new_path"
35444  fi
35445
35446  # Call helper function which possibly converts this using DOS-style short mode.
35447  # If so, the updated path is stored in $new_path.
35448  new_path="$input_to_shortpath"
35449
35450  input_path="$input_to_shortpath"
35451  # Check if we need to convert this using DOS-style short mode. If the path
35452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35453  # take no chances and rewrite it.
35454  # Note: m4 eats our [], so we need to use [ and ] instead.
35455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35456  if test "x$has_forbidden_chars" != x; then
35457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35461      # Going to short mode and back again did indeed matter. Since short mode is
35462      # case insensitive, let's make it lowercase to improve readability.
35463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35464      # Now convert it back to Unix-stile (cygpath)
35465      input_path=`$CYGPATH -u "$shortmode_path"`
35466      new_path="$input_path"
35467    fi
35468  fi
35469
35470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35471  if test "x$test_cygdrive_prefix" = x; then
35472    # As a simple fix, exclude /usr/bin since it's not a real path.
35473    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35475      # a path prefixed by /cygdrive for fixpath to work.
35476      new_path="$CYGWIN_ROOT_PATH$input_path"
35477    fi
35478  fi
35479
35480  # remove trailing .exe if any
35481  new_path="${new_path/%.exe/}"
35482
35483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35484
35485  # First separate the path from the arguments. This will split at the first
35486  # space.
35487  complete="$NM"
35488  path="${complete%% *}"
35489  tmp="$complete EOL"
35490  arguments="${tmp#* }"
35491
35492  # Input might be given as Windows format, start by converting to
35493  # unix format.
35494  new_path="$path"
35495
35496  windows_path="$new_path"
35497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35498    unix_path=`$CYGPATH -u "$windows_path"`
35499    new_path="$unix_path"
35500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35502    new_path="$unix_path"
35503  fi
35504
35505
35506  # Now try to locate executable using which
35507  new_path=`$WHICH "$new_path" 2> /dev/null`
35508
35509  if test "x$new_path" = x; then
35510    # Oops. Which didn't find the executable.
35511    # The splitting of arguments from the executable at a space might have been incorrect,
35512    # since paths with space are more likely in Windows. Give it another try with the whole
35513    # argument.
35514    path="$complete"
35515    arguments="EOL"
35516    new_path="$path"
35517
35518  windows_path="$new_path"
35519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35520    unix_path=`$CYGPATH -u "$windows_path"`
35521    new_path="$unix_path"
35522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35524    new_path="$unix_path"
35525  fi
35526
35527
35528    new_path=`$WHICH "$new_path" 2> /dev/null`
35529
35530    if test "x$new_path" = x; then
35531      # It's still not found. Now this is an unrecoverable error.
35532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35533$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35534      has_space=`$ECHO "$complete" | $GREP " "`
35535      if test "x$has_space" != x; then
35536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35538      fi
35539      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35540    fi
35541  fi
35542
35543  # Now new_path has a complete unix path to the binary
35544  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35545    # Keep paths in /bin as-is, but remove trailing .exe if any
35546    new_path="${new_path/%.exe/}"
35547    # Do not save /bin paths to all_fixpath_prefixes!
35548  else
35549    # Not in mixed or Windows style, start by that.
35550    new_path=`cmd //c echo $new_path`
35551
35552  input_path="$new_path"
35553  # Check if we need to convert this using DOS-style short mode. If the path
35554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35555  # take no chances and rewrite it.
35556  # Note: m4 eats our [], so we need to use [ and ] instead.
35557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35558  if test "x$has_forbidden_chars" != x; then
35559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35561  fi
35562
35563    # Output is in $new_path
35564
35565  windows_path="$new_path"
35566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35567    unix_path=`$CYGPATH -u "$windows_path"`
35568    new_path="$unix_path"
35569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35571    new_path="$unix_path"
35572  fi
35573
35574    # remove trailing .exe if any
35575    new_path="${new_path/%.exe/}"
35576
35577    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35578    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35579  fi
35580
35581  else
35582    # We're on a posix platform. Hooray! :)
35583    # First separate the path from the arguments. This will split at the first
35584    # space.
35585    complete="$NM"
35586    path="${complete%% *}"
35587    tmp="$complete EOL"
35588    arguments="${tmp#* }"
35589
35590    # Cannot rely on the command "which" here since it doesn't always work.
35591    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35592    if test -z "$is_absolute_path"; then
35593      # Path to executable is not absolute. Find it.
35594      IFS_save="$IFS"
35595      IFS=:
35596      for p in $PATH; do
35597        if test -f "$p/$path" && test -x "$p/$path"; then
35598          new_path="$p/$path"
35599          break
35600        fi
35601      done
35602      IFS="$IFS_save"
35603    else
35604      # This is an absolute path, we can use it without further modifications.
35605      new_path="$path"
35606    fi
35607
35608    if test "x$new_path" = x; then
35609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35610$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35611      has_space=`$ECHO "$complete" | $GREP " "`
35612      if test "x$has_space" != x; then
35613        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35614$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35615      fi
35616      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35617    fi
35618  fi
35619
35620  # Now join together the path and the arguments once again
35621  if test "x$arguments" != xEOL; then
35622    new_complete="$new_path ${arguments% *}"
35623  else
35624    new_complete="$new_path"
35625  fi
35626
35627  if test "x$complete" != "x$new_complete"; then
35628    NM="$new_complete"
35629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35630$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35631  fi
35632
35633
35634
35635  # Publish this variable in the help.
35636
35637
35638  if test "x$GNM" = x; then
35639    # The variable is not set by user, try to locate tool using the code snippet
35640    for ac_prog in gnm
35641do
35642  # Extract the first word of "$ac_prog", so it can be a program name with args.
35643set dummy $ac_prog; ac_word=$2
35644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35645$as_echo_n "checking for $ac_word... " >&6; }
35646if ${ac_cv_path_GNM+:} false; then :
35647  $as_echo_n "(cached) " >&6
35648else
35649  case $GNM in
35650  [\\/]* | ?:[\\/]*)
35651  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35652  ;;
35653  *)
35654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35655for as_dir in $PATH
35656do
35657  IFS=$as_save_IFS
35658  test -z "$as_dir" && as_dir=.
35659    for ac_exec_ext in '' $ac_executable_extensions; do
35660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35661    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35663    break 2
35664  fi
35665done
35666  done
35667IFS=$as_save_IFS
35668
35669  ;;
35670esac
35671fi
35672GNM=$ac_cv_path_GNM
35673if test -n "$GNM"; then
35674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35675$as_echo "$GNM" >&6; }
35676else
35677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35678$as_echo "no" >&6; }
35679fi
35680
35681
35682  test -n "$GNM" && break
35683done
35684
35685  else
35686    # The variable is set, but is it from the command line or the environment?
35687
35688    # Try to remove the string !GNM! from our list.
35689    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35690    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35691      # If it failed, the variable was not from the command line. Ignore it,
35692      # but warn the user (except for BASH, which is always set by the calling BASH).
35693      if test "xGNM" != xBASH; then
35694        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35695$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35696      fi
35697      # Try to locate tool using the code snippet
35698      for ac_prog in gnm
35699do
35700  # Extract the first word of "$ac_prog", so it can be a program name with args.
35701set dummy $ac_prog; ac_word=$2
35702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35703$as_echo_n "checking for $ac_word... " >&6; }
35704if ${ac_cv_path_GNM+:} false; then :
35705  $as_echo_n "(cached) " >&6
35706else
35707  case $GNM in
35708  [\\/]* | ?:[\\/]*)
35709  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35710  ;;
35711  *)
35712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35713for as_dir in $PATH
35714do
35715  IFS=$as_save_IFS
35716  test -z "$as_dir" && as_dir=.
35717    for ac_exec_ext in '' $ac_executable_extensions; do
35718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35719    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35721    break 2
35722  fi
35723done
35724  done
35725IFS=$as_save_IFS
35726
35727  ;;
35728esac
35729fi
35730GNM=$ac_cv_path_GNM
35731if test -n "$GNM"; then
35732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35733$as_echo "$GNM" >&6; }
35734else
35735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35736$as_echo "no" >&6; }
35737fi
35738
35739
35740  test -n "$GNM" && break
35741done
35742
35743    else
35744      # If it succeeded, then it was overridden by the user. We will use it
35745      # for the tool.
35746
35747      # First remove it from the list of overridden variables, so we can test
35748      # for unknown variables in the end.
35749      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35750
35751      # Check if the provided tool contains a complete path.
35752      tool_specified="$GNM"
35753      tool_basename="${tool_specified##*/}"
35754      if test "x$tool_basename" = "x$tool_specified"; then
35755        # A command without a complete path is provided, search $PATH.
35756        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35757$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35758        # Extract the first word of "$tool_basename", so it can be a program name with args.
35759set dummy $tool_basename; ac_word=$2
35760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35761$as_echo_n "checking for $ac_word... " >&6; }
35762if ${ac_cv_path_GNM+:} false; then :
35763  $as_echo_n "(cached) " >&6
35764else
35765  case $GNM in
35766  [\\/]* | ?:[\\/]*)
35767  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35768  ;;
35769  *)
35770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35771for as_dir in $PATH
35772do
35773  IFS=$as_save_IFS
35774  test -z "$as_dir" && as_dir=.
35775    for ac_exec_ext in '' $ac_executable_extensions; do
35776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35777    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35779    break 2
35780  fi
35781done
35782  done
35783IFS=$as_save_IFS
35784
35785  ;;
35786esac
35787fi
35788GNM=$ac_cv_path_GNM
35789if test -n "$GNM"; then
35790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35791$as_echo "$GNM" >&6; }
35792else
35793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35794$as_echo "no" >&6; }
35795fi
35796
35797
35798        if test "x$GNM" = x; then
35799          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35800        fi
35801      else
35802        # Otherwise we believe it is a complete path. Use it as it is.
35803        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35804$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35806$as_echo_n "checking for GNM... " >&6; }
35807        if test ! -x "$tool_specified"; then
35808          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35809$as_echo "not found" >&6; }
35810          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35811        fi
35812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35813$as_echo "$tool_specified" >&6; }
35814      fi
35815    fi
35816  fi
35817
35818
35819
35820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35821
35822  # First separate the path from the arguments. This will split at the first
35823  # space.
35824  complete="$GNM"
35825  path="${complete%% *}"
35826  tmp="$complete EOL"
35827  arguments="${tmp#* }"
35828
35829  # Input might be given as Windows format, start by converting to
35830  # unix format.
35831  new_path=`$CYGPATH -u "$path"`
35832
35833  # Now try to locate executable using which
35834  new_path=`$WHICH "$new_path" 2> /dev/null`
35835  # bat and cmd files are not always considered executable in cygwin causing which
35836  # to not find them
35837  if test "x$new_path" = x \
35838      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35839      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35840    new_path=`$CYGPATH -u "$path"`
35841  fi
35842  if test "x$new_path" = x; then
35843    # Oops. Which didn't find the executable.
35844    # The splitting of arguments from the executable at a space might have been incorrect,
35845    # since paths with space are more likely in Windows. Give it another try with the whole
35846    # argument.
35847    path="$complete"
35848    arguments="EOL"
35849    new_path=`$CYGPATH -u "$path"`
35850    new_path=`$WHICH "$new_path" 2> /dev/null`
35851    # bat and cmd files are not always considered executable in cygwin causing which
35852    # to not find them
35853    if test "x$new_path" = x \
35854        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35855        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35856      new_path=`$CYGPATH -u "$path"`
35857    fi
35858    if test "x$new_path" = x; then
35859      # It's still not found. Now this is an unrecoverable error.
35860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35861$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35862      has_space=`$ECHO "$complete" | $GREP " "`
35863      if test "x$has_space" != x; then
35864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35866      fi
35867      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35868    fi
35869  fi
35870
35871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35874  # "foo.exe" is OK but "foo" is an error.
35875  #
35876  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35877  # It is also a way to make sure we got the proper file name for the real test later on.
35878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35879  if test "x$test_shortpath" = x; then
35880    # Short path failed, file does not exist as specified.
35881    # Try adding .exe or .cmd
35882    if test -f "${new_path}.exe"; then
35883      input_to_shortpath="${new_path}.exe"
35884    elif test -f "${new_path}.cmd"; then
35885      input_to_shortpath="${new_path}.cmd"
35886    else
35887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35888$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35889      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35890$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35891      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35892    fi
35893  else
35894    input_to_shortpath="$new_path"
35895  fi
35896
35897  # Call helper function which possibly converts this using DOS-style short mode.
35898  # If so, the updated path is stored in $new_path.
35899  new_path="$input_to_shortpath"
35900
35901  input_path="$input_to_shortpath"
35902  # Check if we need to convert this using DOS-style short mode. If the path
35903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35904  # take no chances and rewrite it.
35905  # Note: m4 eats our [], so we need to use [ and ] instead.
35906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35907  if test "x$has_forbidden_chars" != x; then
35908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35912      # Going to short mode and back again did indeed matter. Since short mode is
35913      # case insensitive, let's make it lowercase to improve readability.
35914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35915      # Now convert it back to Unix-stile (cygpath)
35916      input_path=`$CYGPATH -u "$shortmode_path"`
35917      new_path="$input_path"
35918    fi
35919  fi
35920
35921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35922  if test "x$test_cygdrive_prefix" = x; then
35923    # As a simple fix, exclude /usr/bin since it's not a real path.
35924    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35926      # a path prefixed by /cygdrive for fixpath to work.
35927      new_path="$CYGWIN_ROOT_PATH$input_path"
35928    fi
35929  fi
35930
35931  # remove trailing .exe if any
35932  new_path="${new_path/%.exe/}"
35933
35934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35935
35936  # First separate the path from the arguments. This will split at the first
35937  # space.
35938  complete="$GNM"
35939  path="${complete%% *}"
35940  tmp="$complete EOL"
35941  arguments="${tmp#* }"
35942
35943  # Input might be given as Windows format, start by converting to
35944  # unix format.
35945  new_path="$path"
35946
35947  windows_path="$new_path"
35948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35949    unix_path=`$CYGPATH -u "$windows_path"`
35950    new_path="$unix_path"
35951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35953    new_path="$unix_path"
35954  fi
35955
35956
35957  # Now try to locate executable using which
35958  new_path=`$WHICH "$new_path" 2> /dev/null`
35959
35960  if test "x$new_path" = x; then
35961    # Oops. Which didn't find the executable.
35962    # The splitting of arguments from the executable at a space might have been incorrect,
35963    # since paths with space are more likely in Windows. Give it another try with the whole
35964    # argument.
35965    path="$complete"
35966    arguments="EOL"
35967    new_path="$path"
35968
35969  windows_path="$new_path"
35970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35971    unix_path=`$CYGPATH -u "$windows_path"`
35972    new_path="$unix_path"
35973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35975    new_path="$unix_path"
35976  fi
35977
35978
35979    new_path=`$WHICH "$new_path" 2> /dev/null`
35980
35981    if test "x$new_path" = x; then
35982      # It's still not found. Now this is an unrecoverable error.
35983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35984$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35985      has_space=`$ECHO "$complete" | $GREP " "`
35986      if test "x$has_space" != x; then
35987        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35988$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35989      fi
35990      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35991    fi
35992  fi
35993
35994  # Now new_path has a complete unix path to the binary
35995  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35996    # Keep paths in /bin as-is, but remove trailing .exe if any
35997    new_path="${new_path/%.exe/}"
35998    # Do not save /bin paths to all_fixpath_prefixes!
35999  else
36000    # Not in mixed or Windows style, start by that.
36001    new_path=`cmd //c echo $new_path`
36002
36003  input_path="$new_path"
36004  # Check if we need to convert this using DOS-style short mode. If the path
36005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36006  # take no chances and rewrite it.
36007  # Note: m4 eats our [], so we need to use [ and ] instead.
36008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36009  if test "x$has_forbidden_chars" != x; then
36010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36012  fi
36013
36014    # Output is in $new_path
36015
36016  windows_path="$new_path"
36017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36018    unix_path=`$CYGPATH -u "$windows_path"`
36019    new_path="$unix_path"
36020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36022    new_path="$unix_path"
36023  fi
36024
36025    # remove trailing .exe if any
36026    new_path="${new_path/%.exe/}"
36027
36028    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36029    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36030  fi
36031
36032  else
36033    # We're on a posix platform. Hooray! :)
36034    # First separate the path from the arguments. This will split at the first
36035    # space.
36036    complete="$GNM"
36037    path="${complete%% *}"
36038    tmp="$complete EOL"
36039    arguments="${tmp#* }"
36040
36041    # Cannot rely on the command "which" here since it doesn't always work.
36042    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36043    if test -z "$is_absolute_path"; then
36044      # Path to executable is not absolute. Find it.
36045      IFS_save="$IFS"
36046      IFS=:
36047      for p in $PATH; do
36048        if test -f "$p/$path" && test -x "$p/$path"; then
36049          new_path="$p/$path"
36050          break
36051        fi
36052      done
36053      IFS="$IFS_save"
36054    else
36055      # This is an absolute path, we can use it without further modifications.
36056      new_path="$path"
36057    fi
36058
36059    if test "x$new_path" = x; then
36060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36061$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36062      has_space=`$ECHO "$complete" | $GREP " "`
36063      if test "x$has_space" != x; then
36064        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36065$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36066      fi
36067      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36068    fi
36069  fi
36070
36071  # Now join together the path and the arguments once again
36072  if test "x$arguments" != xEOL; then
36073    new_complete="$new_path ${arguments% *}"
36074  else
36075    new_complete="$new_path"
36076  fi
36077
36078  if test "x$complete" != "x$new_complete"; then
36079    GNM="$new_complete"
36080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36081$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36082  fi
36083
36084
36085
36086
36087  # Publish this variable in the help.
36088
36089
36090  if test "x$MCS" = x; then
36091    # The variable is not set by user, try to locate tool using the code snippet
36092    for ac_prog in mcs
36093do
36094  # Extract the first word of "$ac_prog", so it can be a program name with args.
36095set dummy $ac_prog; ac_word=$2
36096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36097$as_echo_n "checking for $ac_word... " >&6; }
36098if ${ac_cv_path_MCS+:} false; then :
36099  $as_echo_n "(cached) " >&6
36100else
36101  case $MCS in
36102  [\\/]* | ?:[\\/]*)
36103  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36104  ;;
36105  *)
36106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36107for as_dir in $PATH
36108do
36109  IFS=$as_save_IFS
36110  test -z "$as_dir" && as_dir=.
36111    for ac_exec_ext in '' $ac_executable_extensions; do
36112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36113    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36115    break 2
36116  fi
36117done
36118  done
36119IFS=$as_save_IFS
36120
36121  ;;
36122esac
36123fi
36124MCS=$ac_cv_path_MCS
36125if test -n "$MCS"; then
36126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36127$as_echo "$MCS" >&6; }
36128else
36129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36130$as_echo "no" >&6; }
36131fi
36132
36133
36134  test -n "$MCS" && break
36135done
36136
36137  else
36138    # The variable is set, but is it from the command line or the environment?
36139
36140    # Try to remove the string !MCS! from our list.
36141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36143      # If it failed, the variable was not from the command line. Ignore it,
36144      # but warn the user (except for BASH, which is always set by the calling BASH).
36145      if test "xMCS" != xBASH; then
36146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36147$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36148      fi
36149      # Try to locate tool using the code snippet
36150      for ac_prog in mcs
36151do
36152  # Extract the first word of "$ac_prog", so it can be a program name with args.
36153set dummy $ac_prog; ac_word=$2
36154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36155$as_echo_n "checking for $ac_word... " >&6; }
36156if ${ac_cv_path_MCS+:} false; then :
36157  $as_echo_n "(cached) " >&6
36158else
36159  case $MCS in
36160  [\\/]* | ?:[\\/]*)
36161  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36162  ;;
36163  *)
36164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36165for as_dir in $PATH
36166do
36167  IFS=$as_save_IFS
36168  test -z "$as_dir" && as_dir=.
36169    for ac_exec_ext in '' $ac_executable_extensions; do
36170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36171    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36173    break 2
36174  fi
36175done
36176  done
36177IFS=$as_save_IFS
36178
36179  ;;
36180esac
36181fi
36182MCS=$ac_cv_path_MCS
36183if test -n "$MCS"; then
36184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36185$as_echo "$MCS" >&6; }
36186else
36187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36188$as_echo "no" >&6; }
36189fi
36190
36191
36192  test -n "$MCS" && break
36193done
36194
36195    else
36196      # If it succeeded, then it was overridden by the user. We will use it
36197      # for the tool.
36198
36199      # First remove it from the list of overridden variables, so we can test
36200      # for unknown variables in the end.
36201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36202
36203      # Check if the provided tool contains a complete path.
36204      tool_specified="$MCS"
36205      tool_basename="${tool_specified##*/}"
36206      if test "x$tool_basename" = "x$tool_specified"; then
36207        # A command without a complete path is provided, search $PATH.
36208        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36209$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36210        # Extract the first word of "$tool_basename", so it can be a program name with args.
36211set dummy $tool_basename; ac_word=$2
36212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36213$as_echo_n "checking for $ac_word... " >&6; }
36214if ${ac_cv_path_MCS+:} false; then :
36215  $as_echo_n "(cached) " >&6
36216else
36217  case $MCS in
36218  [\\/]* | ?:[\\/]*)
36219  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36220  ;;
36221  *)
36222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36223for as_dir in $PATH
36224do
36225  IFS=$as_save_IFS
36226  test -z "$as_dir" && as_dir=.
36227    for ac_exec_ext in '' $ac_executable_extensions; do
36228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36229    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36231    break 2
36232  fi
36233done
36234  done
36235IFS=$as_save_IFS
36236
36237  ;;
36238esac
36239fi
36240MCS=$ac_cv_path_MCS
36241if test -n "$MCS"; then
36242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36243$as_echo "$MCS" >&6; }
36244else
36245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36246$as_echo "no" >&6; }
36247fi
36248
36249
36250        if test "x$MCS" = x; then
36251          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36252        fi
36253      else
36254        # Otherwise we believe it is a complete path. Use it as it is.
36255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36256$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36257        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36258$as_echo_n "checking for MCS... " >&6; }
36259        if test ! -x "$tool_specified"; then
36260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36261$as_echo "not found" >&6; }
36262          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36263        fi
36264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36265$as_echo "$tool_specified" >&6; }
36266      fi
36267    fi
36268  fi
36269
36270
36271
36272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36273
36274  # First separate the path from the arguments. This will split at the first
36275  # space.
36276  complete="$MCS"
36277  path="${complete%% *}"
36278  tmp="$complete EOL"
36279  arguments="${tmp#* }"
36280
36281  # Input might be given as Windows format, start by converting to
36282  # unix format.
36283  new_path=`$CYGPATH -u "$path"`
36284
36285  # Now try to locate executable using which
36286  new_path=`$WHICH "$new_path" 2> /dev/null`
36287  # bat and cmd files are not always considered executable in cygwin causing which
36288  # to not find them
36289  if test "x$new_path" = x \
36290      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36291      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36292    new_path=`$CYGPATH -u "$path"`
36293  fi
36294  if test "x$new_path" = x; then
36295    # Oops. Which didn't find the executable.
36296    # The splitting of arguments from the executable at a space might have been incorrect,
36297    # since paths with space are more likely in Windows. Give it another try with the whole
36298    # argument.
36299    path="$complete"
36300    arguments="EOL"
36301    new_path=`$CYGPATH -u "$path"`
36302    new_path=`$WHICH "$new_path" 2> /dev/null`
36303    # bat and cmd files are not always considered executable in cygwin causing which
36304    # to not find them
36305    if test "x$new_path" = x \
36306        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36307        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36308      new_path=`$CYGPATH -u "$path"`
36309    fi
36310    if test "x$new_path" = x; then
36311      # It's still not found. Now this is an unrecoverable error.
36312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36313$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36314      has_space=`$ECHO "$complete" | $GREP " "`
36315      if test "x$has_space" != x; then
36316        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36317$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36318      fi
36319      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36320    fi
36321  fi
36322
36323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36326  # "foo.exe" is OK but "foo" is an error.
36327  #
36328  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36329  # It is also a way to make sure we got the proper file name for the real test later on.
36330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36331  if test "x$test_shortpath" = x; then
36332    # Short path failed, file does not exist as specified.
36333    # Try adding .exe or .cmd
36334    if test -f "${new_path}.exe"; then
36335      input_to_shortpath="${new_path}.exe"
36336    elif test -f "${new_path}.cmd"; then
36337      input_to_shortpath="${new_path}.cmd"
36338    else
36339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36340$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36341      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36342$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36343      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36344    fi
36345  else
36346    input_to_shortpath="$new_path"
36347  fi
36348
36349  # Call helper function which possibly converts this using DOS-style short mode.
36350  # If so, the updated path is stored in $new_path.
36351  new_path="$input_to_shortpath"
36352
36353  input_path="$input_to_shortpath"
36354  # Check if we need to convert this using DOS-style short mode. If the path
36355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36356  # take no chances and rewrite it.
36357  # Note: m4 eats our [], so we need to use [ and ] instead.
36358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36359  if test "x$has_forbidden_chars" != x; then
36360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36364      # Going to short mode and back again did indeed matter. Since short mode is
36365      # case insensitive, let's make it lowercase to improve readability.
36366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36367      # Now convert it back to Unix-stile (cygpath)
36368      input_path=`$CYGPATH -u "$shortmode_path"`
36369      new_path="$input_path"
36370    fi
36371  fi
36372
36373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36374  if test "x$test_cygdrive_prefix" = x; then
36375    # As a simple fix, exclude /usr/bin since it's not a real path.
36376    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36378      # a path prefixed by /cygdrive for fixpath to work.
36379      new_path="$CYGWIN_ROOT_PATH$input_path"
36380    fi
36381  fi
36382
36383  # remove trailing .exe if any
36384  new_path="${new_path/%.exe/}"
36385
36386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36387
36388  # First separate the path from the arguments. This will split at the first
36389  # space.
36390  complete="$MCS"
36391  path="${complete%% *}"
36392  tmp="$complete EOL"
36393  arguments="${tmp#* }"
36394
36395  # Input might be given as Windows format, start by converting to
36396  # unix format.
36397  new_path="$path"
36398
36399  windows_path="$new_path"
36400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36401    unix_path=`$CYGPATH -u "$windows_path"`
36402    new_path="$unix_path"
36403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36405    new_path="$unix_path"
36406  fi
36407
36408
36409  # Now try to locate executable using which
36410  new_path=`$WHICH "$new_path" 2> /dev/null`
36411
36412  if test "x$new_path" = x; then
36413    # Oops. Which didn't find the executable.
36414    # The splitting of arguments from the executable at a space might have been incorrect,
36415    # since paths with space are more likely in Windows. Give it another try with the whole
36416    # argument.
36417    path="$complete"
36418    arguments="EOL"
36419    new_path="$path"
36420
36421  windows_path="$new_path"
36422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36423    unix_path=`$CYGPATH -u "$windows_path"`
36424    new_path="$unix_path"
36425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36427    new_path="$unix_path"
36428  fi
36429
36430
36431    new_path=`$WHICH "$new_path" 2> /dev/null`
36432
36433    if test "x$new_path" = x; then
36434      # It's still not found. Now this is an unrecoverable error.
36435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36436$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36437      has_space=`$ECHO "$complete" | $GREP " "`
36438      if test "x$has_space" != x; then
36439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36441      fi
36442      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36443    fi
36444  fi
36445
36446  # Now new_path has a complete unix path to the binary
36447  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36448    # Keep paths in /bin as-is, but remove trailing .exe if any
36449    new_path="${new_path/%.exe/}"
36450    # Do not save /bin paths to all_fixpath_prefixes!
36451  else
36452    # Not in mixed or Windows style, start by that.
36453    new_path=`cmd //c echo $new_path`
36454
36455  input_path="$new_path"
36456  # Check if we need to convert this using DOS-style short mode. If the path
36457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36458  # take no chances and rewrite it.
36459  # Note: m4 eats our [], so we need to use [ and ] instead.
36460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36461  if test "x$has_forbidden_chars" != x; then
36462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36464  fi
36465
36466    # Output is in $new_path
36467
36468  windows_path="$new_path"
36469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36470    unix_path=`$CYGPATH -u "$windows_path"`
36471    new_path="$unix_path"
36472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36474    new_path="$unix_path"
36475  fi
36476
36477    # remove trailing .exe if any
36478    new_path="${new_path/%.exe/}"
36479
36480    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36481    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36482  fi
36483
36484  else
36485    # We're on a posix platform. Hooray! :)
36486    # First separate the path from the arguments. This will split at the first
36487    # space.
36488    complete="$MCS"
36489    path="${complete%% *}"
36490    tmp="$complete EOL"
36491    arguments="${tmp#* }"
36492
36493    # Cannot rely on the command "which" here since it doesn't always work.
36494    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36495    if test -z "$is_absolute_path"; then
36496      # Path to executable is not absolute. Find it.
36497      IFS_save="$IFS"
36498      IFS=:
36499      for p in $PATH; do
36500        if test -f "$p/$path" && test -x "$p/$path"; then
36501          new_path="$p/$path"
36502          break
36503        fi
36504      done
36505      IFS="$IFS_save"
36506    else
36507      # This is an absolute path, we can use it without further modifications.
36508      new_path="$path"
36509    fi
36510
36511    if test "x$new_path" = x; then
36512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36513$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36514      has_space=`$ECHO "$complete" | $GREP " "`
36515      if test "x$has_space" != x; then
36516        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36517$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36518      fi
36519      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36520    fi
36521  fi
36522
36523  # Now join together the path and the arguments once again
36524  if test "x$arguments" != xEOL; then
36525    new_complete="$new_path ${arguments% *}"
36526  else
36527    new_complete="$new_path"
36528  fi
36529
36530  if test "x$complete" != "x$new_complete"; then
36531    MCS="$new_complete"
36532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36533$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36534  fi
36535
36536  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36537    # FIXME: we should unify this with the solaris case above.
36538
36539
36540  # Publish this variable in the help.
36541
36542
36543  if test "x$STRIP" = x; then
36544    # The variable is not set by user, try to locate tool using the code snippet
36545    if test -n "$ac_tool_prefix"; then
36546  for ac_prog in strip
36547  do
36548    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36549set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36551$as_echo_n "checking for $ac_word... " >&6; }
36552if ${ac_cv_prog_STRIP+:} false; then :
36553  $as_echo_n "(cached) " >&6
36554else
36555  if test -n "$STRIP"; then
36556  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36557else
36558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36559for as_dir in $PATH
36560do
36561  IFS=$as_save_IFS
36562  test -z "$as_dir" && as_dir=.
36563    for ac_exec_ext in '' $ac_executable_extensions; do
36564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36565    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36567    break 2
36568  fi
36569done
36570  done
36571IFS=$as_save_IFS
36572
36573fi
36574fi
36575STRIP=$ac_cv_prog_STRIP
36576if test -n "$STRIP"; then
36577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36578$as_echo "$STRIP" >&6; }
36579else
36580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36581$as_echo "no" >&6; }
36582fi
36583
36584
36585    test -n "$STRIP" && break
36586  done
36587fi
36588if test -z "$STRIP"; then
36589  ac_ct_STRIP=$STRIP
36590  for ac_prog in strip
36591do
36592  # Extract the first word of "$ac_prog", so it can be a program name with args.
36593set dummy $ac_prog; ac_word=$2
36594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36595$as_echo_n "checking for $ac_word... " >&6; }
36596if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36597  $as_echo_n "(cached) " >&6
36598else
36599  if test -n "$ac_ct_STRIP"; then
36600  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36601else
36602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36603for as_dir in $PATH
36604do
36605  IFS=$as_save_IFS
36606  test -z "$as_dir" && as_dir=.
36607    for ac_exec_ext in '' $ac_executable_extensions; do
36608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36609    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36611    break 2
36612  fi
36613done
36614  done
36615IFS=$as_save_IFS
36616
36617fi
36618fi
36619ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36620if test -n "$ac_ct_STRIP"; then
36621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36622$as_echo "$ac_ct_STRIP" >&6; }
36623else
36624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36625$as_echo "no" >&6; }
36626fi
36627
36628
36629  test -n "$ac_ct_STRIP" && break
36630done
36631
36632  if test "x$ac_ct_STRIP" = x; then
36633    STRIP=""
36634  else
36635    case $cross_compiling:$ac_tool_warned in
36636yes:)
36637{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36638$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36639ac_tool_warned=yes ;;
36640esac
36641    STRIP=$ac_ct_STRIP
36642  fi
36643fi
36644
36645  else
36646    # The variable is set, but is it from the command line or the environment?
36647
36648    # Try to remove the string !STRIP! from our list.
36649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36651      # If it failed, the variable was not from the command line. Ignore it,
36652      # but warn the user (except for BASH, which is always set by the calling BASH).
36653      if test "xSTRIP" != xBASH; then
36654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36655$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36656      fi
36657      # Try to locate tool using the code snippet
36658      if test -n "$ac_tool_prefix"; then
36659  for ac_prog in strip
36660  do
36661    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36662set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36664$as_echo_n "checking for $ac_word... " >&6; }
36665if ${ac_cv_prog_STRIP+:} false; then :
36666  $as_echo_n "(cached) " >&6
36667else
36668  if test -n "$STRIP"; then
36669  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36670else
36671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36672for as_dir in $PATH
36673do
36674  IFS=$as_save_IFS
36675  test -z "$as_dir" && as_dir=.
36676    for ac_exec_ext in '' $ac_executable_extensions; do
36677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36678    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36680    break 2
36681  fi
36682done
36683  done
36684IFS=$as_save_IFS
36685
36686fi
36687fi
36688STRIP=$ac_cv_prog_STRIP
36689if test -n "$STRIP"; then
36690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36691$as_echo "$STRIP" >&6; }
36692else
36693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36694$as_echo "no" >&6; }
36695fi
36696
36697
36698    test -n "$STRIP" && break
36699  done
36700fi
36701if test -z "$STRIP"; then
36702  ac_ct_STRIP=$STRIP
36703  for ac_prog in strip
36704do
36705  # Extract the first word of "$ac_prog", so it can be a program name with args.
36706set dummy $ac_prog; ac_word=$2
36707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36708$as_echo_n "checking for $ac_word... " >&6; }
36709if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36710  $as_echo_n "(cached) " >&6
36711else
36712  if test -n "$ac_ct_STRIP"; then
36713  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36714else
36715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36716for as_dir in $PATH
36717do
36718  IFS=$as_save_IFS
36719  test -z "$as_dir" && as_dir=.
36720    for ac_exec_ext in '' $ac_executable_extensions; do
36721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36722    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36724    break 2
36725  fi
36726done
36727  done
36728IFS=$as_save_IFS
36729
36730fi
36731fi
36732ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36733if test -n "$ac_ct_STRIP"; then
36734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36735$as_echo "$ac_ct_STRIP" >&6; }
36736else
36737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36738$as_echo "no" >&6; }
36739fi
36740
36741
36742  test -n "$ac_ct_STRIP" && break
36743done
36744
36745  if test "x$ac_ct_STRIP" = x; then
36746    STRIP=""
36747  else
36748    case $cross_compiling:$ac_tool_warned in
36749yes:)
36750{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36751$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36752ac_tool_warned=yes ;;
36753esac
36754    STRIP=$ac_ct_STRIP
36755  fi
36756fi
36757
36758    else
36759      # If it succeeded, then it was overridden by the user. We will use it
36760      # for the tool.
36761
36762      # First remove it from the list of overridden variables, so we can test
36763      # for unknown variables in the end.
36764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36765
36766      # Check if the provided tool contains a complete path.
36767      tool_specified="$STRIP"
36768      tool_basename="${tool_specified##*/}"
36769      if test "x$tool_basename" = "x$tool_specified"; then
36770        # A command without a complete path is provided, search $PATH.
36771        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36772$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36773        # Extract the first word of "$tool_basename", so it can be a program name with args.
36774set dummy $tool_basename; ac_word=$2
36775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36776$as_echo_n "checking for $ac_word... " >&6; }
36777if ${ac_cv_path_STRIP+:} false; then :
36778  $as_echo_n "(cached) " >&6
36779else
36780  case $STRIP in
36781  [\\/]* | ?:[\\/]*)
36782  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36783  ;;
36784  *)
36785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36786for as_dir in $PATH
36787do
36788  IFS=$as_save_IFS
36789  test -z "$as_dir" && as_dir=.
36790    for ac_exec_ext in '' $ac_executable_extensions; do
36791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36792    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36794    break 2
36795  fi
36796done
36797  done
36798IFS=$as_save_IFS
36799
36800  ;;
36801esac
36802fi
36803STRIP=$ac_cv_path_STRIP
36804if test -n "$STRIP"; then
36805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36806$as_echo "$STRIP" >&6; }
36807else
36808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36809$as_echo "no" >&6; }
36810fi
36811
36812
36813        if test "x$STRIP" = x; then
36814          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36815        fi
36816      else
36817        # Otherwise we believe it is a complete path. Use it as it is.
36818        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36819$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36820        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36821$as_echo_n "checking for STRIP... " >&6; }
36822        if test ! -x "$tool_specified"; then
36823          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36824$as_echo "not found" >&6; }
36825          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36826        fi
36827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36828$as_echo "$tool_specified" >&6; }
36829      fi
36830    fi
36831  fi
36832
36833
36834
36835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36836
36837  # First separate the path from the arguments. This will split at the first
36838  # space.
36839  complete="$STRIP"
36840  path="${complete%% *}"
36841  tmp="$complete EOL"
36842  arguments="${tmp#* }"
36843
36844  # Input might be given as Windows format, start by converting to
36845  # unix format.
36846  new_path=`$CYGPATH -u "$path"`
36847
36848  # Now try to locate executable using which
36849  new_path=`$WHICH "$new_path" 2> /dev/null`
36850  # bat and cmd files are not always considered executable in cygwin causing which
36851  # to not find them
36852  if test "x$new_path" = x \
36853      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36854      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36855    new_path=`$CYGPATH -u "$path"`
36856  fi
36857  if test "x$new_path" = x; then
36858    # Oops. Which didn't find the executable.
36859    # The splitting of arguments from the executable at a space might have been incorrect,
36860    # since paths with space are more likely in Windows. Give it another try with the whole
36861    # argument.
36862    path="$complete"
36863    arguments="EOL"
36864    new_path=`$CYGPATH -u "$path"`
36865    new_path=`$WHICH "$new_path" 2> /dev/null`
36866    # bat and cmd files are not always considered executable in cygwin causing which
36867    # to not find them
36868    if test "x$new_path" = x \
36869        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36870        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36871      new_path=`$CYGPATH -u "$path"`
36872    fi
36873    if test "x$new_path" = x; then
36874      # It's still not found. Now this is an unrecoverable error.
36875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36876$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36877      has_space=`$ECHO "$complete" | $GREP " "`
36878      if test "x$has_space" != x; then
36879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36881      fi
36882      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36883    fi
36884  fi
36885
36886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36889  # "foo.exe" is OK but "foo" is an error.
36890  #
36891  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36892  # It is also a way to make sure we got the proper file name for the real test later on.
36893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36894  if test "x$test_shortpath" = x; then
36895    # Short path failed, file does not exist as specified.
36896    # Try adding .exe or .cmd
36897    if test -f "${new_path}.exe"; then
36898      input_to_shortpath="${new_path}.exe"
36899    elif test -f "${new_path}.cmd"; then
36900      input_to_shortpath="${new_path}.cmd"
36901    else
36902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36903$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36904      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36905$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36906      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36907    fi
36908  else
36909    input_to_shortpath="$new_path"
36910  fi
36911
36912  # Call helper function which possibly converts this using DOS-style short mode.
36913  # If so, the updated path is stored in $new_path.
36914  new_path="$input_to_shortpath"
36915
36916  input_path="$input_to_shortpath"
36917  # Check if we need to convert this using DOS-style short mode. If the path
36918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36919  # take no chances and rewrite it.
36920  # Note: m4 eats our [], so we need to use [ and ] instead.
36921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36922  if test "x$has_forbidden_chars" != x; then
36923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36927      # Going to short mode and back again did indeed matter. Since short mode is
36928      # case insensitive, let's make it lowercase to improve readability.
36929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36930      # Now convert it back to Unix-stile (cygpath)
36931      input_path=`$CYGPATH -u "$shortmode_path"`
36932      new_path="$input_path"
36933    fi
36934  fi
36935
36936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36937  if test "x$test_cygdrive_prefix" = x; then
36938    # As a simple fix, exclude /usr/bin since it's not a real path.
36939    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36941      # a path prefixed by /cygdrive for fixpath to work.
36942      new_path="$CYGWIN_ROOT_PATH$input_path"
36943    fi
36944  fi
36945
36946  # remove trailing .exe if any
36947  new_path="${new_path/%.exe/}"
36948
36949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36950
36951  # First separate the path from the arguments. This will split at the first
36952  # space.
36953  complete="$STRIP"
36954  path="${complete%% *}"
36955  tmp="$complete EOL"
36956  arguments="${tmp#* }"
36957
36958  # Input might be given as Windows format, start by converting to
36959  # unix format.
36960  new_path="$path"
36961
36962  windows_path="$new_path"
36963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36964    unix_path=`$CYGPATH -u "$windows_path"`
36965    new_path="$unix_path"
36966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36968    new_path="$unix_path"
36969  fi
36970
36971
36972  # Now try to locate executable using which
36973  new_path=`$WHICH "$new_path" 2> /dev/null`
36974
36975  if test "x$new_path" = x; then
36976    # Oops. Which didn't find the executable.
36977    # The splitting of arguments from the executable at a space might have been incorrect,
36978    # since paths with space are more likely in Windows. Give it another try with the whole
36979    # argument.
36980    path="$complete"
36981    arguments="EOL"
36982    new_path="$path"
36983
36984  windows_path="$new_path"
36985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36986    unix_path=`$CYGPATH -u "$windows_path"`
36987    new_path="$unix_path"
36988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36990    new_path="$unix_path"
36991  fi
36992
36993
36994    new_path=`$WHICH "$new_path" 2> /dev/null`
36995
36996    if test "x$new_path" = x; then
36997      # It's still not found. Now this is an unrecoverable error.
36998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36999$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37000      has_space=`$ECHO "$complete" | $GREP " "`
37001      if test "x$has_space" != x; then
37002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37004      fi
37005      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37006    fi
37007  fi
37008
37009  # Now new_path has a complete unix path to the binary
37010  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37011    # Keep paths in /bin as-is, but remove trailing .exe if any
37012    new_path="${new_path/%.exe/}"
37013    # Do not save /bin paths to all_fixpath_prefixes!
37014  else
37015    # Not in mixed or Windows style, start by that.
37016    new_path=`cmd //c echo $new_path`
37017
37018  input_path="$new_path"
37019  # Check if we need to convert this using DOS-style short mode. If the path
37020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37021  # take no chances and rewrite it.
37022  # Note: m4 eats our [], so we need to use [ and ] instead.
37023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37024  if test "x$has_forbidden_chars" != x; then
37025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37027  fi
37028
37029    # Output is in $new_path
37030
37031  windows_path="$new_path"
37032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37033    unix_path=`$CYGPATH -u "$windows_path"`
37034    new_path="$unix_path"
37035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37037    new_path="$unix_path"
37038  fi
37039
37040    # remove trailing .exe if any
37041    new_path="${new_path/%.exe/}"
37042
37043    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37044    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37045  fi
37046
37047  else
37048    # We're on a posix platform. Hooray! :)
37049    # First separate the path from the arguments. This will split at the first
37050    # space.
37051    complete="$STRIP"
37052    path="${complete%% *}"
37053    tmp="$complete EOL"
37054    arguments="${tmp#* }"
37055
37056    # Cannot rely on the command "which" here since it doesn't always work.
37057    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37058    if test -z "$is_absolute_path"; then
37059      # Path to executable is not absolute. Find it.
37060      IFS_save="$IFS"
37061      IFS=:
37062      for p in $PATH; do
37063        if test -f "$p/$path" && test -x "$p/$path"; then
37064          new_path="$p/$path"
37065          break
37066        fi
37067      done
37068      IFS="$IFS_save"
37069    else
37070      # This is an absolute path, we can use it without further modifications.
37071      new_path="$path"
37072    fi
37073
37074    if test "x$new_path" = x; then
37075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37076$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37077      has_space=`$ECHO "$complete" | $GREP " "`
37078      if test "x$has_space" != x; then
37079        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37080$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37081      fi
37082      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37083    fi
37084  fi
37085
37086  # Now join together the path and the arguments once again
37087  if test "x$arguments" != xEOL; then
37088    new_complete="$new_path ${arguments% *}"
37089  else
37090    new_complete="$new_path"
37091  fi
37092
37093  if test "x$complete" != "x$new_complete"; then
37094    STRIP="$new_complete"
37095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37096$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37097  fi
37098
37099
37100
37101  # Publish this variable in the help.
37102
37103
37104  if test "x$NM" = x; then
37105    # The variable is not set by user, try to locate tool using the code snippet
37106    if test -n "$ac_tool_prefix"; then
37107  for ac_prog in nm
37108  do
37109    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37110set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37112$as_echo_n "checking for $ac_word... " >&6; }
37113if ${ac_cv_prog_NM+:} false; then :
37114  $as_echo_n "(cached) " >&6
37115else
37116  if test -n "$NM"; then
37117  ac_cv_prog_NM="$NM" # Let the user override the test.
37118else
37119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37120for as_dir in $PATH
37121do
37122  IFS=$as_save_IFS
37123  test -z "$as_dir" && as_dir=.
37124    for ac_exec_ext in '' $ac_executable_extensions; do
37125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37126    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37128    break 2
37129  fi
37130done
37131  done
37132IFS=$as_save_IFS
37133
37134fi
37135fi
37136NM=$ac_cv_prog_NM
37137if test -n "$NM"; then
37138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37139$as_echo "$NM" >&6; }
37140else
37141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37142$as_echo "no" >&6; }
37143fi
37144
37145
37146    test -n "$NM" && break
37147  done
37148fi
37149if test -z "$NM"; then
37150  ac_ct_NM=$NM
37151  for ac_prog in nm
37152do
37153  # Extract the first word of "$ac_prog", so it can be a program name with args.
37154set dummy $ac_prog; ac_word=$2
37155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37156$as_echo_n "checking for $ac_word... " >&6; }
37157if ${ac_cv_prog_ac_ct_NM+:} false; then :
37158  $as_echo_n "(cached) " >&6
37159else
37160  if test -n "$ac_ct_NM"; then
37161  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37162else
37163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37164for as_dir in $PATH
37165do
37166  IFS=$as_save_IFS
37167  test -z "$as_dir" && as_dir=.
37168    for ac_exec_ext in '' $ac_executable_extensions; do
37169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37170    ac_cv_prog_ac_ct_NM="$ac_prog"
37171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37172    break 2
37173  fi
37174done
37175  done
37176IFS=$as_save_IFS
37177
37178fi
37179fi
37180ac_ct_NM=$ac_cv_prog_ac_ct_NM
37181if test -n "$ac_ct_NM"; then
37182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37183$as_echo "$ac_ct_NM" >&6; }
37184else
37185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37186$as_echo "no" >&6; }
37187fi
37188
37189
37190  test -n "$ac_ct_NM" && break
37191done
37192
37193  if test "x$ac_ct_NM" = x; then
37194    NM=""
37195  else
37196    case $cross_compiling:$ac_tool_warned in
37197yes:)
37198{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37199$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37200ac_tool_warned=yes ;;
37201esac
37202    NM=$ac_ct_NM
37203  fi
37204fi
37205
37206  else
37207    # The variable is set, but is it from the command line or the environment?
37208
37209    # Try to remove the string !NM! from our list.
37210    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37211    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37212      # If it failed, the variable was not from the command line. Ignore it,
37213      # but warn the user (except for BASH, which is always set by the calling BASH).
37214      if test "xNM" != xBASH; then
37215        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37216$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37217      fi
37218      # Try to locate tool using the code snippet
37219      if test -n "$ac_tool_prefix"; then
37220  for ac_prog in nm
37221  do
37222    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37223set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37225$as_echo_n "checking for $ac_word... " >&6; }
37226if ${ac_cv_prog_NM+:} false; then :
37227  $as_echo_n "(cached) " >&6
37228else
37229  if test -n "$NM"; then
37230  ac_cv_prog_NM="$NM" # Let the user override the test.
37231else
37232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37233for as_dir in $PATH
37234do
37235  IFS=$as_save_IFS
37236  test -z "$as_dir" && as_dir=.
37237    for ac_exec_ext in '' $ac_executable_extensions; do
37238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37239    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37241    break 2
37242  fi
37243done
37244  done
37245IFS=$as_save_IFS
37246
37247fi
37248fi
37249NM=$ac_cv_prog_NM
37250if test -n "$NM"; then
37251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37252$as_echo "$NM" >&6; }
37253else
37254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37255$as_echo "no" >&6; }
37256fi
37257
37258
37259    test -n "$NM" && break
37260  done
37261fi
37262if test -z "$NM"; then
37263  ac_ct_NM=$NM
37264  for ac_prog in nm
37265do
37266  # Extract the first word of "$ac_prog", so it can be a program name with args.
37267set dummy $ac_prog; ac_word=$2
37268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37269$as_echo_n "checking for $ac_word... " >&6; }
37270if ${ac_cv_prog_ac_ct_NM+:} false; then :
37271  $as_echo_n "(cached) " >&6
37272else
37273  if test -n "$ac_ct_NM"; then
37274  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37275else
37276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37277for as_dir in $PATH
37278do
37279  IFS=$as_save_IFS
37280  test -z "$as_dir" && as_dir=.
37281    for ac_exec_ext in '' $ac_executable_extensions; do
37282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37283    ac_cv_prog_ac_ct_NM="$ac_prog"
37284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37285    break 2
37286  fi
37287done
37288  done
37289IFS=$as_save_IFS
37290
37291fi
37292fi
37293ac_ct_NM=$ac_cv_prog_ac_ct_NM
37294if test -n "$ac_ct_NM"; then
37295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37296$as_echo "$ac_ct_NM" >&6; }
37297else
37298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37299$as_echo "no" >&6; }
37300fi
37301
37302
37303  test -n "$ac_ct_NM" && break
37304done
37305
37306  if test "x$ac_ct_NM" = x; then
37307    NM=""
37308  else
37309    case $cross_compiling:$ac_tool_warned in
37310yes:)
37311{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37312$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37313ac_tool_warned=yes ;;
37314esac
37315    NM=$ac_ct_NM
37316  fi
37317fi
37318
37319    else
37320      # If it succeeded, then it was overridden by the user. We will use it
37321      # for the tool.
37322
37323      # First remove it from the list of overridden variables, so we can test
37324      # for unknown variables in the end.
37325      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37326
37327      # Check if the provided tool contains a complete path.
37328      tool_specified="$NM"
37329      tool_basename="${tool_specified##*/}"
37330      if test "x$tool_basename" = "x$tool_specified"; then
37331        # A command without a complete path is provided, search $PATH.
37332        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37333$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37334        # Extract the first word of "$tool_basename", so it can be a program name with args.
37335set dummy $tool_basename; ac_word=$2
37336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37337$as_echo_n "checking for $ac_word... " >&6; }
37338if ${ac_cv_path_NM+:} false; then :
37339  $as_echo_n "(cached) " >&6
37340else
37341  case $NM in
37342  [\\/]* | ?:[\\/]*)
37343  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37344  ;;
37345  *)
37346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37347for as_dir in $PATH
37348do
37349  IFS=$as_save_IFS
37350  test -z "$as_dir" && as_dir=.
37351    for ac_exec_ext in '' $ac_executable_extensions; do
37352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37353    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37355    break 2
37356  fi
37357done
37358  done
37359IFS=$as_save_IFS
37360
37361  ;;
37362esac
37363fi
37364NM=$ac_cv_path_NM
37365if test -n "$NM"; then
37366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37367$as_echo "$NM" >&6; }
37368else
37369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37370$as_echo "no" >&6; }
37371fi
37372
37373
37374        if test "x$NM" = x; then
37375          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37376        fi
37377      else
37378        # Otherwise we believe it is a complete path. Use it as it is.
37379        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37380$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37382$as_echo_n "checking for NM... " >&6; }
37383        if test ! -x "$tool_specified"; then
37384          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37385$as_echo "not found" >&6; }
37386          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37387        fi
37388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37389$as_echo "$tool_specified" >&6; }
37390      fi
37391    fi
37392  fi
37393
37394
37395
37396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37397
37398  # First separate the path from the arguments. This will split at the first
37399  # space.
37400  complete="$NM"
37401  path="${complete%% *}"
37402  tmp="$complete EOL"
37403  arguments="${tmp#* }"
37404
37405  # Input might be given as Windows format, start by converting to
37406  # unix format.
37407  new_path=`$CYGPATH -u "$path"`
37408
37409  # Now try to locate executable using which
37410  new_path=`$WHICH "$new_path" 2> /dev/null`
37411  # bat and cmd files are not always considered executable in cygwin causing which
37412  # to not find them
37413  if test "x$new_path" = x \
37414      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37415      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37416    new_path=`$CYGPATH -u "$path"`
37417  fi
37418  if test "x$new_path" = x; then
37419    # Oops. Which didn't find the executable.
37420    # The splitting of arguments from the executable at a space might have been incorrect,
37421    # since paths with space are more likely in Windows. Give it another try with the whole
37422    # argument.
37423    path="$complete"
37424    arguments="EOL"
37425    new_path=`$CYGPATH -u "$path"`
37426    new_path=`$WHICH "$new_path" 2> /dev/null`
37427    # bat and cmd files are not always considered executable in cygwin causing which
37428    # to not find them
37429    if test "x$new_path" = x \
37430        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37431        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37432      new_path=`$CYGPATH -u "$path"`
37433    fi
37434    if test "x$new_path" = x; then
37435      # It's still not found. Now this is an unrecoverable error.
37436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37437$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37438      has_space=`$ECHO "$complete" | $GREP " "`
37439      if test "x$has_space" != x; then
37440        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37441$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37442      fi
37443      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37444    fi
37445  fi
37446
37447  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37448  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37449  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37450  # "foo.exe" is OK but "foo" is an error.
37451  #
37452  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37453  # It is also a way to make sure we got the proper file name for the real test later on.
37454  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37455  if test "x$test_shortpath" = x; then
37456    # Short path failed, file does not exist as specified.
37457    # Try adding .exe or .cmd
37458    if test -f "${new_path}.exe"; then
37459      input_to_shortpath="${new_path}.exe"
37460    elif test -f "${new_path}.cmd"; then
37461      input_to_shortpath="${new_path}.cmd"
37462    else
37463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37464$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37465      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37466$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37467      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37468    fi
37469  else
37470    input_to_shortpath="$new_path"
37471  fi
37472
37473  # Call helper function which possibly converts this using DOS-style short mode.
37474  # If so, the updated path is stored in $new_path.
37475  new_path="$input_to_shortpath"
37476
37477  input_path="$input_to_shortpath"
37478  # Check if we need to convert this using DOS-style short mode. If the path
37479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37480  # take no chances and rewrite it.
37481  # Note: m4 eats our [], so we need to use [ and ] instead.
37482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37483  if test "x$has_forbidden_chars" != x; then
37484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37488      # Going to short mode and back again did indeed matter. Since short mode is
37489      # case insensitive, let's make it lowercase to improve readability.
37490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37491      # Now convert it back to Unix-stile (cygpath)
37492      input_path=`$CYGPATH -u "$shortmode_path"`
37493      new_path="$input_path"
37494    fi
37495  fi
37496
37497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37498  if test "x$test_cygdrive_prefix" = x; then
37499    # As a simple fix, exclude /usr/bin since it's not a real path.
37500    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37502      # a path prefixed by /cygdrive for fixpath to work.
37503      new_path="$CYGWIN_ROOT_PATH$input_path"
37504    fi
37505  fi
37506
37507  # remove trailing .exe if any
37508  new_path="${new_path/%.exe/}"
37509
37510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37511
37512  # First separate the path from the arguments. This will split at the first
37513  # space.
37514  complete="$NM"
37515  path="${complete%% *}"
37516  tmp="$complete EOL"
37517  arguments="${tmp#* }"
37518
37519  # Input might be given as Windows format, start by converting to
37520  # unix format.
37521  new_path="$path"
37522
37523  windows_path="$new_path"
37524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37525    unix_path=`$CYGPATH -u "$windows_path"`
37526    new_path="$unix_path"
37527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37529    new_path="$unix_path"
37530  fi
37531
37532
37533  # Now try to locate executable using which
37534  new_path=`$WHICH "$new_path" 2> /dev/null`
37535
37536  if test "x$new_path" = x; then
37537    # Oops. Which didn't find the executable.
37538    # The splitting of arguments from the executable at a space might have been incorrect,
37539    # since paths with space are more likely in Windows. Give it another try with the whole
37540    # argument.
37541    path="$complete"
37542    arguments="EOL"
37543    new_path="$path"
37544
37545  windows_path="$new_path"
37546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37547    unix_path=`$CYGPATH -u "$windows_path"`
37548    new_path="$unix_path"
37549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37551    new_path="$unix_path"
37552  fi
37553
37554
37555    new_path=`$WHICH "$new_path" 2> /dev/null`
37556
37557    if test "x$new_path" = x; then
37558      # It's still not found. Now this is an unrecoverable error.
37559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37560$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37561      has_space=`$ECHO "$complete" | $GREP " "`
37562      if test "x$has_space" != x; then
37563        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37564$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37565      fi
37566      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37567    fi
37568  fi
37569
37570  # Now new_path has a complete unix path to the binary
37571  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37572    # Keep paths in /bin as-is, but remove trailing .exe if any
37573    new_path="${new_path/%.exe/}"
37574    # Do not save /bin paths to all_fixpath_prefixes!
37575  else
37576    # Not in mixed or Windows style, start by that.
37577    new_path=`cmd //c echo $new_path`
37578
37579  input_path="$new_path"
37580  # Check if we need to convert this using DOS-style short mode. If the path
37581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37582  # take no chances and rewrite it.
37583  # Note: m4 eats our [], so we need to use [ and ] instead.
37584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37585  if test "x$has_forbidden_chars" != x; then
37586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37587    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37588  fi
37589
37590    # Output is in $new_path
37591
37592  windows_path="$new_path"
37593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37594    unix_path=`$CYGPATH -u "$windows_path"`
37595    new_path="$unix_path"
37596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37598    new_path="$unix_path"
37599  fi
37600
37601    # remove trailing .exe if any
37602    new_path="${new_path/%.exe/}"
37603
37604    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37605    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37606  fi
37607
37608  else
37609    # We're on a posix platform. Hooray! :)
37610    # First separate the path from the arguments. This will split at the first
37611    # space.
37612    complete="$NM"
37613    path="${complete%% *}"
37614    tmp="$complete EOL"
37615    arguments="${tmp#* }"
37616
37617    # Cannot rely on the command "which" here since it doesn't always work.
37618    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37619    if test -z "$is_absolute_path"; then
37620      # Path to executable is not absolute. Find it.
37621      IFS_save="$IFS"
37622      IFS=:
37623      for p in $PATH; do
37624        if test -f "$p/$path" && test -x "$p/$path"; then
37625          new_path="$p/$path"
37626          break
37627        fi
37628      done
37629      IFS="$IFS_save"
37630    else
37631      # This is an absolute path, we can use it without further modifications.
37632      new_path="$path"
37633    fi
37634
37635    if test "x$new_path" = x; then
37636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37637$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37638      has_space=`$ECHO "$complete" | $GREP " "`
37639      if test "x$has_space" != x; then
37640        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37641$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37642      fi
37643      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37644    fi
37645  fi
37646
37647  # Now join together the path and the arguments once again
37648  if test "x$arguments" != xEOL; then
37649    new_complete="$new_path ${arguments% *}"
37650  else
37651    new_complete="$new_path"
37652  fi
37653
37654  if test "x$complete" != "x$new_complete"; then
37655    NM="$new_complete"
37656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37657$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37658  fi
37659
37660    GNM="$NM"
37661
37662  fi
37663
37664  # objcopy is used for moving debug symbols to separate files when
37665  # full debug symbols are enabled.
37666  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37667
37668
37669  # Publish this variable in the help.
37670
37671
37672  if test "x$OBJCOPY" = x; then
37673    # The variable is not set by user, try to locate tool using the code snippet
37674    if test -n "$ac_tool_prefix"; then
37675  for ac_prog in gobjcopy objcopy
37676  do
37677    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37678set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37680$as_echo_n "checking for $ac_word... " >&6; }
37681if ${ac_cv_prog_OBJCOPY+:} false; then :
37682  $as_echo_n "(cached) " >&6
37683else
37684  if test -n "$OBJCOPY"; then
37685  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37686else
37687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37688for as_dir in $PATH
37689do
37690  IFS=$as_save_IFS
37691  test -z "$as_dir" && as_dir=.
37692    for ac_exec_ext in '' $ac_executable_extensions; do
37693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37694    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37696    break 2
37697  fi
37698done
37699  done
37700IFS=$as_save_IFS
37701
37702fi
37703fi
37704OBJCOPY=$ac_cv_prog_OBJCOPY
37705if test -n "$OBJCOPY"; then
37706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37707$as_echo "$OBJCOPY" >&6; }
37708else
37709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37710$as_echo "no" >&6; }
37711fi
37712
37713
37714    test -n "$OBJCOPY" && break
37715  done
37716fi
37717if test -z "$OBJCOPY"; then
37718  ac_ct_OBJCOPY=$OBJCOPY
37719  for ac_prog in gobjcopy objcopy
37720do
37721  # Extract the first word of "$ac_prog", so it can be a program name with args.
37722set dummy $ac_prog; ac_word=$2
37723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37724$as_echo_n "checking for $ac_word... " >&6; }
37725if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37726  $as_echo_n "(cached) " >&6
37727else
37728  if test -n "$ac_ct_OBJCOPY"; then
37729  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37730else
37731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37732for as_dir in $PATH
37733do
37734  IFS=$as_save_IFS
37735  test -z "$as_dir" && as_dir=.
37736    for ac_exec_ext in '' $ac_executable_extensions; do
37737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37738    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37740    break 2
37741  fi
37742done
37743  done
37744IFS=$as_save_IFS
37745
37746fi
37747fi
37748ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37749if test -n "$ac_ct_OBJCOPY"; then
37750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37751$as_echo "$ac_ct_OBJCOPY" >&6; }
37752else
37753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37754$as_echo "no" >&6; }
37755fi
37756
37757
37758  test -n "$ac_ct_OBJCOPY" && break
37759done
37760
37761  if test "x$ac_ct_OBJCOPY" = x; then
37762    OBJCOPY=""
37763  else
37764    case $cross_compiling:$ac_tool_warned in
37765yes:)
37766{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37767$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37768ac_tool_warned=yes ;;
37769esac
37770    OBJCOPY=$ac_ct_OBJCOPY
37771  fi
37772fi
37773
37774  else
37775    # The variable is set, but is it from the command line or the environment?
37776
37777    # Try to remove the string !OBJCOPY! from our list.
37778    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37779    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37780      # If it failed, the variable was not from the command line. Ignore it,
37781      # but warn the user (except for BASH, which is always set by the calling BASH).
37782      if test "xOBJCOPY" != xBASH; then
37783        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37784$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37785      fi
37786      # Try to locate tool using the code snippet
37787      if test -n "$ac_tool_prefix"; then
37788  for ac_prog in gobjcopy objcopy
37789  do
37790    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37791set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37793$as_echo_n "checking for $ac_word... " >&6; }
37794if ${ac_cv_prog_OBJCOPY+:} false; then :
37795  $as_echo_n "(cached) " >&6
37796else
37797  if test -n "$OBJCOPY"; then
37798  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37799else
37800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37801for as_dir in $PATH
37802do
37803  IFS=$as_save_IFS
37804  test -z "$as_dir" && as_dir=.
37805    for ac_exec_ext in '' $ac_executable_extensions; do
37806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37807    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37809    break 2
37810  fi
37811done
37812  done
37813IFS=$as_save_IFS
37814
37815fi
37816fi
37817OBJCOPY=$ac_cv_prog_OBJCOPY
37818if test -n "$OBJCOPY"; then
37819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37820$as_echo "$OBJCOPY" >&6; }
37821else
37822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37823$as_echo "no" >&6; }
37824fi
37825
37826
37827    test -n "$OBJCOPY" && break
37828  done
37829fi
37830if test -z "$OBJCOPY"; then
37831  ac_ct_OBJCOPY=$OBJCOPY
37832  for ac_prog in gobjcopy objcopy
37833do
37834  # Extract the first word of "$ac_prog", so it can be a program name with args.
37835set dummy $ac_prog; ac_word=$2
37836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37837$as_echo_n "checking for $ac_word... " >&6; }
37838if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37839  $as_echo_n "(cached) " >&6
37840else
37841  if test -n "$ac_ct_OBJCOPY"; then
37842  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37843else
37844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37845for as_dir in $PATH
37846do
37847  IFS=$as_save_IFS
37848  test -z "$as_dir" && as_dir=.
37849    for ac_exec_ext in '' $ac_executable_extensions; do
37850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37851    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37853    break 2
37854  fi
37855done
37856  done
37857IFS=$as_save_IFS
37858
37859fi
37860fi
37861ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37862if test -n "$ac_ct_OBJCOPY"; then
37863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37864$as_echo "$ac_ct_OBJCOPY" >&6; }
37865else
37866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37867$as_echo "no" >&6; }
37868fi
37869
37870
37871  test -n "$ac_ct_OBJCOPY" && break
37872done
37873
37874  if test "x$ac_ct_OBJCOPY" = x; then
37875    OBJCOPY=""
37876  else
37877    case $cross_compiling:$ac_tool_warned in
37878yes:)
37879{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37880$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37881ac_tool_warned=yes ;;
37882esac
37883    OBJCOPY=$ac_ct_OBJCOPY
37884  fi
37885fi
37886
37887    else
37888      # If it succeeded, then it was overridden by the user. We will use it
37889      # for the tool.
37890
37891      # First remove it from the list of overridden variables, so we can test
37892      # for unknown variables in the end.
37893      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37894
37895      # Check if the provided tool contains a complete path.
37896      tool_specified="$OBJCOPY"
37897      tool_basename="${tool_specified##*/}"
37898      if test "x$tool_basename" = "x$tool_specified"; then
37899        # A command without a complete path is provided, search $PATH.
37900        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37901$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37902        # Extract the first word of "$tool_basename", so it can be a program name with args.
37903set dummy $tool_basename; ac_word=$2
37904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37905$as_echo_n "checking for $ac_word... " >&6; }
37906if ${ac_cv_path_OBJCOPY+:} false; then :
37907  $as_echo_n "(cached) " >&6
37908else
37909  case $OBJCOPY in
37910  [\\/]* | ?:[\\/]*)
37911  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37912  ;;
37913  *)
37914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37915for as_dir in $PATH
37916do
37917  IFS=$as_save_IFS
37918  test -z "$as_dir" && as_dir=.
37919    for ac_exec_ext in '' $ac_executable_extensions; do
37920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37921    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37923    break 2
37924  fi
37925done
37926  done
37927IFS=$as_save_IFS
37928
37929  ;;
37930esac
37931fi
37932OBJCOPY=$ac_cv_path_OBJCOPY
37933if test -n "$OBJCOPY"; then
37934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37935$as_echo "$OBJCOPY" >&6; }
37936else
37937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37938$as_echo "no" >&6; }
37939fi
37940
37941
37942        if test "x$OBJCOPY" = x; then
37943          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37944        fi
37945      else
37946        # Otherwise we believe it is a complete path. Use it as it is.
37947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37948$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37949        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37950$as_echo_n "checking for OBJCOPY... " >&6; }
37951        if test ! -x "$tool_specified"; then
37952          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37953$as_echo "not found" >&6; }
37954          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37955        fi
37956        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37957$as_echo "$tool_specified" >&6; }
37958      fi
37959    fi
37960  fi
37961
37962
37963    # Only call fixup if objcopy was found.
37964    if test -n "$OBJCOPY"; then
37965
37966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37967
37968  # First separate the path from the arguments. This will split at the first
37969  # space.
37970  complete="$OBJCOPY"
37971  path="${complete%% *}"
37972  tmp="$complete EOL"
37973  arguments="${tmp#* }"
37974
37975  # Input might be given as Windows format, start by converting to
37976  # unix format.
37977  new_path=`$CYGPATH -u "$path"`
37978
37979  # Now try to locate executable using which
37980  new_path=`$WHICH "$new_path" 2> /dev/null`
37981  # bat and cmd files are not always considered executable in cygwin causing which
37982  # to not find them
37983  if test "x$new_path" = x \
37984      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37985      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37986    new_path=`$CYGPATH -u "$path"`
37987  fi
37988  if test "x$new_path" = x; then
37989    # Oops. Which didn't find the executable.
37990    # The splitting of arguments from the executable at a space might have been incorrect,
37991    # since paths with space are more likely in Windows. Give it another try with the whole
37992    # argument.
37993    path="$complete"
37994    arguments="EOL"
37995    new_path=`$CYGPATH -u "$path"`
37996    new_path=`$WHICH "$new_path" 2> /dev/null`
37997    # bat and cmd files are not always considered executable in cygwin causing which
37998    # to not find them
37999    if test "x$new_path" = x \
38000        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38001        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38002      new_path=`$CYGPATH -u "$path"`
38003    fi
38004    if test "x$new_path" = x; then
38005      # It's still not found. Now this is an unrecoverable error.
38006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38007$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38008      has_space=`$ECHO "$complete" | $GREP " "`
38009      if test "x$has_space" != x; then
38010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38012      fi
38013      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38014    fi
38015  fi
38016
38017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38020  # "foo.exe" is OK but "foo" is an error.
38021  #
38022  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38023  # It is also a way to make sure we got the proper file name for the real test later on.
38024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38025  if test "x$test_shortpath" = x; then
38026    # Short path failed, file does not exist as specified.
38027    # Try adding .exe or .cmd
38028    if test -f "${new_path}.exe"; then
38029      input_to_shortpath="${new_path}.exe"
38030    elif test -f "${new_path}.cmd"; then
38031      input_to_shortpath="${new_path}.cmd"
38032    else
38033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38034$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38035      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38036$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38037      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38038    fi
38039  else
38040    input_to_shortpath="$new_path"
38041  fi
38042
38043  # Call helper function which possibly converts this using DOS-style short mode.
38044  # If so, the updated path is stored in $new_path.
38045  new_path="$input_to_shortpath"
38046
38047  input_path="$input_to_shortpath"
38048  # Check if we need to convert this using DOS-style short mode. If the path
38049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38050  # take no chances and rewrite it.
38051  # Note: m4 eats our [], so we need to use [ and ] instead.
38052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38053  if test "x$has_forbidden_chars" != x; then
38054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38058      # Going to short mode and back again did indeed matter. Since short mode is
38059      # case insensitive, let's make it lowercase to improve readability.
38060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38061      # Now convert it back to Unix-stile (cygpath)
38062      input_path=`$CYGPATH -u "$shortmode_path"`
38063      new_path="$input_path"
38064    fi
38065  fi
38066
38067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38068  if test "x$test_cygdrive_prefix" = x; then
38069    # As a simple fix, exclude /usr/bin since it's not a real path.
38070    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38072      # a path prefixed by /cygdrive for fixpath to work.
38073      new_path="$CYGWIN_ROOT_PATH$input_path"
38074    fi
38075  fi
38076
38077  # remove trailing .exe if any
38078  new_path="${new_path/%.exe/}"
38079
38080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38081
38082  # First separate the path from the arguments. This will split at the first
38083  # space.
38084  complete="$OBJCOPY"
38085  path="${complete%% *}"
38086  tmp="$complete EOL"
38087  arguments="${tmp#* }"
38088
38089  # Input might be given as Windows format, start by converting to
38090  # unix format.
38091  new_path="$path"
38092
38093  windows_path="$new_path"
38094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38095    unix_path=`$CYGPATH -u "$windows_path"`
38096    new_path="$unix_path"
38097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38099    new_path="$unix_path"
38100  fi
38101
38102
38103  # Now try to locate executable using which
38104  new_path=`$WHICH "$new_path" 2> /dev/null`
38105
38106  if test "x$new_path" = x; then
38107    # Oops. Which didn't find the executable.
38108    # The splitting of arguments from the executable at a space might have been incorrect,
38109    # since paths with space are more likely in Windows. Give it another try with the whole
38110    # argument.
38111    path="$complete"
38112    arguments="EOL"
38113    new_path="$path"
38114
38115  windows_path="$new_path"
38116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38117    unix_path=`$CYGPATH -u "$windows_path"`
38118    new_path="$unix_path"
38119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38121    new_path="$unix_path"
38122  fi
38123
38124
38125    new_path=`$WHICH "$new_path" 2> /dev/null`
38126
38127    if test "x$new_path" = x; then
38128      # It's still not found. Now this is an unrecoverable error.
38129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38130$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38131      has_space=`$ECHO "$complete" | $GREP " "`
38132      if test "x$has_space" != x; then
38133        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38134$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38135      fi
38136      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38137    fi
38138  fi
38139
38140  # Now new_path has a complete unix path to the binary
38141  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38142    # Keep paths in /bin as-is, but remove trailing .exe if any
38143    new_path="${new_path/%.exe/}"
38144    # Do not save /bin paths to all_fixpath_prefixes!
38145  else
38146    # Not in mixed or Windows style, start by that.
38147    new_path=`cmd //c echo $new_path`
38148
38149  input_path="$new_path"
38150  # Check if we need to convert this using DOS-style short mode. If the path
38151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38152  # take no chances and rewrite it.
38153  # Note: m4 eats our [], so we need to use [ and ] instead.
38154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38155  if test "x$has_forbidden_chars" != x; then
38156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38158  fi
38159
38160    # Output is in $new_path
38161
38162  windows_path="$new_path"
38163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38164    unix_path=`$CYGPATH -u "$windows_path"`
38165    new_path="$unix_path"
38166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38168    new_path="$unix_path"
38169  fi
38170
38171    # remove trailing .exe if any
38172    new_path="${new_path/%.exe/}"
38173
38174    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38175    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38176  fi
38177
38178  else
38179    # We're on a posix platform. Hooray! :)
38180    # First separate the path from the arguments. This will split at the first
38181    # space.
38182    complete="$OBJCOPY"
38183    path="${complete%% *}"
38184    tmp="$complete EOL"
38185    arguments="${tmp#* }"
38186
38187    # Cannot rely on the command "which" here since it doesn't always work.
38188    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38189    if test -z "$is_absolute_path"; then
38190      # Path to executable is not absolute. Find it.
38191      IFS_save="$IFS"
38192      IFS=:
38193      for p in $PATH; do
38194        if test -f "$p/$path" && test -x "$p/$path"; then
38195          new_path="$p/$path"
38196          break
38197        fi
38198      done
38199      IFS="$IFS_save"
38200    else
38201      # This is an absolute path, we can use it without further modifications.
38202      new_path="$path"
38203    fi
38204
38205    if test "x$new_path" = x; then
38206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38207$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38208      has_space=`$ECHO "$complete" | $GREP " "`
38209      if test "x$has_space" != x; then
38210        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38211$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38212      fi
38213      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38214    fi
38215  fi
38216
38217  # Now join together the path and the arguments once again
38218  if test "x$arguments" != xEOL; then
38219    new_complete="$new_path ${arguments% *}"
38220  else
38221    new_complete="$new_path"
38222  fi
38223
38224  if test "x$complete" != "x$new_complete"; then
38225    OBJCOPY="$new_complete"
38226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38227$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38228  fi
38229
38230    fi
38231  fi
38232
38233
38234
38235  # Publish this variable in the help.
38236
38237
38238  if test "x$OBJDUMP" = x; then
38239    # The variable is not set by user, try to locate tool using the code snippet
38240    if test -n "$ac_tool_prefix"; then
38241  for ac_prog in gobjdump objdump
38242  do
38243    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38244set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38246$as_echo_n "checking for $ac_word... " >&6; }
38247if ${ac_cv_prog_OBJDUMP+:} false; then :
38248  $as_echo_n "(cached) " >&6
38249else
38250  if test -n "$OBJDUMP"; then
38251  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38252else
38253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38254for as_dir in $PATH
38255do
38256  IFS=$as_save_IFS
38257  test -z "$as_dir" && as_dir=.
38258    for ac_exec_ext in '' $ac_executable_extensions; do
38259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38260    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38262    break 2
38263  fi
38264done
38265  done
38266IFS=$as_save_IFS
38267
38268fi
38269fi
38270OBJDUMP=$ac_cv_prog_OBJDUMP
38271if test -n "$OBJDUMP"; then
38272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38273$as_echo "$OBJDUMP" >&6; }
38274else
38275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38276$as_echo "no" >&6; }
38277fi
38278
38279
38280    test -n "$OBJDUMP" && break
38281  done
38282fi
38283if test -z "$OBJDUMP"; then
38284  ac_ct_OBJDUMP=$OBJDUMP
38285  for ac_prog in gobjdump objdump
38286do
38287  # Extract the first word of "$ac_prog", so it can be a program name with args.
38288set dummy $ac_prog; ac_word=$2
38289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38290$as_echo_n "checking for $ac_word... " >&6; }
38291if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38292  $as_echo_n "(cached) " >&6
38293else
38294  if test -n "$ac_ct_OBJDUMP"; then
38295  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38296else
38297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38298for as_dir in $PATH
38299do
38300  IFS=$as_save_IFS
38301  test -z "$as_dir" && as_dir=.
38302    for ac_exec_ext in '' $ac_executable_extensions; do
38303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38304    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38306    break 2
38307  fi
38308done
38309  done
38310IFS=$as_save_IFS
38311
38312fi
38313fi
38314ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38315if test -n "$ac_ct_OBJDUMP"; then
38316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38317$as_echo "$ac_ct_OBJDUMP" >&6; }
38318else
38319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38320$as_echo "no" >&6; }
38321fi
38322
38323
38324  test -n "$ac_ct_OBJDUMP" && break
38325done
38326
38327  if test "x$ac_ct_OBJDUMP" = x; then
38328    OBJDUMP=""
38329  else
38330    case $cross_compiling:$ac_tool_warned in
38331yes:)
38332{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38333$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38334ac_tool_warned=yes ;;
38335esac
38336    OBJDUMP=$ac_ct_OBJDUMP
38337  fi
38338fi
38339
38340  else
38341    # The variable is set, but is it from the command line or the environment?
38342
38343    # Try to remove the string !OBJDUMP! from our list.
38344    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38345    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38346      # If it failed, the variable was not from the command line. Ignore it,
38347      # but warn the user (except for BASH, which is always set by the calling BASH).
38348      if test "xOBJDUMP" != xBASH; then
38349        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38350$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38351      fi
38352      # Try to locate tool using the code snippet
38353      if test -n "$ac_tool_prefix"; then
38354  for ac_prog in gobjdump objdump
38355  do
38356    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38357set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38359$as_echo_n "checking for $ac_word... " >&6; }
38360if ${ac_cv_prog_OBJDUMP+:} false; then :
38361  $as_echo_n "(cached) " >&6
38362else
38363  if test -n "$OBJDUMP"; then
38364  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38365else
38366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38367for as_dir in $PATH
38368do
38369  IFS=$as_save_IFS
38370  test -z "$as_dir" && as_dir=.
38371    for ac_exec_ext in '' $ac_executable_extensions; do
38372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38373    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38375    break 2
38376  fi
38377done
38378  done
38379IFS=$as_save_IFS
38380
38381fi
38382fi
38383OBJDUMP=$ac_cv_prog_OBJDUMP
38384if test -n "$OBJDUMP"; then
38385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38386$as_echo "$OBJDUMP" >&6; }
38387else
38388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38389$as_echo "no" >&6; }
38390fi
38391
38392
38393    test -n "$OBJDUMP" && break
38394  done
38395fi
38396if test -z "$OBJDUMP"; then
38397  ac_ct_OBJDUMP=$OBJDUMP
38398  for ac_prog in gobjdump objdump
38399do
38400  # Extract the first word of "$ac_prog", so it can be a program name with args.
38401set dummy $ac_prog; ac_word=$2
38402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38403$as_echo_n "checking for $ac_word... " >&6; }
38404if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38405  $as_echo_n "(cached) " >&6
38406else
38407  if test -n "$ac_ct_OBJDUMP"; then
38408  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38409else
38410as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38411for as_dir in $PATH
38412do
38413  IFS=$as_save_IFS
38414  test -z "$as_dir" && as_dir=.
38415    for ac_exec_ext in '' $ac_executable_extensions; do
38416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38417    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38419    break 2
38420  fi
38421done
38422  done
38423IFS=$as_save_IFS
38424
38425fi
38426fi
38427ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38428if test -n "$ac_ct_OBJDUMP"; then
38429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38430$as_echo "$ac_ct_OBJDUMP" >&6; }
38431else
38432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38433$as_echo "no" >&6; }
38434fi
38435
38436
38437  test -n "$ac_ct_OBJDUMP" && break
38438done
38439
38440  if test "x$ac_ct_OBJDUMP" = x; then
38441    OBJDUMP=""
38442  else
38443    case $cross_compiling:$ac_tool_warned in
38444yes:)
38445{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38446$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38447ac_tool_warned=yes ;;
38448esac
38449    OBJDUMP=$ac_ct_OBJDUMP
38450  fi
38451fi
38452
38453    else
38454      # If it succeeded, then it was overridden by the user. We will use it
38455      # for the tool.
38456
38457      # First remove it from the list of overridden variables, so we can test
38458      # for unknown variables in the end.
38459      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38460
38461      # Check if the provided tool contains a complete path.
38462      tool_specified="$OBJDUMP"
38463      tool_basename="${tool_specified##*/}"
38464      if test "x$tool_basename" = "x$tool_specified"; then
38465        # A command without a complete path is provided, search $PATH.
38466        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38467$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38468        # Extract the first word of "$tool_basename", so it can be a program name with args.
38469set dummy $tool_basename; ac_word=$2
38470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38471$as_echo_n "checking for $ac_word... " >&6; }
38472if ${ac_cv_path_OBJDUMP+:} false; then :
38473  $as_echo_n "(cached) " >&6
38474else
38475  case $OBJDUMP in
38476  [\\/]* | ?:[\\/]*)
38477  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38478  ;;
38479  *)
38480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38481for as_dir in $PATH
38482do
38483  IFS=$as_save_IFS
38484  test -z "$as_dir" && as_dir=.
38485    for ac_exec_ext in '' $ac_executable_extensions; do
38486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38487    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38489    break 2
38490  fi
38491done
38492  done
38493IFS=$as_save_IFS
38494
38495  ;;
38496esac
38497fi
38498OBJDUMP=$ac_cv_path_OBJDUMP
38499if test -n "$OBJDUMP"; then
38500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38501$as_echo "$OBJDUMP" >&6; }
38502else
38503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38504$as_echo "no" >&6; }
38505fi
38506
38507
38508        if test "x$OBJDUMP" = x; then
38509          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38510        fi
38511      else
38512        # Otherwise we believe it is a complete path. Use it as it is.
38513        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38514$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38516$as_echo_n "checking for OBJDUMP... " >&6; }
38517        if test ! -x "$tool_specified"; then
38518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38519$as_echo "not found" >&6; }
38520          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38521        fi
38522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38523$as_echo "$tool_specified" >&6; }
38524      fi
38525    fi
38526  fi
38527
38528
38529  if test "x$OBJDUMP" != x; then
38530    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38531    # bails if argument is missing.
38532
38533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38534
38535  # First separate the path from the arguments. This will split at the first
38536  # space.
38537  complete="$OBJDUMP"
38538  path="${complete%% *}"
38539  tmp="$complete EOL"
38540  arguments="${tmp#* }"
38541
38542  # Input might be given as Windows format, start by converting to
38543  # unix format.
38544  new_path=`$CYGPATH -u "$path"`
38545
38546  # Now try to locate executable using which
38547  new_path=`$WHICH "$new_path" 2> /dev/null`
38548  # bat and cmd files are not always considered executable in cygwin causing which
38549  # to not find them
38550  if test "x$new_path" = x \
38551      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38552      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38553    new_path=`$CYGPATH -u "$path"`
38554  fi
38555  if test "x$new_path" = x; then
38556    # Oops. Which didn't find the executable.
38557    # The splitting of arguments from the executable at a space might have been incorrect,
38558    # since paths with space are more likely in Windows. Give it another try with the whole
38559    # argument.
38560    path="$complete"
38561    arguments="EOL"
38562    new_path=`$CYGPATH -u "$path"`
38563    new_path=`$WHICH "$new_path" 2> /dev/null`
38564    # bat and cmd files are not always considered executable in cygwin causing which
38565    # to not find them
38566    if test "x$new_path" = x \
38567        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38568        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38569      new_path=`$CYGPATH -u "$path"`
38570    fi
38571    if test "x$new_path" = x; then
38572      # It's still not found. Now this is an unrecoverable error.
38573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38574$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38575      has_space=`$ECHO "$complete" | $GREP " "`
38576      if test "x$has_space" != x; then
38577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38579      fi
38580      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38581    fi
38582  fi
38583
38584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38587  # "foo.exe" is OK but "foo" is an error.
38588  #
38589  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38590  # It is also a way to make sure we got the proper file name for the real test later on.
38591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38592  if test "x$test_shortpath" = x; then
38593    # Short path failed, file does not exist as specified.
38594    # Try adding .exe or .cmd
38595    if test -f "${new_path}.exe"; then
38596      input_to_shortpath="${new_path}.exe"
38597    elif test -f "${new_path}.cmd"; then
38598      input_to_shortpath="${new_path}.cmd"
38599    else
38600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38601$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38602      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38603$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38604      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38605    fi
38606  else
38607    input_to_shortpath="$new_path"
38608  fi
38609
38610  # Call helper function which possibly converts this using DOS-style short mode.
38611  # If so, the updated path is stored in $new_path.
38612  new_path="$input_to_shortpath"
38613
38614  input_path="$input_to_shortpath"
38615  # Check if we need to convert this using DOS-style short mode. If the path
38616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38617  # take no chances and rewrite it.
38618  # Note: m4 eats our [], so we need to use [ and ] instead.
38619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38620  if test "x$has_forbidden_chars" != x; then
38621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38625      # Going to short mode and back again did indeed matter. Since short mode is
38626      # case insensitive, let's make it lowercase to improve readability.
38627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38628      # Now convert it back to Unix-stile (cygpath)
38629      input_path=`$CYGPATH -u "$shortmode_path"`
38630      new_path="$input_path"
38631    fi
38632  fi
38633
38634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38635  if test "x$test_cygdrive_prefix" = x; then
38636    # As a simple fix, exclude /usr/bin since it's not a real path.
38637    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38639      # a path prefixed by /cygdrive for fixpath to work.
38640      new_path="$CYGWIN_ROOT_PATH$input_path"
38641    fi
38642  fi
38643
38644  # remove trailing .exe if any
38645  new_path="${new_path/%.exe/}"
38646
38647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38648
38649  # First separate the path from the arguments. This will split at the first
38650  # space.
38651  complete="$OBJDUMP"
38652  path="${complete%% *}"
38653  tmp="$complete EOL"
38654  arguments="${tmp#* }"
38655
38656  # Input might be given as Windows format, start by converting to
38657  # unix format.
38658  new_path="$path"
38659
38660  windows_path="$new_path"
38661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38662    unix_path=`$CYGPATH -u "$windows_path"`
38663    new_path="$unix_path"
38664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38666    new_path="$unix_path"
38667  fi
38668
38669
38670  # Now try to locate executable using which
38671  new_path=`$WHICH "$new_path" 2> /dev/null`
38672
38673  if test "x$new_path" = x; then
38674    # Oops. Which didn't find the executable.
38675    # The splitting of arguments from the executable at a space might have been incorrect,
38676    # since paths with space are more likely in Windows. Give it another try with the whole
38677    # argument.
38678    path="$complete"
38679    arguments="EOL"
38680    new_path="$path"
38681
38682  windows_path="$new_path"
38683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38684    unix_path=`$CYGPATH -u "$windows_path"`
38685    new_path="$unix_path"
38686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38688    new_path="$unix_path"
38689  fi
38690
38691
38692    new_path=`$WHICH "$new_path" 2> /dev/null`
38693
38694    if test "x$new_path" = x; then
38695      # It's still not found. Now this is an unrecoverable error.
38696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38697$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38698      has_space=`$ECHO "$complete" | $GREP " "`
38699      if test "x$has_space" != x; then
38700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38702      fi
38703      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38704    fi
38705  fi
38706
38707  # Now new_path has a complete unix path to the binary
38708  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38709    # Keep paths in /bin as-is, but remove trailing .exe if any
38710    new_path="${new_path/%.exe/}"
38711    # Do not save /bin paths to all_fixpath_prefixes!
38712  else
38713    # Not in mixed or Windows style, start by that.
38714    new_path=`cmd //c echo $new_path`
38715
38716  input_path="$new_path"
38717  # Check if we need to convert this using DOS-style short mode. If the path
38718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38719  # take no chances and rewrite it.
38720  # Note: m4 eats our [], so we need to use [ and ] instead.
38721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38722  if test "x$has_forbidden_chars" != x; then
38723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38725  fi
38726
38727    # Output is in $new_path
38728
38729  windows_path="$new_path"
38730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38731    unix_path=`$CYGPATH -u "$windows_path"`
38732    new_path="$unix_path"
38733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38735    new_path="$unix_path"
38736  fi
38737
38738    # remove trailing .exe if any
38739    new_path="${new_path/%.exe/}"
38740
38741    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38742    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38743  fi
38744
38745  else
38746    # We're on a posix platform. Hooray! :)
38747    # First separate the path from the arguments. This will split at the first
38748    # space.
38749    complete="$OBJDUMP"
38750    path="${complete%% *}"
38751    tmp="$complete EOL"
38752    arguments="${tmp#* }"
38753
38754    # Cannot rely on the command "which" here since it doesn't always work.
38755    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38756    if test -z "$is_absolute_path"; then
38757      # Path to executable is not absolute. Find it.
38758      IFS_save="$IFS"
38759      IFS=:
38760      for p in $PATH; do
38761        if test -f "$p/$path" && test -x "$p/$path"; then
38762          new_path="$p/$path"
38763          break
38764        fi
38765      done
38766      IFS="$IFS_save"
38767    else
38768      # This is an absolute path, we can use it without further modifications.
38769      new_path="$path"
38770    fi
38771
38772    if test "x$new_path" = x; then
38773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38774$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38775      has_space=`$ECHO "$complete" | $GREP " "`
38776      if test "x$has_space" != x; then
38777        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38778$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38779      fi
38780      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38781    fi
38782  fi
38783
38784  # Now join together the path and the arguments once again
38785  if test "x$arguments" != xEOL; then
38786    new_complete="$new_path ${arguments% *}"
38787  else
38788    new_complete="$new_path"
38789  fi
38790
38791  if test "x$complete" != "x$new_complete"; then
38792    OBJDUMP="$new_complete"
38793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38794$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38795  fi
38796
38797  fi
38798
38799
38800  # Restore old path.
38801  PATH="$OLD_PATH"
38802
38803  # Restore the flags to the user specified values.
38804  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38805  CFLAGS="$ORG_CFLAGS"
38806  CXXFLAGS="$ORG_CXXFLAGS"
38807  OBJCFLAGS="$ORG_OBJCFLAGS"
38808
38809
38810# Finally do some processing after the detection phase
38811
38812  if test "x$COMPILE_TYPE" = "xcross"; then
38813    # Now we need to find a C/C++ compiler that can build executables for the
38814    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38815    # used once. Also, we need to do this without adding a tools dir to the
38816    # path, otherwise we might pick up cross-compilers which don't use standard
38817    # naming.
38818
38819    # FIXME: we should list the discovered compilers as an exclude pattern!
38820    # If we do that, we can do this detection before POST_DETECTION, and still
38821    # find the build compilers in the tools dir, if needed.
38822
38823
38824  # Publish this variable in the help.
38825
38826
38827  if test "x$BUILD_CC" = x; then
38828    # The variable is not set by user, try to locate tool using the code snippet
38829    for ac_prog in cl cc gcc
38830do
38831  # Extract the first word of "$ac_prog", so it can be a program name with args.
38832set dummy $ac_prog; ac_word=$2
38833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38834$as_echo_n "checking for $ac_word... " >&6; }
38835if ${ac_cv_path_BUILD_CC+:} false; then :
38836  $as_echo_n "(cached) " >&6
38837else
38838  case $BUILD_CC in
38839  [\\/]* | ?:[\\/]*)
38840  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38841  ;;
38842  *)
38843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38844for as_dir in $PATH
38845do
38846  IFS=$as_save_IFS
38847  test -z "$as_dir" && as_dir=.
38848    for ac_exec_ext in '' $ac_executable_extensions; do
38849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38850    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38852    break 2
38853  fi
38854done
38855  done
38856IFS=$as_save_IFS
38857
38858  ;;
38859esac
38860fi
38861BUILD_CC=$ac_cv_path_BUILD_CC
38862if test -n "$BUILD_CC"; then
38863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38864$as_echo "$BUILD_CC" >&6; }
38865else
38866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38867$as_echo "no" >&6; }
38868fi
38869
38870
38871  test -n "$BUILD_CC" && break
38872done
38873
38874  else
38875    # The variable is set, but is it from the command line or the environment?
38876
38877    # Try to remove the string !BUILD_CC! from our list.
38878    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38879    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38880      # If it failed, the variable was not from the command line. Ignore it,
38881      # but warn the user (except for BASH, which is always set by the calling BASH).
38882      if test "xBUILD_CC" != xBASH; then
38883        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38884$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38885      fi
38886      # Try to locate tool using the code snippet
38887      for ac_prog in cl cc gcc
38888do
38889  # Extract the first word of "$ac_prog", so it can be a program name with args.
38890set dummy $ac_prog; ac_word=$2
38891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38892$as_echo_n "checking for $ac_word... " >&6; }
38893if ${ac_cv_path_BUILD_CC+:} false; then :
38894  $as_echo_n "(cached) " >&6
38895else
38896  case $BUILD_CC in
38897  [\\/]* | ?:[\\/]*)
38898  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38899  ;;
38900  *)
38901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38902for as_dir in $PATH
38903do
38904  IFS=$as_save_IFS
38905  test -z "$as_dir" && as_dir=.
38906    for ac_exec_ext in '' $ac_executable_extensions; do
38907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38908    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38910    break 2
38911  fi
38912done
38913  done
38914IFS=$as_save_IFS
38915
38916  ;;
38917esac
38918fi
38919BUILD_CC=$ac_cv_path_BUILD_CC
38920if test -n "$BUILD_CC"; then
38921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38922$as_echo "$BUILD_CC" >&6; }
38923else
38924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38925$as_echo "no" >&6; }
38926fi
38927
38928
38929  test -n "$BUILD_CC" && break
38930done
38931
38932    else
38933      # If it succeeded, then it was overridden by the user. We will use it
38934      # for the tool.
38935
38936      # First remove it from the list of overridden variables, so we can test
38937      # for unknown variables in the end.
38938      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38939
38940      # Check if the provided tool contains a complete path.
38941      tool_specified="$BUILD_CC"
38942      tool_basename="${tool_specified##*/}"
38943      if test "x$tool_basename" = "x$tool_specified"; then
38944        # A command without a complete path is provided, search $PATH.
38945        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38946$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38947        # Extract the first word of "$tool_basename", so it can be a program name with args.
38948set dummy $tool_basename; ac_word=$2
38949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38950$as_echo_n "checking for $ac_word... " >&6; }
38951if ${ac_cv_path_BUILD_CC+:} false; then :
38952  $as_echo_n "(cached) " >&6
38953else
38954  case $BUILD_CC in
38955  [\\/]* | ?:[\\/]*)
38956  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38957  ;;
38958  *)
38959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38960for as_dir in $PATH
38961do
38962  IFS=$as_save_IFS
38963  test -z "$as_dir" && as_dir=.
38964    for ac_exec_ext in '' $ac_executable_extensions; do
38965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38966    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38968    break 2
38969  fi
38970done
38971  done
38972IFS=$as_save_IFS
38973
38974  ;;
38975esac
38976fi
38977BUILD_CC=$ac_cv_path_BUILD_CC
38978if test -n "$BUILD_CC"; then
38979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38980$as_echo "$BUILD_CC" >&6; }
38981else
38982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38983$as_echo "no" >&6; }
38984fi
38985
38986
38987        if test "x$BUILD_CC" = x; then
38988          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38989        fi
38990      else
38991        # Otherwise we believe it is a complete path. Use it as it is.
38992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
38993$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
38994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
38995$as_echo_n "checking for BUILD_CC... " >&6; }
38996        if test ! -x "$tool_specified"; then
38997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38998$as_echo "not found" >&6; }
38999          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39000        fi
39001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39002$as_echo "$tool_specified" >&6; }
39003      fi
39004    fi
39005  fi
39006
39007
39008
39009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39010
39011  # First separate the path from the arguments. This will split at the first
39012  # space.
39013  complete="$BUILD_CC"
39014  path="${complete%% *}"
39015  tmp="$complete EOL"
39016  arguments="${tmp#* }"
39017
39018  # Input might be given as Windows format, start by converting to
39019  # unix format.
39020  new_path=`$CYGPATH -u "$path"`
39021
39022  # Now try to locate executable using which
39023  new_path=`$WHICH "$new_path" 2> /dev/null`
39024  # bat and cmd files are not always considered executable in cygwin causing which
39025  # to not find them
39026  if test "x$new_path" = x \
39027      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39028      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39029    new_path=`$CYGPATH -u "$path"`
39030  fi
39031  if test "x$new_path" = x; then
39032    # Oops. Which didn't find the executable.
39033    # The splitting of arguments from the executable at a space might have been incorrect,
39034    # since paths with space are more likely in Windows. Give it another try with the whole
39035    # argument.
39036    path="$complete"
39037    arguments="EOL"
39038    new_path=`$CYGPATH -u "$path"`
39039    new_path=`$WHICH "$new_path" 2> /dev/null`
39040    # bat and cmd files are not always considered executable in cygwin causing which
39041    # to not find them
39042    if test "x$new_path" = x \
39043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39045      new_path=`$CYGPATH -u "$path"`
39046    fi
39047    if test "x$new_path" = x; then
39048      # It's still not found. Now this is an unrecoverable error.
39049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39050$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39051      has_space=`$ECHO "$complete" | $GREP " "`
39052      if test "x$has_space" != x; then
39053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39055      fi
39056      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39057    fi
39058  fi
39059
39060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39063  # "foo.exe" is OK but "foo" is an error.
39064  #
39065  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39066  # It is also a way to make sure we got the proper file name for the real test later on.
39067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39068  if test "x$test_shortpath" = x; then
39069    # Short path failed, file does not exist as specified.
39070    # Try adding .exe or .cmd
39071    if test -f "${new_path}.exe"; then
39072      input_to_shortpath="${new_path}.exe"
39073    elif test -f "${new_path}.cmd"; then
39074      input_to_shortpath="${new_path}.cmd"
39075    else
39076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39077$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39078      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39079$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39080      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39081    fi
39082  else
39083    input_to_shortpath="$new_path"
39084  fi
39085
39086  # Call helper function which possibly converts this using DOS-style short mode.
39087  # If so, the updated path is stored in $new_path.
39088  new_path="$input_to_shortpath"
39089
39090  input_path="$input_to_shortpath"
39091  # Check if we need to convert this using DOS-style short mode. If the path
39092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39093  # take no chances and rewrite it.
39094  # Note: m4 eats our [], so we need to use [ and ] instead.
39095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39096  if test "x$has_forbidden_chars" != x; then
39097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39101      # Going to short mode and back again did indeed matter. Since short mode is
39102      # case insensitive, let's make it lowercase to improve readability.
39103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39104      # Now convert it back to Unix-stile (cygpath)
39105      input_path=`$CYGPATH -u "$shortmode_path"`
39106      new_path="$input_path"
39107    fi
39108  fi
39109
39110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39111  if test "x$test_cygdrive_prefix" = x; then
39112    # As a simple fix, exclude /usr/bin since it's not a real path.
39113    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39115      # a path prefixed by /cygdrive for fixpath to work.
39116      new_path="$CYGWIN_ROOT_PATH$input_path"
39117    fi
39118  fi
39119
39120  # remove trailing .exe if any
39121  new_path="${new_path/%.exe/}"
39122
39123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39124
39125  # First separate the path from the arguments. This will split at the first
39126  # space.
39127  complete="$BUILD_CC"
39128  path="${complete%% *}"
39129  tmp="$complete EOL"
39130  arguments="${tmp#* }"
39131
39132  # Input might be given as Windows format, start by converting to
39133  # unix format.
39134  new_path="$path"
39135
39136  windows_path="$new_path"
39137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39138    unix_path=`$CYGPATH -u "$windows_path"`
39139    new_path="$unix_path"
39140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39142    new_path="$unix_path"
39143  fi
39144
39145
39146  # Now try to locate executable using which
39147  new_path=`$WHICH "$new_path" 2> /dev/null`
39148
39149  if test "x$new_path" = x; then
39150    # Oops. Which didn't find the executable.
39151    # The splitting of arguments from the executable at a space might have been incorrect,
39152    # since paths with space are more likely in Windows. Give it another try with the whole
39153    # argument.
39154    path="$complete"
39155    arguments="EOL"
39156    new_path="$path"
39157
39158  windows_path="$new_path"
39159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39160    unix_path=`$CYGPATH -u "$windows_path"`
39161    new_path="$unix_path"
39162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39164    new_path="$unix_path"
39165  fi
39166
39167
39168    new_path=`$WHICH "$new_path" 2> /dev/null`
39169
39170    if test "x$new_path" = x; then
39171      # It's still not found. Now this is an unrecoverable error.
39172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39173$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39174      has_space=`$ECHO "$complete" | $GREP " "`
39175      if test "x$has_space" != x; then
39176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39178      fi
39179      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39180    fi
39181  fi
39182
39183  # Now new_path has a complete unix path to the binary
39184  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39185    # Keep paths in /bin as-is, but remove trailing .exe if any
39186    new_path="${new_path/%.exe/}"
39187    # Do not save /bin paths to all_fixpath_prefixes!
39188  else
39189    # Not in mixed or Windows style, start by that.
39190    new_path=`cmd //c echo $new_path`
39191
39192  input_path="$new_path"
39193  # Check if we need to convert this using DOS-style short mode. If the path
39194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39195  # take no chances and rewrite it.
39196  # Note: m4 eats our [], so we need to use [ and ] instead.
39197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39198  if test "x$has_forbidden_chars" != x; then
39199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39201  fi
39202
39203    # Output is in $new_path
39204
39205  windows_path="$new_path"
39206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39207    unix_path=`$CYGPATH -u "$windows_path"`
39208    new_path="$unix_path"
39209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39211    new_path="$unix_path"
39212  fi
39213
39214    # remove trailing .exe if any
39215    new_path="${new_path/%.exe/}"
39216
39217    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39218    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39219  fi
39220
39221  else
39222    # We're on a posix platform. Hooray! :)
39223    # First separate the path from the arguments. This will split at the first
39224    # space.
39225    complete="$BUILD_CC"
39226    path="${complete%% *}"
39227    tmp="$complete EOL"
39228    arguments="${tmp#* }"
39229
39230    # Cannot rely on the command "which" here since it doesn't always work.
39231    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39232    if test -z "$is_absolute_path"; then
39233      # Path to executable is not absolute. Find it.
39234      IFS_save="$IFS"
39235      IFS=:
39236      for p in $PATH; do
39237        if test -f "$p/$path" && test -x "$p/$path"; then
39238          new_path="$p/$path"
39239          break
39240        fi
39241      done
39242      IFS="$IFS_save"
39243    else
39244      # This is an absolute path, we can use it without further modifications.
39245      new_path="$path"
39246    fi
39247
39248    if test "x$new_path" = x; then
39249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39250$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39251      has_space=`$ECHO "$complete" | $GREP " "`
39252      if test "x$has_space" != x; then
39253        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39254$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39255      fi
39256      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39257    fi
39258  fi
39259
39260  # Now join together the path and the arguments once again
39261  if test "x$arguments" != xEOL; then
39262    new_complete="$new_path ${arguments% *}"
39263  else
39264    new_complete="$new_path"
39265  fi
39266
39267  if test "x$complete" != "x$new_complete"; then
39268    BUILD_CC="$new_complete"
39269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39270$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39271  fi
39272
39273
39274
39275  # Publish this variable in the help.
39276
39277
39278  if test "x$BUILD_CXX" = x; then
39279    # The variable is not set by user, try to locate tool using the code snippet
39280    for ac_prog in cl CC g++
39281do
39282  # Extract the first word of "$ac_prog", so it can be a program name with args.
39283set dummy $ac_prog; ac_word=$2
39284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39285$as_echo_n "checking for $ac_word... " >&6; }
39286if ${ac_cv_path_BUILD_CXX+:} false; then :
39287  $as_echo_n "(cached) " >&6
39288else
39289  case $BUILD_CXX in
39290  [\\/]* | ?:[\\/]*)
39291  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39292  ;;
39293  *)
39294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39295for as_dir in $PATH
39296do
39297  IFS=$as_save_IFS
39298  test -z "$as_dir" && as_dir=.
39299    for ac_exec_ext in '' $ac_executable_extensions; do
39300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39301    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39303    break 2
39304  fi
39305done
39306  done
39307IFS=$as_save_IFS
39308
39309  ;;
39310esac
39311fi
39312BUILD_CXX=$ac_cv_path_BUILD_CXX
39313if test -n "$BUILD_CXX"; then
39314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39315$as_echo "$BUILD_CXX" >&6; }
39316else
39317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39318$as_echo "no" >&6; }
39319fi
39320
39321
39322  test -n "$BUILD_CXX" && break
39323done
39324
39325  else
39326    # The variable is set, but is it from the command line or the environment?
39327
39328    # Try to remove the string !BUILD_CXX! from our list.
39329    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39330    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39331      # If it failed, the variable was not from the command line. Ignore it,
39332      # but warn the user (except for BASH, which is always set by the calling BASH).
39333      if test "xBUILD_CXX" != xBASH; then
39334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39335$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39336      fi
39337      # Try to locate tool using the code snippet
39338      for ac_prog in cl CC g++
39339do
39340  # Extract the first word of "$ac_prog", so it can be a program name with args.
39341set dummy $ac_prog; ac_word=$2
39342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39343$as_echo_n "checking for $ac_word... " >&6; }
39344if ${ac_cv_path_BUILD_CXX+:} false; then :
39345  $as_echo_n "(cached) " >&6
39346else
39347  case $BUILD_CXX in
39348  [\\/]* | ?:[\\/]*)
39349  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39350  ;;
39351  *)
39352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39353for as_dir in $PATH
39354do
39355  IFS=$as_save_IFS
39356  test -z "$as_dir" && as_dir=.
39357    for ac_exec_ext in '' $ac_executable_extensions; do
39358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39359    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39361    break 2
39362  fi
39363done
39364  done
39365IFS=$as_save_IFS
39366
39367  ;;
39368esac
39369fi
39370BUILD_CXX=$ac_cv_path_BUILD_CXX
39371if test -n "$BUILD_CXX"; then
39372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39373$as_echo "$BUILD_CXX" >&6; }
39374else
39375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39376$as_echo "no" >&6; }
39377fi
39378
39379
39380  test -n "$BUILD_CXX" && break
39381done
39382
39383    else
39384      # If it succeeded, then it was overridden by the user. We will use it
39385      # for the tool.
39386
39387      # First remove it from the list of overridden variables, so we can test
39388      # for unknown variables in the end.
39389      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39390
39391      # Check if the provided tool contains a complete path.
39392      tool_specified="$BUILD_CXX"
39393      tool_basename="${tool_specified##*/}"
39394      if test "x$tool_basename" = "x$tool_specified"; then
39395        # A command without a complete path is provided, search $PATH.
39396        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39397$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39398        # Extract the first word of "$tool_basename", so it can be a program name with args.
39399set dummy $tool_basename; ac_word=$2
39400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39401$as_echo_n "checking for $ac_word... " >&6; }
39402if ${ac_cv_path_BUILD_CXX+:} false; then :
39403  $as_echo_n "(cached) " >&6
39404else
39405  case $BUILD_CXX in
39406  [\\/]* | ?:[\\/]*)
39407  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39408  ;;
39409  *)
39410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39411for as_dir in $PATH
39412do
39413  IFS=$as_save_IFS
39414  test -z "$as_dir" && as_dir=.
39415    for ac_exec_ext in '' $ac_executable_extensions; do
39416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39417    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39419    break 2
39420  fi
39421done
39422  done
39423IFS=$as_save_IFS
39424
39425  ;;
39426esac
39427fi
39428BUILD_CXX=$ac_cv_path_BUILD_CXX
39429if test -n "$BUILD_CXX"; then
39430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39431$as_echo "$BUILD_CXX" >&6; }
39432else
39433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39434$as_echo "no" >&6; }
39435fi
39436
39437
39438        if test "x$BUILD_CXX" = x; then
39439          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39440        fi
39441      else
39442        # Otherwise we believe it is a complete path. Use it as it is.
39443        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39444$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39446$as_echo_n "checking for BUILD_CXX... " >&6; }
39447        if test ! -x "$tool_specified"; then
39448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39449$as_echo "not found" >&6; }
39450          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39451        fi
39452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39453$as_echo "$tool_specified" >&6; }
39454      fi
39455    fi
39456  fi
39457
39458
39459
39460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39461
39462  # First separate the path from the arguments. This will split at the first
39463  # space.
39464  complete="$BUILD_CXX"
39465  path="${complete%% *}"
39466  tmp="$complete EOL"
39467  arguments="${tmp#* }"
39468
39469  # Input might be given as Windows format, start by converting to
39470  # unix format.
39471  new_path=`$CYGPATH -u "$path"`
39472
39473  # Now try to locate executable using which
39474  new_path=`$WHICH "$new_path" 2> /dev/null`
39475  # bat and cmd files are not always considered executable in cygwin causing which
39476  # to not find them
39477  if test "x$new_path" = x \
39478      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39479      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39480    new_path=`$CYGPATH -u "$path"`
39481  fi
39482  if test "x$new_path" = x; then
39483    # Oops. Which didn't find the executable.
39484    # The splitting of arguments from the executable at a space might have been incorrect,
39485    # since paths with space are more likely in Windows. Give it another try with the whole
39486    # argument.
39487    path="$complete"
39488    arguments="EOL"
39489    new_path=`$CYGPATH -u "$path"`
39490    new_path=`$WHICH "$new_path" 2> /dev/null`
39491    # bat and cmd files are not always considered executable in cygwin causing which
39492    # to not find them
39493    if test "x$new_path" = x \
39494        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39495        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39496      new_path=`$CYGPATH -u "$path"`
39497    fi
39498    if test "x$new_path" = x; then
39499      # It's still not found. Now this is an unrecoverable error.
39500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39501$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39502      has_space=`$ECHO "$complete" | $GREP " "`
39503      if test "x$has_space" != x; then
39504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39506      fi
39507      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39508    fi
39509  fi
39510
39511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39514  # "foo.exe" is OK but "foo" is an error.
39515  #
39516  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39517  # It is also a way to make sure we got the proper file name for the real test later on.
39518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39519  if test "x$test_shortpath" = x; then
39520    # Short path failed, file does not exist as specified.
39521    # Try adding .exe or .cmd
39522    if test -f "${new_path}.exe"; then
39523      input_to_shortpath="${new_path}.exe"
39524    elif test -f "${new_path}.cmd"; then
39525      input_to_shortpath="${new_path}.cmd"
39526    else
39527      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39528$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39529      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39530$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39531      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39532    fi
39533  else
39534    input_to_shortpath="$new_path"
39535  fi
39536
39537  # Call helper function which possibly converts this using DOS-style short mode.
39538  # If so, the updated path is stored in $new_path.
39539  new_path="$input_to_shortpath"
39540
39541  input_path="$input_to_shortpath"
39542  # Check if we need to convert this using DOS-style short mode. If the path
39543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39544  # take no chances and rewrite it.
39545  # Note: m4 eats our [], so we need to use [ and ] instead.
39546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39547  if test "x$has_forbidden_chars" != x; then
39548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39552      # Going to short mode and back again did indeed matter. Since short mode is
39553      # case insensitive, let's make it lowercase to improve readability.
39554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39555      # Now convert it back to Unix-stile (cygpath)
39556      input_path=`$CYGPATH -u "$shortmode_path"`
39557      new_path="$input_path"
39558    fi
39559  fi
39560
39561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39562  if test "x$test_cygdrive_prefix" = x; then
39563    # As a simple fix, exclude /usr/bin since it's not a real path.
39564    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39566      # a path prefixed by /cygdrive for fixpath to work.
39567      new_path="$CYGWIN_ROOT_PATH$input_path"
39568    fi
39569  fi
39570
39571  # remove trailing .exe if any
39572  new_path="${new_path/%.exe/}"
39573
39574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39575
39576  # First separate the path from the arguments. This will split at the first
39577  # space.
39578  complete="$BUILD_CXX"
39579  path="${complete%% *}"
39580  tmp="$complete EOL"
39581  arguments="${tmp#* }"
39582
39583  # Input might be given as Windows format, start by converting to
39584  # unix format.
39585  new_path="$path"
39586
39587  windows_path="$new_path"
39588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39589    unix_path=`$CYGPATH -u "$windows_path"`
39590    new_path="$unix_path"
39591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39593    new_path="$unix_path"
39594  fi
39595
39596
39597  # Now try to locate executable using which
39598  new_path=`$WHICH "$new_path" 2> /dev/null`
39599
39600  if test "x$new_path" = x; then
39601    # Oops. Which didn't find the executable.
39602    # The splitting of arguments from the executable at a space might have been incorrect,
39603    # since paths with space are more likely in Windows. Give it another try with the whole
39604    # argument.
39605    path="$complete"
39606    arguments="EOL"
39607    new_path="$path"
39608
39609  windows_path="$new_path"
39610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39611    unix_path=`$CYGPATH -u "$windows_path"`
39612    new_path="$unix_path"
39613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39615    new_path="$unix_path"
39616  fi
39617
39618
39619    new_path=`$WHICH "$new_path" 2> /dev/null`
39620
39621    if test "x$new_path" = x; then
39622      # It's still not found. Now this is an unrecoverable error.
39623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39624$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39625      has_space=`$ECHO "$complete" | $GREP " "`
39626      if test "x$has_space" != x; then
39627        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39628$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39629      fi
39630      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39631    fi
39632  fi
39633
39634  # Now new_path has a complete unix path to the binary
39635  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39636    # Keep paths in /bin as-is, but remove trailing .exe if any
39637    new_path="${new_path/%.exe/}"
39638    # Do not save /bin paths to all_fixpath_prefixes!
39639  else
39640    # Not in mixed or Windows style, start by that.
39641    new_path=`cmd //c echo $new_path`
39642
39643  input_path="$new_path"
39644  # Check if we need to convert this using DOS-style short mode. If the path
39645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39646  # take no chances and rewrite it.
39647  # Note: m4 eats our [], so we need to use [ and ] instead.
39648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39649  if test "x$has_forbidden_chars" != x; then
39650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39651    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39652  fi
39653
39654    # Output is in $new_path
39655
39656  windows_path="$new_path"
39657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39658    unix_path=`$CYGPATH -u "$windows_path"`
39659    new_path="$unix_path"
39660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39662    new_path="$unix_path"
39663  fi
39664
39665    # remove trailing .exe if any
39666    new_path="${new_path/%.exe/}"
39667
39668    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39669    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39670  fi
39671
39672  else
39673    # We're on a posix platform. Hooray! :)
39674    # First separate the path from the arguments. This will split at the first
39675    # space.
39676    complete="$BUILD_CXX"
39677    path="${complete%% *}"
39678    tmp="$complete EOL"
39679    arguments="${tmp#* }"
39680
39681    # Cannot rely on the command "which" here since it doesn't always work.
39682    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39683    if test -z "$is_absolute_path"; then
39684      # Path to executable is not absolute. Find it.
39685      IFS_save="$IFS"
39686      IFS=:
39687      for p in $PATH; do
39688        if test -f "$p/$path" && test -x "$p/$path"; then
39689          new_path="$p/$path"
39690          break
39691        fi
39692      done
39693      IFS="$IFS_save"
39694    else
39695      # This is an absolute path, we can use it without further modifications.
39696      new_path="$path"
39697    fi
39698
39699    if test "x$new_path" = x; then
39700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39701$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39702      has_space=`$ECHO "$complete" | $GREP " "`
39703      if test "x$has_space" != x; then
39704        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39705$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39706      fi
39707      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39708    fi
39709  fi
39710
39711  # Now join together the path and the arguments once again
39712  if test "x$arguments" != xEOL; then
39713    new_complete="$new_path ${arguments% *}"
39714  else
39715    new_complete="$new_path"
39716  fi
39717
39718  if test "x$complete" != "x$new_complete"; then
39719    BUILD_CXX="$new_complete"
39720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39721$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39722  fi
39723
39724
39725
39726  # Publish this variable in the help.
39727
39728
39729  if test "x$BUILD_LD" = x; then
39730    # The variable is not set by user, try to locate tool using the code snippet
39731    for ac_prog in ld
39732do
39733  # Extract the first word of "$ac_prog", so it can be a program name with args.
39734set dummy $ac_prog; ac_word=$2
39735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39736$as_echo_n "checking for $ac_word... " >&6; }
39737if ${ac_cv_path_BUILD_LD+:} false; then :
39738  $as_echo_n "(cached) " >&6
39739else
39740  case $BUILD_LD in
39741  [\\/]* | ?:[\\/]*)
39742  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39743  ;;
39744  *)
39745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39746for as_dir in $PATH
39747do
39748  IFS=$as_save_IFS
39749  test -z "$as_dir" && as_dir=.
39750    for ac_exec_ext in '' $ac_executable_extensions; do
39751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39752    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39754    break 2
39755  fi
39756done
39757  done
39758IFS=$as_save_IFS
39759
39760  ;;
39761esac
39762fi
39763BUILD_LD=$ac_cv_path_BUILD_LD
39764if test -n "$BUILD_LD"; then
39765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39766$as_echo "$BUILD_LD" >&6; }
39767else
39768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39769$as_echo "no" >&6; }
39770fi
39771
39772
39773  test -n "$BUILD_LD" && break
39774done
39775
39776  else
39777    # The variable is set, but is it from the command line or the environment?
39778
39779    # Try to remove the string !BUILD_LD! from our list.
39780    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39781    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39782      # If it failed, the variable was not from the command line. Ignore it,
39783      # but warn the user (except for BASH, which is always set by the calling BASH).
39784      if test "xBUILD_LD" != xBASH; then
39785        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39786$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39787      fi
39788      # Try to locate tool using the code snippet
39789      for ac_prog in ld
39790do
39791  # Extract the first word of "$ac_prog", so it can be a program name with args.
39792set dummy $ac_prog; ac_word=$2
39793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39794$as_echo_n "checking for $ac_word... " >&6; }
39795if ${ac_cv_path_BUILD_LD+:} false; then :
39796  $as_echo_n "(cached) " >&6
39797else
39798  case $BUILD_LD in
39799  [\\/]* | ?:[\\/]*)
39800  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39801  ;;
39802  *)
39803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39804for as_dir in $PATH
39805do
39806  IFS=$as_save_IFS
39807  test -z "$as_dir" && as_dir=.
39808    for ac_exec_ext in '' $ac_executable_extensions; do
39809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39810    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39812    break 2
39813  fi
39814done
39815  done
39816IFS=$as_save_IFS
39817
39818  ;;
39819esac
39820fi
39821BUILD_LD=$ac_cv_path_BUILD_LD
39822if test -n "$BUILD_LD"; then
39823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39824$as_echo "$BUILD_LD" >&6; }
39825else
39826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39827$as_echo "no" >&6; }
39828fi
39829
39830
39831  test -n "$BUILD_LD" && break
39832done
39833
39834    else
39835      # If it succeeded, then it was overridden by the user. We will use it
39836      # for the tool.
39837
39838      # First remove it from the list of overridden variables, so we can test
39839      # for unknown variables in the end.
39840      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39841
39842      # Check if the provided tool contains a complete path.
39843      tool_specified="$BUILD_LD"
39844      tool_basename="${tool_specified##*/}"
39845      if test "x$tool_basename" = "x$tool_specified"; then
39846        # A command without a complete path is provided, search $PATH.
39847        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39848$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39849        # Extract the first word of "$tool_basename", so it can be a program name with args.
39850set dummy $tool_basename; ac_word=$2
39851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39852$as_echo_n "checking for $ac_word... " >&6; }
39853if ${ac_cv_path_BUILD_LD+:} false; then :
39854  $as_echo_n "(cached) " >&6
39855else
39856  case $BUILD_LD in
39857  [\\/]* | ?:[\\/]*)
39858  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39859  ;;
39860  *)
39861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39862for as_dir in $PATH
39863do
39864  IFS=$as_save_IFS
39865  test -z "$as_dir" && as_dir=.
39866    for ac_exec_ext in '' $ac_executable_extensions; do
39867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39868    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39870    break 2
39871  fi
39872done
39873  done
39874IFS=$as_save_IFS
39875
39876  ;;
39877esac
39878fi
39879BUILD_LD=$ac_cv_path_BUILD_LD
39880if test -n "$BUILD_LD"; then
39881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39882$as_echo "$BUILD_LD" >&6; }
39883else
39884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39885$as_echo "no" >&6; }
39886fi
39887
39888
39889        if test "x$BUILD_LD" = x; then
39890          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39891        fi
39892      else
39893        # Otherwise we believe it is a complete path. Use it as it is.
39894        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39895$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39897$as_echo_n "checking for BUILD_LD... " >&6; }
39898        if test ! -x "$tool_specified"; then
39899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39900$as_echo "not found" >&6; }
39901          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39902        fi
39903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39904$as_echo "$tool_specified" >&6; }
39905      fi
39906    fi
39907  fi
39908
39909
39910
39911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39912
39913  # First separate the path from the arguments. This will split at the first
39914  # space.
39915  complete="$BUILD_LD"
39916  path="${complete%% *}"
39917  tmp="$complete EOL"
39918  arguments="${tmp#* }"
39919
39920  # Input might be given as Windows format, start by converting to
39921  # unix format.
39922  new_path=`$CYGPATH -u "$path"`
39923
39924  # Now try to locate executable using which
39925  new_path=`$WHICH "$new_path" 2> /dev/null`
39926  # bat and cmd files are not always considered executable in cygwin causing which
39927  # to not find them
39928  if test "x$new_path" = x \
39929      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39930      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39931    new_path=`$CYGPATH -u "$path"`
39932  fi
39933  if test "x$new_path" = x; then
39934    # Oops. Which didn't find the executable.
39935    # The splitting of arguments from the executable at a space might have been incorrect,
39936    # since paths with space are more likely in Windows. Give it another try with the whole
39937    # argument.
39938    path="$complete"
39939    arguments="EOL"
39940    new_path=`$CYGPATH -u "$path"`
39941    new_path=`$WHICH "$new_path" 2> /dev/null`
39942    # bat and cmd files are not always considered executable in cygwin causing which
39943    # to not find them
39944    if test "x$new_path" = x \
39945        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39946        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39947      new_path=`$CYGPATH -u "$path"`
39948    fi
39949    if test "x$new_path" = x; then
39950      # It's still not found. Now this is an unrecoverable error.
39951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39952$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39953      has_space=`$ECHO "$complete" | $GREP " "`
39954      if test "x$has_space" != x; then
39955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39957      fi
39958      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39959    fi
39960  fi
39961
39962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39965  # "foo.exe" is OK but "foo" is an error.
39966  #
39967  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39968  # It is also a way to make sure we got the proper file name for the real test later on.
39969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39970  if test "x$test_shortpath" = x; then
39971    # Short path failed, file does not exist as specified.
39972    # Try adding .exe or .cmd
39973    if test -f "${new_path}.exe"; then
39974      input_to_shortpath="${new_path}.exe"
39975    elif test -f "${new_path}.cmd"; then
39976      input_to_shortpath="${new_path}.cmd"
39977    else
39978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39979$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39980      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39981$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39982      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39983    fi
39984  else
39985    input_to_shortpath="$new_path"
39986  fi
39987
39988  # Call helper function which possibly converts this using DOS-style short mode.
39989  # If so, the updated path is stored in $new_path.
39990  new_path="$input_to_shortpath"
39991
39992  input_path="$input_to_shortpath"
39993  # Check if we need to convert this using DOS-style short mode. If the path
39994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39995  # take no chances and rewrite it.
39996  # Note: m4 eats our [], so we need to use [ and ] instead.
39997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39998  if test "x$has_forbidden_chars" != x; then
39999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40000    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40001    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40002    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40003      # Going to short mode and back again did indeed matter. Since short mode is
40004      # case insensitive, let's make it lowercase to improve readability.
40005      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40006      # Now convert it back to Unix-stile (cygpath)
40007      input_path=`$CYGPATH -u "$shortmode_path"`
40008      new_path="$input_path"
40009    fi
40010  fi
40011
40012  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40013  if test "x$test_cygdrive_prefix" = x; then
40014    # As a simple fix, exclude /usr/bin since it's not a real path.
40015    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40016      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40017      # a path prefixed by /cygdrive for fixpath to work.
40018      new_path="$CYGWIN_ROOT_PATH$input_path"
40019    fi
40020  fi
40021
40022  # remove trailing .exe if any
40023  new_path="${new_path/%.exe/}"
40024
40025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40026
40027  # First separate the path from the arguments. This will split at the first
40028  # space.
40029  complete="$BUILD_LD"
40030  path="${complete%% *}"
40031  tmp="$complete EOL"
40032  arguments="${tmp#* }"
40033
40034  # Input might be given as Windows format, start by converting to
40035  # unix format.
40036  new_path="$path"
40037
40038  windows_path="$new_path"
40039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40040    unix_path=`$CYGPATH -u "$windows_path"`
40041    new_path="$unix_path"
40042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40044    new_path="$unix_path"
40045  fi
40046
40047
40048  # Now try to locate executable using which
40049  new_path=`$WHICH "$new_path" 2> /dev/null`
40050
40051  if test "x$new_path" = x; then
40052    # Oops. Which didn't find the executable.
40053    # The splitting of arguments from the executable at a space might have been incorrect,
40054    # since paths with space are more likely in Windows. Give it another try with the whole
40055    # argument.
40056    path="$complete"
40057    arguments="EOL"
40058    new_path="$path"
40059
40060  windows_path="$new_path"
40061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40062    unix_path=`$CYGPATH -u "$windows_path"`
40063    new_path="$unix_path"
40064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40066    new_path="$unix_path"
40067  fi
40068
40069
40070    new_path=`$WHICH "$new_path" 2> /dev/null`
40071
40072    if test "x$new_path" = x; then
40073      # It's still not found. Now this is an unrecoverable error.
40074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40075$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40076      has_space=`$ECHO "$complete" | $GREP " "`
40077      if test "x$has_space" != x; then
40078        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40079$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40080      fi
40081      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40082    fi
40083  fi
40084
40085  # Now new_path has a complete unix path to the binary
40086  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40087    # Keep paths in /bin as-is, but remove trailing .exe if any
40088    new_path="${new_path/%.exe/}"
40089    # Do not save /bin paths to all_fixpath_prefixes!
40090  else
40091    # Not in mixed or Windows style, start by that.
40092    new_path=`cmd //c echo $new_path`
40093
40094  input_path="$new_path"
40095  # Check if we need to convert this using DOS-style short mode. If the path
40096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40097  # take no chances and rewrite it.
40098  # Note: m4 eats our [], so we need to use [ and ] instead.
40099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40100  if test "x$has_forbidden_chars" != x; then
40101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40103  fi
40104
40105    # Output is in $new_path
40106
40107  windows_path="$new_path"
40108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40109    unix_path=`$CYGPATH -u "$windows_path"`
40110    new_path="$unix_path"
40111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40113    new_path="$unix_path"
40114  fi
40115
40116    # remove trailing .exe if any
40117    new_path="${new_path/%.exe/}"
40118
40119    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40120    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40121  fi
40122
40123  else
40124    # We're on a posix platform. Hooray! :)
40125    # First separate the path from the arguments. This will split at the first
40126    # space.
40127    complete="$BUILD_LD"
40128    path="${complete%% *}"
40129    tmp="$complete EOL"
40130    arguments="${tmp#* }"
40131
40132    # Cannot rely on the command "which" here since it doesn't always work.
40133    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40134    if test -z "$is_absolute_path"; then
40135      # Path to executable is not absolute. Find it.
40136      IFS_save="$IFS"
40137      IFS=:
40138      for p in $PATH; do
40139        if test -f "$p/$path" && test -x "$p/$path"; then
40140          new_path="$p/$path"
40141          break
40142        fi
40143      done
40144      IFS="$IFS_save"
40145    else
40146      # This is an absolute path, we can use it without further modifications.
40147      new_path="$path"
40148    fi
40149
40150    if test "x$new_path" = x; then
40151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40152$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40153      has_space=`$ECHO "$complete" | $GREP " "`
40154      if test "x$has_space" != x; then
40155        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40156$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40157      fi
40158      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40159    fi
40160  fi
40161
40162  # Now join together the path and the arguments once again
40163  if test "x$arguments" != xEOL; then
40164    new_complete="$new_path ${arguments% *}"
40165  else
40166    new_complete="$new_path"
40167  fi
40168
40169  if test "x$complete" != "x$new_complete"; then
40170    BUILD_LD="$new_complete"
40171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40172$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40173  fi
40174
40175  else
40176    # If we are not cross compiling, use the normal target compilers for
40177    # building the build platform executables.
40178    BUILD_CC="$CC"
40179    BUILD_CXX="$CXX"
40180    BUILD_LD="$LD"
40181  fi
40182
40183
40184
40185
40186
40187
40188  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40189    # For hotspot, we need these in Windows mixed path,
40190    # so rewrite them all. Need added .exe suffix.
40191    HOTSPOT_CXX="$CXX.exe"
40192    HOTSPOT_LD="$LD.exe"
40193    HOTSPOT_MT="$MT.exe"
40194    HOTSPOT_RC="$RC.exe"
40195
40196  unix_path="$HOTSPOT_CXX"
40197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40198    windows_path=`$CYGPATH -m "$unix_path"`
40199    HOTSPOT_CXX="$windows_path"
40200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40201    windows_path=`cmd //c echo $unix_path`
40202    HOTSPOT_CXX="$windows_path"
40203  fi
40204
40205
40206  unix_path="$HOTSPOT_LD"
40207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40208    windows_path=`$CYGPATH -m "$unix_path"`
40209    HOTSPOT_LD="$windows_path"
40210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40211    windows_path=`cmd //c echo $unix_path`
40212    HOTSPOT_LD="$windows_path"
40213  fi
40214
40215
40216  unix_path="$HOTSPOT_MT"
40217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40218    windows_path=`$CYGPATH -m "$unix_path"`
40219    HOTSPOT_MT="$windows_path"
40220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40221    windows_path=`cmd //c echo $unix_path`
40222    HOTSPOT_MT="$windows_path"
40223  fi
40224
40225
40226  unix_path="$HOTSPOT_RC"
40227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40228    windows_path=`$CYGPATH -m "$unix_path"`
40229    HOTSPOT_RC="$windows_path"
40230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40231    windows_path=`cmd //c echo $unix_path`
40232    HOTSPOT_RC="$windows_path"
40233  fi
40234
40235
40236
40237  else
40238    HOTSPOT_CXX="$CXX"
40239    HOTSPOT_LD="$LD"
40240  fi
40241
40242
40243
40244  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40245    USE_CLANG=true
40246  fi
40247
40248
40249  # LDEXE is the linker to use, when creating executables. Not really used.
40250  # FIXME: These should just be removed!
40251  LDEXE="$LD"
40252  LDEXECXX="$LDCXX"
40253
40254
40255
40256
40257  # The package path is used only on macosx?
40258  # FIXME: clean this up, and/or move it elsewhere.
40259  PACKAGE_PATH=/opt/local
40260
40261
40262  # Check for extra potential brokenness.
40263  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40264    # On Windows, double-check that we got the right compiler.
40265    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40266    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40267    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40268      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40269        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40270      fi
40271    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40272      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40273        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40274      fi
40275    fi
40276  fi
40277
40278  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40279    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40280    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40281    # This is later checked when setting flags.
40282  fi
40283
40284  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40285  # in executable.'
40286  USING_BROKEN_SUSE_LD=no
40287  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40288    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40289$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40290    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40291    echo "int main() { }" > main.c
40292    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40293      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40294$as_echo "no" >&6; }
40295      USING_BROKEN_SUSE_LD=no
40296    else
40297      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40298$as_echo "yes" >&6; }
40299      USING_BROKEN_SUSE_LD=yes
40300    fi
40301    rm -rf version-script.map main.c a.out
40302  fi
40303
40304
40305
40306# Setup the JTReg Regression Test Harness.
40307
40308
40309# Check whether --with-jtreg was given.
40310if test "${with_jtreg+set}" = set; then :
40311  withval=$with_jtreg;
40312else
40313  with_jtreg=no
40314fi
40315
40316
40317  if test "x$with_jtreg" = xno; then
40318    # jtreg disabled
40319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40320$as_echo_n "checking for jtreg... " >&6; }
40321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40322$as_echo "no" >&6; }
40323  else
40324    if test "x$with_jtreg" != xyes; then
40325      # with path specified.
40326      JT_HOME="$with_jtreg"
40327    fi
40328
40329    if test "x$JT_HOME" != x; then
40330      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40331$as_echo_n "checking for jtreg... " >&6; }
40332
40333      # use JT_HOME enviroment var.
40334
40335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40336
40337  # Input might be given as Windows format, start by converting to
40338  # unix format.
40339  path="$JT_HOME"
40340  new_path=`$CYGPATH -u "$path"`
40341
40342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40345  # "foo.exe" is OK but "foo" is an error.
40346  #
40347  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40348  # It is also a way to make sure we got the proper file name for the real test later on.
40349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40350  if test "x$test_shortpath" = x; then
40351    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40352$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40353    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40354  fi
40355
40356  # Call helper function which possibly converts this using DOS-style short mode.
40357  # If so, the updated path is stored in $new_path.
40358
40359  input_path="$new_path"
40360  # Check if we need to convert this using DOS-style short mode. If the path
40361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40362  # take no chances and rewrite it.
40363  # Note: m4 eats our [], so we need to use [ and ] instead.
40364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40365  if test "x$has_forbidden_chars" != x; then
40366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40370      # Going to short mode and back again did indeed matter. Since short mode is
40371      # case insensitive, let's make it lowercase to improve readability.
40372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40373      # Now convert it back to Unix-stile (cygpath)
40374      input_path=`$CYGPATH -u "$shortmode_path"`
40375      new_path="$input_path"
40376    fi
40377  fi
40378
40379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40380  if test "x$test_cygdrive_prefix" = x; then
40381    # As a simple fix, exclude /usr/bin since it's not a real path.
40382    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40384      # a path prefixed by /cygdrive for fixpath to work.
40385      new_path="$CYGWIN_ROOT_PATH$input_path"
40386    fi
40387  fi
40388
40389
40390  if test "x$path" != "x$new_path"; then
40391    JT_HOME="$new_path"
40392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40393$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40394  fi
40395
40396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40397
40398  path="$JT_HOME"
40399  has_colon=`$ECHO $path | $GREP ^.:`
40400  new_path="$path"
40401  if test "x$has_colon" = x; then
40402    # Not in mixed or Windows style, start by that.
40403    new_path=`cmd //c echo $path`
40404  fi
40405
40406
40407  input_path="$new_path"
40408  # Check if we need to convert this using DOS-style short mode. If the path
40409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40410  # take no chances and rewrite it.
40411  # Note: m4 eats our [], so we need to use [ and ] instead.
40412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40413  if test "x$has_forbidden_chars" != x; then
40414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40415    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40416  fi
40417
40418
40419  windows_path="$new_path"
40420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40421    unix_path=`$CYGPATH -u "$windows_path"`
40422    new_path="$unix_path"
40423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40425    new_path="$unix_path"
40426  fi
40427
40428  if test "x$path" != "x$new_path"; then
40429    JT_HOME="$new_path"
40430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40431$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40432  fi
40433
40434  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40435  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40436
40437  else
40438    # We're on a posix platform. Hooray! :)
40439    path="$JT_HOME"
40440    has_space=`$ECHO "$path" | $GREP " "`
40441    if test "x$has_space" != x; then
40442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40443$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40444      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40445    fi
40446
40447    # Use eval to expand a potential ~
40448    eval path="$path"
40449    if test ! -f "$path" && test ! -d "$path"; then
40450      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40451    fi
40452
40453    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40454  fi
40455
40456
40457      # jtreg win32 script works for everybody
40458      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40459
40460      if test ! -f "$JTREGEXE"; then
40461        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40462      fi
40463
40464      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40465$as_echo "$JTREGEXE" >&6; }
40466    else
40467      # try to find jtreg on path
40468
40469
40470
40471  # Publish this variable in the help.
40472
40473
40474  if test "x$JTREGEXE" = x; then
40475    # The variable is not set by user, try to locate tool using the code snippet
40476    for ac_prog in jtreg
40477do
40478  # Extract the first word of "$ac_prog", so it can be a program name with args.
40479set dummy $ac_prog; ac_word=$2
40480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40481$as_echo_n "checking for $ac_word... " >&6; }
40482if ${ac_cv_path_JTREGEXE+:} false; then :
40483  $as_echo_n "(cached) " >&6
40484else
40485  case $JTREGEXE in
40486  [\\/]* | ?:[\\/]*)
40487  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40488  ;;
40489  *)
40490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40491for as_dir in $PATH
40492do
40493  IFS=$as_save_IFS
40494  test -z "$as_dir" && as_dir=.
40495    for ac_exec_ext in '' $ac_executable_extensions; do
40496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40497    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40499    break 2
40500  fi
40501done
40502  done
40503IFS=$as_save_IFS
40504
40505  ;;
40506esac
40507fi
40508JTREGEXE=$ac_cv_path_JTREGEXE
40509if test -n "$JTREGEXE"; then
40510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40511$as_echo "$JTREGEXE" >&6; }
40512else
40513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40514$as_echo "no" >&6; }
40515fi
40516
40517
40518  test -n "$JTREGEXE" && break
40519done
40520
40521  else
40522    # The variable is set, but is it from the command line or the environment?
40523
40524    # Try to remove the string !JTREGEXE! from our list.
40525    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40526    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40527      # If it failed, the variable was not from the command line. Ignore it,
40528      # but warn the user (except for BASH, which is always set by the calling BASH).
40529      if test "xJTREGEXE" != xBASH; then
40530        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40531$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40532      fi
40533      # Try to locate tool using the code snippet
40534      for ac_prog in jtreg
40535do
40536  # Extract the first word of "$ac_prog", so it can be a program name with args.
40537set dummy $ac_prog; ac_word=$2
40538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40539$as_echo_n "checking for $ac_word... " >&6; }
40540if ${ac_cv_path_JTREGEXE+:} false; then :
40541  $as_echo_n "(cached) " >&6
40542else
40543  case $JTREGEXE in
40544  [\\/]* | ?:[\\/]*)
40545  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40546  ;;
40547  *)
40548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40549for as_dir in $PATH
40550do
40551  IFS=$as_save_IFS
40552  test -z "$as_dir" && as_dir=.
40553    for ac_exec_ext in '' $ac_executable_extensions; do
40554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40555    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40557    break 2
40558  fi
40559done
40560  done
40561IFS=$as_save_IFS
40562
40563  ;;
40564esac
40565fi
40566JTREGEXE=$ac_cv_path_JTREGEXE
40567if test -n "$JTREGEXE"; then
40568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40569$as_echo "$JTREGEXE" >&6; }
40570else
40571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40572$as_echo "no" >&6; }
40573fi
40574
40575
40576  test -n "$JTREGEXE" && break
40577done
40578
40579    else
40580      # If it succeeded, then it was overridden by the user. We will use it
40581      # for the tool.
40582
40583      # First remove it from the list of overridden variables, so we can test
40584      # for unknown variables in the end.
40585      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40586
40587      # Check if the provided tool contains a complete path.
40588      tool_specified="$JTREGEXE"
40589      tool_basename="${tool_specified##*/}"
40590      if test "x$tool_basename" = "x$tool_specified"; then
40591        # A command without a complete path is provided, search $PATH.
40592        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40593$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40594        # Extract the first word of "$tool_basename", so it can be a program name with args.
40595set dummy $tool_basename; ac_word=$2
40596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40597$as_echo_n "checking for $ac_word... " >&6; }
40598if ${ac_cv_path_JTREGEXE+:} false; then :
40599  $as_echo_n "(cached) " >&6
40600else
40601  case $JTREGEXE in
40602  [\\/]* | ?:[\\/]*)
40603  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40604  ;;
40605  *)
40606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40607for as_dir in $PATH
40608do
40609  IFS=$as_save_IFS
40610  test -z "$as_dir" && as_dir=.
40611    for ac_exec_ext in '' $ac_executable_extensions; do
40612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40613    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40615    break 2
40616  fi
40617done
40618  done
40619IFS=$as_save_IFS
40620
40621  ;;
40622esac
40623fi
40624JTREGEXE=$ac_cv_path_JTREGEXE
40625if test -n "$JTREGEXE"; then
40626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40627$as_echo "$JTREGEXE" >&6; }
40628else
40629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40630$as_echo "no" >&6; }
40631fi
40632
40633
40634        if test "x$JTREGEXE" = x; then
40635          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40636        fi
40637      else
40638        # Otherwise we believe it is a complete path. Use it as it is.
40639        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40640$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40641        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40642$as_echo_n "checking for JTREGEXE... " >&6; }
40643        if test ! -x "$tool_specified"; then
40644          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40645$as_echo "not found" >&6; }
40646          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40647        fi
40648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40649$as_echo "$tool_specified" >&6; }
40650      fi
40651    fi
40652  fi
40653
40654
40655
40656  if test "x$JTREGEXE" = x; then
40657    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40658  fi
40659
40660
40661      JT_HOME="`$DIRNAME $JTREGEXE`"
40662    fi
40663  fi
40664
40665
40666
40667
40668
40669
40670  # Option used to tell the compiler whether to create 32- or 64-bit executables
40671  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40672    COMPILER_TARGET_BITS_FLAG="-q"
40673  else
40674    COMPILER_TARGET_BITS_FLAG="-m"
40675  fi
40676
40677
40678  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40679  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40680    ARFLAGS="-r"
40681  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40682    ARFLAGS="-X64"
40683  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40684    # lib.exe is used as AR to create static libraries.
40685    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40686  else
40687    ARFLAGS=""
40688  fi
40689
40690
40691  ## Setup strip.
40692  # FIXME: should this really be per platform, or should it be per toolchain type?
40693  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40694  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40695  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40696    STRIPFLAGS="-g"
40697  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40698    STRIPFLAGS="-x"
40699  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40700    STRIPFLAGS="-S"
40701  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40702    STRIPFLAGS="-X32_64"
40703  fi
40704
40705  if test "x$OPENJDK_TARGET_OS" != xwindows; then
40706    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40707  fi
40708
40709
40710  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40711    # FIXME: break out into MCSFLAGS
40712    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40713  fi
40714
40715
40716  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40717    CC_OUT_OPTION=-Fo
40718    EXE_OUT_OPTION=-out:
40719    LD_OUT_OPTION=-out:
40720    AR_OUT_OPTION=-out:
40721  else
40722    # The option used to specify the target .o,.a or .so file.
40723    # When compiling, how to specify the to be created object file.
40724    CC_OUT_OPTION='-o$(SPACE)'
40725    # When linking, how to specify the to be created executable.
40726    EXE_OUT_OPTION='-o$(SPACE)'
40727    # When linking, how to specify the to be created dynamically linkable library.
40728    LD_OUT_OPTION='-o$(SPACE)'
40729    # When archiving, how to specify the to be create static archive for object files.
40730    AR_OUT_OPTION='rcs$(SPACE)'
40731  fi
40732
40733
40734
40735
40736
40737  # On Windows, we need to set RC flags.
40738  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40739    RC_FLAGS="-nologo -l 0x409 -r"
40740    if test "x$VARIANT" = xOPT; then
40741      RC_FLAGS="$RC_FLAGS -d NDEBUG"
40742    fi
40743
40744    # The version variables used to create RC_FLAGS may be overridden
40745    # in a custom configure script, or possibly the command line.
40746    # Let those variables be expanded at make time in spec.gmk.
40747    # The \$ are escaped to the shell, and the $(...) variables
40748    # are evaluated by make.
40749    RC_FLAGS="$RC_FLAGS \
40750        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40751        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40752        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40753        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40754        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40755        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40756        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40757  fi
40758
40759
40760  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40761    # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40762    CCXXFLAGS="$CCXXFLAGS -nologo"
40763  fi
40764
40765  if test "x$SYSROOT" != "x"; then
40766    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
40767      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40768        # Solaris Studio does not have a concept of sysroot. Instead we must
40769        # make sure the default include and lib dirs are appended to each
40770        # compile and link command line.
40771        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
40772        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
40773            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
40774            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
40775      fi
40776    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
40777      SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
40778      SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
40779    elif test "x$TOOLCHAIN_TYPE" = xclang; then
40780      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
40781      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
40782    fi
40783    # Propagate the sysroot args to hotspot
40784    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
40785    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
40786    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
40787  fi
40788
40789
40790
40791
40792# FIXME: Currently we must test this after toolchain but before flags. Fix!
40793
40794# Now we can test some aspects on the target using configure macros.
40795
40796
40797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40798$as_echo_n "checking for ANSI C header files... " >&6; }
40799if ${ac_cv_header_stdc+:} false; then :
40800  $as_echo_n "(cached) " >&6
40801else
40802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40803/* end confdefs.h.  */
40804#include <stdlib.h>
40805#include <stdarg.h>
40806#include <string.h>
40807#include <float.h>
40808
40809int
40810main ()
40811{
40812
40813  ;
40814  return 0;
40815}
40816_ACEOF
40817if ac_fn_cxx_try_compile "$LINENO"; then :
40818  ac_cv_header_stdc=yes
40819else
40820  ac_cv_header_stdc=no
40821fi
40822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40823
40824if test $ac_cv_header_stdc = yes; then
40825  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40827/* end confdefs.h.  */
40828#include <string.h>
40829
40830_ACEOF
40831if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40832  $EGREP "memchr" >/dev/null 2>&1; then :
40833
40834else
40835  ac_cv_header_stdc=no
40836fi
40837rm -f conftest*
40838
40839fi
40840
40841if test $ac_cv_header_stdc = yes; then
40842  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40844/* end confdefs.h.  */
40845#include <stdlib.h>
40846
40847_ACEOF
40848if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40849  $EGREP "free" >/dev/null 2>&1; then :
40850
40851else
40852  ac_cv_header_stdc=no
40853fi
40854rm -f conftest*
40855
40856fi
40857
40858if test $ac_cv_header_stdc = yes; then
40859  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40860  if test "$cross_compiling" = yes; then :
40861  :
40862else
40863  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40864/* end confdefs.h.  */
40865#include <ctype.h>
40866#include <stdlib.h>
40867#if ((' ' & 0x0FF) == 0x020)
40868# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40869# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40870#else
40871# define ISLOWER(c) \
40872		   (('a' <= (c) && (c) <= 'i') \
40873		     || ('j' <= (c) && (c) <= 'r') \
40874		     || ('s' <= (c) && (c) <= 'z'))
40875# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40876#endif
40877
40878#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40879int
40880main ()
40881{
40882  int i;
40883  for (i = 0; i < 256; i++)
40884    if (XOR (islower (i), ISLOWER (i))
40885	|| toupper (i) != TOUPPER (i))
40886      return 2;
40887  return 0;
40888}
40889_ACEOF
40890if ac_fn_cxx_try_run "$LINENO"; then :
40891
40892else
40893  ac_cv_header_stdc=no
40894fi
40895rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40896  conftest.$ac_objext conftest.beam conftest.$ac_ext
40897fi
40898
40899fi
40900fi
40901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40902$as_echo "$ac_cv_header_stdc" >&6; }
40903if test $ac_cv_header_stdc = yes; then
40904
40905$as_echo "#define STDC_HEADERS 1" >>confdefs.h
40906
40907fi
40908
40909# On IRIX 5.3, sys/types and inttypes.h are conflicting.
40910for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40911		  inttypes.h stdint.h unistd.h
40912do :
40913  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40914ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40915"
40916if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40917  cat >>confdefs.h <<_ACEOF
40918#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40919_ACEOF
40920
40921fi
40922
40923done
40924
40925
40926
40927  ###############################################################################
40928  #
40929  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40930  # (The JVM can use 32 or 64 bit Java pointers but that decision
40931  # is made at runtime.)
40932  #
40933
40934  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40935    # Always specify -m flag on Solaris
40936    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40937
40938  # When we add flags to the "official" CFLAGS etc, we need to
40939  # keep track of these additions in ADDED_CFLAGS etc. These
40940  # will later be checked to make sure only controlled additions
40941  # have been made to CFLAGS etc.
40942  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40943  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40944  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40945
40946  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40947  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40948  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40949
40950  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40951  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40952  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40953
40954  elif test "x$COMPILE_TYPE" = xreduced; then
40955    if test "x$OPENJDK_TARGET_OS" != xwindows; then
40956      # Specify -m if running reduced on other Posix platforms
40957
40958  # When we add flags to the "official" CFLAGS etc, we need to
40959  # keep track of these additions in ADDED_CFLAGS etc. These
40960  # will later be checked to make sure only controlled additions
40961  # have been made to CFLAGS etc.
40962  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40963  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40964  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40965
40966  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40967  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40968  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40969
40970  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40971  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40972  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40973
40974    fi
40975  fi
40976
40977  # Make compilation sanity check
40978  for ac_header in stdio.h
40979do :
40980  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40981if test "x$ac_cv_header_stdio_h" = xyes; then :
40982  cat >>confdefs.h <<_ACEOF
40983#define HAVE_STDIO_H 1
40984_ACEOF
40985
40986else
40987
40988    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
40989$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
40990    if test "x$COMPILE_TYPE" = xreduced; then
40991      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
40992$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
40993    elif test "x$COMPILE_TYPE" = xcross; then
40994      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
40995$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
40996    fi
40997    as_fn_error $? "Cannot continue." "$LINENO" 5
40998
40999fi
41000
41001done
41002
41003
41004  # The cast to long int works around a bug in the HP C Compiler
41005# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41006# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41007# This bug is HP SR number 8606223364.
41008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41009$as_echo_n "checking size of int *... " >&6; }
41010if ${ac_cv_sizeof_int_p+:} false; then :
41011  $as_echo_n "(cached) " >&6
41012else
41013  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41014
41015else
41016  if test "$ac_cv_type_int_p" = yes; then
41017     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41019as_fn_error 77 "cannot compute sizeof (int *)
41020See \`config.log' for more details" "$LINENO" 5; }
41021   else
41022     ac_cv_sizeof_int_p=0
41023   fi
41024fi
41025
41026fi
41027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41028$as_echo "$ac_cv_sizeof_int_p" >&6; }
41029
41030
41031
41032cat >>confdefs.h <<_ACEOF
41033#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41034_ACEOF
41035
41036
41037
41038  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41039  if test "x$ac_cv_sizeof_int_p" = x; then
41040    # The test failed, lets stick to the assumed value.
41041    { $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
41042$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41043  else
41044    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41045
41046    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41047      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41048      # Let's try to implicitely set the compilers target architecture and retry the test
41049      { $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
41050$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;}
41051      { $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
41052$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;}
41053
41054  # When we add flags to the "official" CFLAGS etc, we need to
41055  # keep track of these additions in ADDED_CFLAGS etc. These
41056  # will later be checked to make sure only controlled additions
41057  # have been made to CFLAGS etc.
41058  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41059  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41060  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41061
41062  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41063  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41064  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41065
41066  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41067  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41068  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41069
41070
41071      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41072      unset ac_cv_sizeof_int_p
41073      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41074      cat >>confdefs.h <<_ACEOF
41075#undef SIZEOF_INT_P
41076_ACEOF
41077
41078      # The cast to long int works around a bug in the HP C Compiler
41079# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41080# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41081# This bug is HP SR number 8606223364.
41082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41083$as_echo_n "checking size of int *... " >&6; }
41084if ${ac_cv_sizeof_int_p+:} false; then :
41085  $as_echo_n "(cached) " >&6
41086else
41087  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41088
41089else
41090  if test "$ac_cv_type_int_p" = yes; then
41091     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41092$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41093as_fn_error 77 "cannot compute sizeof (int *)
41094See \`config.log' for more details" "$LINENO" 5; }
41095   else
41096     ac_cv_sizeof_int_p=0
41097   fi
41098fi
41099
41100fi
41101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41102$as_echo "$ac_cv_sizeof_int_p" >&6; }
41103
41104
41105
41106cat >>confdefs.h <<_ACEOF
41107#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41108_ACEOF
41109
41110
41111
41112      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41113
41114      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41115        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
41116      fi
41117    fi
41118  fi
41119
41120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41121$as_echo_n "checking for target address size... " >&6; }
41122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41123$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41124
41125
41126  ###############################################################################
41127  #
41128  # Is the target little of big endian?
41129  #
41130   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41131$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41132if ${ac_cv_c_bigendian+:} false; then :
41133  $as_echo_n "(cached) " >&6
41134else
41135  ac_cv_c_bigendian=unknown
41136    # See if we're dealing with a universal compiler.
41137    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41138/* end confdefs.h.  */
41139#ifndef __APPLE_CC__
41140	       not a universal capable compiler
41141	     #endif
41142	     typedef int dummy;
41143
41144_ACEOF
41145if ac_fn_cxx_try_compile "$LINENO"; then :
41146
41147	# Check for potential -arch flags.  It is not universal unless
41148	# there are at least two -arch flags with different values.
41149	ac_arch=
41150	ac_prev=
41151	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41152	 if test -n "$ac_prev"; then
41153	   case $ac_word in
41154	     i?86 | x86_64 | ppc | ppc64)
41155	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41156		 ac_arch=$ac_word
41157	       else
41158		 ac_cv_c_bigendian=universal
41159		 break
41160	       fi
41161	       ;;
41162	   esac
41163	   ac_prev=
41164	 elif test "x$ac_word" = "x-arch"; then
41165	   ac_prev=arch
41166	 fi
41167       done
41168fi
41169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41170    if test $ac_cv_c_bigendian = unknown; then
41171      # See if sys/param.h defines the BYTE_ORDER macro.
41172      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41173/* end confdefs.h.  */
41174#include <sys/types.h>
41175	     #include <sys/param.h>
41176
41177int
41178main ()
41179{
41180#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41181		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41182		     && LITTLE_ENDIAN)
41183	      bogus endian macros
41184	     #endif
41185
41186  ;
41187  return 0;
41188}
41189_ACEOF
41190if ac_fn_cxx_try_compile "$LINENO"; then :
41191  # It does; now see whether it defined to BIG_ENDIAN or not.
41192	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41193/* end confdefs.h.  */
41194#include <sys/types.h>
41195		#include <sys/param.h>
41196
41197int
41198main ()
41199{
41200#if BYTE_ORDER != BIG_ENDIAN
41201		 not big endian
41202		#endif
41203
41204  ;
41205  return 0;
41206}
41207_ACEOF
41208if ac_fn_cxx_try_compile "$LINENO"; then :
41209  ac_cv_c_bigendian=yes
41210else
41211  ac_cv_c_bigendian=no
41212fi
41213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41214fi
41215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41216    fi
41217    if test $ac_cv_c_bigendian = unknown; then
41218      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41219      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41220/* end confdefs.h.  */
41221#include <limits.h>
41222
41223int
41224main ()
41225{
41226#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41227	      bogus endian macros
41228	     #endif
41229
41230  ;
41231  return 0;
41232}
41233_ACEOF
41234if ac_fn_cxx_try_compile "$LINENO"; then :
41235  # It does; now see whether it defined to _BIG_ENDIAN or not.
41236	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41237/* end confdefs.h.  */
41238#include <limits.h>
41239
41240int
41241main ()
41242{
41243#ifndef _BIG_ENDIAN
41244		 not big endian
41245		#endif
41246
41247  ;
41248  return 0;
41249}
41250_ACEOF
41251if ac_fn_cxx_try_compile "$LINENO"; then :
41252  ac_cv_c_bigendian=yes
41253else
41254  ac_cv_c_bigendian=no
41255fi
41256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41257fi
41258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41259    fi
41260    if test $ac_cv_c_bigendian = unknown; then
41261      # Compile a test program.
41262      if test "$cross_compiling" = yes; then :
41263  # Try to guess by grepping values from an object file.
41264	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41265/* end confdefs.h.  */
41266short int ascii_mm[] =
41267		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41268		short int ascii_ii[] =
41269		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41270		int use_ascii (int i) {
41271		  return ascii_mm[i] + ascii_ii[i];
41272		}
41273		short int ebcdic_ii[] =
41274		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41275		short int ebcdic_mm[] =
41276		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41277		int use_ebcdic (int i) {
41278		  return ebcdic_mm[i] + ebcdic_ii[i];
41279		}
41280		extern int foo;
41281
41282int
41283main ()
41284{
41285return use_ascii (foo) == use_ebcdic (foo);
41286  ;
41287  return 0;
41288}
41289_ACEOF
41290if ac_fn_cxx_try_compile "$LINENO"; then :
41291  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41292	      ac_cv_c_bigendian=yes
41293	    fi
41294	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41295	      if test "$ac_cv_c_bigendian" = unknown; then
41296		ac_cv_c_bigendian=no
41297	      else
41298		# finding both strings is unlikely to happen, but who knows?
41299		ac_cv_c_bigendian=unknown
41300	      fi
41301	    fi
41302fi
41303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41304else
41305  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41306/* end confdefs.h.  */
41307$ac_includes_default
41308int
41309main ()
41310{
41311
41312	     /* Are we little or big endian?  From Harbison&Steele.  */
41313	     union
41314	     {
41315	       long int l;
41316	       char c[sizeof (long int)];
41317	     } u;
41318	     u.l = 1;
41319	     return u.c[sizeof (long int) - 1] == 1;
41320
41321  ;
41322  return 0;
41323}
41324_ACEOF
41325if ac_fn_cxx_try_run "$LINENO"; then :
41326  ac_cv_c_bigendian=no
41327else
41328  ac_cv_c_bigendian=yes
41329fi
41330rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41331  conftest.$ac_objext conftest.beam conftest.$ac_ext
41332fi
41333
41334    fi
41335fi
41336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41337$as_echo "$ac_cv_c_bigendian" >&6; }
41338 case $ac_cv_c_bigendian in #(
41339   yes)
41340     ENDIAN="big";; #(
41341   no)
41342     ENDIAN="little" ;; #(
41343   universal)
41344     ENDIAN="universal_endianness"
41345     ;; #(
41346   *)
41347     ENDIAN="unknown" ;;
41348 esac
41349
41350
41351  if test "x$ENDIAN" = xuniversal_endianness; then
41352    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41353  fi
41354  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41355    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
41356  fi
41357
41358
41359# Configure flags for the tools
41360
41361  ###############################################################################
41362  #
41363  # How to compile shared libraries.
41364  #
41365
41366  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41367    PICFLAG="-fPIC"
41368    C_FLAG_REORDER=''
41369    CXX_FLAG_REORDER=''
41370
41371    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41372      # Linking is different on MacOSX
41373      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41374      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41375      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41376      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41377      SET_SHARED_LIBRARY_MAPFILE=''
41378    else
41379      # Default works for linux, might work on other platforms as well.
41380      SHARED_LIBRARY_FLAGS='-shared'
41381      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41382      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41383      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41384      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41385    fi
41386  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41387    PICFLAG=''
41388    C_FLAG_REORDER=''
41389    CXX_FLAG_REORDER=''
41390
41391    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41392      # Linking is different on MacOSX
41393      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41394      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41395      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41396      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41397      SET_SHARED_LIBRARY_MAPFILE=''
41398    else
41399      # Default works for linux, might work on other platforms as well.
41400      SHARED_LIBRARY_FLAGS='-shared'
41401      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41402      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41403      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41404      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41405    fi
41406  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41407    PICFLAG="-KPIC"
41408    C_FLAG_REORDER='-xF'
41409    CXX_FLAG_REORDER='-xF'
41410    SHARED_LIBRARY_FLAGS="-G"
41411    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41412    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41413    SET_SHARED_LIBRARY_NAME=''
41414    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41415  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41416    PICFLAG="-qpic=large"
41417    C_FLAG_REORDER=''
41418    CXX_FLAG_REORDER=''
41419    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41420    SET_EXECUTABLE_ORIGIN=""
41421    SET_SHARED_LIBRARY_ORIGIN=''
41422    SET_SHARED_LIBRARY_NAME=''
41423    SET_SHARED_LIBRARY_MAPFILE=''
41424  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41425    PICFLAG=""
41426    C_FLAG_REORDER=''
41427    CXX_FLAG_REORDER=''
41428    SHARED_LIBRARY_FLAGS="-LD"
41429    SET_EXECUTABLE_ORIGIN=''
41430    SET_SHARED_LIBRARY_ORIGIN=''
41431    SET_SHARED_LIBRARY_NAME=''
41432    SET_SHARED_LIBRARY_MAPFILE=''
41433  fi
41434
41435
41436
41437
41438
41439
41440
41441
41442
41443  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41444    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41445    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41446    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41447  fi
41448  # The (cross) compiler is now configured, we can now test capabilities
41449  # of the target platform.
41450
41451
41452
41453  ###############################################################################
41454  #
41455  # Setup the opt flags for different compilers
41456  # and different operating systems.
41457  #
41458
41459  # FIXME: this was indirectly the old default, but just inherited.
41460  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41461  #   C_FLAG_DEPS="-MMD -MF"
41462  # fi
41463
41464  # Generate make dependency files
41465  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41466    C_FLAG_DEPS="-MMD -MF"
41467  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41468    C_FLAG_DEPS="-MMD -MF"
41469  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41470    C_FLAG_DEPS="-xMMD -xMF"
41471  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41472    C_FLAG_DEPS="-qmakedep=gcc -MF"
41473  fi
41474  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41475
41476
41477
41478  # Debug symbols
41479  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41480    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41481      CFLAGS_DEBUG_SYMBOLS="-g1"
41482      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41483    else
41484      CFLAGS_DEBUG_SYMBOLS="-g"
41485      CXXFLAGS_DEBUG_SYMBOLS="-g"
41486    fi
41487  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41488    CFLAGS_DEBUG_SYMBOLS="-g"
41489    CXXFLAGS_DEBUG_SYMBOLS="-g"
41490  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41491    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41492    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41493  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41494    CFLAGS_DEBUG_SYMBOLS="-g"
41495    CXXFLAGS_DEBUG_SYMBOLS="-g"
41496  fi
41497
41498
41499
41500  # Optimization levels
41501  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41502    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41503
41504    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41505      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41506      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41507      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41508      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41509      C_O_FLAG_NONE="-xregs=no%frameptr"
41510      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41511      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41512      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41513      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41514      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41515        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41516        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41517      fi
41518    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41519      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41520      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41521      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41522      C_O_FLAG_NONE=""
41523      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41524      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41525      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41526      CXX_O_FLAG_NONE=""
41527    fi
41528  else
41529    # The remaining toolchains share opt flags between CC and CXX;
41530    # setup for C and duplicate afterwards.
41531    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41532      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41533        # On MacOSX we optimize for size, something
41534        # we should do for all platforms?
41535        C_O_FLAG_HIGHEST="-Os"
41536        C_O_FLAG_HI="-Os"
41537        C_O_FLAG_NORM="-Os"
41538        C_O_FLAG_NONE=""
41539      else
41540        C_O_FLAG_HIGHEST="-O3"
41541        C_O_FLAG_HI="-O3"
41542        C_O_FLAG_NORM="-O2"
41543        C_O_FLAG_NONE="-O0"
41544      fi
41545    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41546      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41547        # On MacOSX we optimize for size, something
41548        # we should do for all platforms?
41549        C_O_FLAG_HIGHEST="-Os"
41550        C_O_FLAG_HI="-Os"
41551        C_O_FLAG_NORM="-Os"
41552        C_O_FLAG_NONE=""
41553      else
41554        C_O_FLAG_HIGHEST="-O3"
41555        C_O_FLAG_HI="-O3"
41556        C_O_FLAG_NORM="-O2"
41557        C_O_FLAG_NONE="-O0"
41558      fi
41559    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41560      C_O_FLAG_HIGHEST="-O3"
41561      C_O_FLAG_HI="-O3 -qstrict"
41562      C_O_FLAG_NORM="-O2"
41563      C_O_FLAG_NONE=""
41564    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41565      C_O_FLAG_HIGHEST="-O2"
41566      C_O_FLAG_HI="-O1"
41567      C_O_FLAG_NORM="-O1"
41568      C_O_FLAG_NONE="-Od"
41569    fi
41570    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41571    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41572    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41573    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41574  fi
41575
41576
41577
41578
41579
41580
41581
41582
41583
41584
41585
41586  # Special extras...
41587  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41588    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41589      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41590      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41591    fi
41592  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41593    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41594    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41595    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41596  fi
41597
41598  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41599    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41600$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41601  fi
41602
41603  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41604    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41605$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41606  fi
41607
41608  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41609    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41610$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41611  fi
41612
41613
41614# Check whether --with-extra-cflags was given.
41615if test "${with_extra_cflags+set}" = set; then :
41616  withval=$with_extra_cflags;
41617fi
41618
41619
41620
41621# Check whether --with-extra-cxxflags was given.
41622if test "${with_extra_cxxflags+set}" = set; then :
41623  withval=$with_extra_cxxflags;
41624fi
41625
41626
41627
41628# Check whether --with-extra-ldflags was given.
41629if test "${with_extra_ldflags+set}" = set; then :
41630  withval=$with_extra_ldflags;
41631fi
41632
41633
41634  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41635  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41636  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41637
41638  # Hotspot needs these set in their legacy form
41639  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
41640  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
41641  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
41642
41643
41644
41645
41646
41647  ###############################################################################
41648  #
41649  # Now setup the CFLAGS and LDFLAGS for the JDK build.
41650  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41651  #
41652
41653  # Setup compiler/platform specific flags to CFLAGS_JDK,
41654  # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41655  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41656    # these options are used for both C and C++ compiles
41657    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41658        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41659    case $OPENJDK_TARGET_CPU_ARCH in
41660      arm )
41661        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41662        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41663        ;;
41664      ppc )
41665        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41666        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41667        ;;
41668      * )
41669        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41670        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41671        ;;
41672    esac
41673  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41674    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41675    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41676      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41677      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41678    fi
41679
41680    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41681    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41682  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41683    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41684    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41685  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41686    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41687    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41688    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41689    -DWIN32 -DIAL"
41690    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41691      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41692    else
41693      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41694    fi
41695  fi
41696
41697  ###############################################################################
41698
41699  # Adjust flags according to debug level.
41700  case $DEBUG_LEVEL in
41701    fastdebug )
41702      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41703      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41704      C_O_FLAG_HI="$C_O_FLAG_NORM"
41705      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41706      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41707      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41708      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41709      ;;
41710    slowdebug )
41711      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41712      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41713      C_O_FLAG_HI="$C_O_FLAG_NONE"
41714      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41715      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41716      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41717      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41718      ;;
41719  esac
41720
41721  # Setup LP64
41722  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41723
41724  # Set some common defines. These works for all compilers, but assume
41725  # -D is universally accepted.
41726
41727  # Setup endianness
41728  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41729    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41730    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41731    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41732    #   Note: -Dmacro         is the same as    #define macro 1
41733    #         -Dmacro=        is the same as    #define macro
41734    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41735      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41736    else
41737      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41738    fi
41739  else
41740    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
41741    # are defined in the system?
41742    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41743      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN="
41744    else
41745      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41746    fi
41747  fi
41748
41749  # Setup target OS define. Use OS target name but in upper case.
41750  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41751  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41752
41753  # Setup target CPU
41754  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41755
41756  # Setup debug/release defines
41757  if test "x$DEBUG_LEVEL" = xrelease; then
41758    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41759    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41760      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41761    fi
41762  else
41763    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41764  fi
41765
41766  # Setup release name
41767  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41768
41769
41770  # Set some additional per-OS defines.
41771  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41772    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41773  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41774    # FIXME: PPC64 should not be here.
41775    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41776  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41777    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41778  fi
41779
41780  # Additional macosx handling
41781  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41782    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41783      # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41784      # FIXME: clean this up, and/or move it elsewhere.
41785
41786      # Setting these parameters makes it an error to link to macosx APIs that are
41787      # newer than the given OS version and makes the linked binaries compatible
41788      # even if built on a newer version of the OS.
41789      # The expected format is X.Y.Z
41790      MACOSX_VERSION_MIN=10.7.0
41791
41792
41793      # The macro takes the version with no dots, ex: 1070
41794      # Let the flags variables get resolved in make for easier override on make
41795      # command line.
41796      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41797      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41798    fi
41799  fi
41800
41801  # Setup some hard coded includes
41802  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41803      -I${JDK_OUTPUTDIR}/include \
41804      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41805      -I${JDK_TOPDIR}/src/share/javavm/export \
41806      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41807      -I${JDK_TOPDIR}/src/share/native/common \
41808      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41809
41810  # The shared libraries are compiled using the picflag.
41811  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41812  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41813
41814  # Executable flags
41815  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41816  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41817
41818
41819
41820
41821
41822
41823  # Setup LDFLAGS et al.
41824  #
41825  # Now this is odd. The JDK native libraries have to link against libjvm.so
41826  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41827  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41828  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41829  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41830  # libraries will link to whatever is in memory. Yuck.
41831  #
41832  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41833  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41834    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41835    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41836      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41837    fi
41838    # TODO: make -debug optional "--disable-full-debug-symbols"
41839    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41840    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41841    LDFLAGS_JDKLIB_SUFFIX=""
41842    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41843      LDFLAGS_STACK_SIZE=1048576
41844    else
41845      LDFLAGS_STACK_SIZE=327680
41846    fi
41847    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41848  else
41849    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41850      # If this is a --hash-style=gnu system, use --hash-style=both, why?
41851      # We have previously set HAS_GNU_HASH if this is the case
41852      if test -n "$HAS_GNU_HASH"; then
41853        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41854      fi
41855      if test "x$OPENJDK_TARGET_OS" = xlinux; then
41856        # And since we now know that the linker is gnu, then add -z defs, to forbid
41857        # undefined symbols in object files.
41858        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
41859        if test "x$DEBUG_LEVEL" = "xrelease"; then
41860          # When building release libraries, tell the linker optimize them.
41861          # Should this be supplied to the OSS linker as well?
41862          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41863        fi
41864      fi
41865    fi
41866
41867    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41868      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41869      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41870    fi
41871
41872    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41873        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41874
41875    # On some platforms (mac) the linker warns about non existing -L dirs.
41876    # Add server first if available. Linking aginst client does not always produce the same results.
41877    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41878    # Default to server for other variants.
41879    if test "x$JVM_VARIANT_SERVER" = xtrue; then
41880      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41881    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41882      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41883    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41884      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41885    else
41886      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41887    fi
41888
41889    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41890    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41891      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41892    fi
41893
41894    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41895    if test "x$OPENJDK_TARGET_OS" = xlinux; then
41896      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41897    fi
41898  fi
41899
41900
41901
41902
41903
41904
41905
41906
41907  # Some Zero and Shark settings.
41908  # ZERO_ARCHFLAG tells the compiler which mode to build for
41909  case "${OPENJDK_TARGET_CPU}" in
41910    s390)
41911      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41912      ;;
41913    *)
41914      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41915  esac
41916
41917  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
41918$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41919  supports=yes
41920
41921  saved_cflags="$CFLAGS"
41922  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41923  ac_ext=c
41924ac_cpp='$CPP $CPPFLAGS'
41925ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41926ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41927ac_compiler_gnu=$ac_cv_c_compiler_gnu
41928
41929  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41930/* end confdefs.h.  */
41931int i;
41932_ACEOF
41933if ac_fn_c_try_compile "$LINENO"; then :
41934
41935else
41936  supports=no
41937fi
41938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41939  ac_ext=cpp
41940ac_cpp='$CXXCPP $CPPFLAGS'
41941ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41942ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41943ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41944
41945  CFLAGS="$saved_cflags"
41946
41947  saved_cxxflags="$CXXFLAGS"
41948  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
41949  ac_ext=cpp
41950ac_cpp='$CXXCPP $CPPFLAGS'
41951ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41952ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41953ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41954
41955  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41956/* end confdefs.h.  */
41957int i;
41958_ACEOF
41959if ac_fn_cxx_try_compile "$LINENO"; then :
41960
41961else
41962  supports=no
41963fi
41964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41965  ac_ext=cpp
41966ac_cpp='$CXXCPP $CPPFLAGS'
41967ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41968ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41969ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41970
41971  CXXFLAGS="$saved_cxxflags"
41972
41973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41974$as_echo "$supports" >&6; }
41975  if test "x$supports" = "xyes" ; then
41976    :
41977  else
41978    ZERO_ARCHFLAG=""
41979  fi
41980
41981
41982
41983  # Check that the compiler supports -mX (or -qX on AIX) flags
41984  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
41985
41986  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
41987$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
41988  supports=yes
41989
41990  saved_cflags="$CFLAGS"
41991  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41992  ac_ext=c
41993ac_cpp='$CPP $CPPFLAGS'
41994ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41995ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41996ac_compiler_gnu=$ac_cv_c_compiler_gnu
41997
41998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41999/* end confdefs.h.  */
42000int i;
42001_ACEOF
42002if ac_fn_c_try_compile "$LINENO"; then :
42003
42004else
42005  supports=no
42006fi
42007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42008  ac_ext=cpp
42009ac_cpp='$CXXCPP $CPPFLAGS'
42010ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42011ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42012ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42013
42014  CFLAGS="$saved_cflags"
42015
42016  saved_cxxflags="$CXXFLAGS"
42017  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42018  ac_ext=cpp
42019ac_cpp='$CXXCPP $CPPFLAGS'
42020ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42021ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42022ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42023
42024  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42025/* end confdefs.h.  */
42026int i;
42027_ACEOF
42028if ac_fn_cxx_try_compile "$LINENO"; then :
42029
42030else
42031  supports=no
42032fi
42033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42034  ac_ext=cpp
42035ac_cpp='$CXXCPP $CPPFLAGS'
42036ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42037ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42038ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42039
42040  CXXFLAGS="$saved_cxxflags"
42041
42042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42043$as_echo "$supports" >&6; }
42044  if test "x$supports" = "xyes" ; then
42045    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42046  else
42047    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42048  fi
42049
42050
42051
42052  case "${TOOLCHAIN_TYPE}" in
42053    microsoft)
42054      CFLAGS_WARNINGS_ARE_ERRORS="/WX"
42055      ;;
42056    solstudio)
42057      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42058      ;;
42059    gcc)
42060      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42061      ;;
42062    clang)
42063      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42064      ;;
42065  esac
42066
42067
42068
42069# Setup debug symbols (need objcopy from the toolchain for that)
42070
42071  #
42072  # ENABLE_DEBUG_SYMBOLS
42073  # This must be done after the toolchain is setup, since we're looking at objcopy.
42074  #
42075  # Check whether --enable-debug-symbols was given.
42076if test "${enable_debug_symbols+set}" = set; then :
42077  enableval=$enable_debug_symbols;
42078fi
42079
42080
42081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42082$as_echo_n "checking if we should generate debug symbols... " >&6; }
42083
42084  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42085    # explicit enabling of enable-debug-symbols and can't find objcopy
42086    #   this is an error
42087    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42088  fi
42089
42090  if test "x$enable_debug_symbols" = "xyes"; then
42091    ENABLE_DEBUG_SYMBOLS=true
42092  elif test "x$enable_debug_symbols" = "xno"; then
42093    ENABLE_DEBUG_SYMBOLS=false
42094  else
42095    # Default is on if objcopy is found
42096    if test "x$OBJCOPY" != x; then
42097      ENABLE_DEBUG_SYMBOLS=true
42098    # MacOS X and Windows don't use objcopy but default is on for those OSes
42099    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42100      ENABLE_DEBUG_SYMBOLS=true
42101    else
42102      ENABLE_DEBUG_SYMBOLS=false
42103    fi
42104  fi
42105
42106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42107$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42108
42109  #
42110  # ZIP_DEBUGINFO_FILES
42111  #
42112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42113$as_echo_n "checking if we should zip debug-info files... " >&6; }
42114  # Check whether --enable-zip-debug-info was given.
42115if test "${enable_zip_debug_info+set}" = set; then :
42116  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42117else
42118  enable_zip_debug_info="yes"
42119fi
42120
42121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42122$as_echo "${enable_zip_debug_info}" >&6; }
42123
42124  if test "x${enable_zip_debug_info}" = "xno"; then
42125    ZIP_DEBUGINFO_FILES=false
42126  else
42127    ZIP_DEBUGINFO_FILES=true
42128  fi
42129
42130
42131
42132
42133
42134###############################################################################
42135#
42136# Check dependencies for external and internal libraries.
42137#
42138###############################################################################
42139
42140# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42141
42142  # When using cygwin or msys, we need a wrapper binary that renames
42143  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42144  # @files and rewrites these too! This wrapper binary is
42145  # called fixpath.
42146  FIXPATH=
42147  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42149$as_echo_n "checking if fixpath can be created... " >&6; }
42150    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42151    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42152    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42153      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42154      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42155      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42156      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42157    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42158      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42159      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42160
42161      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42162      # @ was chosen as separator to minimize risk of other tools messing around with it
42163      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42164      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42165
42166      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42167    fi
42168    rm -f $OUTPUT_ROOT/fixpath*
42169    cd $OUTPUT_ROOT
42170    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42171    cd $CURDIR
42172
42173    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42174      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42175$as_echo "no" >&6; }
42176      cat $OUTPUT_ROOT/fixpath1.log
42177      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42178    fi
42179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42180$as_echo "yes" >&6; }
42181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42182$as_echo_n "checking if fixpath.exe works... " >&6; }
42183    cd $OUTPUT_ROOT
42184    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42185    cd $CURDIR
42186    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42187      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42188$as_echo "no" >&6; }
42189      cat $OUTPUT_ROOT/fixpath2.log
42190      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42191    fi
42192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42193$as_echo "yes" >&6; }
42194    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42195  fi
42196
42197
42198
42199
42200
42201
42202  ###############################################################################
42203  #
42204  # OS specific settings that we never will need to probe.
42205  #
42206  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42208$as_echo_n "checking what is not needed on Linux?... " >&6; }
42209    PULSE_NOT_NEEDED=yes
42210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42211$as_echo "pulse" >&6; }
42212  fi
42213
42214  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42215    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42216$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42217    ALSA_NOT_NEEDED=yes
42218    PULSE_NOT_NEEDED=yes
42219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42220$as_echo "alsa pulse" >&6; }
42221  fi
42222
42223  if test "x$OPENJDK_TARGET_OS" = xaix; then
42224    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42225$as_echo_n "checking what is not needed on AIX?... " >&6; }
42226    ALSA_NOT_NEEDED=yes
42227    PULSE_NOT_NEEDED=yes
42228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42229$as_echo "alsa pulse" >&6; }
42230  fi
42231
42232
42233  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42235$as_echo_n "checking what is not needed on Windows?... " >&6; }
42236    CUPS_NOT_NEEDED=yes
42237    ALSA_NOT_NEEDED=yes
42238    PULSE_NOT_NEEDED=yes
42239    X11_NOT_NEEDED=yes
42240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42241$as_echo "alsa cups pulse x11" >&6; }
42242  fi
42243
42244  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42246$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42247    ALSA_NOT_NEEDED=yes
42248    PULSE_NOT_NEEDED=yes
42249    X11_NOT_NEEDED=yes
42250    # If the java runtime framework is disabled, then we need X11.
42251    # This will be adjusted below.
42252    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42253$as_echo "alsa pulse x11" >&6; }
42254  fi
42255
42256  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42258$as_echo_n "checking what is not needed on bsd?... " >&6; }
42259    ALSA_NOT_NEEDED=yes
42260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42261$as_echo "alsa" >&6; }
42262  fi
42263
42264  if test "x$OPENJDK" = "xfalse"; then
42265    FREETYPE_NOT_NEEDED=yes
42266  fi
42267
42268  if test "x$SUPPORT_HEADFUL" = xno; then
42269    X11_NOT_NEEDED=yes
42270  fi
42271
42272  ###############################################################################
42273  #
42274  # Check for MacOSX support for OpenJDK.
42275  #
42276
42277
42278  # Check whether --enable-macosx-runtime-support was given.
42279if test "${enable_macosx_runtime_support+set}" = set; then :
42280  enableval=$enable_macosx_runtime_support;
42281fi
42282
42283  if test "x$enable_macosx_runtime_support" != x; then
42284    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42285$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42286  fi
42287
42288
42289  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42290$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42291  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42293$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42294  else
42295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42296$as_echo "no" >&6; }
42297  fi
42298
42299
42300
42301  ###############################################################################
42302  #
42303  # Check for X Windows
42304  #
42305
42306  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42307  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42308  # --x-libraries for the sysroot, if that seems to be correct.
42309  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42310    if test "x$SYSROOT" != "x"; then
42311      if test "x$x_includes" = xNONE; then
42312        if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42313          x_includes="$SYSROOT/usr/X11R6/include"
42314        elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42315          x_includes="$SYSROOT/usr/include"
42316        fi
42317      fi
42318      if test "x$x_libraries" = xNONE; then
42319        if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42320          x_libraries="$SYSROOT/usr/X11R6/lib"
42321        elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42322          x_libraries="$SYSROOT/usr/lib64"
42323        elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42324          x_libraries="$SYSROOT/usr/lib"
42325        fi
42326      fi
42327    fi
42328  fi
42329
42330  # Now let autoconf do it's magic
42331  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42332$as_echo_n "checking for X... " >&6; }
42333
42334
42335# Check whether --with-x was given.
42336if test "${with_x+set}" = set; then :
42337  withval=$with_x;
42338fi
42339
42340# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42341if test "x$with_x" = xno; then
42342  # The user explicitly disabled X.
42343  have_x=disabled
42344else
42345  case $x_includes,$x_libraries in #(
42346    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42347    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42348  $as_echo_n "(cached) " >&6
42349else
42350  # One or both of the vars are not set, and there is no cached value.
42351ac_x_includes=no ac_x_libraries=no
42352rm -f -r conftest.dir
42353if mkdir conftest.dir; then
42354  cd conftest.dir
42355  cat >Imakefile <<'_ACEOF'
42356incroot:
42357	@echo incroot='${INCROOT}'
42358usrlibdir:
42359	@echo usrlibdir='${USRLIBDIR}'
42360libdir:
42361	@echo libdir='${LIBDIR}'
42362_ACEOF
42363  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42364    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42365    for ac_var in incroot usrlibdir libdir; do
42366      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42367    done
42368    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42369    for ac_extension in a so sl dylib la dll; do
42370      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42371	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42372	ac_im_usrlibdir=$ac_im_libdir; break
42373      fi
42374    done
42375    # Screen out bogus values from the imake configuration.  They are
42376    # bogus both because they are the default anyway, and because
42377    # using them would break gcc on systems where it needs fixed includes.
42378    case $ac_im_incroot in
42379	/usr/include) ac_x_includes= ;;
42380	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42381    esac
42382    case $ac_im_usrlibdir in
42383	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42384	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42385    esac
42386  fi
42387  cd ..
42388  rm -f -r conftest.dir
42389fi
42390
42391# Standard set of common directories for X headers.
42392# Check X11 before X11Rn because it is often a symlink to the current release.
42393ac_x_header_dirs='
42394/usr/X11/include
42395/usr/X11R7/include
42396/usr/X11R6/include
42397/usr/X11R5/include
42398/usr/X11R4/include
42399
42400/usr/include/X11
42401/usr/include/X11R7
42402/usr/include/X11R6
42403/usr/include/X11R5
42404/usr/include/X11R4
42405
42406/usr/local/X11/include
42407/usr/local/X11R7/include
42408/usr/local/X11R6/include
42409/usr/local/X11R5/include
42410/usr/local/X11R4/include
42411
42412/usr/local/include/X11
42413/usr/local/include/X11R7
42414/usr/local/include/X11R6
42415/usr/local/include/X11R5
42416/usr/local/include/X11R4
42417
42418/usr/X386/include
42419/usr/x386/include
42420/usr/XFree86/include/X11
42421
42422/usr/include
42423/usr/local/include
42424/usr/unsupported/include
42425/usr/athena/include
42426/usr/local/x11r5/include
42427/usr/lpp/Xamples/include
42428
42429/usr/openwin/include
42430/usr/openwin/share/include'
42431
42432if test "$ac_x_includes" = no; then
42433  # Guess where to find include files, by looking for Xlib.h.
42434  # First, try using that file with no special directory specified.
42435  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42436/* end confdefs.h.  */
42437#include <X11/Xlib.h>
42438_ACEOF
42439if ac_fn_cxx_try_cpp "$LINENO"; then :
42440  # We can compile using X headers with no special include directory.
42441ac_x_includes=
42442else
42443  for ac_dir in $ac_x_header_dirs; do
42444  if test -r "$ac_dir/X11/Xlib.h"; then
42445    ac_x_includes=$ac_dir
42446    break
42447  fi
42448done
42449fi
42450rm -f conftest.err conftest.i conftest.$ac_ext
42451fi # $ac_x_includes = no
42452
42453if test "$ac_x_libraries" = no; then
42454  # Check for the libraries.
42455  # See if we find them without any special options.
42456  # Don't add to $LIBS permanently.
42457  ac_save_LIBS=$LIBS
42458  LIBS="-lX11 $LIBS"
42459  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42460/* end confdefs.h.  */
42461#include <X11/Xlib.h>
42462int
42463main ()
42464{
42465XrmInitialize ()
42466  ;
42467  return 0;
42468}
42469_ACEOF
42470if ac_fn_cxx_try_link "$LINENO"; then :
42471  LIBS=$ac_save_LIBS
42472# We can link X programs with no special library path.
42473ac_x_libraries=
42474else
42475  LIBS=$ac_save_LIBS
42476for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42477do
42478  # Don't even attempt the hair of trying to link an X program!
42479  for ac_extension in a so sl dylib la dll; do
42480    if test -r "$ac_dir/libX11.$ac_extension"; then
42481      ac_x_libraries=$ac_dir
42482      break 2
42483    fi
42484  done
42485done
42486fi
42487rm -f core conftest.err conftest.$ac_objext \
42488    conftest$ac_exeext conftest.$ac_ext
42489fi # $ac_x_libraries = no
42490
42491case $ac_x_includes,$ac_x_libraries in #(
42492  no,* | *,no | *\'*)
42493    # Didn't find X, or a directory has "'" in its name.
42494    ac_cv_have_x="have_x=no";; #(
42495  *)
42496    # Record where we found X for the cache.
42497    ac_cv_have_x="have_x=yes\
42498	ac_x_includes='$ac_x_includes'\
42499	ac_x_libraries='$ac_x_libraries'"
42500esac
42501fi
42502;; #(
42503    *) have_x=yes;;
42504  esac
42505  eval "$ac_cv_have_x"
42506fi # $with_x != no
42507
42508if test "$have_x" != yes; then
42509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42510$as_echo "$have_x" >&6; }
42511  no_x=yes
42512else
42513  # If each of the values was on the command line, it overrides each guess.
42514  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42515  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42516  # Update the cache value to reflect the command line values.
42517  ac_cv_have_x="have_x=yes\
42518	ac_x_includes='$x_includes'\
42519	ac_x_libraries='$x_libraries'"
42520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42521$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42522fi
42523
42524  if test "$no_x" = yes; then
42525  # Not all programs may use this symbol, but it does not hurt to define it.
42526
42527$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42528
42529  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42530else
42531  if test -n "$x_includes"; then
42532    X_CFLAGS="$X_CFLAGS -I$x_includes"
42533  fi
42534
42535  # It would also be nice to do this for all -L options, not just this one.
42536  if test -n "$x_libraries"; then
42537    X_LIBS="$X_LIBS -L$x_libraries"
42538    # For Solaris; some versions of Sun CC require a space after -R and
42539    # others require no space.  Words are not sufficient . . . .
42540    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42541$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42542    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42543    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42544    ac_cxx_werror_flag=yes
42545    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42546/* end confdefs.h.  */
42547
42548int
42549main ()
42550{
42551
42552  ;
42553  return 0;
42554}
42555_ACEOF
42556if ac_fn_cxx_try_link "$LINENO"; then :
42557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42558$as_echo "no" >&6; }
42559       X_LIBS="$X_LIBS -R$x_libraries"
42560else
42561  LIBS="$ac_xsave_LIBS -R $x_libraries"
42562       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42563/* end confdefs.h.  */
42564
42565int
42566main ()
42567{
42568
42569  ;
42570  return 0;
42571}
42572_ACEOF
42573if ac_fn_cxx_try_link "$LINENO"; then :
42574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42575$as_echo "yes" >&6; }
42576	  X_LIBS="$X_LIBS -R $x_libraries"
42577else
42578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42579$as_echo "neither works" >&6; }
42580fi
42581rm -f core conftest.err conftest.$ac_objext \
42582    conftest$ac_exeext conftest.$ac_ext
42583fi
42584rm -f core conftest.err conftest.$ac_objext \
42585    conftest$ac_exeext conftest.$ac_ext
42586    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42587    LIBS=$ac_xsave_LIBS
42588  fi
42589
42590  # Check for system-dependent libraries X programs must link with.
42591  # Do this before checking for the system-independent R6 libraries
42592  # (-lICE), since we may need -lsocket or whatever for X linking.
42593
42594  if test "$ISC" = yes; then
42595    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42596  else
42597    # Martyn Johnson says this is needed for Ultrix, if the X
42598    # libraries were built with DECnet support.  And Karl Berry says
42599    # the Alpha needs dnet_stub (dnet does not exist).
42600    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42601    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42602/* end confdefs.h.  */
42603
42604/* Override any GCC internal prototype to avoid an error.
42605   Use char because int might match the return type of a GCC
42606   builtin and then its argument prototype would still apply.  */
42607#ifdef __cplusplus
42608extern "C"
42609#endif
42610char XOpenDisplay ();
42611int
42612main ()
42613{
42614return XOpenDisplay ();
42615  ;
42616  return 0;
42617}
42618_ACEOF
42619if ac_fn_cxx_try_link "$LINENO"; then :
42620
42621else
42622  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42623$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42624if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42625  $as_echo_n "(cached) " >&6
42626else
42627  ac_check_lib_save_LIBS=$LIBS
42628LIBS="-ldnet  $LIBS"
42629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42630/* end confdefs.h.  */
42631
42632/* Override any GCC internal prototype to avoid an error.
42633   Use char because int might match the return type of a GCC
42634   builtin and then its argument prototype would still apply.  */
42635#ifdef __cplusplus
42636extern "C"
42637#endif
42638char dnet_ntoa ();
42639int
42640main ()
42641{
42642return dnet_ntoa ();
42643  ;
42644  return 0;
42645}
42646_ACEOF
42647if ac_fn_cxx_try_link "$LINENO"; then :
42648  ac_cv_lib_dnet_dnet_ntoa=yes
42649else
42650  ac_cv_lib_dnet_dnet_ntoa=no
42651fi
42652rm -f core conftest.err conftest.$ac_objext \
42653    conftest$ac_exeext conftest.$ac_ext
42654LIBS=$ac_check_lib_save_LIBS
42655fi
42656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42657$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42658if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42659  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42660fi
42661
42662    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42663      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42664$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42665if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42666  $as_echo_n "(cached) " >&6
42667else
42668  ac_check_lib_save_LIBS=$LIBS
42669LIBS="-ldnet_stub  $LIBS"
42670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42671/* end confdefs.h.  */
42672
42673/* Override any GCC internal prototype to avoid an error.
42674   Use char because int might match the return type of a GCC
42675   builtin and then its argument prototype would still apply.  */
42676#ifdef __cplusplus
42677extern "C"
42678#endif
42679char dnet_ntoa ();
42680int
42681main ()
42682{
42683return dnet_ntoa ();
42684  ;
42685  return 0;
42686}
42687_ACEOF
42688if ac_fn_cxx_try_link "$LINENO"; then :
42689  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42690else
42691  ac_cv_lib_dnet_stub_dnet_ntoa=no
42692fi
42693rm -f core conftest.err conftest.$ac_objext \
42694    conftest$ac_exeext conftest.$ac_ext
42695LIBS=$ac_check_lib_save_LIBS
42696fi
42697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42698$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42699if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42700  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42701fi
42702
42703    fi
42704fi
42705rm -f core conftest.err conftest.$ac_objext \
42706    conftest$ac_exeext conftest.$ac_ext
42707    LIBS="$ac_xsave_LIBS"
42708
42709    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42710    # to get the SysV transport functions.
42711    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42712    # needs -lnsl.
42713    # The nsl library prevents programs from opening the X display
42714    # on Irix 5.2, according to T.E. Dickey.
42715    # The functions gethostbyname, getservbyname, and inet_addr are
42716    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42717    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42718if test "x$ac_cv_func_gethostbyname" = xyes; then :
42719
42720fi
42721
42722    if test $ac_cv_func_gethostbyname = no; then
42723      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42724$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42725if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42726  $as_echo_n "(cached) " >&6
42727else
42728  ac_check_lib_save_LIBS=$LIBS
42729LIBS="-lnsl  $LIBS"
42730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42731/* end confdefs.h.  */
42732
42733/* Override any GCC internal prototype to avoid an error.
42734   Use char because int might match the return type of a GCC
42735   builtin and then its argument prototype would still apply.  */
42736#ifdef __cplusplus
42737extern "C"
42738#endif
42739char gethostbyname ();
42740int
42741main ()
42742{
42743return gethostbyname ();
42744  ;
42745  return 0;
42746}
42747_ACEOF
42748if ac_fn_cxx_try_link "$LINENO"; then :
42749  ac_cv_lib_nsl_gethostbyname=yes
42750else
42751  ac_cv_lib_nsl_gethostbyname=no
42752fi
42753rm -f core conftest.err conftest.$ac_objext \
42754    conftest$ac_exeext conftest.$ac_ext
42755LIBS=$ac_check_lib_save_LIBS
42756fi
42757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42758$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42759if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42760  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42761fi
42762
42763      if test $ac_cv_lib_nsl_gethostbyname = no; then
42764	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42765$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42766if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42767  $as_echo_n "(cached) " >&6
42768else
42769  ac_check_lib_save_LIBS=$LIBS
42770LIBS="-lbsd  $LIBS"
42771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42772/* end confdefs.h.  */
42773
42774/* Override any GCC internal prototype to avoid an error.
42775   Use char because int might match the return type of a GCC
42776   builtin and then its argument prototype would still apply.  */
42777#ifdef __cplusplus
42778extern "C"
42779#endif
42780char gethostbyname ();
42781int
42782main ()
42783{
42784return gethostbyname ();
42785  ;
42786  return 0;
42787}
42788_ACEOF
42789if ac_fn_cxx_try_link "$LINENO"; then :
42790  ac_cv_lib_bsd_gethostbyname=yes
42791else
42792  ac_cv_lib_bsd_gethostbyname=no
42793fi
42794rm -f core conftest.err conftest.$ac_objext \
42795    conftest$ac_exeext conftest.$ac_ext
42796LIBS=$ac_check_lib_save_LIBS
42797fi
42798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42799$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42800if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42801  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42802fi
42803
42804      fi
42805    fi
42806
42807    # lieder@skyler.mavd.honeywell.com says without -lsocket,
42808    # socket/setsockopt and other routines are undefined under SCO ODT
42809    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42810    # on later versions), says Simon Leinen: it contains gethostby*
42811    # variants that don't use the name server (or something).  -lsocket
42812    # must be given before -lnsl if both are needed.  We assume that
42813    # if connect needs -lnsl, so does gethostbyname.
42814    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42815if test "x$ac_cv_func_connect" = xyes; then :
42816
42817fi
42818
42819    if test $ac_cv_func_connect = no; then
42820      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42821$as_echo_n "checking for connect in -lsocket... " >&6; }
42822if ${ac_cv_lib_socket_connect+:} false; then :
42823  $as_echo_n "(cached) " >&6
42824else
42825  ac_check_lib_save_LIBS=$LIBS
42826LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
42827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42828/* end confdefs.h.  */
42829
42830/* Override any GCC internal prototype to avoid an error.
42831   Use char because int might match the return type of a GCC
42832   builtin and then its argument prototype would still apply.  */
42833#ifdef __cplusplus
42834extern "C"
42835#endif
42836char connect ();
42837int
42838main ()
42839{
42840return connect ();
42841  ;
42842  return 0;
42843}
42844_ACEOF
42845if ac_fn_cxx_try_link "$LINENO"; then :
42846  ac_cv_lib_socket_connect=yes
42847else
42848  ac_cv_lib_socket_connect=no
42849fi
42850rm -f core conftest.err conftest.$ac_objext \
42851    conftest$ac_exeext conftest.$ac_ext
42852LIBS=$ac_check_lib_save_LIBS
42853fi
42854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
42855$as_echo "$ac_cv_lib_socket_connect" >&6; }
42856if test "x$ac_cv_lib_socket_connect" = xyes; then :
42857  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
42858fi
42859
42860    fi
42861
42862    # Guillermo Gomez says -lposix is necessary on A/UX.
42863    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
42864if test "x$ac_cv_func_remove" = xyes; then :
42865
42866fi
42867
42868    if test $ac_cv_func_remove = no; then
42869      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
42870$as_echo_n "checking for remove in -lposix... " >&6; }
42871if ${ac_cv_lib_posix_remove+:} false; then :
42872  $as_echo_n "(cached) " >&6
42873else
42874  ac_check_lib_save_LIBS=$LIBS
42875LIBS="-lposix  $LIBS"
42876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42877/* end confdefs.h.  */
42878
42879/* Override any GCC internal prototype to avoid an error.
42880   Use char because int might match the return type of a GCC
42881   builtin and then its argument prototype would still apply.  */
42882#ifdef __cplusplus
42883extern "C"
42884#endif
42885char remove ();
42886int
42887main ()
42888{
42889return remove ();
42890  ;
42891  return 0;
42892}
42893_ACEOF
42894if ac_fn_cxx_try_link "$LINENO"; then :
42895  ac_cv_lib_posix_remove=yes
42896else
42897  ac_cv_lib_posix_remove=no
42898fi
42899rm -f core conftest.err conftest.$ac_objext \
42900    conftest$ac_exeext conftest.$ac_ext
42901LIBS=$ac_check_lib_save_LIBS
42902fi
42903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
42904$as_echo "$ac_cv_lib_posix_remove" >&6; }
42905if test "x$ac_cv_lib_posix_remove" = xyes; then :
42906  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
42907fi
42908
42909    fi
42910
42911    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
42912    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
42913if test "x$ac_cv_func_shmat" = xyes; then :
42914
42915fi
42916
42917    if test $ac_cv_func_shmat = no; then
42918      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
42919$as_echo_n "checking for shmat in -lipc... " >&6; }
42920if ${ac_cv_lib_ipc_shmat+:} false; then :
42921  $as_echo_n "(cached) " >&6
42922else
42923  ac_check_lib_save_LIBS=$LIBS
42924LIBS="-lipc  $LIBS"
42925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42926/* end confdefs.h.  */
42927
42928/* Override any GCC internal prototype to avoid an error.
42929   Use char because int might match the return type of a GCC
42930   builtin and then its argument prototype would still apply.  */
42931#ifdef __cplusplus
42932extern "C"
42933#endif
42934char shmat ();
42935int
42936main ()
42937{
42938return shmat ();
42939  ;
42940  return 0;
42941}
42942_ACEOF
42943if ac_fn_cxx_try_link "$LINENO"; then :
42944  ac_cv_lib_ipc_shmat=yes
42945else
42946  ac_cv_lib_ipc_shmat=no
42947fi
42948rm -f core conftest.err conftest.$ac_objext \
42949    conftest$ac_exeext conftest.$ac_ext
42950LIBS=$ac_check_lib_save_LIBS
42951fi
42952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
42953$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
42954if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
42955  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
42956fi
42957
42958    fi
42959  fi
42960
42961  # Check for libraries that X11R6 Xt/Xaw programs need.
42962  ac_save_LDFLAGS=$LDFLAGS
42963  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
42964  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
42965  # check for ICE first), but we must link in the order -lSM -lICE or
42966  # we get undefined symbols.  So assume we have SM if we have ICE.
42967  # These have to be linked with before -lX11, unlike the other
42968  # libraries we check for below, so use a different variable.
42969  # John Interrante, Karl Berry
42970  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
42971$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
42972if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
42973  $as_echo_n "(cached) " >&6
42974else
42975  ac_check_lib_save_LIBS=$LIBS
42976LIBS="-lICE $X_EXTRA_LIBS $LIBS"
42977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42978/* end confdefs.h.  */
42979
42980/* Override any GCC internal prototype to avoid an error.
42981   Use char because int might match the return type of a GCC
42982   builtin and then its argument prototype would still apply.  */
42983#ifdef __cplusplus
42984extern "C"
42985#endif
42986char IceConnectionNumber ();
42987int
42988main ()
42989{
42990return IceConnectionNumber ();
42991  ;
42992  return 0;
42993}
42994_ACEOF
42995if ac_fn_cxx_try_link "$LINENO"; then :
42996  ac_cv_lib_ICE_IceConnectionNumber=yes
42997else
42998  ac_cv_lib_ICE_IceConnectionNumber=no
42999fi
43000rm -f core conftest.err conftest.$ac_objext \
43001    conftest$ac_exeext conftest.$ac_ext
43002LIBS=$ac_check_lib_save_LIBS
43003fi
43004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43005$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43006if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43007  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43008fi
43009
43010  LDFLAGS=$ac_save_LDFLAGS
43011
43012fi
43013
43014
43015  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43016  # this doesn't make sense so we remove it.
43017  if test "x$COMPILE_TYPE" = xcross; then
43018    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43019  fi
43020
43021  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43022
43023  # Print a helpful message on how to acquire the necessary build dependency.
43024  # x11 is the help tag: freetype, cups, pulse, alsa etc
43025  MISSING_DEPENDENCY=x11
43026
43027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43028    cygwin_help $MISSING_DEPENDENCY
43029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43030    msys_help $MISSING_DEPENDENCY
43031  else
43032    PKGHANDLER_COMMAND=
43033
43034    case $PKGHANDLER in
43035      apt-get)
43036        apt_help     $MISSING_DEPENDENCY ;;
43037      yum)
43038        yum_help     $MISSING_DEPENDENCY ;;
43039      port)
43040        port_help    $MISSING_DEPENDENCY ;;
43041      pkgutil)
43042        pkgutil_help $MISSING_DEPENDENCY ;;
43043      pkgadd)
43044        pkgadd_help  $MISSING_DEPENDENCY ;;
43045    esac
43046
43047    if test "x$PKGHANDLER_COMMAND" != x; then
43048      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43049    fi
43050  fi
43051
43052    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43053  fi
43054
43055  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43056    OPENWIN_HOME="/usr/openwin"
43057    X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43058    X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43059        -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43060        -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43061        -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43062  fi
43063
43064  #
43065  # Weird Sol10 something check...TODO change to try compile
43066  #
43067  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43068    if test "`uname -r`" = "5.10"; then
43069      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43070        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43071      fi
43072    fi
43073  fi
43074
43075  ac_ext=c
43076ac_cpp='$CPP $CPPFLAGS'
43077ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43078ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43079ac_compiler_gnu=$ac_cv_c_compiler_gnu
43080
43081  OLD_CFLAGS="$CFLAGS"
43082  CFLAGS="$CFLAGS $X_CFLAGS"
43083
43084  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43085  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43086do :
43087  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43088ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43089        # include <X11/Xlib.h>
43090        # include <X11/Xutil.h>
43091
43092
43093"
43094if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43095  cat >>confdefs.h <<_ACEOF
43096#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43097_ACEOF
43098 X11_A_OK=yes
43099else
43100  X11_A_OK=no; break
43101fi
43102
43103done
43104
43105
43106  CFLAGS="$OLD_CFLAGS"
43107  ac_ext=cpp
43108ac_cpp='$CXXCPP $CPPFLAGS'
43109ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43110ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43111ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43112
43113
43114  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43115
43116  # Print a helpful message on how to acquire the necessary build dependency.
43117  # x11 is the help tag: freetype, cups, pulse, alsa etc
43118  MISSING_DEPENDENCY=x11
43119
43120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43121    cygwin_help $MISSING_DEPENDENCY
43122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43123    msys_help $MISSING_DEPENDENCY
43124  else
43125    PKGHANDLER_COMMAND=
43126
43127    case $PKGHANDLER in
43128      apt-get)
43129        apt_help     $MISSING_DEPENDENCY ;;
43130      yum)
43131        yum_help     $MISSING_DEPENDENCY ;;
43132      port)
43133        port_help    $MISSING_DEPENDENCY ;;
43134      pkgutil)
43135        pkgutil_help $MISSING_DEPENDENCY ;;
43136      pkgadd)
43137        pkgadd_help  $MISSING_DEPENDENCY ;;
43138    esac
43139
43140    if test "x$PKGHANDLER_COMMAND" != x; then
43141      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43142    fi
43143  fi
43144
43145    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43146  fi
43147
43148
43149
43150
43151
43152
43153  ###############################################################################
43154  #
43155  # The common unix printing system cups is used to print from java.
43156  #
43157
43158# Check whether --with-cups was given.
43159if test "${with_cups+set}" = set; then :
43160  withval=$with_cups;
43161fi
43162
43163
43164# Check whether --with-cups-include was given.
43165if test "${with_cups_include+set}" = set; then :
43166  withval=$with_cups_include;
43167fi
43168
43169
43170  if test "x$CUPS_NOT_NEEDED" = xyes; then
43171    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43172      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43173$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43174    fi
43175    CUPS_CFLAGS=
43176  else
43177    CUPS_FOUND=no
43178
43179    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43180      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43181    fi
43182
43183    if test "x${with_cups}" != x; then
43184      CUPS_CFLAGS="-I${with_cups}/include"
43185      CUPS_FOUND=yes
43186    fi
43187    if test "x${with_cups_include}" != x; then
43188      CUPS_CFLAGS="-I${with_cups_include}"
43189      CUPS_FOUND=yes
43190    fi
43191    if test "x$CUPS_FOUND" = xno; then
43192
43193
43194  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43195    # Source the builddeps file again, to make sure it uses the latest variables!
43196    . $builddepsfile
43197    # Look for a target and build machine specific resource!
43198    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43199    if test "x$resource" = x; then
43200      # Ok, lets instead look for a target specific resource
43201      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43202    fi
43203    if test "x$resource" = x; then
43204      # Ok, lets instead look for a build specific resource
43205      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43206    fi
43207    if test "x$resource" = x; then
43208      # Ok, lets instead look for a generic resource
43209      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43210      resource=${builddep_cups}
43211    fi
43212    if test "x$resource" != x; then
43213      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43214$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43215      # If the resource in the builddeps.conf file is an existing directory,
43216      # for example /java/linux/cups
43217      if test -d ${resource}; then
43218        depdir=${resource}
43219      else
43220
43221  # cups is for example mymodule
43222  # $resource is for example libs/general/libmymod_1_2_3.zip
43223  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43224  # $with_builddeps_dir is for example /localhome/builddeps
43225  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43226  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43227  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43228  filename=`basename $resource`
43229  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43230  filebase=${filename%%.*}
43231  extension=${filename#*.}
43232  installdir=$with_builddeps_dir/$filebase
43233  if test ! -f $installdir/$filename.unpacked; then
43234    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43235$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43236    if test ! -d $installdir; then
43237      mkdir -p $installdir
43238    fi
43239    if test ! -d $installdir; then
43240      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43241    fi
43242    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43243    touch $tmpfile
43244    if test ! -f $tmpfile; then
43245      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43246    fi
43247
43248  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43249  # $tmpfile is the local file name for the downloaded file.
43250  VALID_TOOL=no
43251  if test "x$BDEPS_FTP" = xwget; then
43252    VALID_TOOL=yes
43253    wget -O $tmpfile $with_builddeps_server/$resource
43254  fi
43255  if test "x$BDEPS_FTP" = xlftp; then
43256    VALID_TOOL=yes
43257    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43258  fi
43259  if test "x$BDEPS_FTP" = xftp; then
43260    VALID_TOOL=yes
43261    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43262    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43263    FTPUSERPWD=${FTPSERVER%%@*}
43264    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43265      FTPUSER=${userpwd%%:*}
43266      FTPPWD=${userpwd#*@}
43267      FTPSERVER=${FTPSERVER#*@}
43268    else
43269      FTPUSER=ftp
43270      FTPPWD=ftp
43271    fi
43272    # the "pass" command does not work on some
43273    # ftp clients (read ftp.exe) but if it works,
43274    # passive mode is better!
43275    ( \
43276        echo "user $FTPUSER $FTPPWD"        ; \
43277        echo "pass"                         ; \
43278        echo "bin"                          ; \
43279        echo "get $FTPPATH $tmpfile"              ; \
43280    ) | ftp -in $FTPSERVER
43281  fi
43282  if test "x$VALID_TOOL" != xyes; then
43283    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43284  fi
43285
43286    mv $tmpfile $installdir/$filename
43287    if test ! -s $installdir/$filename; then
43288      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43289    fi
43290    case "$extension" in
43291      zip)  echo "Unzipping $installdir/$filename..."
43292        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43293        ;;
43294      tar.gz) echo "Untaring $installdir/$filename..."
43295        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43296        ;;
43297      tgz) echo "Untaring $installdir/$filename..."
43298        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43299        ;;
43300      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43301        ;;
43302    esac
43303  fi
43304  if test -f $installdir/$filename.unpacked; then
43305    depdir=$installdir
43306  fi
43307
43308      fi
43309      # Source the builddeps file again, because in the previous command, the depdir
43310      # was updated to point at the current build dependency install directory.
43311      . $builddepsfile
43312      # Now extract variables from the builddeps.conf files.
43313      theroot=${builddep_cups_ROOT}
43314      thecflags=${builddep_cups_CFLAGS}
43315      thelibs=${builddep_cups_LIBS}
43316      if test "x$depdir" = x; then
43317        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43318      fi
43319      CUPS=$depdir
43320      if test "x$theroot" != x; then
43321        CUPS="$theroot"
43322      fi
43323      if test "x$thecflags" != x; then
43324        CUPS_CFLAGS="$thecflags"
43325      fi
43326      if test "x$thelibs" != x; then
43327        CUPS_LIBS="$thelibs"
43328      fi
43329      CUPS_FOUND=yes
43330
43331    fi
43332
43333  fi
43334
43335    fi
43336    if test "x$CUPS_FOUND" = xno; then
43337      # Are the cups headers installed in the default /usr/include location?
43338      for ac_header in cups/cups.h cups/ppd.h
43339do :
43340  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43341ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43342if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43343  cat >>confdefs.h <<_ACEOF
43344#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43345_ACEOF
43346
43347            CUPS_FOUND=yes
43348            CUPS_CFLAGS=
43349            DEFAULT_CUPS=yes
43350
43351
43352fi
43353
43354done
43355
43356    fi
43357    if test "x$CUPS_FOUND" = xno; then
43358      # Getting nervous now? Lets poke around for standard Solaris third-party
43359      # package installation locations.
43360      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43361$as_echo_n "checking for cups headers... " >&6; }
43362      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43363        # An SFW package seems to be installed!
43364        CUPS_FOUND=yes
43365        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43366      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43367        # A CSW package seems to be installed!
43368        CUPS_FOUND=yes
43369        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43370      fi
43371      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43372$as_echo "$CUPS_FOUND" >&6; }
43373    fi
43374    if test "x$CUPS_FOUND" = xno; then
43375
43376  # Print a helpful message on how to acquire the necessary build dependency.
43377  # cups is the help tag: freetype, cups, pulse, alsa etc
43378  MISSING_DEPENDENCY=cups
43379
43380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43381    cygwin_help $MISSING_DEPENDENCY
43382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43383    msys_help $MISSING_DEPENDENCY
43384  else
43385    PKGHANDLER_COMMAND=
43386
43387    case $PKGHANDLER in
43388      apt-get)
43389        apt_help     $MISSING_DEPENDENCY ;;
43390      yum)
43391        yum_help     $MISSING_DEPENDENCY ;;
43392      port)
43393        port_help    $MISSING_DEPENDENCY ;;
43394      pkgutil)
43395        pkgutil_help $MISSING_DEPENDENCY ;;
43396      pkgadd)
43397        pkgadd_help  $MISSING_DEPENDENCY ;;
43398    esac
43399
43400    if test "x$PKGHANDLER_COMMAND" != x; then
43401      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43402    fi
43403  fi
43404
43405      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43406    fi
43407  fi
43408
43409
43410
43411
43412
43413
43414  ###############################################################################
43415  #
43416  # The ubiquitous freetype library is used to render fonts.
43417  #
43418
43419# Check whether --with-freetype was given.
43420if test "${with_freetype+set}" = set; then :
43421  withval=$with_freetype;
43422fi
43423
43424
43425# Check whether --with-freetype-include was given.
43426if test "${with_freetype_include+set}" = set; then :
43427  withval=$with_freetype_include;
43428fi
43429
43430
43431# Check whether --with-freetype-lib was given.
43432if test "${with_freetype_lib+set}" = set; then :
43433  withval=$with_freetype_lib;
43434fi
43435
43436  # Check whether --enable-freetype-bundling was given.
43437if test "${enable_freetype_bundling+set}" = set; then :
43438  enableval=$enable_freetype_bundling;
43439fi
43440
43441
43442  FREETYPE_CFLAGS=
43443  FREETYPE_LIBS=
43444  FREETYPE_BUNDLE_LIB_PATH=
43445
43446  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43447    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43448      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43449$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43450    fi
43451    if test "x$enable_freetype_bundling" != x; then
43452      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43453$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43454    fi
43455  else
43456    # freetype is needed to build; go get it!
43457
43458    BUNDLE_FREETYPE="$enable_freetype_bundling"
43459
43460    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43461      # User has specified settings
43462
43463      if test "x$BUNDLE_FREETYPE" = x; then
43464        # If not specified, default is to bundle freetype
43465        BUNDLE_FREETYPE=yes
43466      fi
43467
43468      if test "x$with_freetype" != x; then
43469        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43470        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43471      fi
43472
43473      # Allow --with-freetype-lib and --with-freetype-include to override
43474      if test "x$with_freetype_include" != x; then
43475        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43476      fi
43477      if test "x$with_freetype_lib" != x; then
43478        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43479      fi
43480
43481      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43482        # Okay, we got it. Check that it works.
43483
43484  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43485  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43486  METHOD="--with-freetype"
43487
43488  # First check if the files exists.
43489  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43490    # We found an arbitrary include file. That's a good sign.
43491    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43492$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43493    FOUND_FREETYPE=yes
43494
43495    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43496    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43497      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43498$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43499      FOUND_FREETYPE=no
43500    else
43501      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43502        # On Windows, we will need both .lib and .dll file.
43503        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43504          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43505$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43506          FOUND_FREETYPE=no
43507        fi
43508      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
43509          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
43510        # Found lib in isa dir, use that instead.
43511        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
43512      fi
43513    fi
43514  fi
43515
43516  if test "x$FOUND_FREETYPE" = xyes; then
43517
43518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43519
43520  # Input might be given as Windows format, start by converting to
43521  # unix format.
43522  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43523  new_path=`$CYGPATH -u "$path"`
43524
43525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43528  # "foo.exe" is OK but "foo" is an error.
43529  #
43530  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43531  # It is also a way to make sure we got the proper file name for the real test later on.
43532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43533  if test "x$test_shortpath" = x; then
43534    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43535$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43536    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43537  fi
43538
43539  # Call helper function which possibly converts this using DOS-style short mode.
43540  # If so, the updated path is stored in $new_path.
43541
43542  input_path="$new_path"
43543  # Check if we need to convert this using DOS-style short mode. If the path
43544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43545  # take no chances and rewrite it.
43546  # Note: m4 eats our [], so we need to use [ and ] instead.
43547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43548  if test "x$has_forbidden_chars" != x; then
43549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43553      # Going to short mode and back again did indeed matter. Since short mode is
43554      # case insensitive, let's make it lowercase to improve readability.
43555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43556      # Now convert it back to Unix-stile (cygpath)
43557      input_path=`$CYGPATH -u "$shortmode_path"`
43558      new_path="$input_path"
43559    fi
43560  fi
43561
43562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43563  if test "x$test_cygdrive_prefix" = x; then
43564    # As a simple fix, exclude /usr/bin since it's not a real path.
43565    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43567      # a path prefixed by /cygdrive for fixpath to work.
43568      new_path="$CYGWIN_ROOT_PATH$input_path"
43569    fi
43570  fi
43571
43572
43573  if test "x$path" != "x$new_path"; then
43574    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43576$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43577  fi
43578
43579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43580
43581  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43582  has_colon=`$ECHO $path | $GREP ^.:`
43583  new_path="$path"
43584  if test "x$has_colon" = x; then
43585    # Not in mixed or Windows style, start by that.
43586    new_path=`cmd //c echo $path`
43587  fi
43588
43589
43590  input_path="$new_path"
43591  # Check if we need to convert this using DOS-style short mode. If the path
43592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43593  # take no chances and rewrite it.
43594  # Note: m4 eats our [], so we need to use [ and ] instead.
43595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43596  if test "x$has_forbidden_chars" != x; then
43597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43599  fi
43600
43601
43602  windows_path="$new_path"
43603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43604    unix_path=`$CYGPATH -u "$windows_path"`
43605    new_path="$unix_path"
43606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43608    new_path="$unix_path"
43609  fi
43610
43611  if test "x$path" != "x$new_path"; then
43612    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43614$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43615  fi
43616
43617  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43618  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43619
43620  else
43621    # We're on a posix platform. Hooray! :)
43622    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43623    has_space=`$ECHO "$path" | $GREP " "`
43624    if test "x$has_space" != x; then
43625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43626$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43627      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43628    fi
43629
43630    # Use eval to expand a potential ~
43631    eval path="$path"
43632    if test ! -f "$path" && test ! -d "$path"; then
43633      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43634    fi
43635
43636    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43637  fi
43638
43639
43640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43641
43642  # Input might be given as Windows format, start by converting to
43643  # unix format.
43644  path="$POTENTIAL_FREETYPE_LIB_PATH"
43645  new_path=`$CYGPATH -u "$path"`
43646
43647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43650  # "foo.exe" is OK but "foo" is an error.
43651  #
43652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43653  # It is also a way to make sure we got the proper file name for the real test later on.
43654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43655  if test "x$test_shortpath" = x; then
43656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43657$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43658    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43659  fi
43660
43661  # Call helper function which possibly converts this using DOS-style short mode.
43662  # If so, the updated path is stored in $new_path.
43663
43664  input_path="$new_path"
43665  # Check if we need to convert this using DOS-style short mode. If the path
43666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43667  # take no chances and rewrite it.
43668  # Note: m4 eats our [], so we need to use [ and ] instead.
43669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43670  if test "x$has_forbidden_chars" != x; then
43671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43675      # Going to short mode and back again did indeed matter. Since short mode is
43676      # case insensitive, let's make it lowercase to improve readability.
43677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43678      # Now convert it back to Unix-stile (cygpath)
43679      input_path=`$CYGPATH -u "$shortmode_path"`
43680      new_path="$input_path"
43681    fi
43682  fi
43683
43684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43685  if test "x$test_cygdrive_prefix" = x; then
43686    # As a simple fix, exclude /usr/bin since it's not a real path.
43687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43689      # a path prefixed by /cygdrive for fixpath to work.
43690      new_path="$CYGWIN_ROOT_PATH$input_path"
43691    fi
43692  fi
43693
43694
43695  if test "x$path" != "x$new_path"; then
43696    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43698$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43699  fi
43700
43701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43702
43703  path="$POTENTIAL_FREETYPE_LIB_PATH"
43704  has_colon=`$ECHO $path | $GREP ^.:`
43705  new_path="$path"
43706  if test "x$has_colon" = x; then
43707    # Not in mixed or Windows style, start by that.
43708    new_path=`cmd //c echo $path`
43709  fi
43710
43711
43712  input_path="$new_path"
43713  # Check if we need to convert this using DOS-style short mode. If the path
43714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43715  # take no chances and rewrite it.
43716  # Note: m4 eats our [], so we need to use [ and ] instead.
43717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43718  if test "x$has_forbidden_chars" != x; then
43719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43721  fi
43722
43723
43724  windows_path="$new_path"
43725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43726    unix_path=`$CYGPATH -u "$windows_path"`
43727    new_path="$unix_path"
43728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43730    new_path="$unix_path"
43731  fi
43732
43733  if test "x$path" != "x$new_path"; then
43734    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43736$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43737  fi
43738
43739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43741
43742  else
43743    # We're on a posix platform. Hooray! :)
43744    path="$POTENTIAL_FREETYPE_LIB_PATH"
43745    has_space=`$ECHO "$path" | $GREP " "`
43746    if test "x$has_space" != x; then
43747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43748$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43749      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43750    fi
43751
43752    # Use eval to expand a potential ~
43753    eval path="$path"
43754    if test ! -f "$path" && test ! -d "$path"; then
43755      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43756    fi
43757
43758    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43759  fi
43760
43761
43762    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43763    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43764$as_echo_n "checking for freetype includes... " >&6; }
43765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43766$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43767    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43769$as_echo_n "checking for freetype libraries... " >&6; }
43770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43771$as_echo "$FREETYPE_LIB_PATH" >&6; }
43772  fi
43773
43774        if test "x$FOUND_FREETYPE" != xyes; then
43775          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43776        fi
43777      else
43778        # User specified only one of lib or include. This is an error.
43779        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43780          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43781$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43782          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43783        else
43784          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43785$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43786          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43787        fi
43788      fi
43789    else
43790      # User did not specify settings, but we need freetype. Try to locate it.
43791
43792      if test "x$BUNDLE_FREETYPE" = x; then
43793        # If not specified, default is to bundle freetype only on windows
43794        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43795          BUNDLE_FREETYPE=yes
43796        else
43797          BUNDLE_FREETYPE=no
43798        fi
43799      fi
43800
43801      if test "x$FOUND_FREETYPE" != xyes; then
43802        # Check builddeps
43803
43804
43805  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43806    # Source the builddeps file again, to make sure it uses the latest variables!
43807    . $builddepsfile
43808    # Look for a target and build machine specific resource!
43809    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43810    if test "x$resource" = x; then
43811      # Ok, lets instead look for a target specific resource
43812      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
43813    fi
43814    if test "x$resource" = x; then
43815      # Ok, lets instead look for a build specific resource
43816      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
43817    fi
43818    if test "x$resource" = x; then
43819      # Ok, lets instead look for a generic resource
43820      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
43821      resource=${builddep_freetype2}
43822    fi
43823    if test "x$resource" != x; then
43824      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
43825$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
43826      # If the resource in the builddeps.conf file is an existing directory,
43827      # for example /java/linux/cups
43828      if test -d ${resource}; then
43829        depdir=${resource}
43830      else
43831
43832  # freetype2 is for example mymodule
43833  # $resource is for example libs/general/libmymod_1_2_3.zip
43834  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43835  # $with_builddeps_dir is for example /localhome/builddeps
43836  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43837  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43838  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43839  filename=`basename $resource`
43840  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43841  filebase=${filename%%.*}
43842  extension=${filename#*.}
43843  installdir=$with_builddeps_dir/$filebase
43844  if test ! -f $installdir/$filename.unpacked; then
43845    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
43846$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43847    if test ! -d $installdir; then
43848      mkdir -p $installdir
43849    fi
43850    if test ! -d $installdir; then
43851      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43852    fi
43853    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
43854    touch $tmpfile
43855    if test ! -f $tmpfile; then
43856      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43857    fi
43858
43859  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43860  # $tmpfile is the local file name for the downloaded file.
43861  VALID_TOOL=no
43862  if test "x$BDEPS_FTP" = xwget; then
43863    VALID_TOOL=yes
43864    wget -O $tmpfile $with_builddeps_server/$resource
43865  fi
43866  if test "x$BDEPS_FTP" = xlftp; then
43867    VALID_TOOL=yes
43868    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43869  fi
43870  if test "x$BDEPS_FTP" = xftp; then
43871    VALID_TOOL=yes
43872    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43873    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43874    FTPUSERPWD=${FTPSERVER%%@*}
43875    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43876      FTPUSER=${userpwd%%:*}
43877      FTPPWD=${userpwd#*@}
43878      FTPSERVER=${FTPSERVER#*@}
43879    else
43880      FTPUSER=ftp
43881      FTPPWD=ftp
43882    fi
43883    # the "pass" command does not work on some
43884    # ftp clients (read ftp.exe) but if it works,
43885    # passive mode is better!
43886    ( \
43887        echo "user $FTPUSER $FTPPWD"        ; \
43888        echo "pass"                         ; \
43889        echo "bin"                          ; \
43890        echo "get $FTPPATH $tmpfile"              ; \
43891    ) | ftp -in $FTPSERVER
43892  fi
43893  if test "x$VALID_TOOL" != xyes; then
43894    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43895  fi
43896
43897    mv $tmpfile $installdir/$filename
43898    if test ! -s $installdir/$filename; then
43899      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43900    fi
43901    case "$extension" in
43902      zip)  echo "Unzipping $installdir/$filename..."
43903        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43904        ;;
43905      tar.gz) echo "Untaring $installdir/$filename..."
43906        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43907        ;;
43908      tgz) echo "Untaring $installdir/$filename..."
43909        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43910        ;;
43911      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43912        ;;
43913    esac
43914  fi
43915  if test -f $installdir/$filename.unpacked; then
43916    depdir=$installdir
43917  fi
43918
43919      fi
43920      # Source the builddeps file again, because in the previous command, the depdir
43921      # was updated to point at the current build dependency install directory.
43922      . $builddepsfile
43923      # Now extract variables from the builddeps.conf files.
43924      theroot=${builddep_freetype2_ROOT}
43925      thecflags=${builddep_freetype2_CFLAGS}
43926      thelibs=${builddep_freetype2_LIBS}
43927      if test "x$depdir" = x; then
43928        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
43929      fi
43930      FREETYPE=$depdir
43931      if test "x$theroot" != x; then
43932        FREETYPE="$theroot"
43933      fi
43934      if test "x$thecflags" != x; then
43935        FREETYPE_CFLAGS="$thecflags"
43936      fi
43937      if test "x$thelibs" != x; then
43938        FREETYPE_LIBS="$thelibs"
43939      fi
43940      FOUND_FREETYPE=yes
43941      else FOUND_FREETYPE=no
43942
43943    fi
43944    else FOUND_FREETYPE=no
43945
43946  fi
43947
43948        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43949        if test "x$FOUND_FREETYPE" = xyes; then
43950          if test "x$BUNDLE_FREETYPE" = xyes; then
43951            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
43952$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
43953            FOUND_FREETYPE=no
43954          else
43955            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43956$as_echo_n "checking for freetype... " >&6; }
43957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
43958$as_echo "yes (using builddeps)" >&6; }
43959          fi
43960        fi
43961      fi
43962
43963      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
43964      if test "x$SYSROOT" = x; then
43965        if test "x$FOUND_FREETYPE" != xyes; then
43966          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
43967          if test "x$PKG_CONFIG" != x; then
43968
43969pkg_failed=no
43970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
43971$as_echo_n "checking for FREETYPE... " >&6; }
43972
43973if test -n "$FREETYPE_CFLAGS"; then
43974    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
43975 elif test -n "$PKG_CONFIG"; then
43976    if test -n "$PKG_CONFIG" && \
43977    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43978  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43979  ac_status=$?
43980  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43981  test $ac_status = 0; }; then
43982  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
43983else
43984  pkg_failed=yes
43985fi
43986 else
43987    pkg_failed=untried
43988fi
43989if test -n "$FREETYPE_LIBS"; then
43990    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
43991 elif test -n "$PKG_CONFIG"; then
43992    if test -n "$PKG_CONFIG" && \
43993    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43994  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43995  ac_status=$?
43996  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43997  test $ac_status = 0; }; then
43998  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
43999else
44000  pkg_failed=yes
44001fi
44002 else
44003    pkg_failed=untried
44004fi
44005
44006
44007
44008if test $pkg_failed = yes; then
44009
44010if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44011        _pkg_short_errors_supported=yes
44012else
44013        _pkg_short_errors_supported=no
44014fi
44015        if test $_pkg_short_errors_supported = yes; then
44016	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44017        else
44018	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44019        fi
44020	# Put the nasty error message in config.log where it belongs
44021	echo "$FREETYPE_PKG_ERRORS" >&5
44022
44023	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44024$as_echo "no" >&6; }
44025                FOUND_FREETYPE=no
44026elif test $pkg_failed = untried; then
44027	FOUND_FREETYPE=no
44028else
44029	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44030	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44031        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44032$as_echo "yes" >&6; }
44033	FOUND_FREETYPE=yes
44034fi
44035            if test "x$FOUND_FREETYPE" = xyes; then
44036              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44037              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44038              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44039              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44040                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44041              fi
44042              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44043              if test "x$BUNDLE_FREETYPE" = xyes; then
44044                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44045$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44046                FOUND_FREETYPE=no
44047              else
44048                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44049$as_echo_n "checking for freetype... " >&6; }
44050                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44051$as_echo "yes (using pkg-config)" >&6; }
44052              fi
44053            fi
44054          fi
44055        fi
44056      fi
44057
44058      if test "x$FOUND_FREETYPE" != xyes; then
44059        # Check in well-known locations
44060        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44061          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44062
44063  windows_path="$FREETYPE_BASE_DIR"
44064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44065    unix_path=`$CYGPATH -u "$windows_path"`
44066    FREETYPE_BASE_DIR="$unix_path"
44067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44069    FREETYPE_BASE_DIR="$unix_path"
44070  fi
44071
44072
44073  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44074  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44075  METHOD="well-known location"
44076
44077  # First check if the files exists.
44078  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44079    # We found an arbitrary include file. That's a good sign.
44080    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44081$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44082    FOUND_FREETYPE=yes
44083
44084    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44085    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44086      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44087$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44088      FOUND_FREETYPE=no
44089    else
44090      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44091        # On Windows, we will need both .lib and .dll file.
44092        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44093          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44094$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44095          FOUND_FREETYPE=no
44096        fi
44097      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44098          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44099        # Found lib in isa dir, use that instead.
44100        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44101      fi
44102    fi
44103  fi
44104
44105  if test "x$FOUND_FREETYPE" = xyes; then
44106
44107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44108
44109  # Input might be given as Windows format, start by converting to
44110  # unix format.
44111  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44112  new_path=`$CYGPATH -u "$path"`
44113
44114  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44115  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44116  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44117  # "foo.exe" is OK but "foo" is an error.
44118  #
44119  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44120  # It is also a way to make sure we got the proper file name for the real test later on.
44121  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44122  if test "x$test_shortpath" = x; then
44123    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44124$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44125    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44126  fi
44127
44128  # Call helper function which possibly converts this using DOS-style short mode.
44129  # If so, the updated path is stored in $new_path.
44130
44131  input_path="$new_path"
44132  # Check if we need to convert this using DOS-style short mode. If the path
44133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44134  # take no chances and rewrite it.
44135  # Note: m4 eats our [], so we need to use [ and ] instead.
44136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44137  if test "x$has_forbidden_chars" != x; then
44138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44142      # Going to short mode and back again did indeed matter. Since short mode is
44143      # case insensitive, let's make it lowercase to improve readability.
44144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44145      # Now convert it back to Unix-stile (cygpath)
44146      input_path=`$CYGPATH -u "$shortmode_path"`
44147      new_path="$input_path"
44148    fi
44149  fi
44150
44151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44152  if test "x$test_cygdrive_prefix" = x; then
44153    # As a simple fix, exclude /usr/bin since it's not a real path.
44154    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44156      # a path prefixed by /cygdrive for fixpath to work.
44157      new_path="$CYGWIN_ROOT_PATH$input_path"
44158    fi
44159  fi
44160
44161
44162  if test "x$path" != "x$new_path"; then
44163    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44165$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44166  fi
44167
44168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44169
44170  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44171  has_colon=`$ECHO $path | $GREP ^.:`
44172  new_path="$path"
44173  if test "x$has_colon" = x; then
44174    # Not in mixed or Windows style, start by that.
44175    new_path=`cmd //c echo $path`
44176  fi
44177
44178
44179  input_path="$new_path"
44180  # Check if we need to convert this using DOS-style short mode. If the path
44181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44182  # take no chances and rewrite it.
44183  # Note: m4 eats our [], so we need to use [ and ] instead.
44184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44185  if test "x$has_forbidden_chars" != x; then
44186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44188  fi
44189
44190
44191  windows_path="$new_path"
44192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44193    unix_path=`$CYGPATH -u "$windows_path"`
44194    new_path="$unix_path"
44195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44197    new_path="$unix_path"
44198  fi
44199
44200  if test "x$path" != "x$new_path"; then
44201    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44203$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44204  fi
44205
44206  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44207  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44208
44209  else
44210    # We're on a posix platform. Hooray! :)
44211    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44212    has_space=`$ECHO "$path" | $GREP " "`
44213    if test "x$has_space" != x; then
44214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44215$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44216      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44217    fi
44218
44219    # Use eval to expand a potential ~
44220    eval path="$path"
44221    if test ! -f "$path" && test ! -d "$path"; then
44222      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44223    fi
44224
44225    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44226  fi
44227
44228
44229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44230
44231  # Input might be given as Windows format, start by converting to
44232  # unix format.
44233  path="$POTENTIAL_FREETYPE_LIB_PATH"
44234  new_path=`$CYGPATH -u "$path"`
44235
44236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44239  # "foo.exe" is OK but "foo" is an error.
44240  #
44241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44242  # It is also a way to make sure we got the proper file name for the real test later on.
44243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44244  if test "x$test_shortpath" = x; then
44245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44246$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44247    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44248  fi
44249
44250  # Call helper function which possibly converts this using DOS-style short mode.
44251  # If so, the updated path is stored in $new_path.
44252
44253  input_path="$new_path"
44254  # Check if we need to convert this using DOS-style short mode. If the path
44255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44256  # take no chances and rewrite it.
44257  # Note: m4 eats our [], so we need to use [ and ] instead.
44258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44259  if test "x$has_forbidden_chars" != x; then
44260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44264      # Going to short mode and back again did indeed matter. Since short mode is
44265      # case insensitive, let's make it lowercase to improve readability.
44266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44267      # Now convert it back to Unix-stile (cygpath)
44268      input_path=`$CYGPATH -u "$shortmode_path"`
44269      new_path="$input_path"
44270    fi
44271  fi
44272
44273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44274  if test "x$test_cygdrive_prefix" = x; then
44275    # As a simple fix, exclude /usr/bin since it's not a real path.
44276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44278      # a path prefixed by /cygdrive for fixpath to work.
44279      new_path="$CYGWIN_ROOT_PATH$input_path"
44280    fi
44281  fi
44282
44283
44284  if test "x$path" != "x$new_path"; then
44285    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44287$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44288  fi
44289
44290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44291
44292  path="$POTENTIAL_FREETYPE_LIB_PATH"
44293  has_colon=`$ECHO $path | $GREP ^.:`
44294  new_path="$path"
44295  if test "x$has_colon" = x; then
44296    # Not in mixed or Windows style, start by that.
44297    new_path=`cmd //c echo $path`
44298  fi
44299
44300
44301  input_path="$new_path"
44302  # Check if we need to convert this using DOS-style short mode. If the path
44303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44304  # take no chances and rewrite it.
44305  # Note: m4 eats our [], so we need to use [ and ] instead.
44306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44307  if test "x$has_forbidden_chars" != x; then
44308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44310  fi
44311
44312
44313  windows_path="$new_path"
44314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44315    unix_path=`$CYGPATH -u "$windows_path"`
44316    new_path="$unix_path"
44317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44319    new_path="$unix_path"
44320  fi
44321
44322  if test "x$path" != "x$new_path"; then
44323    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44325$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44326  fi
44327
44328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44330
44331  else
44332    # We're on a posix platform. Hooray! :)
44333    path="$POTENTIAL_FREETYPE_LIB_PATH"
44334    has_space=`$ECHO "$path" | $GREP " "`
44335    if test "x$has_space" != x; then
44336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44337$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44338      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44339    fi
44340
44341    # Use eval to expand a potential ~
44342    eval path="$path"
44343    if test ! -f "$path" && test ! -d "$path"; then
44344      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44345    fi
44346
44347    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44348  fi
44349
44350
44351    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44352    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44353$as_echo_n "checking for freetype includes... " >&6; }
44354    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44355$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44356    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44357    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44358$as_echo_n "checking for freetype libraries... " >&6; }
44359    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44360$as_echo "$FREETYPE_LIB_PATH" >&6; }
44361  fi
44362
44363          if test "x$FOUND_FREETYPE" != xyes; then
44364            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44365
44366  windows_path="$FREETYPE_BASE_DIR"
44367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44368    unix_path=`$CYGPATH -u "$windows_path"`
44369    FREETYPE_BASE_DIR="$unix_path"
44370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44372    FREETYPE_BASE_DIR="$unix_path"
44373  fi
44374
44375
44376  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44377  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44378  METHOD="well-known location"
44379
44380  # First check if the files exists.
44381  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44382    # We found an arbitrary include file. That's a good sign.
44383    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44384$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44385    FOUND_FREETYPE=yes
44386
44387    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44388    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44389      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44390$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44391      FOUND_FREETYPE=no
44392    else
44393      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44394        # On Windows, we will need both .lib and .dll file.
44395        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44396          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44397$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44398          FOUND_FREETYPE=no
44399        fi
44400      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44401          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44402        # Found lib in isa dir, use that instead.
44403        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44404      fi
44405    fi
44406  fi
44407
44408  if test "x$FOUND_FREETYPE" = xyes; then
44409
44410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44411
44412  # Input might be given as Windows format, start by converting to
44413  # unix format.
44414  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44415  new_path=`$CYGPATH -u "$path"`
44416
44417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44420  # "foo.exe" is OK but "foo" is an error.
44421  #
44422  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44423  # It is also a way to make sure we got the proper file name for the real test later on.
44424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44425  if test "x$test_shortpath" = x; then
44426    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44427$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44428    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44429  fi
44430
44431  # Call helper function which possibly converts this using DOS-style short mode.
44432  # If so, the updated path is stored in $new_path.
44433
44434  input_path="$new_path"
44435  # Check if we need to convert this using DOS-style short mode. If the path
44436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44437  # take no chances and rewrite it.
44438  # Note: m4 eats our [], so we need to use [ and ] instead.
44439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44440  if test "x$has_forbidden_chars" != x; then
44441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44445      # Going to short mode and back again did indeed matter. Since short mode is
44446      # case insensitive, let's make it lowercase to improve readability.
44447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44448      # Now convert it back to Unix-stile (cygpath)
44449      input_path=`$CYGPATH -u "$shortmode_path"`
44450      new_path="$input_path"
44451    fi
44452  fi
44453
44454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44455  if test "x$test_cygdrive_prefix" = x; then
44456    # As a simple fix, exclude /usr/bin since it's not a real path.
44457    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44459      # a path prefixed by /cygdrive for fixpath to work.
44460      new_path="$CYGWIN_ROOT_PATH$input_path"
44461    fi
44462  fi
44463
44464
44465  if test "x$path" != "x$new_path"; then
44466    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44468$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44469  fi
44470
44471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44472
44473  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44474  has_colon=`$ECHO $path | $GREP ^.:`
44475  new_path="$path"
44476  if test "x$has_colon" = x; then
44477    # Not in mixed or Windows style, start by that.
44478    new_path=`cmd //c echo $path`
44479  fi
44480
44481
44482  input_path="$new_path"
44483  # Check if we need to convert this using DOS-style short mode. If the path
44484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44485  # take no chances and rewrite it.
44486  # Note: m4 eats our [], so we need to use [ and ] instead.
44487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44488  if test "x$has_forbidden_chars" != x; then
44489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44491  fi
44492
44493
44494  windows_path="$new_path"
44495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44496    unix_path=`$CYGPATH -u "$windows_path"`
44497    new_path="$unix_path"
44498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44500    new_path="$unix_path"
44501  fi
44502
44503  if test "x$path" != "x$new_path"; then
44504    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44506$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44507  fi
44508
44509  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44510  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44511
44512  else
44513    # We're on a posix platform. Hooray! :)
44514    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44515    has_space=`$ECHO "$path" | $GREP " "`
44516    if test "x$has_space" != x; then
44517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44518$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44519      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44520    fi
44521
44522    # Use eval to expand a potential ~
44523    eval path="$path"
44524    if test ! -f "$path" && test ! -d "$path"; then
44525      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44526    fi
44527
44528    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44529  fi
44530
44531
44532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44533
44534  # Input might be given as Windows format, start by converting to
44535  # unix format.
44536  path="$POTENTIAL_FREETYPE_LIB_PATH"
44537  new_path=`$CYGPATH -u "$path"`
44538
44539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44542  # "foo.exe" is OK but "foo" is an error.
44543  #
44544  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44545  # It is also a way to make sure we got the proper file name for the real test later on.
44546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44547  if test "x$test_shortpath" = x; then
44548    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44549$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44550    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44551  fi
44552
44553  # Call helper function which possibly converts this using DOS-style short mode.
44554  # If so, the updated path is stored in $new_path.
44555
44556  input_path="$new_path"
44557  # Check if we need to convert this using DOS-style short mode. If the path
44558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44559  # take no chances and rewrite it.
44560  # Note: m4 eats our [], so we need to use [ and ] instead.
44561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44562  if test "x$has_forbidden_chars" != x; then
44563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44567      # Going to short mode and back again did indeed matter. Since short mode is
44568      # case insensitive, let's make it lowercase to improve readability.
44569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44570      # Now convert it back to Unix-stile (cygpath)
44571      input_path=`$CYGPATH -u "$shortmode_path"`
44572      new_path="$input_path"
44573    fi
44574  fi
44575
44576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44577  if test "x$test_cygdrive_prefix" = x; then
44578    # As a simple fix, exclude /usr/bin since it's not a real path.
44579    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44581      # a path prefixed by /cygdrive for fixpath to work.
44582      new_path="$CYGWIN_ROOT_PATH$input_path"
44583    fi
44584  fi
44585
44586
44587  if test "x$path" != "x$new_path"; then
44588    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44590$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44591  fi
44592
44593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44594
44595  path="$POTENTIAL_FREETYPE_LIB_PATH"
44596  has_colon=`$ECHO $path | $GREP ^.:`
44597  new_path="$path"
44598  if test "x$has_colon" = x; then
44599    # Not in mixed or Windows style, start by that.
44600    new_path=`cmd //c echo $path`
44601  fi
44602
44603
44604  input_path="$new_path"
44605  # Check if we need to convert this using DOS-style short mode. If the path
44606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44607  # take no chances and rewrite it.
44608  # Note: m4 eats our [], so we need to use [ and ] instead.
44609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44610  if test "x$has_forbidden_chars" != x; then
44611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44613  fi
44614
44615
44616  windows_path="$new_path"
44617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44618    unix_path=`$CYGPATH -u "$windows_path"`
44619    new_path="$unix_path"
44620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44622    new_path="$unix_path"
44623  fi
44624
44625  if test "x$path" != "x$new_path"; then
44626    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44628$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44629  fi
44630
44631  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44632  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44633
44634  else
44635    # We're on a posix platform. Hooray! :)
44636    path="$POTENTIAL_FREETYPE_LIB_PATH"
44637    has_space=`$ECHO "$path" | $GREP " "`
44638    if test "x$has_space" != x; then
44639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44640$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44641      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44642    fi
44643
44644    # Use eval to expand a potential ~
44645    eval path="$path"
44646    if test ! -f "$path" && test ! -d "$path"; then
44647      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44648    fi
44649
44650    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44651  fi
44652
44653
44654    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44655    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44656$as_echo_n "checking for freetype includes... " >&6; }
44657    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44658$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44659    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44660    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44661$as_echo_n "checking for freetype libraries... " >&6; }
44662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44663$as_echo "$FREETYPE_LIB_PATH" >&6; }
44664  fi
44665
44666          fi
44667        else
44668          FREETYPE_BASE_DIR="$SYSROOT/usr"
44669
44670  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44671  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44672  METHOD="well-known location"
44673
44674  # First check if the files exists.
44675  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44676    # We found an arbitrary include file. That's a good sign.
44677    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44678$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44679    FOUND_FREETYPE=yes
44680
44681    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44682    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44683      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44684$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44685      FOUND_FREETYPE=no
44686    else
44687      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44688        # On Windows, we will need both .lib and .dll file.
44689        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44690          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44691$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44692          FOUND_FREETYPE=no
44693        fi
44694      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44695          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44696        # Found lib in isa dir, use that instead.
44697        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44698      fi
44699    fi
44700  fi
44701
44702  if test "x$FOUND_FREETYPE" = xyes; then
44703
44704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44705
44706  # Input might be given as Windows format, start by converting to
44707  # unix format.
44708  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44709  new_path=`$CYGPATH -u "$path"`
44710
44711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44714  # "foo.exe" is OK but "foo" is an error.
44715  #
44716  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44717  # It is also a way to make sure we got the proper file name for the real test later on.
44718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44719  if test "x$test_shortpath" = x; then
44720    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44721$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44722    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44723  fi
44724
44725  # Call helper function which possibly converts this using DOS-style short mode.
44726  # If so, the updated path is stored in $new_path.
44727
44728  input_path="$new_path"
44729  # Check if we need to convert this using DOS-style short mode. If the path
44730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44731  # take no chances and rewrite it.
44732  # Note: m4 eats our [], so we need to use [ and ] instead.
44733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44734  if test "x$has_forbidden_chars" != x; then
44735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44739      # Going to short mode and back again did indeed matter. Since short mode is
44740      # case insensitive, let's make it lowercase to improve readability.
44741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44742      # Now convert it back to Unix-stile (cygpath)
44743      input_path=`$CYGPATH -u "$shortmode_path"`
44744      new_path="$input_path"
44745    fi
44746  fi
44747
44748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44749  if test "x$test_cygdrive_prefix" = x; then
44750    # As a simple fix, exclude /usr/bin since it's not a real path.
44751    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44753      # a path prefixed by /cygdrive for fixpath to work.
44754      new_path="$CYGWIN_ROOT_PATH$input_path"
44755    fi
44756  fi
44757
44758
44759  if test "x$path" != "x$new_path"; then
44760    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44762$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44763  fi
44764
44765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44766
44767  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44768  has_colon=`$ECHO $path | $GREP ^.:`
44769  new_path="$path"
44770  if test "x$has_colon" = x; then
44771    # Not in mixed or Windows style, start by that.
44772    new_path=`cmd //c echo $path`
44773  fi
44774
44775
44776  input_path="$new_path"
44777  # Check if we need to convert this using DOS-style short mode. If the path
44778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44779  # take no chances and rewrite it.
44780  # Note: m4 eats our [], so we need to use [ and ] instead.
44781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44782  if test "x$has_forbidden_chars" != x; then
44783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44785  fi
44786
44787
44788  windows_path="$new_path"
44789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44790    unix_path=`$CYGPATH -u "$windows_path"`
44791    new_path="$unix_path"
44792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44794    new_path="$unix_path"
44795  fi
44796
44797  if test "x$path" != "x$new_path"; then
44798    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44800$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44801  fi
44802
44803  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44804  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44805
44806  else
44807    # We're on a posix platform. Hooray! :)
44808    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44809    has_space=`$ECHO "$path" | $GREP " "`
44810    if test "x$has_space" != x; then
44811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44812$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44813      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44814    fi
44815
44816    # Use eval to expand a potential ~
44817    eval path="$path"
44818    if test ! -f "$path" && test ! -d "$path"; then
44819      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44820    fi
44821
44822    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44823  fi
44824
44825
44826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44827
44828  # Input might be given as Windows format, start by converting to
44829  # unix format.
44830  path="$POTENTIAL_FREETYPE_LIB_PATH"
44831  new_path=`$CYGPATH -u "$path"`
44832
44833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44836  # "foo.exe" is OK but "foo" is an error.
44837  #
44838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44839  # It is also a way to make sure we got the proper file name for the real test later on.
44840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44841  if test "x$test_shortpath" = x; then
44842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44843$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44844    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44845  fi
44846
44847  # Call helper function which possibly converts this using DOS-style short mode.
44848  # If so, the updated path is stored in $new_path.
44849
44850  input_path="$new_path"
44851  # Check if we need to convert this using DOS-style short mode. If the path
44852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44853  # take no chances and rewrite it.
44854  # Note: m4 eats our [], so we need to use [ and ] instead.
44855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44856  if test "x$has_forbidden_chars" != x; then
44857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44861      # Going to short mode and back again did indeed matter. Since short mode is
44862      # case insensitive, let's make it lowercase to improve readability.
44863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44864      # Now convert it back to Unix-stile (cygpath)
44865      input_path=`$CYGPATH -u "$shortmode_path"`
44866      new_path="$input_path"
44867    fi
44868  fi
44869
44870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44871  if test "x$test_cygdrive_prefix" = x; then
44872    # As a simple fix, exclude /usr/bin since it's not a real path.
44873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44875      # a path prefixed by /cygdrive for fixpath to work.
44876      new_path="$CYGWIN_ROOT_PATH$input_path"
44877    fi
44878  fi
44879
44880
44881  if test "x$path" != "x$new_path"; then
44882    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44884$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44885  fi
44886
44887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44888
44889  path="$POTENTIAL_FREETYPE_LIB_PATH"
44890  has_colon=`$ECHO $path | $GREP ^.:`
44891  new_path="$path"
44892  if test "x$has_colon" = x; then
44893    # Not in mixed or Windows style, start by that.
44894    new_path=`cmd //c echo $path`
44895  fi
44896
44897
44898  input_path="$new_path"
44899  # Check if we need to convert this using DOS-style short mode. If the path
44900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44901  # take no chances and rewrite it.
44902  # Note: m4 eats our [], so we need to use [ and ] instead.
44903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44904  if test "x$has_forbidden_chars" != x; then
44905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44907  fi
44908
44909
44910  windows_path="$new_path"
44911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44912    unix_path=`$CYGPATH -u "$windows_path"`
44913    new_path="$unix_path"
44914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44916    new_path="$unix_path"
44917  fi
44918
44919  if test "x$path" != "x$new_path"; then
44920    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44922$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44923  fi
44924
44925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44927
44928  else
44929    # We're on a posix platform. Hooray! :)
44930    path="$POTENTIAL_FREETYPE_LIB_PATH"
44931    has_space=`$ECHO "$path" | $GREP " "`
44932    if test "x$has_space" != x; then
44933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44934$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44935      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44936    fi
44937
44938    # Use eval to expand a potential ~
44939    eval path="$path"
44940    if test ! -f "$path" && test ! -d "$path"; then
44941      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44942    fi
44943
44944    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44945  fi
44946
44947
44948    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44950$as_echo_n "checking for freetype includes... " >&6; }
44951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44952$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44953    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44955$as_echo_n "checking for freetype libraries... " >&6; }
44956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44957$as_echo "$FREETYPE_LIB_PATH" >&6; }
44958  fi
44959
44960
44961          if test "x$FOUND_FREETYPE" != xyes; then
44962            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
44963
44964  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44965  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44966  METHOD="well-known location"
44967
44968  # First check if the files exists.
44969  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44970    # We found an arbitrary include file. That's a good sign.
44971    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44972$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44973    FOUND_FREETYPE=yes
44974
44975    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44976    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44977      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44978$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44979      FOUND_FREETYPE=no
44980    else
44981      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44982        # On Windows, we will need both .lib and .dll file.
44983        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44984          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44985$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44986          FOUND_FREETYPE=no
44987        fi
44988      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44989          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44990        # Found lib in isa dir, use that instead.
44991        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44992      fi
44993    fi
44994  fi
44995
44996  if test "x$FOUND_FREETYPE" = xyes; then
44997
44998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44999
45000  # Input might be given as Windows format, start by converting to
45001  # unix format.
45002  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45003  new_path=`$CYGPATH -u "$path"`
45004
45005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45008  # "foo.exe" is OK but "foo" is an error.
45009  #
45010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45011  # It is also a way to make sure we got the proper file name for the real test later on.
45012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45013  if test "x$test_shortpath" = x; then
45014    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45015$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45016    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45017  fi
45018
45019  # Call helper function which possibly converts this using DOS-style short mode.
45020  # If so, the updated path is stored in $new_path.
45021
45022  input_path="$new_path"
45023  # Check if we need to convert this using DOS-style short mode. If the path
45024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45025  # take no chances and rewrite it.
45026  # Note: m4 eats our [], so we need to use [ and ] instead.
45027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45028  if test "x$has_forbidden_chars" != x; then
45029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45033      # Going to short mode and back again did indeed matter. Since short mode is
45034      # case insensitive, let's make it lowercase to improve readability.
45035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45036      # Now convert it back to Unix-stile (cygpath)
45037      input_path=`$CYGPATH -u "$shortmode_path"`
45038      new_path="$input_path"
45039    fi
45040  fi
45041
45042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45043  if test "x$test_cygdrive_prefix" = x; then
45044    # As a simple fix, exclude /usr/bin since it's not a real path.
45045    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45047      # a path prefixed by /cygdrive for fixpath to work.
45048      new_path="$CYGWIN_ROOT_PATH$input_path"
45049    fi
45050  fi
45051
45052
45053  if test "x$path" != "x$new_path"; then
45054    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45056$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45057  fi
45058
45059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45060
45061  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45062  has_colon=`$ECHO $path | $GREP ^.:`
45063  new_path="$path"
45064  if test "x$has_colon" = x; then
45065    # Not in mixed or Windows style, start by that.
45066    new_path=`cmd //c echo $path`
45067  fi
45068
45069
45070  input_path="$new_path"
45071  # Check if we need to convert this using DOS-style short mode. If the path
45072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45073  # take no chances and rewrite it.
45074  # Note: m4 eats our [], so we need to use [ and ] instead.
45075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45076  if test "x$has_forbidden_chars" != x; then
45077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45079  fi
45080
45081
45082  windows_path="$new_path"
45083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45084    unix_path=`$CYGPATH -u "$windows_path"`
45085    new_path="$unix_path"
45086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45088    new_path="$unix_path"
45089  fi
45090
45091  if test "x$path" != "x$new_path"; then
45092    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45094$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45095  fi
45096
45097  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45098  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45099
45100  else
45101    # We're on a posix platform. Hooray! :)
45102    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45103    has_space=`$ECHO "$path" | $GREP " "`
45104    if test "x$has_space" != x; then
45105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45106$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45107      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45108    fi
45109
45110    # Use eval to expand a potential ~
45111    eval path="$path"
45112    if test ! -f "$path" && test ! -d "$path"; then
45113      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45114    fi
45115
45116    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45117  fi
45118
45119
45120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45121
45122  # Input might be given as Windows format, start by converting to
45123  # unix format.
45124  path="$POTENTIAL_FREETYPE_LIB_PATH"
45125  new_path=`$CYGPATH -u "$path"`
45126
45127  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45128  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45129  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45130  # "foo.exe" is OK but "foo" is an error.
45131  #
45132  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45133  # It is also a way to make sure we got the proper file name for the real test later on.
45134  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45135  if test "x$test_shortpath" = x; then
45136    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45137$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45138    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45139  fi
45140
45141  # Call helper function which possibly converts this using DOS-style short mode.
45142  # If so, the updated path is stored in $new_path.
45143
45144  input_path="$new_path"
45145  # Check if we need to convert this using DOS-style short mode. If the path
45146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45147  # take no chances and rewrite it.
45148  # Note: m4 eats our [], so we need to use [ and ] instead.
45149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45150  if test "x$has_forbidden_chars" != x; then
45151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45155      # Going to short mode and back again did indeed matter. Since short mode is
45156      # case insensitive, let's make it lowercase to improve readability.
45157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45158      # Now convert it back to Unix-stile (cygpath)
45159      input_path=`$CYGPATH -u "$shortmode_path"`
45160      new_path="$input_path"
45161    fi
45162  fi
45163
45164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45165  if test "x$test_cygdrive_prefix" = x; then
45166    # As a simple fix, exclude /usr/bin since it's not a real path.
45167    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45169      # a path prefixed by /cygdrive for fixpath to work.
45170      new_path="$CYGWIN_ROOT_PATH$input_path"
45171    fi
45172  fi
45173
45174
45175  if test "x$path" != "x$new_path"; then
45176    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45178$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45179  fi
45180
45181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45182
45183  path="$POTENTIAL_FREETYPE_LIB_PATH"
45184  has_colon=`$ECHO $path | $GREP ^.:`
45185  new_path="$path"
45186  if test "x$has_colon" = x; then
45187    # Not in mixed or Windows style, start by that.
45188    new_path=`cmd //c echo $path`
45189  fi
45190
45191
45192  input_path="$new_path"
45193  # Check if we need to convert this using DOS-style short mode. If the path
45194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45195  # take no chances and rewrite it.
45196  # Note: m4 eats our [], so we need to use [ and ] instead.
45197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45198  if test "x$has_forbidden_chars" != x; then
45199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45201  fi
45202
45203
45204  windows_path="$new_path"
45205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45206    unix_path=`$CYGPATH -u "$windows_path"`
45207    new_path="$unix_path"
45208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45210    new_path="$unix_path"
45211  fi
45212
45213  if test "x$path" != "x$new_path"; then
45214    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45216$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45217  fi
45218
45219  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45220  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45221
45222  else
45223    # We're on a posix platform. Hooray! :)
45224    path="$POTENTIAL_FREETYPE_LIB_PATH"
45225    has_space=`$ECHO "$path" | $GREP " "`
45226    if test "x$has_space" != x; then
45227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45228$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45229      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45230    fi
45231
45232    # Use eval to expand a potential ~
45233    eval path="$path"
45234    if test ! -f "$path" && test ! -d "$path"; then
45235      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45236    fi
45237
45238    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45239  fi
45240
45241
45242    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45244$as_echo_n "checking for freetype includes... " >&6; }
45245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45246$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45247    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45249$as_echo_n "checking for freetype libraries... " >&6; }
45250    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45251$as_echo "$FREETYPE_LIB_PATH" >&6; }
45252  fi
45253
45254          fi
45255
45256          if test "x$FOUND_FREETYPE" != xyes; then
45257            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
45258
45259  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45260  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45261  METHOD="well-known location"
45262
45263  # First check if the files exists.
45264  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45265    # We found an arbitrary include file. That's a good sign.
45266    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45267$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45268    FOUND_FREETYPE=yes
45269
45270    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45271    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45272      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45273$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45274      FOUND_FREETYPE=no
45275    else
45276      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45277        # On Windows, we will need both .lib and .dll file.
45278        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45279          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45280$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45281          FOUND_FREETYPE=no
45282        fi
45283      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45284          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45285        # Found lib in isa dir, use that instead.
45286        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45287      fi
45288    fi
45289  fi
45290
45291  if test "x$FOUND_FREETYPE" = xyes; then
45292
45293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45294
45295  # Input might be given as Windows format, start by converting to
45296  # unix format.
45297  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45298  new_path=`$CYGPATH -u "$path"`
45299
45300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45303  # "foo.exe" is OK but "foo" is an error.
45304  #
45305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45306  # It is also a way to make sure we got the proper file name for the real test later on.
45307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45308  if test "x$test_shortpath" = x; then
45309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45310$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45311    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45312  fi
45313
45314  # Call helper function which possibly converts this using DOS-style short mode.
45315  # If so, the updated path is stored in $new_path.
45316
45317  input_path="$new_path"
45318  # Check if we need to convert this using DOS-style short mode. If the path
45319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45320  # take no chances and rewrite it.
45321  # Note: m4 eats our [], so we need to use [ and ] instead.
45322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45323  if test "x$has_forbidden_chars" != x; then
45324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45328      # Going to short mode and back again did indeed matter. Since short mode is
45329      # case insensitive, let's make it lowercase to improve readability.
45330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45331      # Now convert it back to Unix-stile (cygpath)
45332      input_path=`$CYGPATH -u "$shortmode_path"`
45333      new_path="$input_path"
45334    fi
45335  fi
45336
45337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45338  if test "x$test_cygdrive_prefix" = x; then
45339    # As a simple fix, exclude /usr/bin since it's not a real path.
45340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45342      # a path prefixed by /cygdrive for fixpath to work.
45343      new_path="$CYGWIN_ROOT_PATH$input_path"
45344    fi
45345  fi
45346
45347
45348  if test "x$path" != "x$new_path"; then
45349    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45351$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45352  fi
45353
45354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45355
45356  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45357  has_colon=`$ECHO $path | $GREP ^.:`
45358  new_path="$path"
45359  if test "x$has_colon" = x; then
45360    # Not in mixed or Windows style, start by that.
45361    new_path=`cmd //c echo $path`
45362  fi
45363
45364
45365  input_path="$new_path"
45366  # Check if we need to convert this using DOS-style short mode. If the path
45367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45368  # take no chances and rewrite it.
45369  # Note: m4 eats our [], so we need to use [ and ] instead.
45370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45371  if test "x$has_forbidden_chars" != x; then
45372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45374  fi
45375
45376
45377  windows_path="$new_path"
45378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45379    unix_path=`$CYGPATH -u "$windows_path"`
45380    new_path="$unix_path"
45381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45383    new_path="$unix_path"
45384  fi
45385
45386  if test "x$path" != "x$new_path"; then
45387    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45389$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45390  fi
45391
45392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45394
45395  else
45396    # We're on a posix platform. Hooray! :)
45397    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45398    has_space=`$ECHO "$path" | $GREP " "`
45399    if test "x$has_space" != x; then
45400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45401$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45402      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45403    fi
45404
45405    # Use eval to expand a potential ~
45406    eval path="$path"
45407    if test ! -f "$path" && test ! -d "$path"; then
45408      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45409    fi
45410
45411    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45412  fi
45413
45414
45415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45416
45417  # Input might be given as Windows format, start by converting to
45418  # unix format.
45419  path="$POTENTIAL_FREETYPE_LIB_PATH"
45420  new_path=`$CYGPATH -u "$path"`
45421
45422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45425  # "foo.exe" is OK but "foo" is an error.
45426  #
45427  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45428  # It is also a way to make sure we got the proper file name for the real test later on.
45429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45430  if test "x$test_shortpath" = x; then
45431    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45432$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45433    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45434  fi
45435
45436  # Call helper function which possibly converts this using DOS-style short mode.
45437  # If so, the updated path is stored in $new_path.
45438
45439  input_path="$new_path"
45440  # Check if we need to convert this using DOS-style short mode. If the path
45441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45442  # take no chances and rewrite it.
45443  # Note: m4 eats our [], so we need to use [ and ] instead.
45444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45445  if test "x$has_forbidden_chars" != x; then
45446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45447    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45448    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45449    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45450      # Going to short mode and back again did indeed matter. Since short mode is
45451      # case insensitive, let's make it lowercase to improve readability.
45452      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45453      # Now convert it back to Unix-stile (cygpath)
45454      input_path=`$CYGPATH -u "$shortmode_path"`
45455      new_path="$input_path"
45456    fi
45457  fi
45458
45459  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45460  if test "x$test_cygdrive_prefix" = x; then
45461    # As a simple fix, exclude /usr/bin since it's not a real path.
45462    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45463      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45464      # a path prefixed by /cygdrive for fixpath to work.
45465      new_path="$CYGWIN_ROOT_PATH$input_path"
45466    fi
45467  fi
45468
45469
45470  if test "x$path" != "x$new_path"; then
45471    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45473$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45474  fi
45475
45476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45477
45478  path="$POTENTIAL_FREETYPE_LIB_PATH"
45479  has_colon=`$ECHO $path | $GREP ^.:`
45480  new_path="$path"
45481  if test "x$has_colon" = x; then
45482    # Not in mixed or Windows style, start by that.
45483    new_path=`cmd //c echo $path`
45484  fi
45485
45486
45487  input_path="$new_path"
45488  # Check if we need to convert this using DOS-style short mode. If the path
45489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45490  # take no chances and rewrite it.
45491  # Note: m4 eats our [], so we need to use [ and ] instead.
45492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45493  if test "x$has_forbidden_chars" != x; then
45494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45496  fi
45497
45498
45499  windows_path="$new_path"
45500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45501    unix_path=`$CYGPATH -u "$windows_path"`
45502    new_path="$unix_path"
45503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45505    new_path="$unix_path"
45506  fi
45507
45508  if test "x$path" != "x$new_path"; then
45509    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45511$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45512  fi
45513
45514  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45515  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45516
45517  else
45518    # We're on a posix platform. Hooray! :)
45519    path="$POTENTIAL_FREETYPE_LIB_PATH"
45520    has_space=`$ECHO "$path" | $GREP " "`
45521    if test "x$has_space" != x; then
45522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45523$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45524      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45525    fi
45526
45527    # Use eval to expand a potential ~
45528    eval path="$path"
45529    if test ! -f "$path" && test ! -d "$path"; then
45530      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45531    fi
45532
45533    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45534  fi
45535
45536
45537    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45539$as_echo_n "checking for freetype includes... " >&6; }
45540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45541$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45542    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45543    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45544$as_echo_n "checking for freetype libraries... " >&6; }
45545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45546$as_echo "$FREETYPE_LIB_PATH" >&6; }
45547  fi
45548
45549          fi
45550
45551          if test "x$FOUND_FREETYPE" != xyes; then
45552            FREETYPE_BASE_DIR="$SYSROOT/usr"
45553            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45554
45555  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45556  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45557  METHOD="well-known location"
45558
45559  # First check if the files exists.
45560  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45561    # We found an arbitrary include file. That's a good sign.
45562    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45563$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45564    FOUND_FREETYPE=yes
45565
45566    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45567    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45568      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45569$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45570      FOUND_FREETYPE=no
45571    else
45572      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45573        # On Windows, we will need both .lib and .dll file.
45574        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45575          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45576$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45577          FOUND_FREETYPE=no
45578        fi
45579      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45580          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45581        # Found lib in isa dir, use that instead.
45582        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45583      fi
45584    fi
45585  fi
45586
45587  if test "x$FOUND_FREETYPE" = xyes; then
45588
45589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45590
45591  # Input might be given as Windows format, start by converting to
45592  # unix format.
45593  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45594  new_path=`$CYGPATH -u "$path"`
45595
45596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45599  # "foo.exe" is OK but "foo" is an error.
45600  #
45601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45602  # It is also a way to make sure we got the proper file name for the real test later on.
45603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45604  if test "x$test_shortpath" = x; then
45605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45606$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45607    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45608  fi
45609
45610  # Call helper function which possibly converts this using DOS-style short mode.
45611  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45624      # Going to short mode and back again did indeed matter. Since short mode is
45625      # case insensitive, let's make it lowercase to improve readability.
45626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45627      # Now convert it back to Unix-stile (cygpath)
45628      input_path=`$CYGPATH -u "$shortmode_path"`
45629      new_path="$input_path"
45630    fi
45631  fi
45632
45633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45634  if test "x$test_cygdrive_prefix" = x; then
45635    # As a simple fix, exclude /usr/bin since it's not a real path.
45636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45638      # a path prefixed by /cygdrive for fixpath to work.
45639      new_path="$CYGWIN_ROOT_PATH$input_path"
45640    fi
45641  fi
45642
45643
45644  if test "x$path" != "x$new_path"; then
45645    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45647$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45648  fi
45649
45650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45651
45652  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45653  has_colon=`$ECHO $path | $GREP ^.:`
45654  new_path="$path"
45655  if test "x$has_colon" = x; then
45656    # Not in mixed or Windows style, start by that.
45657    new_path=`cmd //c echo $path`
45658  fi
45659
45660
45661  input_path="$new_path"
45662  # Check if we need to convert this using DOS-style short mode. If the path
45663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45664  # take no chances and rewrite it.
45665  # Note: m4 eats our [], so we need to use [ and ] instead.
45666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45667  if test "x$has_forbidden_chars" != x; then
45668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45670  fi
45671
45672
45673  windows_path="$new_path"
45674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45675    unix_path=`$CYGPATH -u "$windows_path"`
45676    new_path="$unix_path"
45677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45679    new_path="$unix_path"
45680  fi
45681
45682  if test "x$path" != "x$new_path"; then
45683    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45685$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45686  fi
45687
45688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45690
45691  else
45692    # We're on a posix platform. Hooray! :)
45693    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45694    has_space=`$ECHO "$path" | $GREP " "`
45695    if test "x$has_space" != x; then
45696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45697$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45698      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45699    fi
45700
45701    # Use eval to expand a potential ~
45702    eval path="$path"
45703    if test ! -f "$path" && test ! -d "$path"; then
45704      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45705    fi
45706
45707    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45708  fi
45709
45710
45711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45712
45713  # Input might be given as Windows format, start by converting to
45714  # unix format.
45715  path="$POTENTIAL_FREETYPE_LIB_PATH"
45716  new_path=`$CYGPATH -u "$path"`
45717
45718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45721  # "foo.exe" is OK but "foo" is an error.
45722  #
45723  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45724  # It is also a way to make sure we got the proper file name for the real test later on.
45725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45726  if test "x$test_shortpath" = x; then
45727    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45728$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45729    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45730  fi
45731
45732  # Call helper function which possibly converts this using DOS-style short mode.
45733  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45746      # Going to short mode and back again did indeed matter. Since short mode is
45747      # case insensitive, let's make it lowercase to improve readability.
45748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45749      # Now convert it back to Unix-stile (cygpath)
45750      input_path=`$CYGPATH -u "$shortmode_path"`
45751      new_path="$input_path"
45752    fi
45753  fi
45754
45755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45756  if test "x$test_cygdrive_prefix" = x; then
45757    # As a simple fix, exclude /usr/bin since it's not a real path.
45758    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45760      # a path prefixed by /cygdrive for fixpath to work.
45761      new_path="$CYGWIN_ROOT_PATH$input_path"
45762    fi
45763  fi
45764
45765
45766  if test "x$path" != "x$new_path"; then
45767    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45769$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45770  fi
45771
45772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45773
45774  path="$POTENTIAL_FREETYPE_LIB_PATH"
45775  has_colon=`$ECHO $path | $GREP ^.:`
45776  new_path="$path"
45777  if test "x$has_colon" = x; then
45778    # Not in mixed or Windows style, start by that.
45779    new_path=`cmd //c echo $path`
45780  fi
45781
45782
45783  input_path="$new_path"
45784  # Check if we need to convert this using DOS-style short mode. If the path
45785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45786  # take no chances and rewrite it.
45787  # Note: m4 eats our [], so we need to use [ and ] instead.
45788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45789  if test "x$has_forbidden_chars" != x; then
45790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45791    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45792  fi
45793
45794
45795  windows_path="$new_path"
45796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45797    unix_path=`$CYGPATH -u "$windows_path"`
45798    new_path="$unix_path"
45799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45801    new_path="$unix_path"
45802  fi
45803
45804  if test "x$path" != "x$new_path"; then
45805    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45807$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45808  fi
45809
45810  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45811  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45812
45813  else
45814    # We're on a posix platform. Hooray! :)
45815    path="$POTENTIAL_FREETYPE_LIB_PATH"
45816    has_space=`$ECHO "$path" | $GREP " "`
45817    if test "x$has_space" != x; then
45818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45819$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45820      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45821    fi
45822
45823    # Use eval to expand a potential ~
45824    eval path="$path"
45825    if test ! -f "$path" && test ! -d "$path"; then
45826      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45827    fi
45828
45829    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45830  fi
45831
45832
45833    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45834    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45835$as_echo_n "checking for freetype includes... " >&6; }
45836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45837$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45838    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45840$as_echo_n "checking for freetype libraries... " >&6; }
45841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45842$as_echo "$FREETYPE_LIB_PATH" >&6; }
45843  fi
45844
45845            else
45846
45847  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45848  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45849  METHOD="well-known location"
45850
45851  # First check if the files exists.
45852  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45853    # We found an arbitrary include file. That's a good sign.
45854    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45855$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45856    FOUND_FREETYPE=yes
45857
45858    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45859    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45860      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45861$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45862      FOUND_FREETYPE=no
45863    else
45864      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45865        # On Windows, we will need both .lib and .dll file.
45866        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45867          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45868$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45869          FOUND_FREETYPE=no
45870        fi
45871      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45872          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45873        # Found lib in isa dir, use that instead.
45874        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45875      fi
45876    fi
45877  fi
45878
45879  if test "x$FOUND_FREETYPE" = xyes; then
45880
45881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45882
45883  # Input might be given as Windows format, start by converting to
45884  # unix format.
45885  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45886  new_path=`$CYGPATH -u "$path"`
45887
45888  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45889  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45890  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45891  # "foo.exe" is OK but "foo" is an error.
45892  #
45893  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45894  # It is also a way to make sure we got the proper file name for the real test later on.
45895  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45896  if test "x$test_shortpath" = x; then
45897    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45898$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45899    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45900  fi
45901
45902  # Call helper function which possibly converts this using DOS-style short mode.
45903  # If so, the updated path is stored in $new_path.
45904
45905  input_path="$new_path"
45906  # Check if we need to convert this using DOS-style short mode. If the path
45907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45908  # take no chances and rewrite it.
45909  # Note: m4 eats our [], so we need to use [ and ] instead.
45910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45911  if test "x$has_forbidden_chars" != x; then
45912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45913    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45914    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45915    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45916      # Going to short mode and back again did indeed matter. Since short mode is
45917      # case insensitive, let's make it lowercase to improve readability.
45918      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45919      # Now convert it back to Unix-stile (cygpath)
45920      input_path=`$CYGPATH -u "$shortmode_path"`
45921      new_path="$input_path"
45922    fi
45923  fi
45924
45925  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45926  if test "x$test_cygdrive_prefix" = x; then
45927    # As a simple fix, exclude /usr/bin since it's not a real path.
45928    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45929      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45930      # a path prefixed by /cygdrive for fixpath to work.
45931      new_path="$CYGWIN_ROOT_PATH$input_path"
45932    fi
45933  fi
45934
45935
45936  if test "x$path" != "x$new_path"; then
45937    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45939$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45940  fi
45941
45942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45943
45944  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45945  has_colon=`$ECHO $path | $GREP ^.:`
45946  new_path="$path"
45947  if test "x$has_colon" = x; then
45948    # Not in mixed or Windows style, start by that.
45949    new_path=`cmd //c echo $path`
45950  fi
45951
45952
45953  input_path="$new_path"
45954  # Check if we need to convert this using DOS-style short mode. If the path
45955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45956  # take no chances and rewrite it.
45957  # Note: m4 eats our [], so we need to use [ and ] instead.
45958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45959  if test "x$has_forbidden_chars" != x; then
45960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45962  fi
45963
45964
45965  windows_path="$new_path"
45966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45967    unix_path=`$CYGPATH -u "$windows_path"`
45968    new_path="$unix_path"
45969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45971    new_path="$unix_path"
45972  fi
45973
45974  if test "x$path" != "x$new_path"; then
45975    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45977$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45978  fi
45979
45980  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45981  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45982
45983  else
45984    # We're on a posix platform. Hooray! :)
45985    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45986    has_space=`$ECHO "$path" | $GREP " "`
45987    if test "x$has_space" != x; then
45988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45989$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45990      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45991    fi
45992
45993    # Use eval to expand a potential ~
45994    eval path="$path"
45995    if test ! -f "$path" && test ! -d "$path"; then
45996      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45997    fi
45998
45999    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46000  fi
46001
46002
46003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46004
46005  # Input might be given as Windows format, start by converting to
46006  # unix format.
46007  path="$POTENTIAL_FREETYPE_LIB_PATH"
46008  new_path=`$CYGPATH -u "$path"`
46009
46010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46013  # "foo.exe" is OK but "foo" is an error.
46014  #
46015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46016  # It is also a way to make sure we got the proper file name for the real test later on.
46017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46018  if test "x$test_shortpath" = x; then
46019    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46020$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46021    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46022  fi
46023
46024  # Call helper function which possibly converts this using DOS-style short mode.
46025  # If so, the updated path is stored in $new_path.
46026
46027  input_path="$new_path"
46028  # Check if we need to convert this using DOS-style short mode. If the path
46029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46030  # take no chances and rewrite it.
46031  # Note: m4 eats our [], so we need to use [ and ] instead.
46032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46033  if test "x$has_forbidden_chars" != x; then
46034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46038      # Going to short mode and back again did indeed matter. Since short mode is
46039      # case insensitive, let's make it lowercase to improve readability.
46040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46041      # Now convert it back to Unix-stile (cygpath)
46042      input_path=`$CYGPATH -u "$shortmode_path"`
46043      new_path="$input_path"
46044    fi
46045  fi
46046
46047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46048  if test "x$test_cygdrive_prefix" = x; then
46049    # As a simple fix, exclude /usr/bin since it's not a real path.
46050    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46052      # a path prefixed by /cygdrive for fixpath to work.
46053      new_path="$CYGWIN_ROOT_PATH$input_path"
46054    fi
46055  fi
46056
46057
46058  if test "x$path" != "x$new_path"; then
46059    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46061$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46062  fi
46063
46064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46065
46066  path="$POTENTIAL_FREETYPE_LIB_PATH"
46067  has_colon=`$ECHO $path | $GREP ^.:`
46068  new_path="$path"
46069  if test "x$has_colon" = x; then
46070    # Not in mixed or Windows style, start by that.
46071    new_path=`cmd //c echo $path`
46072  fi
46073
46074
46075  input_path="$new_path"
46076  # Check if we need to convert this using DOS-style short mode. If the path
46077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46078  # take no chances and rewrite it.
46079  # Note: m4 eats our [], so we need to use [ and ] instead.
46080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46081  if test "x$has_forbidden_chars" != x; then
46082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46084  fi
46085
46086
46087  windows_path="$new_path"
46088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46089    unix_path=`$CYGPATH -u "$windows_path"`
46090    new_path="$unix_path"
46091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46093    new_path="$unix_path"
46094  fi
46095
46096  if test "x$path" != "x$new_path"; then
46097    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46099$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46100  fi
46101
46102  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46103  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46104
46105  else
46106    # We're on a posix platform. Hooray! :)
46107    path="$POTENTIAL_FREETYPE_LIB_PATH"
46108    has_space=`$ECHO "$path" | $GREP " "`
46109    if test "x$has_space" != x; then
46110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46111$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46112      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46113    fi
46114
46115    # Use eval to expand a potential ~
46116    eval path="$path"
46117    if test ! -f "$path" && test ! -d "$path"; then
46118      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46119    fi
46120
46121    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46122  fi
46123
46124
46125    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46126    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46127$as_echo_n "checking for freetype includes... " >&6; }
46128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46129$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46130    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46132$as_echo_n "checking for freetype libraries... " >&6; }
46133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46134$as_echo "$FREETYPE_LIB_PATH" >&6; }
46135  fi
46136
46137              if test "x$FOUND_FREETYPE" != xyes; then
46138
46139  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46140  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46141  METHOD="well-known location"
46142
46143  # First check if the files exists.
46144  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46145    # We found an arbitrary include file. That's a good sign.
46146    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46147$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46148    FOUND_FREETYPE=yes
46149
46150    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46151    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46152      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46153$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46154      FOUND_FREETYPE=no
46155    else
46156      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46157        # On Windows, we will need both .lib and .dll file.
46158        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46159          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46160$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46161          FOUND_FREETYPE=no
46162        fi
46163      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46164          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46165        # Found lib in isa dir, use that instead.
46166        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46167      fi
46168    fi
46169  fi
46170
46171  if test "x$FOUND_FREETYPE" = xyes; then
46172
46173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46174
46175  # Input might be given as Windows format, start by converting to
46176  # unix format.
46177  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46178  new_path=`$CYGPATH -u "$path"`
46179
46180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46183  # "foo.exe" is OK but "foo" is an error.
46184  #
46185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46186  # It is also a way to make sure we got the proper file name for the real test later on.
46187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46188  if test "x$test_shortpath" = x; then
46189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46190$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46191    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46192  fi
46193
46194  # Call helper function which possibly converts this using DOS-style short mode.
46195  # If so, the updated path is stored in $new_path.
46196
46197  input_path="$new_path"
46198  # Check if we need to convert this using DOS-style short mode. If the path
46199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46200  # take no chances and rewrite it.
46201  # Note: m4 eats our [], so we need to use [ and ] instead.
46202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46203  if test "x$has_forbidden_chars" != x; then
46204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46208      # Going to short mode and back again did indeed matter. Since short mode is
46209      # case insensitive, let's make it lowercase to improve readability.
46210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46211      # Now convert it back to Unix-stile (cygpath)
46212      input_path=`$CYGPATH -u "$shortmode_path"`
46213      new_path="$input_path"
46214    fi
46215  fi
46216
46217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46218  if test "x$test_cygdrive_prefix" = x; then
46219    # As a simple fix, exclude /usr/bin since it's not a real path.
46220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46222      # a path prefixed by /cygdrive for fixpath to work.
46223      new_path="$CYGWIN_ROOT_PATH$input_path"
46224    fi
46225  fi
46226
46227
46228  if test "x$path" != "x$new_path"; then
46229    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46231$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46232  fi
46233
46234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46235
46236  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46237  has_colon=`$ECHO $path | $GREP ^.:`
46238  new_path="$path"
46239  if test "x$has_colon" = x; then
46240    # Not in mixed or Windows style, start by that.
46241    new_path=`cmd //c echo $path`
46242  fi
46243
46244
46245  input_path="$new_path"
46246  # Check if we need to convert this using DOS-style short mode. If the path
46247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46248  # take no chances and rewrite it.
46249  # Note: m4 eats our [], so we need to use [ and ] instead.
46250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46251  if test "x$has_forbidden_chars" != x; then
46252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46254  fi
46255
46256
46257  windows_path="$new_path"
46258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46259    unix_path=`$CYGPATH -u "$windows_path"`
46260    new_path="$unix_path"
46261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46263    new_path="$unix_path"
46264  fi
46265
46266  if test "x$path" != "x$new_path"; then
46267    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46269$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46270  fi
46271
46272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46274
46275  else
46276    # We're on a posix platform. Hooray! :)
46277    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46278    has_space=`$ECHO "$path" | $GREP " "`
46279    if test "x$has_space" != x; then
46280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46281$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46282      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46283    fi
46284
46285    # Use eval to expand a potential ~
46286    eval path="$path"
46287    if test ! -f "$path" && test ! -d "$path"; then
46288      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46289    fi
46290
46291    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46292  fi
46293
46294
46295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46296
46297  # Input might be given as Windows format, start by converting to
46298  # unix format.
46299  path="$POTENTIAL_FREETYPE_LIB_PATH"
46300  new_path=`$CYGPATH -u "$path"`
46301
46302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46305  # "foo.exe" is OK but "foo" is an error.
46306  #
46307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46308  # It is also a way to make sure we got the proper file name for the real test later on.
46309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46310  if test "x$test_shortpath" = x; then
46311    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46312$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46313    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46314  fi
46315
46316  # Call helper function which possibly converts this using DOS-style short mode.
46317  # If so, the updated path is stored in $new_path.
46318
46319  input_path="$new_path"
46320  # Check if we need to convert this using DOS-style short mode. If the path
46321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46322  # take no chances and rewrite it.
46323  # Note: m4 eats our [], so we need to use [ and ] instead.
46324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46325  if test "x$has_forbidden_chars" != x; then
46326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46330      # Going to short mode and back again did indeed matter. Since short mode is
46331      # case insensitive, let's make it lowercase to improve readability.
46332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46333      # Now convert it back to Unix-stile (cygpath)
46334      input_path=`$CYGPATH -u "$shortmode_path"`
46335      new_path="$input_path"
46336    fi
46337  fi
46338
46339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46340  if test "x$test_cygdrive_prefix" = x; then
46341    # As a simple fix, exclude /usr/bin since it's not a real path.
46342    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46344      # a path prefixed by /cygdrive for fixpath to work.
46345      new_path="$CYGWIN_ROOT_PATH$input_path"
46346    fi
46347  fi
46348
46349
46350  if test "x$path" != "x$new_path"; then
46351    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46353$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46354  fi
46355
46356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46357
46358  path="$POTENTIAL_FREETYPE_LIB_PATH"
46359  has_colon=`$ECHO $path | $GREP ^.:`
46360  new_path="$path"
46361  if test "x$has_colon" = x; then
46362    # Not in mixed or Windows style, start by that.
46363    new_path=`cmd //c echo $path`
46364  fi
46365
46366
46367  input_path="$new_path"
46368  # Check if we need to convert this using DOS-style short mode. If the path
46369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46370  # take no chances and rewrite it.
46371  # Note: m4 eats our [], so we need to use [ and ] instead.
46372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46373  if test "x$has_forbidden_chars" != x; then
46374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46376  fi
46377
46378
46379  windows_path="$new_path"
46380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46381    unix_path=`$CYGPATH -u "$windows_path"`
46382    new_path="$unix_path"
46383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46385    new_path="$unix_path"
46386  fi
46387
46388  if test "x$path" != "x$new_path"; then
46389    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46391$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46392  fi
46393
46394  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46395  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46396
46397  else
46398    # We're on a posix platform. Hooray! :)
46399    path="$POTENTIAL_FREETYPE_LIB_PATH"
46400    has_space=`$ECHO "$path" | $GREP " "`
46401    if test "x$has_space" != x; then
46402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46403$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46404      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46405    fi
46406
46407    # Use eval to expand a potential ~
46408    eval path="$path"
46409    if test ! -f "$path" && test ! -d "$path"; then
46410      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46411    fi
46412
46413    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46414  fi
46415
46416
46417    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46419$as_echo_n "checking for freetype includes... " >&6; }
46420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46421$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46422    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46424$as_echo_n "checking for freetype libraries... " >&6; }
46425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46426$as_echo "$FREETYPE_LIB_PATH" >&6; }
46427  fi
46428
46429              fi
46430            fi
46431          fi
46432        fi
46433      fi # end check in well-known locations
46434
46435      if test "x$FOUND_FREETYPE" != xyes; then
46436
46437  # Print a helpful message on how to acquire the necessary build dependency.
46438  # freetype is the help tag: freetype, cups, pulse, alsa etc
46439  MISSING_DEPENDENCY=freetype
46440
46441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46442    cygwin_help $MISSING_DEPENDENCY
46443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46444    msys_help $MISSING_DEPENDENCY
46445  else
46446    PKGHANDLER_COMMAND=
46447
46448    case $PKGHANDLER in
46449      apt-get)
46450        apt_help     $MISSING_DEPENDENCY ;;
46451      yum)
46452        yum_help     $MISSING_DEPENDENCY ;;
46453      port)
46454        port_help    $MISSING_DEPENDENCY ;;
46455      pkgutil)
46456        pkgutil_help $MISSING_DEPENDENCY ;;
46457      pkgadd)
46458        pkgadd_help  $MISSING_DEPENDENCY ;;
46459    esac
46460
46461    if test "x$PKGHANDLER_COMMAND" != x; then
46462      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46463    fi
46464  fi
46465
46466        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46467      fi
46468    fi # end user specified settings
46469
46470    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46471    if test "x$FREETYPE_CFLAGS" = x; then
46472
46473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46474
46475  # Input might be given as Windows format, start by converting to
46476  # unix format.
46477  path="$FREETYPE_INCLUDE_PATH"
46478  new_path=`$CYGPATH -u "$path"`
46479
46480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46483  # "foo.exe" is OK but "foo" is an error.
46484  #
46485  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46486  # It is also a way to make sure we got the proper file name for the real test later on.
46487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46488  if test "x$test_shortpath" = x; then
46489    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46490$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46491    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46492  fi
46493
46494  # Call helper function which possibly converts this using DOS-style short mode.
46495  # If so, the updated path is stored in $new_path.
46496
46497  input_path="$new_path"
46498  # Check if we need to convert this using DOS-style short mode. If the path
46499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46500  # take no chances and rewrite it.
46501  # Note: m4 eats our [], so we need to use [ and ] instead.
46502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46503  if test "x$has_forbidden_chars" != x; then
46504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46508      # Going to short mode and back again did indeed matter. Since short mode is
46509      # case insensitive, let's make it lowercase to improve readability.
46510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46511      # Now convert it back to Unix-stile (cygpath)
46512      input_path=`$CYGPATH -u "$shortmode_path"`
46513      new_path="$input_path"
46514    fi
46515  fi
46516
46517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46518  if test "x$test_cygdrive_prefix" = x; then
46519    # As a simple fix, exclude /usr/bin since it's not a real path.
46520    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46522      # a path prefixed by /cygdrive for fixpath to work.
46523      new_path="$CYGWIN_ROOT_PATH$input_path"
46524    fi
46525  fi
46526
46527
46528  if test "x$path" != "x$new_path"; then
46529    FREETYPE_INCLUDE_PATH="$new_path"
46530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46531$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46532  fi
46533
46534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46535
46536  path="$FREETYPE_INCLUDE_PATH"
46537  has_colon=`$ECHO $path | $GREP ^.:`
46538  new_path="$path"
46539  if test "x$has_colon" = x; then
46540    # Not in mixed or Windows style, start by that.
46541    new_path=`cmd //c echo $path`
46542  fi
46543
46544
46545  input_path="$new_path"
46546  # Check if we need to convert this using DOS-style short mode. If the path
46547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46548  # take no chances and rewrite it.
46549  # Note: m4 eats our [], so we need to use [ and ] instead.
46550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46551  if test "x$has_forbidden_chars" != x; then
46552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46554  fi
46555
46556
46557  windows_path="$new_path"
46558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46559    unix_path=`$CYGPATH -u "$windows_path"`
46560    new_path="$unix_path"
46561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46563    new_path="$unix_path"
46564  fi
46565
46566  if test "x$path" != "x$new_path"; then
46567    FREETYPE_INCLUDE_PATH="$new_path"
46568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46569$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46570  fi
46571
46572  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46573  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46574
46575  else
46576    # We're on a posix platform. Hooray! :)
46577    path="$FREETYPE_INCLUDE_PATH"
46578    has_space=`$ECHO "$path" | $GREP " "`
46579    if test "x$has_space" != x; then
46580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46581$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46582      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46583    fi
46584
46585    # Use eval to expand a potential ~
46586    eval path="$path"
46587    if test ! -f "$path" && test ! -d "$path"; then
46588      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46589    fi
46590
46591    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46592  fi
46593
46594      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46595        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46596      else
46597        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46598      fi
46599    fi
46600
46601    if test "x$FREETYPE_LIBS" = x; then
46602
46603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46604
46605  # Input might be given as Windows format, start by converting to
46606  # unix format.
46607  path="$FREETYPE_LIB_PATH"
46608  new_path=`$CYGPATH -u "$path"`
46609
46610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46613  # "foo.exe" is OK but "foo" is an error.
46614  #
46615  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46616  # It is also a way to make sure we got the proper file name for the real test later on.
46617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46618  if test "x$test_shortpath" = x; then
46619    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46620$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46621    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46622  fi
46623
46624  # Call helper function which possibly converts this using DOS-style short mode.
46625  # If so, the updated path is stored in $new_path.
46626
46627  input_path="$new_path"
46628  # Check if we need to convert this using DOS-style short mode. If the path
46629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46630  # take no chances and rewrite it.
46631  # Note: m4 eats our [], so we need to use [ and ] instead.
46632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46633  if test "x$has_forbidden_chars" != x; then
46634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46638      # Going to short mode and back again did indeed matter. Since short mode is
46639      # case insensitive, let's make it lowercase to improve readability.
46640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46641      # Now convert it back to Unix-stile (cygpath)
46642      input_path=`$CYGPATH -u "$shortmode_path"`
46643      new_path="$input_path"
46644    fi
46645  fi
46646
46647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46648  if test "x$test_cygdrive_prefix" = x; then
46649    # As a simple fix, exclude /usr/bin since it's not a real path.
46650    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46652      # a path prefixed by /cygdrive for fixpath to work.
46653      new_path="$CYGWIN_ROOT_PATH$input_path"
46654    fi
46655  fi
46656
46657
46658  if test "x$path" != "x$new_path"; then
46659    FREETYPE_LIB_PATH="$new_path"
46660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46661$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46662  fi
46663
46664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46665
46666  path="$FREETYPE_LIB_PATH"
46667  has_colon=`$ECHO $path | $GREP ^.:`
46668  new_path="$path"
46669  if test "x$has_colon" = x; then
46670    # Not in mixed or Windows style, start by that.
46671    new_path=`cmd //c echo $path`
46672  fi
46673
46674
46675  input_path="$new_path"
46676  # Check if we need to convert this using DOS-style short mode. If the path
46677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46678  # take no chances and rewrite it.
46679  # Note: m4 eats our [], so we need to use [ and ] instead.
46680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46681  if test "x$has_forbidden_chars" != x; then
46682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46684  fi
46685
46686
46687  windows_path="$new_path"
46688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46689    unix_path=`$CYGPATH -u "$windows_path"`
46690    new_path="$unix_path"
46691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46693    new_path="$unix_path"
46694  fi
46695
46696  if test "x$path" != "x$new_path"; then
46697    FREETYPE_LIB_PATH="$new_path"
46698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46699$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46700  fi
46701
46702  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46703  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46704
46705  else
46706    # We're on a posix platform. Hooray! :)
46707    path="$FREETYPE_LIB_PATH"
46708    has_space=`$ECHO "$path" | $GREP " "`
46709    if test "x$has_space" != x; then
46710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46711$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46712      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46713    fi
46714
46715    # Use eval to expand a potential ~
46716    eval path="$path"
46717    if test ! -f "$path" && test ! -d "$path"; then
46718      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46719    fi
46720
46721    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46722  fi
46723
46724      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46725        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46726      else
46727        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46728      fi
46729    fi
46730
46731    # Try to compile it
46732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46733$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46734    ac_ext=cpp
46735ac_cpp='$CXXCPP $CPPFLAGS'
46736ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46737ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46738ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46739
46740    PREV_CXXCFLAGS="$CXXFLAGS"
46741    PREV_LIBS="$LIBS"
46742    PREV_CXX="$CXX"
46743    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46744    LIBS="$LIBS $FREETYPE_LIBS"
46745    CXX="$FIXPATH $CXX"
46746    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46747/* end confdefs.h.  */
46748
46749          #include<ft2build.h>
46750          #include FT_FREETYPE_H
46751          int main () {
46752            FT_Init_FreeType(NULL);
46753            return 0;
46754          }
46755
46756_ACEOF
46757if ac_fn_cxx_try_link "$LINENO"; then :
46758
46759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46760$as_echo "yes" >&6; }
46761
46762else
46763
46764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46765$as_echo "no" >&6; }
46766          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46767$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46768          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46769$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46770
46771
46772  # Print a helpful message on how to acquire the necessary build dependency.
46773  # freetype is the help tag: freetype, cups, pulse, alsa etc
46774  MISSING_DEPENDENCY=freetype
46775
46776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46777    cygwin_help $MISSING_DEPENDENCY
46778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46779    msys_help $MISSING_DEPENDENCY
46780  else
46781    PKGHANDLER_COMMAND=
46782
46783    case $PKGHANDLER in
46784      apt-get)
46785        apt_help     $MISSING_DEPENDENCY ;;
46786      yum)
46787        yum_help     $MISSING_DEPENDENCY ;;
46788      port)
46789        port_help    $MISSING_DEPENDENCY ;;
46790      pkgutil)
46791        pkgutil_help $MISSING_DEPENDENCY ;;
46792      pkgadd)
46793        pkgadd_help  $MISSING_DEPENDENCY ;;
46794    esac
46795
46796    if test "x$PKGHANDLER_COMMAND" != x; then
46797      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46798    fi
46799  fi
46800
46801
46802          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46803
46804
46805fi
46806rm -f core conftest.err conftest.$ac_objext \
46807    conftest$ac_exeext conftest.$ac_ext
46808    CXXCFLAGS="$PREV_CXXFLAGS"
46809    LIBS="$PREV_LIBS"
46810    CXX="$PREV_CXX"
46811    ac_ext=cpp
46812ac_cpp='$CXXCPP $CPPFLAGS'
46813ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46814ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46815ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46816
46817
46818    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46819$as_echo_n "checking if we should bundle freetype... " >&6; }
46820    if test "x$BUNDLE_FREETYPE" = xyes; then
46821      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46822    fi
46823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46824$as_echo "$BUNDLE_FREETYPE" >&6; }
46825
46826  fi # end freetype needed
46827
46828
46829
46830
46831
46832
46833
46834  ###############################################################################
46835  #
46836  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46837  #
46838
46839# Check whether --with-alsa was given.
46840if test "${with_alsa+set}" = set; then :
46841  withval=$with_alsa;
46842fi
46843
46844
46845# Check whether --with-alsa-include was given.
46846if test "${with_alsa_include+set}" = set; then :
46847  withval=$with_alsa_include;
46848fi
46849
46850
46851# Check whether --with-alsa-lib was given.
46852if test "${with_alsa_lib+set}" = set; then :
46853  withval=$with_alsa_lib;
46854fi
46855
46856
46857  if test "x$ALSA_NOT_NEEDED" = xyes; then
46858    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46859      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46860$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46861    fi
46862    ALSA_CFLAGS=
46863    ALSA_LIBS=
46864  else
46865    ALSA_FOUND=no
46866
46867    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46868      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46869    fi
46870
46871    if test "x${with_alsa}" != x; then
46872      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46873      ALSA_CFLAGS="-I${with_alsa}/include"
46874      ALSA_FOUND=yes
46875    fi
46876    if test "x${with_alsa_include}" != x; then
46877      ALSA_CFLAGS="-I${with_alsa_include}"
46878      ALSA_FOUND=yes
46879    fi
46880    if test "x${with_alsa_lib}" != x; then
46881      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46882      ALSA_FOUND=yes
46883    fi
46884    if test "x$ALSA_FOUND" = xno; then
46885
46886
46887  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46888    # Source the builddeps file again, to make sure it uses the latest variables!
46889    . $builddepsfile
46890    # Look for a target and build machine specific resource!
46891    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46892    if test "x$resource" = x; then
46893      # Ok, lets instead look for a target specific resource
46894      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46895    fi
46896    if test "x$resource" = x; then
46897      # Ok, lets instead look for a build specific resource
46898      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46899    fi
46900    if test "x$resource" = x; then
46901      # Ok, lets instead look for a generic resource
46902      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46903      resource=${builddep_alsa}
46904    fi
46905    if test "x$resource" != x; then
46906      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46907$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46908      # If the resource in the builddeps.conf file is an existing directory,
46909      # for example /java/linux/cups
46910      if test -d ${resource}; then
46911        depdir=${resource}
46912      else
46913
46914  # alsa is for example mymodule
46915  # $resource is for example libs/general/libmymod_1_2_3.zip
46916  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46917  # $with_builddeps_dir is for example /localhome/builddeps
46918  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46919  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46920  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46921  filename=`basename $resource`
46922  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46923  filebase=${filename%%.*}
46924  extension=${filename#*.}
46925  installdir=$with_builddeps_dir/$filebase
46926  if test ! -f $installdir/$filename.unpacked; then
46927    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46928$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46929    if test ! -d $installdir; then
46930      mkdir -p $installdir
46931    fi
46932    if test ! -d $installdir; then
46933      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46934    fi
46935    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46936    touch $tmpfile
46937    if test ! -f $tmpfile; then
46938      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46939    fi
46940
46941  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46942  # $tmpfile is the local file name for the downloaded file.
46943  VALID_TOOL=no
46944  if test "x$BDEPS_FTP" = xwget; then
46945    VALID_TOOL=yes
46946    wget -O $tmpfile $with_builddeps_server/$resource
46947  fi
46948  if test "x$BDEPS_FTP" = xlftp; then
46949    VALID_TOOL=yes
46950    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46951  fi
46952  if test "x$BDEPS_FTP" = xftp; then
46953    VALID_TOOL=yes
46954    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46955    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46956    FTPUSERPWD=${FTPSERVER%%@*}
46957    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46958      FTPUSER=${userpwd%%:*}
46959      FTPPWD=${userpwd#*@}
46960      FTPSERVER=${FTPSERVER#*@}
46961    else
46962      FTPUSER=ftp
46963      FTPPWD=ftp
46964    fi
46965    # the "pass" command does not work on some
46966    # ftp clients (read ftp.exe) but if it works,
46967    # passive mode is better!
46968    ( \
46969        echo "user $FTPUSER $FTPPWD"        ; \
46970        echo "pass"                         ; \
46971        echo "bin"                          ; \
46972        echo "get $FTPPATH $tmpfile"              ; \
46973    ) | ftp -in $FTPSERVER
46974  fi
46975  if test "x$VALID_TOOL" != xyes; then
46976    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46977  fi
46978
46979    mv $tmpfile $installdir/$filename
46980    if test ! -s $installdir/$filename; then
46981      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46982    fi
46983    case "$extension" in
46984      zip)  echo "Unzipping $installdir/$filename..."
46985        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46986        ;;
46987      tar.gz) echo "Untaring $installdir/$filename..."
46988        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46989        ;;
46990      tgz) echo "Untaring $installdir/$filename..."
46991        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46992        ;;
46993      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46994        ;;
46995    esac
46996  fi
46997  if test -f $installdir/$filename.unpacked; then
46998    depdir=$installdir
46999  fi
47000
47001      fi
47002      # Source the builddeps file again, because in the previous command, the depdir
47003      # was updated to point at the current build dependency install directory.
47004      . $builddepsfile
47005      # Now extract variables from the builddeps.conf files.
47006      theroot=${builddep_alsa_ROOT}
47007      thecflags=${builddep_alsa_CFLAGS}
47008      thelibs=${builddep_alsa_LIBS}
47009      if test "x$depdir" = x; then
47010        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
47011      fi
47012      ALSA=$depdir
47013      if test "x$theroot" != x; then
47014        ALSA="$theroot"
47015      fi
47016      if test "x$thecflags" != x; then
47017        ALSA_CFLAGS="$thecflags"
47018      fi
47019      if test "x$thelibs" != x; then
47020        ALSA_LIBS="$thelibs"
47021      fi
47022      ALSA_FOUND=yes
47023      else ALSA_FOUND=no
47024
47025    fi
47026    else ALSA_FOUND=no
47027
47028  fi
47029
47030    fi
47031    # Do not try pkg-config if we have a sysroot set.
47032    if test "x$SYSROOT" = x; then
47033      if test "x$ALSA_FOUND" = xno; then
47034
47035pkg_failed=no
47036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
47037$as_echo_n "checking for ALSA... " >&6; }
47038
47039if test -n "$ALSA_CFLAGS"; then
47040    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
47041 elif test -n "$PKG_CONFIG"; then
47042    if test -n "$PKG_CONFIG" && \
47043    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47044  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47045  ac_status=$?
47046  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47047  test $ac_status = 0; }; then
47048  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
47049else
47050  pkg_failed=yes
47051fi
47052 else
47053    pkg_failed=untried
47054fi
47055if test -n "$ALSA_LIBS"; then
47056    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
47057 elif test -n "$PKG_CONFIG"; then
47058    if test -n "$PKG_CONFIG" && \
47059    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47060  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47061  ac_status=$?
47062  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47063  test $ac_status = 0; }; then
47064  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
47065else
47066  pkg_failed=yes
47067fi
47068 else
47069    pkg_failed=untried
47070fi
47071
47072
47073
47074if test $pkg_failed = yes; then
47075
47076if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47077        _pkg_short_errors_supported=yes
47078else
47079        _pkg_short_errors_supported=no
47080fi
47081        if test $_pkg_short_errors_supported = yes; then
47082	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
47083        else
47084	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
47085        fi
47086	# Put the nasty error message in config.log where it belongs
47087	echo "$ALSA_PKG_ERRORS" >&5
47088
47089	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47090$as_echo "no" >&6; }
47091                ALSA_FOUND=no
47092elif test $pkg_failed = untried; then
47093	ALSA_FOUND=no
47094else
47095	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47096	ALSA_LIBS=$pkg_cv_ALSA_LIBS
47097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47098$as_echo "yes" >&6; }
47099	ALSA_FOUND=yes
47100fi
47101      fi
47102    fi
47103    if test "x$ALSA_FOUND" = xno; then
47104      for ac_header in alsa/asoundlib.h
47105do :
47106  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47107if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47108  cat >>confdefs.h <<_ACEOF
47109#define HAVE_ALSA_ASOUNDLIB_H 1
47110_ACEOF
47111
47112            ALSA_FOUND=yes
47113            ALSA_CFLAGS=-Iignoreme
47114            ALSA_LIBS=-lasound
47115            DEFAULT_ALSA=yes
47116
47117else
47118  ALSA_FOUND=no
47119fi
47120
47121done
47122
47123    fi
47124    if test "x$ALSA_FOUND" = xno; then
47125
47126  # Print a helpful message on how to acquire the necessary build dependency.
47127  # alsa is the help tag: freetype, cups, pulse, alsa etc
47128  MISSING_DEPENDENCY=alsa
47129
47130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47131    cygwin_help $MISSING_DEPENDENCY
47132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47133    msys_help $MISSING_DEPENDENCY
47134  else
47135    PKGHANDLER_COMMAND=
47136
47137    case $PKGHANDLER in
47138      apt-get)
47139        apt_help     $MISSING_DEPENDENCY ;;
47140      yum)
47141        yum_help     $MISSING_DEPENDENCY ;;
47142      port)
47143        port_help    $MISSING_DEPENDENCY ;;
47144      pkgutil)
47145        pkgutil_help $MISSING_DEPENDENCY ;;
47146      pkgadd)
47147        pkgadd_help  $MISSING_DEPENDENCY ;;
47148    esac
47149
47150    if test "x$PKGHANDLER_COMMAND" != x; then
47151      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47152    fi
47153  fi
47154
47155      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47156    fi
47157  fi
47158
47159
47160
47161
47162
47163
47164  ###############################################################################
47165  #
47166  # Check for the jpeg library
47167  #
47168
47169  USE_EXTERNAL_LIBJPEG=true
47170  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
47171$as_echo_n "checking for main in -ljpeg... " >&6; }
47172if ${ac_cv_lib_jpeg_main+:} false; then :
47173  $as_echo_n "(cached) " >&6
47174else
47175  ac_check_lib_save_LIBS=$LIBS
47176LIBS="-ljpeg  $LIBS"
47177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47178/* end confdefs.h.  */
47179
47180
47181int
47182main ()
47183{
47184return main ();
47185  ;
47186  return 0;
47187}
47188_ACEOF
47189if ac_fn_cxx_try_link "$LINENO"; then :
47190  ac_cv_lib_jpeg_main=yes
47191else
47192  ac_cv_lib_jpeg_main=no
47193fi
47194rm -f core conftest.err conftest.$ac_objext \
47195    conftest$ac_exeext conftest.$ac_ext
47196LIBS=$ac_check_lib_save_LIBS
47197fi
47198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
47199$as_echo "$ac_cv_lib_jpeg_main" >&6; }
47200if test "x$ac_cv_lib_jpeg_main" = xyes; then :
47201  cat >>confdefs.h <<_ACEOF
47202#define HAVE_LIBJPEG 1
47203_ACEOF
47204
47205  LIBS="-ljpeg $LIBS"
47206
47207else
47208   USE_EXTERNAL_LIBJPEG=false
47209      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
47210$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
47211
47212fi
47213
47214
47215
47216  ###############################################################################
47217  #
47218  # Check for the gif library
47219  #
47220
47221
47222# Check whether --with-giflib was given.
47223if test "${with_giflib+set}" = set; then :
47224  withval=$with_giflib;
47225fi
47226
47227
47228
47229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47230$as_echo_n "checking for which giflib to use... " >&6; }
47231
47232  # default is bundled
47233  DEFAULT_GIFLIB=bundled
47234
47235  #
47236  # if user didn't specify, use DEFAULT_GIFLIB
47237  #
47238  if test "x${with_giflib}" = "x"; then
47239    with_giflib=${DEFAULT_GIFLIB}
47240  fi
47241
47242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47243$as_echo "${with_giflib}" >&6; }
47244
47245  if test "x${with_giflib}" = "xbundled"; then
47246    USE_EXTERNAL_LIBGIF=false
47247  elif test "x${with_giflib}" = "xsystem"; then
47248    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47249if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47250
47251else
47252   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47253fi
47254
47255
47256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47257$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47258if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47259  $as_echo_n "(cached) " >&6
47260else
47261  ac_check_lib_save_LIBS=$LIBS
47262LIBS="-lgif  $LIBS"
47263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47264/* end confdefs.h.  */
47265
47266/* Override any GCC internal prototype to avoid an error.
47267   Use char because int might match the return type of a GCC
47268   builtin and then its argument prototype would still apply.  */
47269#ifdef __cplusplus
47270extern "C"
47271#endif
47272char DGifGetCode ();
47273int
47274main ()
47275{
47276return DGifGetCode ();
47277  ;
47278  return 0;
47279}
47280_ACEOF
47281if ac_fn_cxx_try_link "$LINENO"; then :
47282  ac_cv_lib_gif_DGifGetCode=yes
47283else
47284  ac_cv_lib_gif_DGifGetCode=no
47285fi
47286rm -f core conftest.err conftest.$ac_objext \
47287    conftest$ac_exeext conftest.$ac_ext
47288LIBS=$ac_check_lib_save_LIBS
47289fi
47290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47291$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47292if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47293  cat >>confdefs.h <<_ACEOF
47294#define HAVE_LIBGIF 1
47295_ACEOF
47296
47297  LIBS="-lgif $LIBS"
47298
47299else
47300   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
47301fi
47302
47303
47304    USE_EXTERNAL_LIBGIF=true
47305  else
47306    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
47307  fi
47308
47309
47310  ###############################################################################
47311  #
47312  # Check for the png library
47313  #
47314
47315
47316# Check whether --with-libpng was given.
47317if test "${with_libpng+set}" = set; then :
47318  withval=$with_libpng;
47319fi
47320
47321
47322
47323  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
47324$as_echo_n "checking for which libpng to use... " >&6; }
47325
47326  # default is bundled
47327  DEFAULT_LIBPNG=bundled
47328
47329  #
47330  # if user didn't specify, use DEFAULT_LIBPNG
47331  #
47332  if test "x${with_libpng}" = "x"; then
47333      with_libpng=${DEFAULT_LIBPNG}
47334  fi
47335
47336  if test "x${with_libpng}" = "xbundled"; then
47337      USE_EXTERNAL_LIBPNG=false
47338      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47339$as_echo "bundled" >&6; }
47340  elif test "x${with_libpng}" = "xsystem"; then
47341
47342pkg_failed=no
47343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
47344$as_echo_n "checking for PNG... " >&6; }
47345
47346if test -n "$PNG_CFLAGS"; then
47347    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
47348 elif test -n "$PKG_CONFIG"; then
47349    if test -n "$PKG_CONFIG" && \
47350    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47351  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47352  ac_status=$?
47353  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47354  test $ac_status = 0; }; then
47355  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
47356else
47357  pkg_failed=yes
47358fi
47359 else
47360    pkg_failed=untried
47361fi
47362if test -n "$PNG_LIBS"; then
47363    pkg_cv_PNG_LIBS="$PNG_LIBS"
47364 elif test -n "$PKG_CONFIG"; then
47365    if test -n "$PKG_CONFIG" && \
47366    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47367  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47368  ac_status=$?
47369  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47370  test $ac_status = 0; }; then
47371  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
47372else
47373  pkg_failed=yes
47374fi
47375 else
47376    pkg_failed=untried
47377fi
47378
47379
47380
47381if test $pkg_failed = yes; then
47382
47383if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47384        _pkg_short_errors_supported=yes
47385else
47386        _pkg_short_errors_supported=no
47387fi
47388        if test $_pkg_short_errors_supported = yes; then
47389	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
47390        else
47391	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
47392        fi
47393	# Put the nasty error message in config.log where it belongs
47394	echo "$PNG_PKG_ERRORS" >&5
47395
47396	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47397$as_echo "no" >&6; }
47398                 LIBPNG_FOUND=no
47399elif test $pkg_failed = untried; then
47400	 LIBPNG_FOUND=no
47401else
47402	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
47403	PNG_LIBS=$pkg_cv_PNG_LIBS
47404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47405$as_echo "yes" >&6; }
47406	 LIBPNG_FOUND=yes
47407fi
47408      if test "x${LIBPNG_FOUND}" = "xyes"; then
47409          USE_EXTERNAL_LIBPNG=true
47410          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47411$as_echo "system" >&6; }
47412      else
47413          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47414$as_echo "system not found" >&6; }
47415          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
47416      fi
47417  else
47418      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
47419  fi
47420
47421
47422  ###############################################################################
47423  #
47424  # Check for the zlib library
47425  #
47426
47427
47428# Check whether --with-zlib was given.
47429if test "${with_zlib+set}" = set; then :
47430  withval=$with_zlib;
47431fi
47432
47433
47434  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
47435$as_echo_n "checking for compress in -lz... " >&6; }
47436if ${ac_cv_lib_z_compress+:} false; then :
47437  $as_echo_n "(cached) " >&6
47438else
47439  ac_check_lib_save_LIBS=$LIBS
47440LIBS="-lz  $LIBS"
47441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47442/* end confdefs.h.  */
47443
47444/* Override any GCC internal prototype to avoid an error.
47445   Use char because int might match the return type of a GCC
47446   builtin and then its argument prototype would still apply.  */
47447#ifdef __cplusplus
47448extern "C"
47449#endif
47450char compress ();
47451int
47452main ()
47453{
47454return compress ();
47455  ;
47456  return 0;
47457}
47458_ACEOF
47459if ac_fn_cxx_try_link "$LINENO"; then :
47460  ac_cv_lib_z_compress=yes
47461else
47462  ac_cv_lib_z_compress=no
47463fi
47464rm -f core conftest.err conftest.$ac_objext \
47465    conftest$ac_exeext conftest.$ac_ext
47466LIBS=$ac_check_lib_save_LIBS
47467fi
47468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47469$as_echo "$ac_cv_lib_z_compress" >&6; }
47470if test "x$ac_cv_lib_z_compress" = xyes; then :
47471   ZLIB_FOUND=yes
47472else
47473   ZLIB_FOUND=no
47474fi
47475
47476
47477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47478$as_echo_n "checking for which zlib to use... " >&6; }
47479
47480  DEFAULT_ZLIB=bundled
47481  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47482    #
47483    # On macosx default is system...on others default is
47484    #
47485    DEFAULT_ZLIB=system
47486  fi
47487
47488  if test "x${ZLIB_FOUND}" != "xyes"; then
47489    #
47490    # If we don't find any system...set default to bundled
47491    #
47492    DEFAULT_ZLIB=bundled
47493  fi
47494
47495  #
47496  # If user didn't specify, use DEFAULT_ZLIB
47497  #
47498  if test "x${with_zlib}" = "x"; then
47499    with_zlib=${DEFAULT_ZLIB}
47500  fi
47501
47502  if test "x${with_zlib}" = "xbundled"; then
47503    USE_EXTERNAL_LIBZ=false
47504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47505$as_echo "bundled" >&6; }
47506  elif test "x${with_zlib}" = "xsystem"; then
47507    if test "x${ZLIB_FOUND}" = "xyes"; then
47508      USE_EXTERNAL_LIBZ=true
47509      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47510$as_echo "system" >&6; }
47511    else
47512      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47513$as_echo "system not found" >&6; }
47514      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
47515    fi
47516  else
47517    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47518  fi
47519
47520
47521
47522  ###############################################################################
47523  LIBZIP_CAN_USE_MMAP=true
47524
47525
47526
47527  ###############################################################################
47528  #
47529  # Check if altzone exists in time.h
47530  #
47531
47532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47533/* end confdefs.h.  */
47534#include <time.h>
47535int
47536main ()
47537{
47538return (int)altzone;
47539  ;
47540  return 0;
47541}
47542_ACEOF
47543if ac_fn_cxx_try_link "$LINENO"; then :
47544  has_altzone=yes
47545else
47546  has_altzone=no
47547fi
47548rm -f core conftest.err conftest.$ac_objext \
47549    conftest$ac_exeext conftest.$ac_ext
47550  if test "x$has_altzone" = xyes; then
47551
47552$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47553
47554  fi
47555
47556  ###############################################################################
47557  #
47558  # Check the maths library
47559  #
47560
47561  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47562$as_echo_n "checking for cos in -lm... " >&6; }
47563if ${ac_cv_lib_m_cos+:} false; then :
47564  $as_echo_n "(cached) " >&6
47565else
47566  ac_check_lib_save_LIBS=$LIBS
47567LIBS="-lm  $LIBS"
47568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47569/* end confdefs.h.  */
47570
47571/* Override any GCC internal prototype to avoid an error.
47572   Use char because int might match the return type of a GCC
47573   builtin and then its argument prototype would still apply.  */
47574#ifdef __cplusplus
47575extern "C"
47576#endif
47577char cos ();
47578int
47579main ()
47580{
47581return cos ();
47582  ;
47583  return 0;
47584}
47585_ACEOF
47586if ac_fn_cxx_try_link "$LINENO"; then :
47587  ac_cv_lib_m_cos=yes
47588else
47589  ac_cv_lib_m_cos=no
47590fi
47591rm -f core conftest.err conftest.$ac_objext \
47592    conftest$ac_exeext conftest.$ac_ext
47593LIBS=$ac_check_lib_save_LIBS
47594fi
47595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47596$as_echo "$ac_cv_lib_m_cos" >&6; }
47597if test "x$ac_cv_lib_m_cos" = xyes; then :
47598  cat >>confdefs.h <<_ACEOF
47599#define HAVE_LIBM 1
47600_ACEOF
47601
47602  LIBS="-lm $LIBS"
47603
47604else
47605
47606        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47607$as_echo "$as_me: Maths library was not found" >&6;}
47608
47609
47610fi
47611
47612
47613
47614  ###############################################################################
47615  #
47616  # Check for libdl.so
47617
47618  save_LIBS="$LIBS"
47619  LIBS=""
47620  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47621$as_echo_n "checking for dlopen in -ldl... " >&6; }
47622if ${ac_cv_lib_dl_dlopen+:} false; then :
47623  $as_echo_n "(cached) " >&6
47624else
47625  ac_check_lib_save_LIBS=$LIBS
47626LIBS="-ldl  $LIBS"
47627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47628/* end confdefs.h.  */
47629
47630/* Override any GCC internal prototype to avoid an error.
47631   Use char because int might match the return type of a GCC
47632   builtin and then its argument prototype would still apply.  */
47633#ifdef __cplusplus
47634extern "C"
47635#endif
47636char dlopen ();
47637int
47638main ()
47639{
47640return dlopen ();
47641  ;
47642  return 0;
47643}
47644_ACEOF
47645if ac_fn_cxx_try_link "$LINENO"; then :
47646  ac_cv_lib_dl_dlopen=yes
47647else
47648  ac_cv_lib_dl_dlopen=no
47649fi
47650rm -f core conftest.err conftest.$ac_objext \
47651    conftest$ac_exeext conftest.$ac_ext
47652LIBS=$ac_check_lib_save_LIBS
47653fi
47654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47655$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47656if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47657  cat >>confdefs.h <<_ACEOF
47658#define HAVE_LIBDL 1
47659_ACEOF
47660
47661  LIBS="-ldl $LIBS"
47662
47663fi
47664
47665  LIBDL="$LIBS"
47666
47667  LIBS="$save_LIBS"
47668
47669
47670  ###############################################################################
47671  #
47672  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47673  # dynamic build is configured on command line.
47674  #
47675
47676# Check whether --with-stdc++lib was given.
47677if test "${with_stdc__lib+set}" = set; then :
47678  withval=$with_stdc__lib;
47679        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47680                && test "x$with_stdc__lib" != xdefault; then
47681          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47682        fi
47683
47684else
47685  with_stdc__lib=default
47686
47687fi
47688
47689
47690  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47691    # Test if -lstdc++ works.
47692    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47693$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47694    ac_ext=cpp
47695ac_cpp='$CXXCPP $CPPFLAGS'
47696ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47697ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47698ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47699
47700    OLD_CXXFLAGS="$CXXFLAGS"
47701    CXXFLAGS="$CXXFLAGS -lstdc++"
47702    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47703/* end confdefs.h.  */
47704
47705int
47706main ()
47707{
47708return 0;
47709  ;
47710  return 0;
47711}
47712_ACEOF
47713if ac_fn_cxx_try_link "$LINENO"; then :
47714  has_dynamic_libstdcxx=yes
47715else
47716  has_dynamic_libstdcxx=no
47717fi
47718rm -f core conftest.err conftest.$ac_objext \
47719    conftest$ac_exeext conftest.$ac_ext
47720    CXXFLAGS="$OLD_CXXFLAGS"
47721    ac_ext=cpp
47722ac_cpp='$CXXCPP $CPPFLAGS'
47723ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47724ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47725ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47726
47727    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47728$as_echo "$has_dynamic_libstdcxx" >&6; }
47729
47730    # Test if stdc++ can be linked statically.
47731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47732$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47733    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47734    ac_ext=cpp
47735ac_cpp='$CXXCPP $CPPFLAGS'
47736ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47737ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47738ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47739
47740    OLD_LIBS="$LIBS"
47741    OLD_CXX="$CXX"
47742    LIBS="$STATIC_STDCXX_FLAGS"
47743    CXX="$CC"
47744    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47745/* end confdefs.h.  */
47746
47747int
47748main ()
47749{
47750return 0;
47751  ;
47752  return 0;
47753}
47754_ACEOF
47755if ac_fn_cxx_try_link "$LINENO"; then :
47756  has_static_libstdcxx=yes
47757else
47758  has_static_libstdcxx=no
47759fi
47760rm -f core conftest.err conftest.$ac_objext \
47761    conftest$ac_exeext conftest.$ac_ext
47762    LIBS="$OLD_LIBS"
47763    CXX="$OLD_CXX"
47764    ac_ext=cpp
47765ac_cpp='$CXXCPP $CPPFLAGS'
47766ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47767ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47768ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47769
47770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47771$as_echo "$has_static_libstdcxx" >&6; }
47772
47773    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47774      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47775    fi
47776
47777    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47778      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47779    fi
47780
47781    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47782      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47783    fi
47784
47785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47786$as_echo_n "checking how to link with libstdc++... " >&6; }
47787    # If dynamic was requested, it's available since it would fail above otherwise.
47788    # If dynamic wasn't requested, go with static unless it isn't available.
47789    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47790      LIBCXX="$LIBCXX -lstdc++"
47791      LDCXX="$CXX"
47792      STATIC_CXX_SETTING="STATIC_CXX=false"
47793      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47794$as_echo "dynamic" >&6; }
47795    else
47796      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47797      LDCXX="$CC"
47798      STATIC_CXX_SETTING="STATIC_CXX=true"
47799      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47800$as_echo "static" >&6; }
47801    fi
47802  fi
47803
47804
47805  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47806    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47807
47808pkg_failed=no
47809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47810$as_echo_n "checking for LIBFFI... " >&6; }
47811
47812if test -n "$LIBFFI_CFLAGS"; then
47813    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47814 elif test -n "$PKG_CONFIG"; then
47815    if test -n "$PKG_CONFIG" && \
47816    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47817  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47818  ac_status=$?
47819  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47820  test $ac_status = 0; }; then
47821  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47822else
47823  pkg_failed=yes
47824fi
47825 else
47826    pkg_failed=untried
47827fi
47828if test -n "$LIBFFI_LIBS"; then
47829    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47830 elif test -n "$PKG_CONFIG"; then
47831    if test -n "$PKG_CONFIG" && \
47832    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47833  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47834  ac_status=$?
47835  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47836  test $ac_status = 0; }; then
47837  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47838else
47839  pkg_failed=yes
47840fi
47841 else
47842    pkg_failed=untried
47843fi
47844
47845
47846
47847if test $pkg_failed = yes; then
47848
47849if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47850        _pkg_short_errors_supported=yes
47851else
47852        _pkg_short_errors_supported=no
47853fi
47854        if test $_pkg_short_errors_supported = yes; then
47855	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47856        else
47857	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47858        fi
47859	# Put the nasty error message in config.log where it belongs
47860	echo "$LIBFFI_PKG_ERRORS" >&5
47861
47862	as_fn_error $? "Package requirements (libffi) were not met:
47863
47864$LIBFFI_PKG_ERRORS
47865
47866Consider adjusting the PKG_CONFIG_PATH environment variable if you
47867installed software in a non-standard prefix.
47868
47869Alternatively, you may set the environment variables LIBFFI_CFLAGS
47870and LIBFFI_LIBS to avoid the need to call pkg-config.
47871See the pkg-config man page for more details.
47872" "$LINENO" 5
47873elif test $pkg_failed = untried; then
47874	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47876as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47877is in your PATH or set the PKG_CONFIG environment variable to the full
47878path to pkg-config.
47879
47880Alternatively, you may set the environment variables LIBFFI_CFLAGS
47881and LIBFFI_LIBS to avoid the need to call pkg-config.
47882See the pkg-config man page for more details.
47883
47884To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47885See \`config.log' for more details" "$LINENO" 5; }
47886else
47887	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47888	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47890$as_echo "yes" >&6; }
47891	:
47892fi
47893
47894  fi
47895
47896  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47897    # Extract the first word of "llvm-config", so it can be a program name with args.
47898set dummy llvm-config; ac_word=$2
47899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47900$as_echo_n "checking for $ac_word... " >&6; }
47901if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47902  $as_echo_n "(cached) " >&6
47903else
47904  if test -n "$LLVM_CONFIG"; then
47905  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47906else
47907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47908for as_dir in $PATH
47909do
47910  IFS=$as_save_IFS
47911  test -z "$as_dir" && as_dir=.
47912    for ac_exec_ext in '' $ac_executable_extensions; do
47913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47914    ac_cv_prog_LLVM_CONFIG="llvm-config"
47915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47916    break 2
47917  fi
47918done
47919  done
47920IFS=$as_save_IFS
47921
47922fi
47923fi
47924LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47925if test -n "$LLVM_CONFIG"; then
47926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47927$as_echo "$LLVM_CONFIG" >&6; }
47928else
47929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47930$as_echo "no" >&6; }
47931fi
47932
47933
47934
47935    if test "x$LLVM_CONFIG" != xllvm-config; then
47936      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47937    fi
47938
47939    llvm_components="jit mcjit engine nativecodegen native"
47940    unset LLVM_CFLAGS
47941    for flag in $("$LLVM_CONFIG" --cxxflags); do
47942      if echo "${flag}" | grep -q '^-[ID]'; then
47943        if test "${flag}" != "-D_DEBUG" ; then
47944          if test "${LLVM_CFLAGS}" != "" ; then
47945            LLVM_CFLAGS="${LLVM_CFLAGS} "
47946          fi
47947          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47948        fi
47949      fi
47950    done
47951    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47952    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47953
47954    unset LLVM_LDFLAGS
47955    for flag in $("${LLVM_CONFIG}" --ldflags); do
47956      if echo "${flag}" | grep -q '^-L'; then
47957        if test "${LLVM_LDFLAGS}" != ""; then
47958          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47959        fi
47960        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47961      fi
47962    done
47963
47964    unset LLVM_LIBS
47965    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47966      if echo "${flag}" | grep -q '^-l'; then
47967        if test "${LLVM_LIBS}" != ""; then
47968          LLVM_LIBS="${LLVM_LIBS} "
47969        fi
47970        LLVM_LIBS="${LLVM_LIBS}${flag}"
47971      fi
47972    done
47973
47974
47975
47976
47977  fi
47978
47979  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47980  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47981    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47982  fi
47983
47984  # TODO better (platform agnostic) test
47985  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47986    LIBCXX="-lstdc++"
47987  fi
47988
47989
47990
47991
47992  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47993
47994
47995# Check whether --with-msvcr-dll was given.
47996if test "${with_msvcr_dll+set}" = set; then :
47997  withval=$with_msvcr_dll;
47998fi
47999
48000
48001  if test "x$with_msvcr_dll" != x; then
48002    # If given explicitely by user, do not probe. If not present, fail directly.
48003
48004  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
48005  METHOD="--with-msvcr-dll"
48006  if test -e "$POSSIBLE_MSVCR_DLL"; then
48007    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48008$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48009
48010    # Need to check if the found msvcr is correct architecture
48011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48012$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48013    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48014    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48015      CORRECT_MSVCR_ARCH=386
48016    else
48017      CORRECT_MSVCR_ARCH=x86-64
48018    fi
48019    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48020      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48021$as_echo "ok" >&6; }
48022      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48023      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48024$as_echo_n "checking for msvcr100.dll... " >&6; }
48025      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48026$as_echo "$MSVCR_DLL" >&6; }
48027    else
48028      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48029$as_echo "incorrect, ignoring" >&6; }
48030      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48031$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48032    fi
48033  fi
48034
48035    if test "x$MSVCR_DLL" = x; then
48036      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
48037    fi
48038  fi
48039
48040  if test "x$MSVCR_DLL" = x; then
48041    # Probe: Using well-known location from Visual Studio 10.0
48042    if test "x$VCINSTALLDIR" != x; then
48043      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48044
48045  windows_path="$CYGWIN_VC_INSTALL_DIR"
48046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48047    unix_path=`$CYGPATH -u "$windows_path"`
48048    CYGWIN_VC_INSTALL_DIR="$unix_path"
48049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48051    CYGWIN_VC_INSTALL_DIR="$unix_path"
48052  fi
48053
48054      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48055        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
48056      else
48057        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
48058      fi
48059
48060  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48061  METHOD="well-known location in VCINSTALLDIR"
48062  if test -e "$POSSIBLE_MSVCR_DLL"; then
48063    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48064$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48065
48066    # Need to check if the found msvcr is correct architecture
48067    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48068$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48069    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48070    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48071      CORRECT_MSVCR_ARCH=386
48072    else
48073      CORRECT_MSVCR_ARCH=x86-64
48074    fi
48075    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48076      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48077$as_echo "ok" >&6; }
48078      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48079      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48080$as_echo_n "checking for msvcr100.dll... " >&6; }
48081      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48082$as_echo "$MSVCR_DLL" >&6; }
48083    else
48084      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48085$as_echo "incorrect, ignoring" >&6; }
48086      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48087$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48088    fi
48089  fi
48090
48091    fi
48092  fi
48093
48094  if test "x$MSVCR_DLL" = x; then
48095    # Probe: Check in the Boot JDK directory.
48096    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
48097
48098  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48099  METHOD="well-known location in Boot JDK"
48100  if test -e "$POSSIBLE_MSVCR_DLL"; then
48101    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48102$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48103
48104    # Need to check if the found msvcr is correct architecture
48105    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48106$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48107    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48108    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48109      CORRECT_MSVCR_ARCH=386
48110    else
48111      CORRECT_MSVCR_ARCH=x86-64
48112    fi
48113    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48114      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48115$as_echo "ok" >&6; }
48116      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48117      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48118$as_echo_n "checking for msvcr100.dll... " >&6; }
48119      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48120$as_echo "$MSVCR_DLL" >&6; }
48121    else
48122      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48123$as_echo "incorrect, ignoring" >&6; }
48124      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48125$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48126    fi
48127  fi
48128
48129  fi
48130
48131  if test "x$MSVCR_DLL" = x; then
48132    # Probe: Look in the Windows system32 directory
48133    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48134
48135  windows_path="$CYGWIN_SYSTEMROOT"
48136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48137    unix_path=`$CYGPATH -u "$windows_path"`
48138    CYGWIN_SYSTEMROOT="$unix_path"
48139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48141    CYGWIN_SYSTEMROOT="$unix_path"
48142  fi
48143
48144    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
48145
48146  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48147  METHOD="well-known location in SYSTEMROOT"
48148  if test -e "$POSSIBLE_MSVCR_DLL"; then
48149    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48150$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48151
48152    # Need to check if the found msvcr is correct architecture
48153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48154$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48155    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48156    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48157      CORRECT_MSVCR_ARCH=386
48158    else
48159      CORRECT_MSVCR_ARCH=x86-64
48160    fi
48161    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48162      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48163$as_echo "ok" >&6; }
48164      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48165      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48166$as_echo_n "checking for msvcr100.dll... " >&6; }
48167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48168$as_echo "$MSVCR_DLL" >&6; }
48169    else
48170      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48171$as_echo "incorrect, ignoring" >&6; }
48172      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48173$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48174    fi
48175  fi
48176
48177  fi
48178
48179  if test "x$MSVCR_DLL" = x; then
48180    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48181    if test "x$VS100COMNTOOLS" != x; then
48182      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48183
48184  windows_path="$CYGWIN_VS_TOOLS_DIR"
48185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48186    unix_path=`$CYGPATH -u "$windows_path"`
48187    CYGWIN_VS_TOOLS_DIR="$unix_path"
48188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48190    CYGWIN_VS_TOOLS_DIR="$unix_path"
48191  fi
48192
48193      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48194        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
48195      else
48196        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
48197      fi
48198
48199  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48200  METHOD="search of VS100COMNTOOLS"
48201  if test -e "$POSSIBLE_MSVCR_DLL"; then
48202    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48203$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48204
48205    # Need to check if the found msvcr is correct architecture
48206    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48207$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48208    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48209    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48210      CORRECT_MSVCR_ARCH=386
48211    else
48212      CORRECT_MSVCR_ARCH=x86-64
48213    fi
48214    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48215      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48216$as_echo "ok" >&6; }
48217      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48218      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48219$as_echo_n "checking for msvcr100.dll... " >&6; }
48220      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48221$as_echo "$MSVCR_DLL" >&6; }
48222    else
48223      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48224$as_echo "incorrect, ignoring" >&6; }
48225      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48226$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48227    fi
48228  fi
48229
48230    fi
48231  fi
48232
48233  if test "x$MSVCR_DLL" = x; then
48234    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48235    # (This was the original behaviour; kept since it might turn up something)
48236    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48237      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48238        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
48239      else
48240        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48241        if test "x$POSSIBLE_MSVCR_DLL" = x; then
48242          # We're grasping at straws now...
48243          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
48244        fi
48245      fi
48246
48247
48248  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48249  METHOD="search of VCINSTALLDIR"
48250  if test -e "$POSSIBLE_MSVCR_DLL"; then
48251    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48252$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48253
48254    # Need to check if the found msvcr is correct architecture
48255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48256$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48257    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48258    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48259      CORRECT_MSVCR_ARCH=386
48260    else
48261      CORRECT_MSVCR_ARCH=x86-64
48262    fi
48263    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48264      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48265$as_echo "ok" >&6; }
48266      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48267      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48268$as_echo_n "checking for msvcr100.dll... " >&6; }
48269      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48270$as_echo "$MSVCR_DLL" >&6; }
48271    else
48272      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48273$as_echo "incorrect, ignoring" >&6; }
48274      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48275$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48276    fi
48277  fi
48278
48279    fi
48280  fi
48281
48282  if test "x$MSVCR_DLL" = x; then
48283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48284$as_echo_n "checking for msvcr100.dll... " >&6; }
48285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48286$as_echo "no" >&6; }
48287    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
48288  fi
48289
48290
48291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48292
48293  # Input might be given as Windows format, start by converting to
48294  # unix format.
48295  path="$MSVCR_DLL"
48296  new_path=`$CYGPATH -u "$path"`
48297
48298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48301  # "foo.exe" is OK but "foo" is an error.
48302  #
48303  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48304  # It is also a way to make sure we got the proper file name for the real test later on.
48305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48306  if test "x$test_shortpath" = x; then
48307    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48308$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48309    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
48310  fi
48311
48312  # Call helper function which possibly converts this using DOS-style short mode.
48313  # If so, the updated path is stored in $new_path.
48314
48315  input_path="$new_path"
48316  # Check if we need to convert this using DOS-style short mode. If the path
48317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48318  # take no chances and rewrite it.
48319  # Note: m4 eats our [], so we need to use [ and ] instead.
48320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48321  if test "x$has_forbidden_chars" != x; then
48322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48326      # Going to short mode and back again did indeed matter. Since short mode is
48327      # case insensitive, let's make it lowercase to improve readability.
48328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48329      # Now convert it back to Unix-stile (cygpath)
48330      input_path=`$CYGPATH -u "$shortmode_path"`
48331      new_path="$input_path"
48332    fi
48333  fi
48334
48335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48336  if test "x$test_cygdrive_prefix" = x; then
48337    # As a simple fix, exclude /usr/bin since it's not a real path.
48338    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48340      # a path prefixed by /cygdrive for fixpath to work.
48341      new_path="$CYGWIN_ROOT_PATH$input_path"
48342    fi
48343  fi
48344
48345
48346  if test "x$path" != "x$new_path"; then
48347    MSVCR_DLL="$new_path"
48348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48349$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48350  fi
48351
48352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48353
48354  path="$MSVCR_DLL"
48355  has_colon=`$ECHO $path | $GREP ^.:`
48356  new_path="$path"
48357  if test "x$has_colon" = x; then
48358    # Not in mixed or Windows style, start by that.
48359    new_path=`cmd //c echo $path`
48360  fi
48361
48362
48363  input_path="$new_path"
48364  # Check if we need to convert this using DOS-style short mode. If the path
48365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48366  # take no chances and rewrite it.
48367  # Note: m4 eats our [], so we need to use [ and ] instead.
48368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48369  if test "x$has_forbidden_chars" != x; then
48370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48371    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48372  fi
48373
48374
48375  windows_path="$new_path"
48376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48377    unix_path=`$CYGPATH -u "$windows_path"`
48378    new_path="$unix_path"
48379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48381    new_path="$unix_path"
48382  fi
48383
48384  if test "x$path" != "x$new_path"; then
48385    MSVCR_DLL="$new_path"
48386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48387$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48388  fi
48389
48390  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48391  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48392
48393  else
48394    # We're on a posix platform. Hooray! :)
48395    path="$MSVCR_DLL"
48396    has_space=`$ECHO "$path" | $GREP " "`
48397    if test "x$has_space" != x; then
48398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48399$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48400      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48401    fi
48402
48403    # Use eval to expand a potential ~
48404    eval path="$path"
48405    if test ! -f "$path" && test ! -d "$path"; then
48406      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48407    fi
48408
48409    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
48410  fi
48411
48412
48413
48414
48415# Check whether --with-dxsdk was given.
48416if test "${with_dxsdk+set}" = set; then :
48417  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
48418$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
48419fi
48420
48421
48422
48423
48424# Check whether --with-dxsdk-lib was given.
48425if test "${with_dxsdk_lib+set}" = set; then :
48426  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
48427$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
48428fi
48429
48430
48431
48432
48433# Check whether --with-dxsdk-include was given.
48434if test "${with_dxsdk_include+set}" = set; then :
48435  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
48436$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
48437fi
48438
48439
48440  fi
48441
48442
48443
48444###############################################################################
48445#
48446# We need to do some final tweaking, when everything else is done.
48447#
48448###############################################################################
48449
48450
48451  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
48452
48453
48454  # The name of the Service Agent jar.
48455  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
48456  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48457    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
48458  fi
48459
48460
48461
48462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
48463$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
48464
48465    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
48466      ENABLE_INTREE_EC=yes
48467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48468$as_echo "yes" >&6; }
48469    else
48470      ENABLE_INTREE_EC=no
48471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48472$as_echo "no" >&6; }
48473    fi
48474
48475
48476
48477
48478###############################################################################
48479#
48480# Configure parts of the build that only affect the build performance,
48481# not the result.
48482#
48483###############################################################################
48484
48485
48486  # How many cores do we have on this build system?
48487
48488# Check whether --with-num-cores was given.
48489if test "${with_num_cores+set}" = set; then :
48490  withval=$with_num_cores;
48491fi
48492
48493  if test "x$with_num_cores" = x; then
48494    # The number of cores were not specified, try to probe them.
48495
48496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
48497$as_echo_n "checking for number of cores... " >&6; }
48498  NUM_CORES=1
48499  FOUND_CORES=no
48500
48501  if test -f /proc/cpuinfo; then
48502    # Looks like a Linux (or cygwin) system
48503    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
48504    FOUND_CORES=yes
48505  elif test -x /usr/sbin/psrinfo; then
48506    # Looks like a Solaris system
48507    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
48508    FOUND_CORES=yes
48509  elif test -x /usr/sbin/system_profiler; then
48510    # Looks like a MacOSX system
48511    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
48512    FOUND_CORES=yes
48513  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
48514    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
48515    FOUND_CORES=yes
48516  elif test -n "$NUMBER_OF_PROCESSORS"; then
48517    # On windows, look in the env
48518    NUM_CORES=$NUMBER_OF_PROCESSORS
48519    FOUND_CORES=yes
48520  fi
48521
48522  if test "x$FOUND_CORES" = xyes; then
48523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
48524$as_echo "$NUM_CORES" >&6; }
48525  else
48526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
48527$as_echo "could not detect number of cores, defaulting to 1" >&6; }
48528    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
48529$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
48530  fi
48531
48532  else
48533    NUM_CORES=$with_num_cores
48534  fi
48535
48536
48537
48538  # How much memory do we have on this build system?
48539
48540# Check whether --with-memory-size was given.
48541if test "${with_memory_size+set}" = set; then :
48542  withval=$with_memory_size;
48543fi
48544
48545  if test "x$with_memory_size" = x; then
48546    # The memory size was not specified, try to probe it.
48547
48548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
48549$as_echo_n "checking for memory size... " >&6; }
48550  # Default to 1024 MB
48551  MEMORY_SIZE=1024
48552  FOUND_MEM=no
48553
48554  if test -f /proc/meminfo; then
48555    # Looks like a Linux (or cygwin) system
48556    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
48557    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
48558    FOUND_MEM=yes
48559  elif test -x /usr/sbin/prtconf; then
48560    # Looks like a Solaris or AIX system
48561    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
48562    FOUND_MEM=yes
48563  elif test -x /usr/sbin/system_profiler; then
48564    # Looks like a MacOSX system
48565    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
48566    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
48567    FOUND_MEM=yes
48568  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
48569    # Windows, but without cygwin
48570    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
48571    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
48572    FOUND_MEM=yes
48573  fi
48574
48575  if test "x$FOUND_MEM" = xyes; then
48576    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
48577$as_echo "$MEMORY_SIZE MB" >&6; }
48578  else
48579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
48580$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
48581    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
48582$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
48583  fi
48584
48585  else
48586    MEMORY_SIZE=$with_memory_size
48587  fi
48588
48589
48590
48591  # Provide a decent default number of parallel jobs for make depending on
48592  # number of cores, amount of memory and machine architecture.
48593
48594# Check whether --with-jobs was given.
48595if test "${with_jobs+set}" = set; then :
48596  withval=$with_jobs;
48597fi
48598
48599  if test "x$with_jobs" = x; then
48600    # Number of jobs was not specified, calculate.
48601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
48602$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
48603    # Approximate memory in GB, rounding up a bit.
48604    memory_gb=`expr $MEMORY_SIZE / 1100`
48605    # Pick the lowest of memory in gb and number of cores.
48606    if test "$memory_gb" -lt "$NUM_CORES"; then
48607      JOBS="$memory_gb"
48608    else
48609      JOBS="$NUM_CORES"
48610      # On bigger machines, leave some room for other processes to run
48611      if test "$JOBS" -gt "4"; then
48612        JOBS=`expr $JOBS '*' 90 / 100`
48613      fi
48614    fi
48615    # Cap number of jobs to 16
48616    if test "$JOBS" -gt "16"; then
48617      JOBS=16
48618    fi
48619    if test "$JOBS" -eq "0"; then
48620      JOBS=1
48621    fi
48622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
48623$as_echo "$JOBS" >&6; }
48624  else
48625    JOBS=$with_jobs
48626  fi
48627
48628
48629
48630# Setup smart javac (after cores and memory have been setup)
48631
48632
48633# Check whether --with-sjavac-server-java was given.
48634if test "${with_sjavac_server_java+set}" = set; then :
48635  withval=$with_sjavac_server_java;
48636fi
48637
48638
48639  if test "x$with_sjavac_server_java" != x; then
48640    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
48641    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
48642    if test "x$FOUND_VERSION" = x; then
48643      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
48644    fi
48645  else
48646    SJAVAC_SERVER_JAVA=""
48647    # Hotspot specific options.
48648
48649  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
48650  $ECHO "Command: $JAVA -verbosegc -version" >&5
48651  OUTPUT=`$JAVA -verbosegc -version 2>&1`
48652  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48653  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48654  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48655    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48656    JVM_ARG_OK=true
48657  else
48658    $ECHO "Arg failed:" >&5
48659    $ECHO "$OUTPUT" >&5
48660    JVM_ARG_OK=false
48661  fi
48662
48663    # JRockit specific options.
48664
48665  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48666  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48667  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48668  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48669  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48670  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48671    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48672    JVM_ARG_OK=true
48673  else
48674    $ECHO "Arg failed:" >&5
48675    $ECHO "$OUTPUT" >&5
48676    JVM_ARG_OK=false
48677  fi
48678
48679    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48680  fi
48681
48682
48683  if test "$MEMORY_SIZE" -gt "2500"; then
48684
48685  $ECHO "Check if jvm arg is ok: -d64" >&5
48686  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48687  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48688  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48689  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48690  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48691    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48692    JVM_ARG_OK=true
48693  else
48694    $ECHO "Arg failed:" >&5
48695    $ECHO "$OUTPUT" >&5
48696    JVM_ARG_OK=false
48697  fi
48698
48699    if test "$JVM_ARG_OK" = true; then
48700      JVM_64BIT=true
48701      JVM_ARG_OK=false
48702    fi
48703  fi
48704
48705  if test "$JVM_64BIT" = true; then
48706    if test "$MEMORY_SIZE" -gt "17000"; then
48707
48708  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48709  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48710  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48711  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48712  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48713  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48714    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48715    JVM_ARG_OK=true
48716  else
48717    $ECHO "Arg failed:" >&5
48718    $ECHO "$OUTPUT" >&5
48719    JVM_ARG_OK=false
48720  fi
48721
48722    fi
48723    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48724
48725  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48726  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48727  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48728  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48729  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48730  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48731    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48732    JVM_ARG_OK=true
48733  else
48734    $ECHO "Arg failed:" >&5
48735    $ECHO "$OUTPUT" >&5
48736    JVM_ARG_OK=false
48737  fi
48738
48739    fi
48740    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48741
48742  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48743  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48744  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48745  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48746  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48747  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48748    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48749    JVM_ARG_OK=true
48750  else
48751    $ECHO "Arg failed:" >&5
48752    $ECHO "$OUTPUT" >&5
48753    JVM_ARG_OK=false
48754  fi
48755
48756    fi
48757    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48758
48759  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48760  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48761  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48762  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48763  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48764  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48765    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48766    JVM_ARG_OK=true
48767  else
48768    $ECHO "Arg failed:" >&5
48769    $ECHO "$OUTPUT" >&5
48770    JVM_ARG_OK=false
48771  fi
48772
48773    fi
48774  fi
48775  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48776
48777  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48778  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48779  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48780  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48781  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48782  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48783    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48784    JVM_ARG_OK=true
48785  else
48786    $ECHO "Arg failed:" >&5
48787    $ECHO "$OUTPUT" >&5
48788    JVM_ARG_OK=false
48789  fi
48790
48791  fi
48792  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48793
48794  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48795  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48796  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48797  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48798  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48799  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48800    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48801    JVM_ARG_OK=true
48802  else
48803    $ECHO "Arg failed:" >&5
48804    $ECHO "$OUTPUT" >&5
48805    JVM_ARG_OK=false
48806  fi
48807
48808  fi
48809  if test "$JVM_ARG_OK" = false; then
48810
48811  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48812  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48813  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48814  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48815  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48816  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48817    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48818    JVM_ARG_OK=true
48819  else
48820    $ECHO "Arg failed:" >&5
48821    $ECHO "$OUTPUT" >&5
48822    JVM_ARG_OK=false
48823  fi
48824
48825  fi
48826
48827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48828$as_echo_n "checking whether to use sjavac... " >&6; }
48829  # Check whether --enable-sjavac was given.
48830if test "${enable_sjavac+set}" = set; then :
48831  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48832else
48833  ENABLE_SJAVAC='no'
48834fi
48835
48836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48837$as_echo "$ENABLE_SJAVAC" >&6; }
48838
48839
48840  if test "x$ENABLE_SJAVAC" = xyes; then
48841    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48842  else
48843    SJAVAC_SERVER_DIR=
48844  fi
48845
48846
48847
48848# Can the C/C++ compiler use precompiled headers?
48849
48850
48851  ###############################################################################
48852  #
48853  # Can the C/C++ compiler use precompiled headers?
48854  #
48855  # Check whether --enable-precompiled-headers was given.
48856if test "${enable_precompiled_headers+set}" = set; then :
48857  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48858else
48859  ENABLE_PRECOMPH=yes
48860fi
48861
48862
48863  USE_PRECOMPILED_HEADER=1
48864  if test "x$ENABLE_PRECOMPH" = xno; then
48865    USE_PRECOMPILED_HEADER=0
48866  fi
48867
48868  if test "x$ENABLE_PRECOMPH" = xyes; then
48869    # Check that the compiler actually supports precomp headers.
48870    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48871      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48872$as_echo_n "checking that precompiled headers work... " >&6; }
48873      echo "int alfa();" > conftest.h
48874      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48875      if test ! -f conftest.hpp.gch; then
48876        USE_PRECOMPILED_HEADER=0
48877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48878$as_echo "no" >&6; }
48879      else
48880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48881$as_echo "yes" >&6; }
48882      fi
48883      rm -f conftest.h conftest.hpp.gch
48884    fi
48885  fi
48886
48887
48888
48889
48890# Setup use of ccache, if available
48891
48892  # Check whether --enable-ccache was given.
48893if test "${enable_ccache+set}" = set; then :
48894  enableval=$enable_ccache;
48895fi
48896
48897
48898  CCACHE=
48899  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48900$as_echo_n "checking is ccache enabled... " >&6; }
48901  ENABLE_CCACHE=$enable_ccache
48902  if test "x$enable_ccache" = xyes; then
48903    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48904$as_echo "yes" >&6; }
48905    OLD_PATH="$PATH"
48906    if test "x$TOOLCHAIN_PATH" != x; then
48907      PATH=$TOOLCHAIN_PATH:$PATH
48908    fi
48909
48910
48911
48912  # Publish this variable in the help.
48913
48914
48915  if test "x$CCACHE" = x; then
48916    # The variable is not set by user, try to locate tool using the code snippet
48917    for ac_prog in ccache
48918do
48919  # Extract the first word of "$ac_prog", so it can be a program name with args.
48920set dummy $ac_prog; ac_word=$2
48921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48922$as_echo_n "checking for $ac_word... " >&6; }
48923if ${ac_cv_path_CCACHE+:} false; then :
48924  $as_echo_n "(cached) " >&6
48925else
48926  case $CCACHE in
48927  [\\/]* | ?:[\\/]*)
48928  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48929  ;;
48930  *)
48931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48932for as_dir in $PATH
48933do
48934  IFS=$as_save_IFS
48935  test -z "$as_dir" && as_dir=.
48936    for ac_exec_ext in '' $ac_executable_extensions; do
48937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48938    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48940    break 2
48941  fi
48942done
48943  done
48944IFS=$as_save_IFS
48945
48946  ;;
48947esac
48948fi
48949CCACHE=$ac_cv_path_CCACHE
48950if test -n "$CCACHE"; then
48951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48952$as_echo "$CCACHE" >&6; }
48953else
48954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48955$as_echo "no" >&6; }
48956fi
48957
48958
48959  test -n "$CCACHE" && break
48960done
48961
48962  else
48963    # The variable is set, but is it from the command line or the environment?
48964
48965    # Try to remove the string !CCACHE! from our list.
48966    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48967    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48968      # If it failed, the variable was not from the command line. Ignore it,
48969      # but warn the user (except for BASH, which is always set by the calling BASH).
48970      if test "xCCACHE" != xBASH; then
48971        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48972$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48973      fi
48974      # Try to locate tool using the code snippet
48975      for ac_prog in ccache
48976do
48977  # Extract the first word of "$ac_prog", so it can be a program name with args.
48978set dummy $ac_prog; ac_word=$2
48979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48980$as_echo_n "checking for $ac_word... " >&6; }
48981if ${ac_cv_path_CCACHE+:} false; then :
48982  $as_echo_n "(cached) " >&6
48983else
48984  case $CCACHE in
48985  [\\/]* | ?:[\\/]*)
48986  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48987  ;;
48988  *)
48989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48990for as_dir in $PATH
48991do
48992  IFS=$as_save_IFS
48993  test -z "$as_dir" && as_dir=.
48994    for ac_exec_ext in '' $ac_executable_extensions; do
48995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48996    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48998    break 2
48999  fi
49000done
49001  done
49002IFS=$as_save_IFS
49003
49004  ;;
49005esac
49006fi
49007CCACHE=$ac_cv_path_CCACHE
49008if test -n "$CCACHE"; then
49009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49010$as_echo "$CCACHE" >&6; }
49011else
49012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49013$as_echo "no" >&6; }
49014fi
49015
49016
49017  test -n "$CCACHE" && break
49018done
49019
49020    else
49021      # If it succeeded, then it was overridden by the user. We will use it
49022      # for the tool.
49023
49024      # First remove it from the list of overridden variables, so we can test
49025      # for unknown variables in the end.
49026      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49027
49028      # Check if the provided tool contains a complete path.
49029      tool_specified="$CCACHE"
49030      tool_basename="${tool_specified##*/}"
49031      if test "x$tool_basename" = "x$tool_specified"; then
49032        # A command without a complete path is provided, search $PATH.
49033        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
49034$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
49035        # Extract the first word of "$tool_basename", so it can be a program name with args.
49036set dummy $tool_basename; ac_word=$2
49037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49038$as_echo_n "checking for $ac_word... " >&6; }
49039if ${ac_cv_path_CCACHE+:} false; then :
49040  $as_echo_n "(cached) " >&6
49041else
49042  case $CCACHE in
49043  [\\/]* | ?:[\\/]*)
49044  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49045  ;;
49046  *)
49047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49048for as_dir in $PATH
49049do
49050  IFS=$as_save_IFS
49051  test -z "$as_dir" && as_dir=.
49052    for ac_exec_ext in '' $ac_executable_extensions; do
49053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49054    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49056    break 2
49057  fi
49058done
49059  done
49060IFS=$as_save_IFS
49061
49062  ;;
49063esac
49064fi
49065CCACHE=$ac_cv_path_CCACHE
49066if test -n "$CCACHE"; then
49067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49068$as_echo "$CCACHE" >&6; }
49069else
49070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49071$as_echo "no" >&6; }
49072fi
49073
49074
49075        if test "x$CCACHE" = x; then
49076          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49077        fi
49078      else
49079        # Otherwise we believe it is a complete path. Use it as it is.
49080        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
49081$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
49082        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
49083$as_echo_n "checking for CCACHE... " >&6; }
49084        if test ! -x "$tool_specified"; then
49085          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49086$as_echo "not found" >&6; }
49087          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
49088        fi
49089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49090$as_echo "$tool_specified" >&6; }
49091      fi
49092    fi
49093  fi
49094
49095
49096
49097  if test "x$CCACHE" = x; then
49098    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
49099  fi
49100
49101
49102    CCACHE_STATUS="enabled"
49103    PATH="$OLD_PATH"
49104  elif test "x$enable_ccache" = xno; then
49105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
49106$as_echo "no, explicitly disabled" >&6; }
49107  elif test "x$enable_ccache" = x; then
49108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49109$as_echo "no" >&6; }
49110  else
49111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
49112$as_echo "unknown" >&6; }
49113    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
49114  fi
49115
49116
49117
49118# Check whether --with-ccache-dir was given.
49119if test "${with_ccache_dir+set}" = set; then :
49120  withval=$with_ccache_dir;
49121fi
49122
49123
49124  if test "x$with_ccache_dir" != x; then
49125    # When using a non home ccache directory, assume the use is to share ccache files
49126    # with other users. Thus change the umask.
49127    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
49128    if test "x$CCACHE" = x; then
49129      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
49130$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
49131    fi
49132  fi
49133
49134  if test "x$CCACHE" != x; then
49135
49136  if test "x$CCACHE" != x; then
49137    # Only use ccache if it is 3.1.4 or later, which supports
49138    # precompiled headers.
49139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
49140$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
49141    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
49142    if test "x$HAS_GOOD_CCACHE" = x; then
49143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
49144$as_echo "no, disabling ccache" >&6; }
49145      CCACHE=
49146      CCACHE_STATUS="disabled"
49147    else
49148      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49149$as_echo "yes" >&6; }
49150      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
49151$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
49152      PUSHED_FLAGS="$CXXFLAGS"
49153      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
49154      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49155/* end confdefs.h.  */
49156
49157int
49158main ()
49159{
49160
49161  ;
49162  return 0;
49163}
49164_ACEOF
49165if ac_fn_cxx_try_compile "$LINENO"; then :
49166  CC_KNOWS_CCACHE_TRICK=yes
49167else
49168  CC_KNOWS_CCACHE_TRICK=no
49169fi
49170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49171      CXXFLAGS="$PUSHED_FLAGS"
49172      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
49173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49174$as_echo "yes" >&6; }
49175      else
49176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
49177$as_echo "no, disabling ccaching of precompiled headers" >&6; }
49178        CCACHE=
49179        CCACHE_STATUS="disabled"
49180      fi
49181    fi
49182  fi
49183
49184  if test "x$CCACHE" != x; then
49185    CCACHE_SLOPPINESS=time_macros
49186    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
49187    CCACHE_FLAGS=-fpch-preprocess
49188
49189    if test "x$SET_CCACHE_DIR" != x; then
49190      mkdir -p $CCACHE_DIR > /dev/null 2>&1
49191      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
49192    fi
49193  fi
49194
49195  fi
49196
49197
49198###############################################################################
49199#
49200# And now the finish...
49201#
49202###############################################################################
49203
49204# Check for some common pitfalls
49205
49206  if test x"$OPENJDK_BUILD_OS" = xwindows; then
49207    file_to_test="$SRC_ROOT/LICENSE"
49208    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
49209      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
49210    fi
49211  fi
49212
49213
49214  # Did user specify any unknown variables?
49215
49216  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
49217    # Replace the separating ! with spaces before presenting for end user.
49218    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
49219    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
49220$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
49221  fi
49222
49223
49224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
49225$as_echo_n "checking if build directory is on local disk... " >&6; }
49226
49227  # df -l lists only local disks; if the given directory is not found then
49228  # a non-zero exit code is given
49229  if test "x$DF" = x; then
49230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49231      # msys does not have df; use Windows "net use" instead.
49232      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
49233      if test "x$IS_NETWORK_DISK" = x; then
49234        OUTPUT_DIR_IS_LOCAL="yes"
49235      else
49236        OUTPUT_DIR_IS_LOCAL="no"
49237      fi
49238    else
49239      # No df here, say it's local
49240      OUTPUT_DIR_IS_LOCAL="yes"
49241    fi
49242  else
49243    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
49244      OUTPUT_DIR_IS_LOCAL="yes"
49245    else
49246      OUTPUT_DIR_IS_LOCAL="no"
49247    fi
49248  fi
49249
49250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
49251$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
49252
49253
49254
49255  # Check if the user has any old-style ALT_ variables set.
49256  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
49257
49258  # Before generating output files, test if they exist. If they do, this is a reconfigure.
49259  # Since we can't properly handle the dependencies for this, warn the user about the situation
49260  if test -e $OUTPUT_ROOT/spec.gmk; then
49261    IS_RECONFIGURE=yes
49262  else
49263    IS_RECONFIGURE=no
49264  fi
49265
49266
49267# At the end, call the custom hook. (Dummy macro if no custom sources available)
49268
49269
49270# We're messing a bit with internal autoconf variables to put the config.status
49271# in the output directory instead of the current directory.
49272CONFIG_STATUS="$OUTPUT_ROOT/config.status"
49273
49274# Create the actual output files. Now the main work of configure is done.
49275cat >confcache <<\_ACEOF
49276# This file is a shell script that caches the results of configure
49277# tests run on this system so they can be shared between configure
49278# scripts and configure runs, see configure's option --config-cache.
49279# It is not useful on other systems.  If it contains results you don't
49280# want to keep, you may remove or edit it.
49281#
49282# config.status only pays attention to the cache file if you give it
49283# the --recheck option to rerun configure.
49284#
49285# `ac_cv_env_foo' variables (set or unset) will be overridden when
49286# loading this file, other *unset* `ac_cv_foo' will be assigned the
49287# following values.
49288
49289_ACEOF
49290
49291# The following way of writing the cache mishandles newlines in values,
49292# but we know of no workaround that is simple, portable, and efficient.
49293# So, we kill variables containing newlines.
49294# Ultrix sh set writes to stderr and can't be redirected directly,
49295# and sets the high bit in the cache file unless we assign to the vars.
49296(
49297  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
49298    eval ac_val=\$$ac_var
49299    case $ac_val in #(
49300    *${as_nl}*)
49301      case $ac_var in #(
49302      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
49303$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
49304      esac
49305      case $ac_var in #(
49306      _ | IFS | as_nl) ;; #(
49307      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
49308      *) { eval $ac_var=; unset $ac_var;} ;;
49309      esac ;;
49310    esac
49311  done
49312
49313  (set) 2>&1 |
49314    case $as_nl`(ac_space=' '; set) 2>&1` in #(
49315    *${as_nl}ac_space=\ *)
49316      # `set' does not quote correctly, so add quotes: double-quote
49317      # substitution turns \\\\ into \\, and sed turns \\ into \.
49318      sed -n \
49319	"s/'/'\\\\''/g;
49320	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
49321      ;; #(
49322    *)
49323      # `set' quotes correctly as required by POSIX, so do not add quotes.
49324      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
49325      ;;
49326    esac |
49327    sort
49328) |
49329  sed '
49330     /^ac_cv_env_/b end
49331     t clear
49332     :clear
49333     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
49334     t end
49335     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
49336     :end' >>confcache
49337if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
49338  if test -w "$cache_file"; then
49339    if test "x$cache_file" != "x/dev/null"; then
49340      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
49341$as_echo "$as_me: updating cache $cache_file" >&6;}
49342      if test ! -f "$cache_file" || test -h "$cache_file"; then
49343	cat confcache >"$cache_file"
49344      else
49345        case $cache_file in #(
49346        */* | ?:*)
49347	  mv -f confcache "$cache_file"$$ &&
49348	  mv -f "$cache_file"$$ "$cache_file" ;; #(
49349        *)
49350	  mv -f confcache "$cache_file" ;;
49351	esac
49352      fi
49353    fi
49354  else
49355    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
49356$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
49357  fi
49358fi
49359rm -f confcache
49360
49361test "x$prefix" = xNONE && prefix=$ac_default_prefix
49362# Let make expand exec_prefix.
49363test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
49364
49365DEFS=-DHAVE_CONFIG_H
49366
49367ac_libobjs=
49368ac_ltlibobjs=
49369U=
49370for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
49371  # 1. Remove the extension, and $U if already installed.
49372  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
49373  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
49374  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
49375  #    will be set to the directory where LIBOBJS objects are built.
49376  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
49377  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
49378done
49379LIBOBJS=$ac_libobjs
49380
49381LTLIBOBJS=$ac_ltlibobjs
49382
49383
49384
49385: "${CONFIG_STATUS=./config.status}"
49386ac_write_fail=0
49387ac_clean_files_save=$ac_clean_files
49388ac_clean_files="$ac_clean_files $CONFIG_STATUS"
49389{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
49390$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
49391as_write_fail=0
49392cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
49393#! $SHELL
49394# Generated by $as_me.
49395# Run this file to recreate the current configuration.
49396# Compiler output produced by configure, useful for debugging
49397# configure, is in config.log if it exists.
49398
49399debug=false
49400ac_cs_recheck=false
49401ac_cs_silent=false
49402
49403SHELL=\${CONFIG_SHELL-$SHELL}
49404export SHELL
49405_ASEOF
49406cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
49407## -------------------- ##
49408## M4sh Initialization. ##
49409## -------------------- ##
49410
49411# Be more Bourne compatible
49412DUALCASE=1; export DUALCASE # for MKS sh
49413if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
49414  emulate sh
49415  NULLCMD=:
49416  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
49417  # is contrary to our usage.  Disable this feature.
49418  alias -g '${1+"$@"}'='"$@"'
49419  setopt NO_GLOB_SUBST
49420else
49421  case `(set -o) 2>/dev/null` in #(
49422  *posix*) :
49423    set -o posix ;; #(
49424  *) :
49425     ;;
49426esac
49427fi
49428
49429
49430as_nl='
49431'
49432export as_nl
49433# Printing a long string crashes Solaris 7 /usr/bin/printf.
49434as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
49435as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
49436as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49437# Prefer a ksh shell builtin over an external printf program on Solaris,
49438# but without wasting forks for bash or zsh.
49439if test -z "$BASH_VERSION$ZSH_VERSION" \
49440    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49441  as_echo='print -r --'
49442  as_echo_n='print -rn --'
49443elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49444  as_echo='printf %s\n'
49445  as_echo_n='printf %s'
49446else
49447  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
49448    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
49449    as_echo_n='/usr/ucb/echo -n'
49450  else
49451    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
49452    as_echo_n_body='eval
49453      arg=$1;
49454      case $arg in #(
49455      *"$as_nl"*)
49456	expr "X$arg" : "X\\(.*\\)$as_nl";
49457	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
49458      esac;
49459      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
49460    '
49461    export as_echo_n_body
49462    as_echo_n='sh -c $as_echo_n_body as_echo'
49463  fi
49464  export as_echo_body
49465  as_echo='sh -c $as_echo_body as_echo'
49466fi
49467
49468# The user is always right.
49469if test "${PATH_SEPARATOR+set}" != set; then
49470  PATH_SEPARATOR=:
49471  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
49472    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
49473      PATH_SEPARATOR=';'
49474  }
49475fi
49476
49477
49478# IFS
49479# We need space, tab and new line, in precisely that order.  Quoting is
49480# there to prevent editors from complaining about space-tab.
49481# (If _AS_PATH_WALK were called with IFS unset, it would disable word
49482# splitting by setting IFS to empty value.)
49483IFS=" ""	$as_nl"
49484
49485# Find who we are.  Look in the path if we contain no directory separator.
49486as_myself=
49487case $0 in #((
49488  *[\\/]* ) as_myself=$0 ;;
49489  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49490for as_dir in $PATH
49491do
49492  IFS=$as_save_IFS
49493  test -z "$as_dir" && as_dir=.
49494    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
49495  done
49496IFS=$as_save_IFS
49497
49498     ;;
49499esac
49500# We did not find ourselves, most probably we were run as `sh COMMAND'
49501# in which case we are not to be found in the path.
49502if test "x$as_myself" = x; then
49503  as_myself=$0
49504fi
49505if test ! -f "$as_myself"; then
49506  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
49507  exit 1
49508fi
49509
49510# Unset variables that we do not need and which cause bugs (e.g. in
49511# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
49512# suppresses any "Segmentation fault" message there.  '((' could
49513# trigger a bug in pdksh 5.2.14.
49514for as_var in BASH_ENV ENV MAIL MAILPATH
49515do eval test x\${$as_var+set} = xset \
49516  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
49517done
49518PS1='$ '
49519PS2='> '
49520PS4='+ '
49521
49522# NLS nuisances.
49523LC_ALL=C
49524export LC_ALL
49525LANGUAGE=C
49526export LANGUAGE
49527
49528# CDPATH.
49529(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
49530
49531
49532# as_fn_error STATUS ERROR [LINENO LOG_FD]
49533# ----------------------------------------
49534# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
49535# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
49536# script with STATUS, using 1 if that was 0.
49537as_fn_error ()
49538{
49539  as_status=$1; test $as_status -eq 0 && as_status=1
49540  if test "$4"; then
49541    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
49542    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
49543  fi
49544  $as_echo "$as_me: error: $2" >&2
49545  as_fn_exit $as_status
49546} # as_fn_error
49547
49548
49549# as_fn_set_status STATUS
49550# -----------------------
49551# Set $? to STATUS, without forking.
49552as_fn_set_status ()
49553{
49554  return $1
49555} # as_fn_set_status
49556
49557# as_fn_exit STATUS
49558# -----------------
49559# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
49560as_fn_exit ()
49561{
49562  set +e
49563  as_fn_set_status $1
49564  exit $1
49565} # as_fn_exit
49566
49567# as_fn_unset VAR
49568# ---------------
49569# Portably unset VAR.
49570as_fn_unset ()
49571{
49572  { eval $1=; unset $1;}
49573}
49574as_unset=as_fn_unset
49575# as_fn_append VAR VALUE
49576# ----------------------
49577# Append the text in VALUE to the end of the definition contained in VAR. Take
49578# advantage of any shell optimizations that allow amortized linear growth over
49579# repeated appends, instead of the typical quadratic growth present in naive
49580# implementations.
49581if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
49582  eval 'as_fn_append ()
49583  {
49584    eval $1+=\$2
49585  }'
49586else
49587  as_fn_append ()
49588  {
49589    eval $1=\$$1\$2
49590  }
49591fi # as_fn_append
49592
49593# as_fn_arith ARG...
49594# ------------------
49595# Perform arithmetic evaluation on the ARGs, and store the result in the
49596# global $as_val. Take advantage of shells that can avoid forks. The arguments
49597# must be portable across $(()) and expr.
49598if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
49599  eval 'as_fn_arith ()
49600  {
49601    as_val=$(( $* ))
49602  }'
49603else
49604  as_fn_arith ()
49605  {
49606    as_val=`expr "$@" || test $? -eq 1`
49607  }
49608fi # as_fn_arith
49609
49610
49611if expr a : '\(a\)' >/dev/null 2>&1 &&
49612   test "X`expr 00001 : '.*\(...\)'`" = X001; then
49613  as_expr=expr
49614else
49615  as_expr=false
49616fi
49617
49618if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
49619  as_basename=basename
49620else
49621  as_basename=false
49622fi
49623
49624if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
49625  as_dirname=dirname
49626else
49627  as_dirname=false
49628fi
49629
49630as_me=`$as_basename -- "$0" ||
49631$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
49632	 X"$0" : 'X\(//\)$' \| \
49633	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
49634$as_echo X/"$0" |
49635    sed '/^.*\/\([^/][^/]*\)\/*$/{
49636	    s//\1/
49637	    q
49638	  }
49639	  /^X\/\(\/\/\)$/{
49640	    s//\1/
49641	    q
49642	  }
49643	  /^X\/\(\/\).*/{
49644	    s//\1/
49645	    q
49646	  }
49647	  s/.*/./; q'`
49648
49649# Avoid depending upon Character Ranges.
49650as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49651as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49652as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49653as_cr_digits='0123456789'
49654as_cr_alnum=$as_cr_Letters$as_cr_digits
49655
49656ECHO_C= ECHO_N= ECHO_T=
49657case `echo -n x` in #(((((
49658-n*)
49659  case `echo 'xy\c'` in
49660  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
49661  xy)  ECHO_C='\c';;
49662  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49663       ECHO_T='	';;
49664  esac;;
49665*)
49666  ECHO_N='-n';;
49667esac
49668
49669rm -f conf$$ conf$$.exe conf$$.file
49670if test -d conf$$.dir; then
49671  rm -f conf$$.dir/conf$$.file
49672else
49673  rm -f conf$$.dir
49674  mkdir conf$$.dir 2>/dev/null
49675fi
49676if (echo >conf$$.file) 2>/dev/null; then
49677  if ln -s conf$$.file conf$$ 2>/dev/null; then
49678    as_ln_s='ln -s'
49679    # ... but there are two gotchas:
49680    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49681    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49682    # In both cases, we have to default to `cp -pR'.
49683    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49684      as_ln_s='cp -pR'
49685  elif ln conf$$.file conf$$ 2>/dev/null; then
49686    as_ln_s=ln
49687  else
49688    as_ln_s='cp -pR'
49689  fi
49690else
49691  as_ln_s='cp -pR'
49692fi
49693rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49694rmdir conf$$.dir 2>/dev/null
49695
49696
49697# as_fn_mkdir_p
49698# -------------
49699# Create "$as_dir" as a directory, including parents if necessary.
49700as_fn_mkdir_p ()
49701{
49702
49703  case $as_dir in #(
49704  -*) as_dir=./$as_dir;;
49705  esac
49706  test -d "$as_dir" || eval $as_mkdir_p || {
49707    as_dirs=
49708    while :; do
49709      case $as_dir in #(
49710      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49711      *) as_qdir=$as_dir;;
49712      esac
49713      as_dirs="'$as_qdir' $as_dirs"
49714      as_dir=`$as_dirname -- "$as_dir" ||
49715$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49716	 X"$as_dir" : 'X\(//\)[^/]' \| \
49717	 X"$as_dir" : 'X\(//\)$' \| \
49718	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49719$as_echo X"$as_dir" |
49720    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49721	    s//\1/
49722	    q
49723	  }
49724	  /^X\(\/\/\)[^/].*/{
49725	    s//\1/
49726	    q
49727	  }
49728	  /^X\(\/\/\)$/{
49729	    s//\1/
49730	    q
49731	  }
49732	  /^X\(\/\).*/{
49733	    s//\1/
49734	    q
49735	  }
49736	  s/.*/./; q'`
49737      test -d "$as_dir" && break
49738    done
49739    test -z "$as_dirs" || eval "mkdir $as_dirs"
49740  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49741
49742
49743} # as_fn_mkdir_p
49744if mkdir -p . 2>/dev/null; then
49745  as_mkdir_p='mkdir -p "$as_dir"'
49746else
49747  test -d ./-p && rmdir ./-p
49748  as_mkdir_p=false
49749fi
49750
49751
49752# as_fn_executable_p FILE
49753# -----------------------
49754# Test if FILE is an executable regular file.
49755as_fn_executable_p ()
49756{
49757  test -f "$1" && test -x "$1"
49758} # as_fn_executable_p
49759as_test_x='test -x'
49760as_executable_p=as_fn_executable_p
49761
49762# Sed expression to map a string onto a valid CPP name.
49763as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49764
49765# Sed expression to map a string onto a valid variable name.
49766as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49767
49768
49769exec 6>&1
49770## ----------------------------------- ##
49771## Main body of $CONFIG_STATUS script. ##
49772## ----------------------------------- ##
49773_ASEOF
49774test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49775
49776cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49777# Save the log message, to keep $0 and so on meaningful, and to
49778# report actual input values of CONFIG_FILES etc. instead of their
49779# values after options handling.
49780ac_log="
49781This file was extended by OpenJDK $as_me jdk9, which was
49782generated by GNU Autoconf 2.69.  Invocation command line was
49783
49784  CONFIG_FILES    = $CONFIG_FILES
49785  CONFIG_HEADERS  = $CONFIG_HEADERS
49786  CONFIG_LINKS    = $CONFIG_LINKS
49787  CONFIG_COMMANDS = $CONFIG_COMMANDS
49788  $ $0 $@
49789
49790on `(hostname || uname -n) 2>/dev/null | sed 1q`
49791"
49792
49793_ACEOF
49794
49795case $ac_config_files in *"
49796"*) set x $ac_config_files; shift; ac_config_files=$*;;
49797esac
49798
49799case $ac_config_headers in *"
49800"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49801esac
49802
49803
49804cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49805# Files that config.status was made for.
49806config_files="$ac_config_files"
49807config_headers="$ac_config_headers"
49808
49809_ACEOF
49810
49811cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49812ac_cs_usage="\
49813\`$as_me' instantiates files and other configuration actions
49814from templates according to the current configuration.  Unless the files
49815and actions are specified as TAGs, all are instantiated by default.
49816
49817Usage: $0 [OPTION]... [TAG]...
49818
49819  -h, --help       print this help, then exit
49820  -V, --version    print version number and configuration settings, then exit
49821      --config     print configuration, then exit
49822  -q, --quiet, --silent
49823                   do not print progress messages
49824  -d, --debug      don't remove temporary files
49825      --recheck    update $as_me by reconfiguring in the same conditions
49826      --file=FILE[:TEMPLATE]
49827                   instantiate the configuration file FILE
49828      --header=FILE[:TEMPLATE]
49829                   instantiate the configuration header FILE
49830
49831Configuration files:
49832$config_files
49833
49834Configuration headers:
49835$config_headers
49836
49837Report bugs to <build-dev@openjdk.java.net>.
49838OpenJDK home page: <http://openjdk.java.net>."
49839
49840_ACEOF
49841cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49842ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49843ac_cs_version="\\
49844OpenJDK config.status jdk9
49845configured by $0, generated by GNU Autoconf 2.69,
49846  with options \\"\$ac_cs_config\\"
49847
49848Copyright (C) 2012 Free Software Foundation, Inc.
49849This config.status script is free software; the Free Software Foundation
49850gives unlimited permission to copy, distribute and modify it."
49851
49852ac_pwd='$ac_pwd'
49853srcdir='$srcdir'
49854AWK='$AWK'
49855test -n "\$AWK" || AWK=awk
49856_ACEOF
49857
49858cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49859# The default lists apply if the user does not specify any file.
49860ac_need_defaults=:
49861while test $# != 0
49862do
49863  case $1 in
49864  --*=?*)
49865    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49866    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49867    ac_shift=:
49868    ;;
49869  --*=)
49870    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49871    ac_optarg=
49872    ac_shift=:
49873    ;;
49874  *)
49875    ac_option=$1
49876    ac_optarg=$2
49877    ac_shift=shift
49878    ;;
49879  esac
49880
49881  case $ac_option in
49882  # Handling of the options.
49883  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49884    ac_cs_recheck=: ;;
49885  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49886    $as_echo "$ac_cs_version"; exit ;;
49887  --config | --confi | --conf | --con | --co | --c )
49888    $as_echo "$ac_cs_config"; exit ;;
49889  --debug | --debu | --deb | --de | --d | -d )
49890    debug=: ;;
49891  --file | --fil | --fi | --f )
49892    $ac_shift
49893    case $ac_optarg in
49894    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49895    '') as_fn_error $? "missing file argument" ;;
49896    esac
49897    as_fn_append CONFIG_FILES " '$ac_optarg'"
49898    ac_need_defaults=false;;
49899  --header | --heade | --head | --hea )
49900    $ac_shift
49901    case $ac_optarg in
49902    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49903    esac
49904    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49905    ac_need_defaults=false;;
49906  --he | --h)
49907    # Conflict between --help and --header
49908    as_fn_error $? "ambiguous option: \`$1'
49909Try \`$0 --help' for more information.";;
49910  --help | --hel | -h )
49911    $as_echo "$ac_cs_usage"; exit ;;
49912  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49913  | -silent | --silent | --silen | --sile | --sil | --si | --s)
49914    ac_cs_silent=: ;;
49915
49916  # This is an error.
49917  -*) as_fn_error $? "unrecognized option: \`$1'
49918Try \`$0 --help' for more information." ;;
49919
49920  *) as_fn_append ac_config_targets " $1"
49921     ac_need_defaults=false ;;
49922
49923  esac
49924  shift
49925done
49926
49927ac_configure_extra_args=
49928
49929if $ac_cs_silent; then
49930  exec 6>/dev/null
49931  ac_configure_extra_args="$ac_configure_extra_args --silent"
49932fi
49933
49934_ACEOF
49935cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49936if \$ac_cs_recheck; then
49937  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49938  shift
49939  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49940  CONFIG_SHELL='$SHELL'
49941  export CONFIG_SHELL
49942  exec "\$@"
49943fi
49944
49945_ACEOF
49946cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49947exec 5>>config.log
49948{
49949  echo
49950  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49951## Running $as_me. ##
49952_ASBOX
49953  $as_echo "$ac_log"
49954} >&5
49955
49956_ACEOF
49957cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49958_ACEOF
49959
49960cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49961
49962# Handling of arguments.
49963for ac_config_target in $ac_config_targets
49964do
49965  case $ac_config_target in
49966    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49967    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49968    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49969    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49970    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49971    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49972    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49973
49974  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49975  esac
49976done
49977
49978
49979# If the user did not use the arguments to specify the items to instantiate,
49980# then the envvar interface is used.  Set only those that are not.
49981# We use the long form for the default assignment because of an extremely
49982# bizarre bug on SunOS 4.1.3.
49983if $ac_need_defaults; then
49984  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49985  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49986fi
49987
49988# Have a temporary directory for convenience.  Make it in the build tree
49989# simply because there is no reason against having it here, and in addition,
49990# creating and moving files from /tmp can sometimes cause problems.
49991# Hook for its removal unless debugging.
49992# Note that there is a small window in which the directory will not be cleaned:
49993# after its creation but before its name has been assigned to `$tmp'.
49994$debug ||
49995{
49996  tmp= ac_tmp=
49997  trap 'exit_status=$?
49998  : "${ac_tmp:=$tmp}"
49999  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
50000' 0
50001  trap 'as_fn_exit 1' 1 2 13 15
50002}
50003# Create a (secure) tmp directory for tmp files.
50004
50005{
50006  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
50007  test -d "$tmp"
50008}  ||
50009{
50010  tmp=./conf$$-$RANDOM
50011  (umask 077 && mkdir "$tmp")
50012} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
50013ac_tmp=$tmp
50014
50015# Set up the scripts for CONFIG_FILES section.
50016# No need to generate them if there are no CONFIG_FILES.
50017# This happens for instance with `./config.status config.h'.
50018if test -n "$CONFIG_FILES"; then
50019
50020
50021ac_cr=`echo X | tr X '\015'`
50022# On cygwin, bash can eat \r inside `` if the user requested igncr.
50023# But we know of no other shell where ac_cr would be empty at this
50024# point, so we can use a bashism as a fallback.
50025if test "x$ac_cr" = x; then
50026  eval ac_cr=\$\'\\r\'
50027fi
50028ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
50029if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
50030  ac_cs_awk_cr='\\r'
50031else
50032  ac_cs_awk_cr=$ac_cr
50033fi
50034
50035echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
50036_ACEOF
50037
50038
50039{
50040  echo "cat >conf$$subs.awk <<_ACEOF" &&
50041  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
50042  echo "_ACEOF"
50043} >conf$$subs.sh ||
50044  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50045ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
50046ac_delim='%!_!# '
50047for ac_last_try in false false false false false :; do
50048  . ./conf$$subs.sh ||
50049    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50050
50051  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
50052  if test $ac_delim_n = $ac_delim_num; then
50053    break
50054  elif $ac_last_try; then
50055    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50056  else
50057    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50058  fi
50059done
50060rm -f conf$$subs.sh
50061
50062cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50063cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
50064_ACEOF
50065sed -n '
50066h
50067s/^/S["/; s/!.*/"]=/
50068p
50069g
50070s/^[^!]*!//
50071:repl
50072t repl
50073s/'"$ac_delim"'$//
50074t delim
50075:nl
50076h
50077s/\(.\{148\}\)..*/\1/
50078t more1
50079s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
50080p
50081n
50082b repl
50083:more1
50084s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50085p
50086g
50087s/.\{148\}//
50088t nl
50089:delim
50090h
50091s/\(.\{148\}\)..*/\1/
50092t more2
50093s/["\\]/\\&/g; s/^/"/; s/$/"/
50094p
50095b
50096:more2
50097s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50098p
50099g
50100s/.\{148\}//
50101t delim
50102' <conf$$subs.awk | sed '
50103/^[^""]/{
50104  N
50105  s/\n//
50106}
50107' >>$CONFIG_STATUS || ac_write_fail=1
50108rm -f conf$$subs.awk
50109cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50110_ACAWK
50111cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
50112  for (key in S) S_is_set[key] = 1
50113  FS = ""
50114
50115}
50116{
50117  line = $ 0
50118  nfields = split(line, field, "@")
50119  substed = 0
50120  len = length(field[1])
50121  for (i = 2; i < nfields; i++) {
50122    key = field[i]
50123    keylen = length(key)
50124    if (S_is_set[key]) {
50125      value = S[key]
50126      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
50127      len += length(value) + length(field[++i])
50128      substed = 1
50129    } else
50130      len += 1 + keylen
50131  }
50132
50133  print line
50134}
50135
50136_ACAWK
50137_ACEOF
50138cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50139if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
50140  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
50141else
50142  cat
50143fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
50144  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
50145_ACEOF
50146
50147# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
50148# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
50149# trailing colons and then remove the whole line if VPATH becomes empty
50150# (actually we leave an empty line to preserve line numbers).
50151if test "x$srcdir" = x.; then
50152  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
50153h
50154s///
50155s/^/:/
50156s/[	 ]*$/:/
50157s/:\$(srcdir):/:/g
50158s/:\${srcdir}:/:/g
50159s/:@srcdir@:/:/g
50160s/^:*//
50161s/:*$//
50162x
50163s/\(=[	 ]*\).*/\1/
50164G
50165s/\n//
50166s/^[^=]*=[	 ]*$//
50167}'
50168fi
50169
50170cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50171fi # test -n "$CONFIG_FILES"
50172
50173# Set up the scripts for CONFIG_HEADERS section.
50174# No need to generate them if there are no CONFIG_HEADERS.
50175# This happens for instance with `./config.status Makefile'.
50176if test -n "$CONFIG_HEADERS"; then
50177cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
50178BEGIN {
50179_ACEOF
50180
50181# Transform confdefs.h into an awk script `defines.awk', embedded as
50182# here-document in config.status, that substitutes the proper values into
50183# config.h.in to produce config.h.
50184
50185# Create a delimiter string that does not exist in confdefs.h, to ease
50186# handling of long lines.
50187ac_delim='%!_!# '
50188for ac_last_try in false false :; do
50189  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
50190  if test -z "$ac_tt"; then
50191    break
50192  elif $ac_last_try; then
50193    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
50194  else
50195    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50196  fi
50197done
50198
50199# For the awk script, D is an array of macro values keyed by name,
50200# likewise P contains macro parameters if any.  Preserve backslash
50201# newline sequences.
50202
50203ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
50204sed -n '
50205s/.\{148\}/&'"$ac_delim"'/g
50206t rset
50207:rset
50208s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
50209t def
50210d
50211:def
50212s/\\$//
50213t bsnl
50214s/["\\]/\\&/g
50215s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
50216D["\1"]=" \3"/p
50217s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
50218d
50219:bsnl
50220s/["\\]/\\&/g
50221s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
50222D["\1"]=" \3\\\\\\n"\\/p
50223t cont
50224s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
50225t cont
50226d
50227:cont
50228n
50229s/.\{148\}/&'"$ac_delim"'/g
50230t clear
50231:clear
50232s/\\$//
50233t bsnlc
50234s/["\\]/\\&/g; s/^/"/; s/$/"/p
50235d
50236:bsnlc
50237s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
50238b cont
50239' <confdefs.h | sed '
50240s/'"$ac_delim"'/"\\\
50241"/g' >>$CONFIG_STATUS || ac_write_fail=1
50242
50243cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50244  for (key in D) D_is_set[key] = 1
50245  FS = ""
50246}
50247/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
50248  line = \$ 0
50249  split(line, arg, " ")
50250  if (arg[1] == "#") {
50251    defundef = arg[2]
50252    mac1 = arg[3]
50253  } else {
50254    defundef = substr(arg[1], 2)
50255    mac1 = arg[2]
50256  }
50257  split(mac1, mac2, "(") #)
50258  macro = mac2[1]
50259  prefix = substr(line, 1, index(line, defundef) - 1)
50260  if (D_is_set[macro]) {
50261    # Preserve the white space surrounding the "#".
50262    print prefix "define", macro P[macro] D[macro]
50263    next
50264  } else {
50265    # Replace #undef with comments.  This is necessary, for example,
50266    # in the case of _POSIX_SOURCE, which is predefined and required
50267    # on some systems where configure will not decide to define it.
50268    if (defundef == "undef") {
50269      print "/*", prefix defundef, macro, "*/"
50270      next
50271    }
50272  }
50273}
50274{ print }
50275_ACAWK
50276_ACEOF
50277cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50278  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
50279fi # test -n "$CONFIG_HEADERS"
50280
50281
50282eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
50283shift
50284for ac_tag
50285do
50286  case $ac_tag in
50287  :[FHLC]) ac_mode=$ac_tag; continue;;
50288  esac
50289  case $ac_mode$ac_tag in
50290  :[FHL]*:*);;
50291  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
50292  :[FH]-) ac_tag=-:-;;
50293  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
50294  esac
50295  ac_save_IFS=$IFS
50296  IFS=:
50297  set x $ac_tag
50298  IFS=$ac_save_IFS
50299  shift
50300  ac_file=$1
50301  shift
50302
50303  case $ac_mode in
50304  :L) ac_source=$1;;
50305  :[FH])
50306    ac_file_inputs=
50307    for ac_f
50308    do
50309      case $ac_f in
50310      -) ac_f="$ac_tmp/stdin";;
50311      *) # Look for the file first in the build tree, then in the source tree
50312	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
50313	 # because $ac_f cannot contain `:'.
50314	 test -f "$ac_f" ||
50315	   case $ac_f in
50316	   [\\/$]*) false;;
50317	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
50318	   esac ||
50319	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
50320      esac
50321      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
50322      as_fn_append ac_file_inputs " '$ac_f'"
50323    done
50324
50325    # Let's still pretend it is `configure' which instantiates (i.e., don't
50326    # use $as_me), people would be surprised to read:
50327    #    /* config.h.  Generated by config.status.  */
50328    configure_input='Generated from '`
50329	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
50330	`' by configure.'
50331    if test x"$ac_file" != x-; then
50332      configure_input="$ac_file.  $configure_input"
50333      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
50334$as_echo "$as_me: creating $ac_file" >&6;}
50335    fi
50336    # Neutralize special characters interpreted by sed in replacement strings.
50337    case $configure_input in #(
50338    *\&* | *\|* | *\\* )
50339       ac_sed_conf_input=`$as_echo "$configure_input" |
50340       sed 's/[\\\\&|]/\\\\&/g'`;; #(
50341    *) ac_sed_conf_input=$configure_input;;
50342    esac
50343
50344    case $ac_tag in
50345    *:-:* | *:-) cat >"$ac_tmp/stdin" \
50346      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
50347    esac
50348    ;;
50349  esac
50350
50351  ac_dir=`$as_dirname -- "$ac_file" ||
50352$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50353	 X"$ac_file" : 'X\(//\)[^/]' \| \
50354	 X"$ac_file" : 'X\(//\)$' \| \
50355	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
50356$as_echo X"$ac_file" |
50357    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50358	    s//\1/
50359	    q
50360	  }
50361	  /^X\(\/\/\)[^/].*/{
50362	    s//\1/
50363	    q
50364	  }
50365	  /^X\(\/\/\)$/{
50366	    s//\1/
50367	    q
50368	  }
50369	  /^X\(\/\).*/{
50370	    s//\1/
50371	    q
50372	  }
50373	  s/.*/./; q'`
50374  as_dir="$ac_dir"; as_fn_mkdir_p
50375  ac_builddir=.
50376
50377case "$ac_dir" in
50378.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
50379*)
50380  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
50381  # A ".." for each directory in $ac_dir_suffix.
50382  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
50383  case $ac_top_builddir_sub in
50384  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
50385  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
50386  esac ;;
50387esac
50388ac_abs_top_builddir=$ac_pwd
50389ac_abs_builddir=$ac_pwd$ac_dir_suffix
50390# for backward compatibility:
50391ac_top_builddir=$ac_top_build_prefix
50392
50393case $srcdir in
50394  .)  # We are building in place.
50395    ac_srcdir=.
50396    ac_top_srcdir=$ac_top_builddir_sub
50397    ac_abs_top_srcdir=$ac_pwd ;;
50398  [\\/]* | ?:[\\/]* )  # Absolute name.
50399    ac_srcdir=$srcdir$ac_dir_suffix;
50400    ac_top_srcdir=$srcdir
50401    ac_abs_top_srcdir=$srcdir ;;
50402  *) # Relative name.
50403    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
50404    ac_top_srcdir=$ac_top_build_prefix$srcdir
50405    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
50406esac
50407ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
50408
50409
50410  case $ac_mode in
50411  :F)
50412  #
50413  # CONFIG_FILE
50414  #
50415
50416_ACEOF
50417
50418cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50419# If the template does not know about datarootdir, expand it.
50420# FIXME: This hack should be removed a few years after 2.60.
50421ac_datarootdir_hack=; ac_datarootdir_seen=
50422ac_sed_dataroot='
50423/datarootdir/ {
50424  p
50425  q
50426}
50427/@datadir@/p
50428/@docdir@/p
50429/@infodir@/p
50430/@localedir@/p
50431/@mandir@/p'
50432case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
50433*datarootdir*) ac_datarootdir_seen=yes;;
50434*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
50435  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
50436$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
50437_ACEOF
50438cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50439  ac_datarootdir_hack='
50440  s&@datadir@&$datadir&g
50441  s&@docdir@&$docdir&g
50442  s&@infodir@&$infodir&g
50443  s&@localedir@&$localedir&g
50444  s&@mandir@&$mandir&g
50445  s&\\\${datarootdir}&$datarootdir&g' ;;
50446esac
50447_ACEOF
50448
50449# Neutralize VPATH when `$srcdir' = `.'.
50450# Shell code in configure.ac might set extrasub.
50451# FIXME: do we really want to maintain this feature?
50452cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50453ac_sed_extra="$ac_vpsub
50454$extrasub
50455_ACEOF
50456cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50457:t
50458/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
50459s|@configure_input@|$ac_sed_conf_input|;t t
50460s&@top_builddir@&$ac_top_builddir_sub&;t t
50461s&@top_build_prefix@&$ac_top_build_prefix&;t t
50462s&@srcdir@&$ac_srcdir&;t t
50463s&@abs_srcdir@&$ac_abs_srcdir&;t t
50464s&@top_srcdir@&$ac_top_srcdir&;t t
50465s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
50466s&@builddir@&$ac_builddir&;t t
50467s&@abs_builddir@&$ac_abs_builddir&;t t
50468s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
50469$ac_datarootdir_hack
50470"
50471eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
50472  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50473
50474test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
50475  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
50476  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
50477      "$ac_tmp/out"`; test -z "$ac_out"; } &&
50478  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50479which seems to be undefined.  Please make sure it is defined" >&5
50480$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50481which seems to be undefined.  Please make sure it is defined" >&2;}
50482
50483  rm -f "$ac_tmp/stdin"
50484  case $ac_file in
50485  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
50486  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
50487  esac \
50488  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50489 ;;
50490  :H)
50491  #
50492  # CONFIG_HEADER
50493  #
50494  if test x"$ac_file" != x-; then
50495    {
50496      $as_echo "/* $configure_input  */" \
50497      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
50498    } >"$ac_tmp/config.h" \
50499      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50500    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
50501      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
50502$as_echo "$as_me: $ac_file is unchanged" >&6;}
50503    else
50504      rm -f "$ac_file"
50505      mv "$ac_tmp/config.h" "$ac_file" \
50506	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
50507    fi
50508  else
50509    $as_echo "/* $configure_input  */" \
50510      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
50511      || as_fn_error $? "could not create -" "$LINENO" 5
50512  fi
50513 ;;
50514
50515
50516  esac
50517
50518done # for ac_tag
50519
50520
50521as_fn_exit 0
50522_ACEOF
50523ac_clean_files=$ac_clean_files_save
50524
50525test $ac_write_fail = 0 ||
50526  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
50527
50528
50529# configure is writing to config.log, and then calls config.status.
50530# config.status does its own redirection, appending to config.log.
50531# Unfortunately, on DOS this fails, as config.log is still kept open
50532# by configure, so config.status won't be able to write to it; its
50533# output is simply discarded.  So we exec the FD to /dev/null,
50534# effectively closing config.log, so it can be properly (re)opened and
50535# appended to by config.status.  When coming back to configure, we
50536# need to make the FD available again.
50537if test "$no_create" != yes; then
50538  ac_cs_success=:
50539  ac_config_status_args=
50540  test "$silent" = yes &&
50541    ac_config_status_args="$ac_config_status_args --quiet"
50542  exec 5>/dev/null
50543  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
50544  exec 5>>config.log
50545  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50546  # would make configure fail if this is the last instruction.
50547  $ac_cs_success || as_fn_exit 1
50548fi
50549if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
50550  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
50551$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
50552fi
50553
50554
50555# Try to move the config.log file to the output directory.
50556if test -e ./config.log; then
50557  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
50558fi
50559
50560# Make the compare script executable
50561$CHMOD +x $OUTPUT_ROOT/compare.sh
50562
50563# Finally output some useful information to the user
50564
50565  # Finally output some useful information to the user
50566
50567  printf "\n"
50568  printf "====================================================\n"
50569  if test "x$no_create" != "xyes"; then
50570    if test "x$IS_RECONFIGURE" != "xyes"; then
50571      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
50572    else
50573      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
50574    fi
50575  else
50576    if test "x$IS_RECONFIGURE" != "xyes"; then
50577      printf "A configuration has been successfully checked but not created\n"
50578    else
50579      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
50580    fi
50581  fi
50582  if test "x$CONFIGURE_COMMAND_LINE" != x; then
50583    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
50584  else
50585    printf "using default settings.\n"
50586  fi
50587
50588  printf "\n"
50589  printf "Configuration summary:\n"
50590  printf "* Debug level:    $DEBUG_LEVEL\n"
50591  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
50592  printf "* JDK variant:    $JDK_VARIANT\n"
50593  printf "* JVM variants:   $with_jvm_variants\n"
50594  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
50595
50596  printf "\n"
50597  printf "Tools summary:\n"
50598  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
50599    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
50600  fi
50601  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
50602  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
50603  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
50604  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
50605
50606  printf "\n"
50607  printf "Build performance summary:\n"
50608  printf "* Cores to use:   $JOBS\n"
50609  printf "* Memory limit:   $MEMORY_SIZE MB\n"
50610  if test "x$CCACHE_STATUS" != "x"; then
50611    printf "* ccache status:  $CCACHE_STATUS\n"
50612  fi
50613  printf "\n"
50614
50615  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
50616    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
50617    printf "will result in longer build times.\n"
50618    printf "\n"
50619  fi
50620
50621  if test "x$FOUND_ALT_VARIABLES" != "x"; then
50622    printf "WARNING: You have old-style ALT_ environment variables set.\n"
50623    printf "These are not respected, and will be ignored. It is recommended\n"
50624    printf "that you clean your environment. The following variables are set:\n"
50625    printf "$FOUND_ALT_VARIABLES\n"
50626    printf "\n"
50627  fi
50628
50629  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
50630    printf "WARNING: Your build output directory is not on a local disk.\n"
50631    printf "This will severely degrade build performance!\n"
50632    printf "It is recommended that you create an output directory on a local disk,\n"
50633    printf "and run the configure script again from that directory.\n"
50634    printf "\n"
50635  fi
50636
50637  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
50638    printf "WARNING: The result of this configuration has overridden an older\n"
50639    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
50640    printf "proper build. Failure to do so might result in strange build problems.\n"
50641    printf "\n"
50642  fi
50643
50644  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
50645    printf "WARNING: The result of this configuration was not saved.\n"
50646    printf "You should run without '--no-create | -n' to create the configuration.\n"
50647    printf "\n"
50648  fi
50649
50650