generated-configure.sh revision 1125:13255d60e919
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_LCMS
660LCMS_LIBS
661LCMS_CFLAGS
662USE_EXTERNAL_LIBGIF
663USE_EXTERNAL_LIBJPEG
664ALSA_LIBS
665ALSA_CFLAGS
666FREETYPE_BUNDLE_LIB_PATH
667FREETYPE_LIBS
668FREETYPE_CFLAGS
669CUPS_CFLAGS
670X_EXTRA_LIBS
671X_LIBS
672X_PRE_LIBS
673X_CFLAGS
674XMKMF
675FIXPATH
676ZIP_DEBUGINFO_FILES
677ENABLE_DEBUG_SYMBOLS
678CFLAGS_WARNINGS_ARE_ERRORS
679COMPILER_SUPPORTS_TARGET_BITS_FLAG
680ZERO_ARCHFLAG
681LDFLAGS_CXX_JDK
682LDFLAGS_JDKEXE_SUFFIX
683LDFLAGS_JDKLIB_SUFFIX
684LDFLAGS_JDKEXE
685LDFLAGS_JDKLIB
686CXXFLAGS_JDKEXE
687CXXFLAGS_JDKLIB
688CFLAGS_JDKEXE
689CFLAGS_JDKLIB
690MACOSX_VERSION_MIN
691LEGACY_EXTRA_LDFLAGS
692LEGACY_EXTRA_CXXFLAGS
693LEGACY_EXTRA_CFLAGS
694CXX_O_FLAG_NONE
695CXX_O_FLAG_DEBUG
696CXX_O_FLAG_NORM
697CXX_O_FLAG_HI
698CXX_O_FLAG_HIGHEST
699C_O_FLAG_NONE
700C_O_FLAG_DEBUG
701C_O_FLAG_NORM
702C_O_FLAG_HI
703C_O_FLAG_HIGHEST
704CXXFLAGS_DEBUG_OPTIONS
705CFLAGS_DEBUG_OPTIONS
706CXXFLAGS_DEBUG_SYMBOLS
707CFLAGS_DEBUG_SYMBOLS
708CXX_FLAG_DEPS
709C_FLAG_DEPS
710SET_SHARED_LIBRARY_MAPFILE
711SET_SHARED_LIBRARY_NAME
712SET_SHARED_LIBRARY_ORIGIN
713SET_EXECUTABLE_ORIGIN
714SHARED_LIBRARY_FLAGS
715CXX_FLAG_REORDER
716C_FLAG_REORDER
717SYSROOT_LDFLAGS
718SYSROOT_CFLAGS
719RC_FLAGS
720AR_OUT_OPTION
721LD_OUT_OPTION
722EXE_OUT_OPTION
723CC_OUT_OPTION
724POST_MCS_CMD
725POST_STRIP_CMD
726ARFLAGS
727COMPILER_TARGET_BITS_FLAG
728JT_HOME
729JTREGEXE
730USING_BROKEN_SUSE_LD
731PACKAGE_PATH
732LDEXECXX
733LDEXE
734USE_CLANG
735HOTSPOT_LD
736HOTSPOT_CXX
737HOTSPOT_RC
738HOTSPOT_MT
739BUILD_LD
740BUILD_CXX
741BUILD_CC
742ac_ct_OBJDUMP
743OBJDUMP
744ac_ct_OBJCOPY
745OBJCOPY
746ac_ct_NM
747ac_ct_STRIP
748MCS
749GNM
750NM
751STRIP
752DUMPBIN
753RC
754MT
755LIPO
756ac_ct_OBJC
757OBJCFLAGS
758OBJC
759ac_ct_AR
760AR
761AS
762LDCXX
763LD
764CXXCPP
765CPP
766ac_ct_CXX
767CXXFLAGS
768CXX
769ac_ct_PROPER_COMPILER_CXX
770PROPER_COMPILER_CXX
771TOOLCHAIN_PATH_CXX
772POTENTIAL_CXX
773OBJEXT
774EXEEXT
775ac_ct_CC
776CPPFLAGS
777LDFLAGS
778CFLAGS
779CC
780ac_ct_PROPER_COMPILER_CC
781PROPER_COMPILER_CC
782TOOLCHAIN_PATH_CC
783POTENTIAL_CC
784VS_LIB
785VS_INCLUDE
786VS_PATH
787CYGWIN_LINK
788EXE_SUFFIX
789OBJ_SUFFIX
790STATIC_LIBRARY
791SHARED_LIBRARY
792STATIC_LIBRARY_SUFFIX
793SHARED_LIBRARY_SUFFIX
794LIBRARY_PREFIX
795TOOLCHAIN_TYPE
796BUILD_HOTSPOT
797HOTSPOT_DIST
798BUILD_OUTPUT
799OVERRIDE_SRC_ROOT
800ADD_SRC_ROOT
801JDK_TOPDIR
802NASHORN_TOPDIR
803HOTSPOT_TOPDIR
804JAXWS_TOPDIR
805JAXP_TOPDIR
806CORBA_TOPDIR
807LANGTOOLS_TOPDIR
808JAVA_TOOL_FLAGS_SMALL
809JAVA_FLAGS_SMALL
810JAVA_FLAGS_BIG
811JAVA_FLAGS
812JAVAC_FLAGS
813BOOT_JDK_SOURCETARGET
814JARSIGNER
815NATIVE2ASCII
816JAR
817JAVAH
818JAVAC
819JAVA
820BOOT_JDK
821BOOT_TOOLSJAR
822BOOT_RTJAR
823JAVA_CHECK
824JAVAC_CHECK
825COOKED_BUILD_NUMBER
826JDK_VERSION
827COPYRIGHT_YEAR
828MACOSX_BUNDLE_ID_BASE
829MACOSX_BUNDLE_NAME_BASE
830COMPANY_NAME
831JDK_RC_PLATFORM_NAME
832PRODUCT_SUFFIX
833PRODUCT_NAME
834LAUNCHER_NAME
835MILESTONE
836JDK_BUILD_NUMBER
837JDK_UPDATE_VERSION
838JDK_MICRO_VERSION
839JDK_MINOR_VERSION
840JDK_MAJOR_VERSION
841USER_RELEASE_SUFFIX
842COMPRESS_JARS
843RMICONNECTOR_IIOP
844UNLIMITED_CRYPTO
845CACERTS_FILE
846TEST_IN_BUILD
847BUILD_HEADLESS
848SUPPORT_HEADFUL
849SUPPORT_HEADLESS
850BDEPS_FTP
851BDEPS_UNZIP
852OS_VERSION_MICRO
853OS_VERSION_MINOR
854OS_VERSION_MAJOR
855PKG_CONFIG
856CODESIGN
857XATTR
858DSYMUTIL
859IS_GNU_TIME
860TIME
861STAT
862HG
863READELF
864OTOOL
865LDD
866ZIP
867UNZIP
868FIND_DELETE
869OUTPUT_SYNC
870OUTPUT_SYNC_SUPPORTED
871MAKE
872CHECK_TOOLSDIR_MAKE
873CHECK_TOOLSDIR_GMAKE
874CHECK_MAKE
875CHECK_GMAKE
876PKGHANDLER
877OUTPUT_ROOT
878CONF_NAME
879SPEC
880SDKROOT
881XCODEBUILD
882BUILD_VARIANT_RELEASE
883DEBUG_CLASSFILES
884FASTDEBUG
885VARIANT
886DEBUG_LEVEL
887MACOSX_UNIVERSAL
888INCLUDE_SA
889JVM_VARIANT_CORE
890JVM_VARIANT_ZEROSHARK
891JVM_VARIANT_ZERO
892JVM_VARIANT_KERNEL
893JVM_VARIANT_MINIMAL1
894JVM_VARIANT_CLIENT
895JVM_VARIANT_SERVER
896JVM_VARIANTS
897JVM_INTERPRETER
898JDK_VARIANT
899SET_OPENJDK
900BUILD_LOG_WRAPPER
901BUILD_LOG_PREVIOUS
902BUILD_LOG
903TOPDIR
904PATH_SEP
905ZERO_ARCHDEF
906DEFINE_CROSS_COMPILE_ARCH
907LP64
908OPENJDK_TARGET_OS_EXPORT_DIR
909OPENJDK_TARGET_OS_API_DIR
910OPENJDK_TARGET_CPU_JLI_CFLAGS
911OPENJDK_TARGET_CPU_OSARCH
912OPENJDK_TARGET_CPU_ISADIR
913OPENJDK_TARGET_CPU_LIBDIR
914OPENJDK_TARGET_CPU_LEGACY_LIB
915OPENJDK_TARGET_CPU_LEGACY
916REQUIRED_OS_VERSION
917REQUIRED_OS_NAME
918COMPILE_TYPE
919OPENJDK_TARGET_CPU_ENDIAN
920OPENJDK_TARGET_CPU_BITS
921OPENJDK_TARGET_CPU_ARCH
922OPENJDK_TARGET_CPU
923OPENJDK_TARGET_OS_ENV
924OPENJDK_TARGET_OS_API
925OPENJDK_TARGET_OS
926OPENJDK_BUILD_CPU_ENDIAN
927OPENJDK_BUILD_CPU_BITS
928OPENJDK_BUILD_CPU_ARCH
929OPENJDK_BUILD_CPU
930OPENJDK_BUILD_OS_ENV
931OPENJDK_BUILD_OS_API
932OPENJDK_BUILD_OS
933OPENJDK_BUILD_AUTOCONF_NAME
934OPENJDK_TARGET_AUTOCONF_NAME
935target_os
936target_vendor
937target_cpu
938target
939host_os
940host_vendor
941host_cpu
942host
943build_os
944build_vendor
945build_cpu
946build
947CPIO
948SETFILE
949DF
950READLINK
951CYGPATH
952SED
953FGREP
954EGREP
955GREP
956AWK
957XARGS
958WHICH
959WC
960UNIQ
961UNAME
962TR
963TOUCH
964TEE
965TAR
966TAIL
967SORT
968SH
969RM
970PRINTF
971NAWK
972MV
973MKTEMP
974MKDIR
975LS
976LN
977HEAD
978FIND
979FILE
980EXPR
981ECHO
982DIRNAME
983DIFF
984DATE
985CUT
986CP
987COMM
988CMP
989CHMOD
990CAT
991BASH
992BASENAME
993DATE_WHEN_CONFIGURED
994CONFIGURE_COMMAND_LINE
995target_alias
996host_alias
997build_alias
998LIBS
999ECHO_T
1000ECHO_N
1001ECHO_C
1002DEFS
1003mandir
1004localedir
1005libdir
1006psdir
1007pdfdir
1008dvidir
1009htmldir
1010infodir
1011docdir
1012oldincludedir
1013includedir
1014localstatedir
1015sharedstatedir
1016sysconfdir
1017datadir
1018datarootdir
1019libexecdir
1020sbindir
1021bindir
1022program_transform_name
1023prefix
1024exec_prefix
1025PACKAGE_URL
1026PACKAGE_BUGREPORT
1027PACKAGE_STRING
1028PACKAGE_VERSION
1029PACKAGE_TARNAME
1030PACKAGE_NAME
1031PATH_SEPARATOR
1032SHELL'
1033ac_subst_files=''
1034ac_user_opts='
1035enable_option_checking
1036with_target_bits
1037enable_openjdk_only
1038with_custom_make_dir
1039with_jdk_variant
1040with_jvm_interpreter
1041with_jvm_variants
1042enable_debug
1043with_debug_level
1044with_devkit
1045with_sys_root
1046with_sysroot
1047with_tools_dir
1048with_toolchain_path
1049with_extra_path
1050with_sdk_name
1051with_conf_name
1052with_output_sync
1053with_builddeps_conf
1054with_builddeps_server
1055with_builddeps_dir
1056with_builddeps_group
1057enable_headful
1058enable_hotspot_test_in_build
1059with_cacerts_file
1060enable_unlimited_crypto
1061enable_rmiconnector_iiop
1062with_milestone
1063with_update_version
1064with_user_release_suffix
1065with_build_number
1066with_boot_jdk
1067with_boot_jdk_jvmargs
1068with_add_source_root
1069with_override_source_root
1070with_adds_and_overrides
1071with_override_langtools
1072with_override_corba
1073with_override_jaxp
1074with_override_jaxws
1075with_override_hotspot
1076with_override_nashorn
1077with_override_jdk
1078with_import_hotspot
1079with_toolchain_type
1080with_jtreg
1081with_extra_cflags
1082with_extra_cxxflags
1083with_extra_ldflags
1084enable_debug_symbols
1085enable_zip_debug_info
1086with_x
1087with_cups
1088with_cups_include
1089with_freetype
1090with_freetype_include
1091with_freetype_lib
1092enable_freetype_bundling
1093with_alsa
1094with_alsa_include
1095with_alsa_lib
1096with_libjpeg
1097with_giflib
1098with_lcms
1099with_libpng
1100with_zlib
1101with_stdc__lib
1102with_msvcr_dll
1103with_dxsdk
1104with_dxsdk_lib
1105with_dxsdk_include
1106with_num_cores
1107with_memory_size
1108with_jobs
1109with_sjavac_server_java
1110enable_sjavac
1111enable_precompiled_headers
1112enable_ccache
1113with_ccache_dir
1114'
1115      ac_precious_vars='build_alias
1116host_alias
1117target_alias
1118BASENAME
1119BASH
1120CAT
1121CHMOD
1122CMP
1123COMM
1124CP
1125CUT
1126DATE
1127DIFF
1128DIRNAME
1129ECHO
1130EXPR
1131FILE
1132FIND
1133HEAD
1134LN
1135LS
1136MKDIR
1137MKTEMP
1138MV
1139NAWK
1140PRINTF
1141RM
1142SH
1143SORT
1144TAIL
1145TAR
1146TEE
1147TOUCH
1148TR
1149UNAME
1150UNIQ
1151WC
1152WHICH
1153XARGS
1154AWK
1155GREP
1156EGREP
1157FGREP
1158SED
1159CYGPATH
1160READLINK
1161DF
1162SETFILE
1163CPIO
1164UNZIP
1165ZIP
1166LDD
1167OTOOL
1168READELF
1169HG
1170STAT
1171TIME
1172DSYMUTIL
1173XATTR
1174CODESIGN
1175PKG_CONFIG
1176JAVA
1177JAVAC
1178JAVAH
1179JAR
1180NATIVE2ASCII
1181JARSIGNER
1182CC
1183CFLAGS
1184LDFLAGS
1185LIBS
1186CPPFLAGS
1187CXX
1188CXXFLAGS
1189CCC
1190CPP
1191CXXCPP
1192AS
1193AR
1194OBJC
1195OBJCFLAGS
1196LIPO
1197STRIP
1198NM
1199GNM
1200MCS
1201OBJCOPY
1202OBJDUMP
1203BUILD_CC
1204BUILD_CXX
1205BUILD_LD
1206JTREGEXE
1207XMKMF
1208FREETYPE_CFLAGS
1209FREETYPE_LIBS
1210ALSA_CFLAGS
1211ALSA_LIBS
1212LCMS_CFLAGS
1213LCMS_LIBS
1214PNG_CFLAGS
1215PNG_LIBS
1216LIBFFI_CFLAGS
1217LIBFFI_LIBS
1218CCACHE'
1219
1220
1221# Initialize some variables set by options.
1222ac_init_help=
1223ac_init_version=false
1224ac_unrecognized_opts=
1225ac_unrecognized_sep=
1226# The variables have the same names as the options, with
1227# dashes changed to underlines.
1228cache_file=/dev/null
1229exec_prefix=NONE
1230no_create=
1231no_recursion=
1232prefix=NONE
1233program_prefix=NONE
1234program_suffix=NONE
1235program_transform_name=s,x,x,
1236silent=
1237site=
1238srcdir=
1239verbose=
1240x_includes=NONE
1241x_libraries=NONE
1242
1243# Installation directory options.
1244# These are left unexpanded so users can "make install exec_prefix=/foo"
1245# and all the variables that are supposed to be based on exec_prefix
1246# by default will actually change.
1247# Use braces instead of parens because sh, perl, etc. also accept them.
1248# (The list follows the same order as the GNU Coding Standards.)
1249bindir='${exec_prefix}/bin'
1250sbindir='${exec_prefix}/sbin'
1251libexecdir='${exec_prefix}/libexec'
1252datarootdir='${prefix}/share'
1253datadir='${datarootdir}'
1254sysconfdir='${prefix}/etc'
1255sharedstatedir='${prefix}/com'
1256localstatedir='${prefix}/var'
1257includedir='${prefix}/include'
1258oldincludedir='/usr/include'
1259docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1260infodir='${datarootdir}/info'
1261htmldir='${docdir}'
1262dvidir='${docdir}'
1263pdfdir='${docdir}'
1264psdir='${docdir}'
1265libdir='${exec_prefix}/lib'
1266localedir='${datarootdir}/locale'
1267mandir='${datarootdir}/man'
1268
1269ac_prev=
1270ac_dashdash=
1271for ac_option
1272do
1273  # If the previous option needs an argument, assign it.
1274  if test -n "$ac_prev"; then
1275    eval $ac_prev=\$ac_option
1276    ac_prev=
1277    continue
1278  fi
1279
1280  case $ac_option in
1281  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1282  *=)   ac_optarg= ;;
1283  *)    ac_optarg=yes ;;
1284  esac
1285
1286  # Accept the important Cygnus configure options, so we can diagnose typos.
1287
1288  case $ac_dashdash$ac_option in
1289  --)
1290    ac_dashdash=yes ;;
1291
1292  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1293    ac_prev=bindir ;;
1294  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1295    bindir=$ac_optarg ;;
1296
1297  -build | --build | --buil | --bui | --bu)
1298    ac_prev=build_alias ;;
1299  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1300    build_alias=$ac_optarg ;;
1301
1302  -cache-file | --cache-file | --cache-fil | --cache-fi \
1303  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1304    ac_prev=cache_file ;;
1305  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1306  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1307    cache_file=$ac_optarg ;;
1308
1309  --config-cache | -C)
1310    cache_file=config.cache ;;
1311
1312  -datadir | --datadir | --datadi | --datad)
1313    ac_prev=datadir ;;
1314  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1315    datadir=$ac_optarg ;;
1316
1317  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1318  | --dataroo | --dataro | --datar)
1319    ac_prev=datarootdir ;;
1320  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1321  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1322    datarootdir=$ac_optarg ;;
1323
1324  -disable-* | --disable-*)
1325    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1326    # Reject names that are not valid shell variable names.
1327    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1328      as_fn_error $? "invalid feature name: $ac_useropt"
1329    ac_useropt_orig=$ac_useropt
1330    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1331    case $ac_user_opts in
1332      *"
1333"enable_$ac_useropt"
1334"*) ;;
1335      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1336	 ac_unrecognized_sep=', ';;
1337    esac
1338    eval enable_$ac_useropt=no ;;
1339
1340  -docdir | --docdir | --docdi | --doc | --do)
1341    ac_prev=docdir ;;
1342  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1343    docdir=$ac_optarg ;;
1344
1345  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1346    ac_prev=dvidir ;;
1347  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1348    dvidir=$ac_optarg ;;
1349
1350  -enable-* | --enable-*)
1351    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1352    # Reject names that are not valid shell variable names.
1353    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1354      as_fn_error $? "invalid feature name: $ac_useropt"
1355    ac_useropt_orig=$ac_useropt
1356    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1357    case $ac_user_opts in
1358      *"
1359"enable_$ac_useropt"
1360"*) ;;
1361      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1362	 ac_unrecognized_sep=', ';;
1363    esac
1364    eval enable_$ac_useropt=\$ac_optarg ;;
1365
1366  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1367  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1368  | --exec | --exe | --ex)
1369    ac_prev=exec_prefix ;;
1370  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1371  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1372  | --exec=* | --exe=* | --ex=*)
1373    exec_prefix=$ac_optarg ;;
1374
1375  -gas | --gas | --ga | --g)
1376    # Obsolete; use --with-gas.
1377    with_gas=yes ;;
1378
1379  -help | --help | --hel | --he | -h)
1380    ac_init_help=long ;;
1381  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1382    ac_init_help=recursive ;;
1383  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1384    ac_init_help=short ;;
1385
1386  -host | --host | --hos | --ho)
1387    ac_prev=host_alias ;;
1388  -host=* | --host=* | --hos=* | --ho=*)
1389    host_alias=$ac_optarg ;;
1390
1391  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1392    ac_prev=htmldir ;;
1393  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1394  | --ht=*)
1395    htmldir=$ac_optarg ;;
1396
1397  -includedir | --includedir | --includedi | --included | --include \
1398  | --includ | --inclu | --incl | --inc)
1399    ac_prev=includedir ;;
1400  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1401  | --includ=* | --inclu=* | --incl=* | --inc=*)
1402    includedir=$ac_optarg ;;
1403
1404  -infodir | --infodir | --infodi | --infod | --info | --inf)
1405    ac_prev=infodir ;;
1406  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1407    infodir=$ac_optarg ;;
1408
1409  -libdir | --libdir | --libdi | --libd)
1410    ac_prev=libdir ;;
1411  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1412    libdir=$ac_optarg ;;
1413
1414  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1415  | --libexe | --libex | --libe)
1416    ac_prev=libexecdir ;;
1417  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1418  | --libexe=* | --libex=* | --libe=*)
1419    libexecdir=$ac_optarg ;;
1420
1421  -localedir | --localedir | --localedi | --localed | --locale)
1422    ac_prev=localedir ;;
1423  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1424    localedir=$ac_optarg ;;
1425
1426  -localstatedir | --localstatedir | --localstatedi | --localstated \
1427  | --localstate | --localstat | --localsta | --localst | --locals)
1428    ac_prev=localstatedir ;;
1429  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1430  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1431    localstatedir=$ac_optarg ;;
1432
1433  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1434    ac_prev=mandir ;;
1435  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1436    mandir=$ac_optarg ;;
1437
1438  -nfp | --nfp | --nf)
1439    # Obsolete; use --without-fp.
1440    with_fp=no ;;
1441
1442  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1443  | --no-cr | --no-c | -n)
1444    no_create=yes ;;
1445
1446  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1447  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1448    no_recursion=yes ;;
1449
1450  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1451  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1452  | --oldin | --oldi | --old | --ol | --o)
1453    ac_prev=oldincludedir ;;
1454  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1455  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1456  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1457    oldincludedir=$ac_optarg ;;
1458
1459  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1460    ac_prev=prefix ;;
1461  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1462    prefix=$ac_optarg ;;
1463
1464  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1465  | --program-pre | --program-pr | --program-p)
1466    ac_prev=program_prefix ;;
1467  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1468  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1469    program_prefix=$ac_optarg ;;
1470
1471  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1472  | --program-suf | --program-su | --program-s)
1473    ac_prev=program_suffix ;;
1474  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1475  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1476    program_suffix=$ac_optarg ;;
1477
1478  -program-transform-name | --program-transform-name \
1479  | --program-transform-nam | --program-transform-na \
1480  | --program-transform-n | --program-transform- \
1481  | --program-transform | --program-transfor \
1482  | --program-transfo | --program-transf \
1483  | --program-trans | --program-tran \
1484  | --progr-tra | --program-tr | --program-t)
1485    ac_prev=program_transform_name ;;
1486  -program-transform-name=* | --program-transform-name=* \
1487  | --program-transform-nam=* | --program-transform-na=* \
1488  | --program-transform-n=* | --program-transform-=* \
1489  | --program-transform=* | --program-transfor=* \
1490  | --program-transfo=* | --program-transf=* \
1491  | --program-trans=* | --program-tran=* \
1492  | --progr-tra=* | --program-tr=* | --program-t=*)
1493    program_transform_name=$ac_optarg ;;
1494
1495  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1496    ac_prev=pdfdir ;;
1497  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1498    pdfdir=$ac_optarg ;;
1499
1500  -psdir | --psdir | --psdi | --psd | --ps)
1501    ac_prev=psdir ;;
1502  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1503    psdir=$ac_optarg ;;
1504
1505  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1506  | -silent | --silent | --silen | --sile | --sil)
1507    silent=yes ;;
1508
1509  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1510    ac_prev=sbindir ;;
1511  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1512  | --sbi=* | --sb=*)
1513    sbindir=$ac_optarg ;;
1514
1515  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1516  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1517  | --sharedst | --shareds | --shared | --share | --shar \
1518  | --sha | --sh)
1519    ac_prev=sharedstatedir ;;
1520  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1521  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1522  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1523  | --sha=* | --sh=*)
1524    sharedstatedir=$ac_optarg ;;
1525
1526  -site | --site | --sit)
1527    ac_prev=site ;;
1528  -site=* | --site=* | --sit=*)
1529    site=$ac_optarg ;;
1530
1531  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1532    ac_prev=srcdir ;;
1533  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1534    srcdir=$ac_optarg ;;
1535
1536  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1537  | --syscon | --sysco | --sysc | --sys | --sy)
1538    ac_prev=sysconfdir ;;
1539  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1540  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1541    sysconfdir=$ac_optarg ;;
1542
1543  -target | --target | --targe | --targ | --tar | --ta | --t)
1544    ac_prev=target_alias ;;
1545  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1546    target_alias=$ac_optarg ;;
1547
1548  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1549    verbose=yes ;;
1550
1551  -version | --version | --versio | --versi | --vers | -V)
1552    ac_init_version=: ;;
1553
1554  -with-* | --with-*)
1555    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1556    # Reject names that are not valid shell variable names.
1557    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1558      as_fn_error $? "invalid package name: $ac_useropt"
1559    ac_useropt_orig=$ac_useropt
1560    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1561    case $ac_user_opts in
1562      *"
1563"with_$ac_useropt"
1564"*) ;;
1565      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1566	 ac_unrecognized_sep=', ';;
1567    esac
1568    eval with_$ac_useropt=\$ac_optarg ;;
1569
1570  -without-* | --without-*)
1571    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1572    # Reject names that are not valid shell variable names.
1573    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1574      as_fn_error $? "invalid package name: $ac_useropt"
1575    ac_useropt_orig=$ac_useropt
1576    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1577    case $ac_user_opts in
1578      *"
1579"with_$ac_useropt"
1580"*) ;;
1581      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1582	 ac_unrecognized_sep=', ';;
1583    esac
1584    eval with_$ac_useropt=no ;;
1585
1586  --x)
1587    # Obsolete; use --with-x.
1588    with_x=yes ;;
1589
1590  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1591  | --x-incl | --x-inc | --x-in | --x-i)
1592    ac_prev=x_includes ;;
1593  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1594  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1595    x_includes=$ac_optarg ;;
1596
1597  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1598  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1599    ac_prev=x_libraries ;;
1600  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1601  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1602    x_libraries=$ac_optarg ;;
1603
1604  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1605Try \`$0 --help' for more information"
1606    ;;
1607
1608  *=*)
1609    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1610    # Reject names that are not valid shell variable names.
1611    case $ac_envvar in #(
1612      '' | [0-9]* | *[!_$as_cr_alnum]* )
1613      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1614    esac
1615    eval $ac_envvar=\$ac_optarg
1616    export $ac_envvar ;;
1617
1618  *)
1619    # FIXME: should be removed in autoconf 3.0.
1620    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1621    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1622      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1623    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1624    ;;
1625
1626  esac
1627done
1628
1629if test -n "$ac_prev"; then
1630  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1631  as_fn_error $? "missing argument to $ac_option"
1632fi
1633
1634if test -n "$ac_unrecognized_opts"; then
1635  case $enable_option_checking in
1636    no) ;;
1637    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1638    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1639  esac
1640fi
1641
1642# Check all directory arguments for consistency.
1643for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1644		datadir sysconfdir sharedstatedir localstatedir includedir \
1645		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1646		libdir localedir mandir
1647do
1648  eval ac_val=\$$ac_var
1649  # Remove trailing slashes.
1650  case $ac_val in
1651    */ )
1652      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1653      eval $ac_var=\$ac_val;;
1654  esac
1655  # Be sure to have absolute directory names.
1656  case $ac_val in
1657    [\\/$]* | ?:[\\/]* )  continue;;
1658    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1659  esac
1660  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1661done
1662
1663# There might be people who depend on the old broken behavior: `$host'
1664# used to hold the argument of --host etc.
1665# FIXME: To remove some day.
1666build=$build_alias
1667host=$host_alias
1668target=$target_alias
1669
1670# FIXME: To remove some day.
1671if test "x$host_alias" != x; then
1672  if test "x$build_alias" = x; then
1673    cross_compiling=maybe
1674  elif test "x$build_alias" != "x$host_alias"; then
1675    cross_compiling=yes
1676  fi
1677fi
1678
1679ac_tool_prefix=
1680test -n "$host_alias" && ac_tool_prefix=$host_alias-
1681
1682test "$silent" = yes && exec 6>/dev/null
1683
1684
1685ac_pwd=`pwd` && test -n "$ac_pwd" &&
1686ac_ls_di=`ls -di .` &&
1687ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1688  as_fn_error $? "working directory cannot be determined"
1689test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1690  as_fn_error $? "pwd does not report name of working directory"
1691
1692
1693# Find the source files, if location was not specified.
1694if test -z "$srcdir"; then
1695  ac_srcdir_defaulted=yes
1696  # Try the directory containing this script, then the parent directory.
1697  ac_confdir=`$as_dirname -- "$as_myself" ||
1698$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1699	 X"$as_myself" : 'X\(//\)[^/]' \| \
1700	 X"$as_myself" : 'X\(//\)$' \| \
1701	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1702$as_echo X"$as_myself" |
1703    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1704	    s//\1/
1705	    q
1706	  }
1707	  /^X\(\/\/\)[^/].*/{
1708	    s//\1/
1709	    q
1710	  }
1711	  /^X\(\/\/\)$/{
1712	    s//\1/
1713	    q
1714	  }
1715	  /^X\(\/\).*/{
1716	    s//\1/
1717	    q
1718	  }
1719	  s/.*/./; q'`
1720  srcdir=$ac_confdir
1721  if test ! -r "$srcdir/$ac_unique_file"; then
1722    srcdir=..
1723  fi
1724else
1725  ac_srcdir_defaulted=no
1726fi
1727if test ! -r "$srcdir/$ac_unique_file"; then
1728  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1729  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1730fi
1731ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1732ac_abs_confdir=`(
1733	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1734	pwd)`
1735# When building in place, set srcdir=.
1736if test "$ac_abs_confdir" = "$ac_pwd"; then
1737  srcdir=.
1738fi
1739# Remove unnecessary trailing slashes from srcdir.
1740# Double slashes in file names in object file debugging info
1741# mess up M-x gdb in Emacs.
1742case $srcdir in
1743*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1744esac
1745for ac_var in $ac_precious_vars; do
1746  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1747  eval ac_env_${ac_var}_value=\$${ac_var}
1748  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1749  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1750done
1751
1752#
1753# Report the --help message.
1754#
1755if test "$ac_init_help" = "long"; then
1756  # Omit some internal or obsolete options to make the list less imposing.
1757  # This message is too long to be a string in the A/UX 3.1 sh.
1758  cat <<_ACEOF
1759\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1760
1761Usage: $0 [OPTION]... [VAR=VALUE]...
1762
1763To assign environment variables (e.g., CC, CFLAGS...), specify them as
1764VAR=VALUE.  See below for descriptions of some of the useful variables.
1765
1766Defaults for the options are specified in brackets.
1767
1768Configuration:
1769  -h, --help              display this help and exit
1770      --help=short        display options specific to this package
1771      --help=recursive    display the short help of all the included packages
1772  -V, --version           display version information and exit
1773  -q, --quiet, --silent   do not print \`checking ...' messages
1774      --cache-file=FILE   cache test results in FILE [disabled]
1775  -C, --config-cache      alias for \`--cache-file=config.cache'
1776  -n, --no-create         do not create output files
1777      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1778
1779Installation directories:
1780  --prefix=PREFIX         install architecture-independent files in PREFIX
1781                          [$ac_default_prefix]
1782  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1783                          [PREFIX]
1784
1785By default, \`make install' will install all the files in
1786\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1787an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1788for instance \`--prefix=\$HOME'.
1789
1790For better control, use the options below.
1791
1792Fine tuning of the installation directories:
1793  --bindir=DIR            user executables [EPREFIX/bin]
1794  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1795  --libexecdir=DIR        program executables [EPREFIX/libexec]
1796  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1797  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1798  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1799  --libdir=DIR            object code libraries [EPREFIX/lib]
1800  --includedir=DIR        C header files [PREFIX/include]
1801  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1802  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1803  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1804  --infodir=DIR           info documentation [DATAROOTDIR/info]
1805  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1806  --mandir=DIR            man documentation [DATAROOTDIR/man]
1807  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1808  --htmldir=DIR           html documentation [DOCDIR]
1809  --dvidir=DIR            dvi documentation [DOCDIR]
1810  --pdfdir=DIR            pdf documentation [DOCDIR]
1811  --psdir=DIR             ps documentation [DOCDIR]
1812_ACEOF
1813
1814  cat <<\_ACEOF
1815
1816X features:
1817  --x-includes=DIR    X include files are in DIR
1818  --x-libraries=DIR   X library files are in DIR
1819
1820System types:
1821  --build=BUILD     configure for building on BUILD [guessed]
1822  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1823  --target=TARGET   configure for building compilers for TARGET [HOST]
1824_ACEOF
1825fi
1826
1827if test -n "$ac_init_help"; then
1828  case $ac_init_help in
1829     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1830   esac
1831  cat <<\_ACEOF
1832
1833Optional Features:
1834  --disable-option-checking  ignore unrecognized --enable/--with options
1835  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1836  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1837  --enable-openjdk-only   suppress building custom source even if present
1838                          [disabled]
1839  --enable-debug          set the debug level to fastdebug (shorthand for
1840                          --with-debug-level=fastdebug) [disabled]
1841  --disable-headful       disable building headful support (graphical UI
1842                          support) [enabled]
1843  --enable-hotspot-test-in-build
1844                          run the Queens test after Hotspot build [disabled]
1845  --enable-unlimited-crypto
1846                          Enable unlimited crypto policy [disabled]
1847  --enable-rmiconnector-iiop
1848                          enable the JMX RMIConnector iiop transport
1849                          [disabled]
1850  --disable-debug-symbols disable generation of debug symbols [enabled]
1851  --disable-zip-debug-info
1852                          disable zipping of debug-info files [enabled]
1853  --disable-freetype-bundling
1854                          disable bundling of the freetype library with the
1855                          build result [enabled on Windows or when using
1856                          --with-freetype, disabled otherwise]
1857  --enable-sjavac         use sjavac to do fast incremental compiles
1858                          [disabled]
1859  --disable-precompiled-headers
1860                          disable using precompiled headers when compiling C++
1861                          [enabled]
1862  --enable-ccache         enable using ccache to speed up recompilations
1863                          [disabled]
1864
1865Optional Packages:
1866  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1867  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1868  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1869                          support it), e.g. --with-target-bits=32 [guessed]
1870  --with-custom-make-dir  Deprecated. Option is kept for backwards
1871                          compatibility and is ignored
1872  --with-jdk-variant      JDK variant to build (normal) [normal]
1873  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1874  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1875                          client, minimal1, kernel, zero, zeroshark, core)
1876                          [server]
1877  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1878                          optimized (HotSpot build only)) [release]
1879  --with-devkit           use this devkit for compilers, tools and resources
1880  --with-sys-root         alias for --with-sysroot for backwards compatability
1881  --with-sysroot          use this directory as sysroot
1882  --with-tools-dir        alias for --with-toolchain-path for backwards
1883                          compatibility
1884  --with-toolchain-path   prepend these directories when searching for
1885                          toolchain binaries (compilers etc)
1886  --with-extra-path       prepend these directories to the default path
1887  --with-sdk-name         use the platform SDK of the given name. [macosx]
1888  --with-conf-name        use this as the name of the configuration [generated
1889                          from important configuration options]
1890  --with-output-sync      set make output sync type if supported by make.
1891                          [recurse]
1892  --with-builddeps-conf   use this configuration file for the builddeps
1893  --with-builddeps-server download and use build dependencies from this server
1894                          url
1895  --with-builddeps-dir    store downloaded build dependencies here
1896                          [/localhome/builddeps]
1897  --with-builddeps-group  chgrp the downloaded build dependencies to this
1898                          group
1899  --with-cacerts-file     specify alternative cacerts file
1900  --with-milestone        Set milestone value for build [internal]
1901  --with-update-version   Set update version value for build [b00]
1902  --with-user-release-suffix
1903                          Add a custom string to the version string if build
1904                          number is not set.[username_builddateb00]
1905  --with-build-number     Set build number value for build [b00]
1906  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1907  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1908                          invocations of boot JDK, overriding the default
1909                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1910                          -enableassertions"
1911  --with-add-source-root  for each and every source directory, look in this
1912                          additional source root for the same directory; if it
1913                          exists and have files in it, include it in the build
1914  --with-override-source-root
1915                          for each and every source directory, look in this
1916                          override source root for the same directory; if it
1917                          exists, use that directory instead and ignore the
1918                          directory in the original source root
1919  --with-adds-and-overrides
1920                          use the subdirs 'adds' and 'overrides' in the
1921                          specified directory as add-source-root and
1922                          override-source-root
1923  --with-override-langtools
1924                          use this langtools dir for the build
1925  --with-override-corba   use this corba dir for the build
1926  --with-override-jaxp    use this jaxp dir for the build
1927  --with-override-jaxws   use this jaxws dir for the build
1928  --with-override-hotspot use this hotspot dir for the build
1929  --with-override-nashorn use this nashorn dir for the build
1930  --with-override-jdk     use this jdk dir for the build
1931  --with-import-hotspot   import hotspot binaries from this jdk image or
1932                          hotspot build dist dir instead of building from
1933                          source
1934  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1935                          to show possible values [platform dependent]
1936  --with-jtreg            Regression Test Harness [probed]
1937  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1938  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1939  --with-extra-ldflags    extra flags to be used when linking jdk
1940  --with-x                use the X Window System
1941  --with-cups             specify prefix directory for the cups package
1942                          (expecting the headers under PATH/include)
1943  --with-cups-include     specify directory for the cups include files
1944  --with-freetype         specify prefix directory for the freetype package
1945                          (expecting the libraries under PATH/lib and the
1946                          headers under PATH/include)
1947  --with-freetype-include specify directory for the freetype include files
1948  --with-freetype-lib     specify directory for the freetype library
1949  --with-alsa             specify prefix directory for the alsa package
1950                          (expecting the libraries under PATH/lib and the
1951                          headers under PATH/include)
1952  --with-alsa-include     specify directory for the alsa include files
1953  --with-alsa-lib         specify directory for the alsa library
1954  --with-libjpeg          use libjpeg from build system or OpenJDK source
1955                          (system, bundled) [bundled]
1956  --with-giflib           use giflib from build system or OpenJDK source
1957                          (system, bundled) [bundled]
1958  --with-lcms             use lcms2 from build system or OpenJDK source
1959                          (system, bundled) [bundled]
1960  --with-libpng           use libpng from build system or OpenJDK source
1961                          (system, bundled) [bundled]
1962  --with-zlib             use zlib from build system or OpenJDK source
1963                          (system, bundled) [bundled]
1964  --with-stdc++lib=<static>,<dynamic>,<default>
1965                          force linking of the C++ runtime on Linux to either
1966                          static or dynamic, default is static with dynamic as
1967                          fallback
1968  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1969                          only) [probed]
1970  --with-dxsdk            Deprecated. Option is kept for backwards
1971                          compatibility and is ignored
1972  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1973                          compatibility and is ignored
1974  --with-dxsdk-include    Deprecated. Option is kept for backwards
1975                          compatibility and is ignored
1976  --with-num-cores        number of cores in the build system, e.g.
1977                          --with-num-cores=8 [probed]
1978  --with-memory-size      memory (in MB) available in the build system, e.g.
1979                          --with-memory-size=1024 [probed]
1980  --with-jobs             number of parallel jobs to let make run [calculated
1981                          based on cores and memory]
1982  --with-sjavac-server-java
1983                          use this java binary for running the sjavac
1984                          background server [Boot JDK java]
1985  --with-ccache-dir       where to store ccache files [~/.ccache]
1986
1987Some influential environment variables:
1988  BASENAME    Override default value for BASENAME
1989  BASH        Override default value for BASH
1990  CAT         Override default value for CAT
1991  CHMOD       Override default value for CHMOD
1992  CMP         Override default value for CMP
1993  COMM        Override default value for COMM
1994  CP          Override default value for CP
1995  CUT         Override default value for CUT
1996  DATE        Override default value for DATE
1997  DIFF        Override default value for DIFF
1998  DIRNAME     Override default value for DIRNAME
1999  ECHO        Override default value for ECHO
2000  EXPR        Override default value for EXPR
2001  FILE        Override default value for FILE
2002  FIND        Override default value for FIND
2003  HEAD        Override default value for HEAD
2004  LN          Override default value for LN
2005  LS          Override default value for LS
2006  MKDIR       Override default value for MKDIR
2007  MKTEMP      Override default value for MKTEMP
2008  MV          Override default value for MV
2009  NAWK        Override default value for NAWK
2010  PRINTF      Override default value for PRINTF
2011  RM          Override default value for RM
2012  SH          Override default value for SH
2013  SORT        Override default value for SORT
2014  TAIL        Override default value for TAIL
2015  TAR         Override default value for TAR
2016  TEE         Override default value for TEE
2017  TOUCH       Override default value for TOUCH
2018  TR          Override default value for TR
2019  UNAME       Override default value for UNAME
2020  UNIQ        Override default value for UNIQ
2021  WC          Override default value for WC
2022  WHICH       Override default value for WHICH
2023  XARGS       Override default value for XARGS
2024  AWK         Override default value for AWK
2025  GREP        Override default value for GREP
2026  EGREP       Override default value for EGREP
2027  FGREP       Override default value for FGREP
2028  SED         Override default value for SED
2029  CYGPATH     Override default value for CYGPATH
2030  READLINK    Override default value for READLINK
2031  DF          Override default value for DF
2032  SETFILE     Override default value for SETFILE
2033  CPIO        Override default value for CPIO
2034  UNZIP       Override default value for UNZIP
2035  ZIP         Override default value for ZIP
2036  LDD         Override default value for LDD
2037  OTOOL       Override default value for OTOOL
2038  READELF     Override default value for READELF
2039  HG          Override default value for HG
2040  STAT        Override default value for STAT
2041  TIME        Override default value for TIME
2042  DSYMUTIL    Override default value for DSYMUTIL
2043  XATTR       Override default value for XATTR
2044  CODESIGN    Override default value for CODESIGN
2045  PKG_CONFIG  path to pkg-config utility
2046  JAVA        Override default value for JAVA
2047  JAVAC       Override default value for JAVAC
2048  JAVAH       Override default value for JAVAH
2049  JAR         Override default value for JAR
2050  NATIVE2ASCII
2051              Override default value for NATIVE2ASCII
2052  JARSIGNER   Override default value for JARSIGNER
2053  CC          C compiler command
2054  CFLAGS      C compiler flags
2055  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2056              nonstandard directory <lib dir>
2057  LIBS        libraries to pass to the linker, e.g. -l<library>
2058  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2059              you have headers in a nonstandard directory <include dir>
2060  CXX         C++ compiler command
2061  CXXFLAGS    C++ compiler flags
2062  CPP         C preprocessor
2063  CXXCPP      C++ preprocessor
2064  AS          Override default value for AS
2065  AR          Override default value for AR
2066  OBJC        Objective C compiler command
2067  OBJCFLAGS   Objective C compiler flags
2068  LIPO        Override default value for LIPO
2069  STRIP       Override default value for STRIP
2070  NM          Override default value for NM
2071  GNM         Override default value for GNM
2072  MCS         Override default value for MCS
2073  OBJCOPY     Override default value for OBJCOPY
2074  OBJDUMP     Override default value for OBJDUMP
2075  BUILD_CC    Override default value for BUILD_CC
2076  BUILD_CXX   Override default value for BUILD_CXX
2077  BUILD_LD    Override default value for BUILD_LD
2078  JTREGEXE    Override default value for JTREGEXE
2079  XMKMF       Path to xmkmf, Makefile generator for X Window System
2080  FREETYPE_CFLAGS
2081              C compiler flags for FREETYPE, overriding pkg-config
2082  FREETYPE_LIBS
2083              linker flags for FREETYPE, overriding pkg-config
2084  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2085  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2086  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2087  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2088  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2089  PNG_LIBS    linker flags for PNG, overriding pkg-config
2090  LIBFFI_CFLAGS
2091              C compiler flags for LIBFFI, overriding pkg-config
2092  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2093  CCACHE      Override default value for CCACHE
2094
2095Use these variables to override the choices made by `configure' or to help
2096it to find libraries and programs with nonstandard names/locations.
2097
2098Report bugs to <build-dev@openjdk.java.net>.
2099OpenJDK home page: <http://openjdk.java.net>.
2100_ACEOF
2101ac_status=$?
2102fi
2103
2104if test "$ac_init_help" = "recursive"; then
2105  # If there are subdirs, report their specific --help.
2106  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2107    test -d "$ac_dir" ||
2108      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2109      continue
2110    ac_builddir=.
2111
2112case "$ac_dir" in
2113.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2114*)
2115  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2116  # A ".." for each directory in $ac_dir_suffix.
2117  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2118  case $ac_top_builddir_sub in
2119  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2120  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2121  esac ;;
2122esac
2123ac_abs_top_builddir=$ac_pwd
2124ac_abs_builddir=$ac_pwd$ac_dir_suffix
2125# for backward compatibility:
2126ac_top_builddir=$ac_top_build_prefix
2127
2128case $srcdir in
2129  .)  # We are building in place.
2130    ac_srcdir=.
2131    ac_top_srcdir=$ac_top_builddir_sub
2132    ac_abs_top_srcdir=$ac_pwd ;;
2133  [\\/]* | ?:[\\/]* )  # Absolute name.
2134    ac_srcdir=$srcdir$ac_dir_suffix;
2135    ac_top_srcdir=$srcdir
2136    ac_abs_top_srcdir=$srcdir ;;
2137  *) # Relative name.
2138    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2139    ac_top_srcdir=$ac_top_build_prefix$srcdir
2140    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2141esac
2142ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2143
2144    cd "$ac_dir" || { ac_status=$?; continue; }
2145    # Check for guested configure.
2146    if test -f "$ac_srcdir/configure.gnu"; then
2147      echo &&
2148      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2149    elif test -f "$ac_srcdir/configure"; then
2150      echo &&
2151      $SHELL "$ac_srcdir/configure" --help=recursive
2152    else
2153      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2154    fi || ac_status=$?
2155    cd "$ac_pwd" || { ac_status=$?; break; }
2156  done
2157fi
2158
2159test -n "$ac_init_help" && exit $ac_status
2160if $ac_init_version; then
2161  cat <<\_ACEOF
2162OpenJDK configure jdk9
2163generated by GNU Autoconf 2.69
2164
2165Copyright (C) 2012 Free Software Foundation, Inc.
2166This configure script is free software; the Free Software Foundation
2167gives unlimited permission to copy, distribute and modify it.
2168_ACEOF
2169  exit
2170fi
2171
2172## ------------------------ ##
2173## Autoconf initialization. ##
2174## ------------------------ ##
2175
2176# ac_fn_c_try_compile LINENO
2177# --------------------------
2178# Try to compile conftest.$ac_ext, and return whether this succeeded.
2179ac_fn_c_try_compile ()
2180{
2181  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2182  rm -f conftest.$ac_objext
2183  if { { ac_try="$ac_compile"
2184case "(($ac_try" in
2185  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2186  *) ac_try_echo=$ac_try;;
2187esac
2188eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2189$as_echo "$ac_try_echo"; } >&5
2190  (eval "$ac_compile") 2>conftest.err
2191  ac_status=$?
2192  if test -s conftest.err; then
2193    grep -v '^ *+' conftest.err >conftest.er1
2194    cat conftest.er1 >&5
2195    mv -f conftest.er1 conftest.err
2196  fi
2197  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2198  test $ac_status = 0; } && {
2199	 test -z "$ac_c_werror_flag" ||
2200	 test ! -s conftest.err
2201       } && test -s conftest.$ac_objext; then :
2202  ac_retval=0
2203else
2204  $as_echo "$as_me: failed program was:" >&5
2205sed 's/^/| /' conftest.$ac_ext >&5
2206
2207	ac_retval=1
2208fi
2209  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2210  as_fn_set_status $ac_retval
2211
2212} # ac_fn_c_try_compile
2213
2214# ac_fn_cxx_try_compile LINENO
2215# ----------------------------
2216# Try to compile conftest.$ac_ext, and return whether this succeeded.
2217ac_fn_cxx_try_compile ()
2218{
2219  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2220  rm -f conftest.$ac_objext
2221  if { { ac_try="$ac_compile"
2222case "(($ac_try" in
2223  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2224  *) ac_try_echo=$ac_try;;
2225esac
2226eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2227$as_echo "$ac_try_echo"; } >&5
2228  (eval "$ac_compile") 2>conftest.err
2229  ac_status=$?
2230  if test -s conftest.err; then
2231    grep -v '^ *+' conftest.err >conftest.er1
2232    cat conftest.er1 >&5
2233    mv -f conftest.er1 conftest.err
2234  fi
2235  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2236  test $ac_status = 0; } && {
2237	 test -z "$ac_cxx_werror_flag" ||
2238	 test ! -s conftest.err
2239       } && test -s conftest.$ac_objext; then :
2240  ac_retval=0
2241else
2242  $as_echo "$as_me: failed program was:" >&5
2243sed 's/^/| /' conftest.$ac_ext >&5
2244
2245	ac_retval=1
2246fi
2247  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2248  as_fn_set_status $ac_retval
2249
2250} # ac_fn_cxx_try_compile
2251
2252# ac_fn_c_try_cpp LINENO
2253# ----------------------
2254# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2255ac_fn_c_try_cpp ()
2256{
2257  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2258  if { { ac_try="$ac_cpp conftest.$ac_ext"
2259case "(($ac_try" in
2260  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2261  *) ac_try_echo=$ac_try;;
2262esac
2263eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2264$as_echo "$ac_try_echo"; } >&5
2265  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2266  ac_status=$?
2267  if test -s conftest.err; then
2268    grep -v '^ *+' conftest.err >conftest.er1
2269    cat conftest.er1 >&5
2270    mv -f conftest.er1 conftest.err
2271  fi
2272  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2273  test $ac_status = 0; } > conftest.i && {
2274	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2275	 test ! -s conftest.err
2276       }; then :
2277  ac_retval=0
2278else
2279  $as_echo "$as_me: failed program was:" >&5
2280sed 's/^/| /' conftest.$ac_ext >&5
2281
2282    ac_retval=1
2283fi
2284  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2285  as_fn_set_status $ac_retval
2286
2287} # ac_fn_c_try_cpp
2288
2289# ac_fn_cxx_try_cpp LINENO
2290# ------------------------
2291# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2292ac_fn_cxx_try_cpp ()
2293{
2294  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2295  if { { ac_try="$ac_cpp conftest.$ac_ext"
2296case "(($ac_try" in
2297  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2298  *) ac_try_echo=$ac_try;;
2299esac
2300eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2301$as_echo "$ac_try_echo"; } >&5
2302  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2303  ac_status=$?
2304  if test -s conftest.err; then
2305    grep -v '^ *+' conftest.err >conftest.er1
2306    cat conftest.er1 >&5
2307    mv -f conftest.er1 conftest.err
2308  fi
2309  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2310  test $ac_status = 0; } > conftest.i && {
2311	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2312	 test ! -s conftest.err
2313       }; then :
2314  ac_retval=0
2315else
2316  $as_echo "$as_me: failed program was:" >&5
2317sed 's/^/| /' conftest.$ac_ext >&5
2318
2319    ac_retval=1
2320fi
2321  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2322  as_fn_set_status $ac_retval
2323
2324} # ac_fn_cxx_try_cpp
2325
2326# ac_fn_objc_try_compile LINENO
2327# -----------------------------
2328# Try to compile conftest.$ac_ext, and return whether this succeeded.
2329ac_fn_objc_try_compile ()
2330{
2331  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2332  rm -f conftest.$ac_objext
2333  if { { ac_try="$ac_compile"
2334case "(($ac_try" in
2335  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2336  *) ac_try_echo=$ac_try;;
2337esac
2338eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2339$as_echo "$ac_try_echo"; } >&5
2340  (eval "$ac_compile") 2>conftest.err
2341  ac_status=$?
2342  if test -s conftest.err; then
2343    grep -v '^ *+' conftest.err >conftest.er1
2344    cat conftest.er1 >&5
2345    mv -f conftest.er1 conftest.err
2346  fi
2347  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2348  test $ac_status = 0; } && {
2349	 test -z "$ac_objc_werror_flag" ||
2350	 test ! -s conftest.err
2351       } && test -s conftest.$ac_objext; then :
2352  ac_retval=0
2353else
2354  $as_echo "$as_me: failed program was:" >&5
2355sed 's/^/| /' conftest.$ac_ext >&5
2356
2357	ac_retval=1
2358fi
2359  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2360  as_fn_set_status $ac_retval
2361
2362} # ac_fn_objc_try_compile
2363
2364# ac_fn_c_try_link LINENO
2365# -----------------------
2366# Try to link conftest.$ac_ext, and return whether this succeeded.
2367ac_fn_c_try_link ()
2368{
2369  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2370  rm -f conftest.$ac_objext conftest$ac_exeext
2371  if { { ac_try="$ac_link"
2372case "(($ac_try" in
2373  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2374  *) ac_try_echo=$ac_try;;
2375esac
2376eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2377$as_echo "$ac_try_echo"; } >&5
2378  (eval "$ac_link") 2>conftest.err
2379  ac_status=$?
2380  if test -s conftest.err; then
2381    grep -v '^ *+' conftest.err >conftest.er1
2382    cat conftest.er1 >&5
2383    mv -f conftest.er1 conftest.err
2384  fi
2385  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2386  test $ac_status = 0; } && {
2387	 test -z "$ac_c_werror_flag" ||
2388	 test ! -s conftest.err
2389       } && test -s conftest$ac_exeext && {
2390	 test "$cross_compiling" = yes ||
2391	 test -x conftest$ac_exeext
2392       }; then :
2393  ac_retval=0
2394else
2395  $as_echo "$as_me: failed program was:" >&5
2396sed 's/^/| /' conftest.$ac_ext >&5
2397
2398	ac_retval=1
2399fi
2400  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2401  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2402  # interfere with the next link command; also delete a directory that is
2403  # left behind by Apple's compiler.  We do this before executing the actions.
2404  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2405  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2406  as_fn_set_status $ac_retval
2407
2408} # ac_fn_c_try_link
2409
2410# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2411# ---------------------------------------------------------
2412# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2413# the include files in INCLUDES and setting the cache variable VAR
2414# accordingly.
2415ac_fn_cxx_check_header_mongrel ()
2416{
2417  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2418  if eval \${$3+:} false; then :
2419  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2420$as_echo_n "checking for $2... " >&6; }
2421if eval \${$3+:} false; then :
2422  $as_echo_n "(cached) " >&6
2423fi
2424eval ac_res=\$$3
2425	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2426$as_echo "$ac_res" >&6; }
2427else
2428  # Is the header compilable?
2429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2430$as_echo_n "checking $2 usability... " >&6; }
2431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2432/* end confdefs.h.  */
2433$4
2434#include <$2>
2435_ACEOF
2436if ac_fn_cxx_try_compile "$LINENO"; then :
2437  ac_header_compiler=yes
2438else
2439  ac_header_compiler=no
2440fi
2441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2443$as_echo "$ac_header_compiler" >&6; }
2444
2445# Is the header present?
2446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2447$as_echo_n "checking $2 presence... " >&6; }
2448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2449/* end confdefs.h.  */
2450#include <$2>
2451_ACEOF
2452if ac_fn_cxx_try_cpp "$LINENO"; then :
2453  ac_header_preproc=yes
2454else
2455  ac_header_preproc=no
2456fi
2457rm -f conftest.err conftest.i conftest.$ac_ext
2458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2459$as_echo "$ac_header_preproc" >&6; }
2460
2461# So?  What about this header?
2462case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2463  yes:no: )
2464    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2465$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2466    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2467$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2468    ;;
2469  no:yes:* )
2470    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2471$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2472    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2473$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2474    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2475$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2476    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2477$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2478    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2479$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2480( $as_echo "## ----------------------------------------- ##
2481## Report this to build-dev@openjdk.java.net ##
2482## ----------------------------------------- ##"
2483     ) | sed "s/^/$as_me: WARNING:     /" >&2
2484    ;;
2485esac
2486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2487$as_echo_n "checking for $2... " >&6; }
2488if eval \${$3+:} false; then :
2489  $as_echo_n "(cached) " >&6
2490else
2491  eval "$3=\$ac_header_compiler"
2492fi
2493eval ac_res=\$$3
2494	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2495$as_echo "$ac_res" >&6; }
2496fi
2497  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2498
2499} # ac_fn_cxx_check_header_mongrel
2500
2501# ac_fn_cxx_try_run LINENO
2502# ------------------------
2503# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2504# that executables *can* be run.
2505ac_fn_cxx_try_run ()
2506{
2507  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2508  if { { ac_try="$ac_link"
2509case "(($ac_try" in
2510  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2511  *) ac_try_echo=$ac_try;;
2512esac
2513eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2514$as_echo "$ac_try_echo"; } >&5
2515  (eval "$ac_link") 2>&5
2516  ac_status=$?
2517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2518  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2519  { { case "(($ac_try" in
2520  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2521  *) ac_try_echo=$ac_try;;
2522esac
2523eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2524$as_echo "$ac_try_echo"; } >&5
2525  (eval "$ac_try") 2>&5
2526  ac_status=$?
2527  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2528  test $ac_status = 0; }; }; then :
2529  ac_retval=0
2530else
2531  $as_echo "$as_me: program exited with status $ac_status" >&5
2532       $as_echo "$as_me: failed program was:" >&5
2533sed 's/^/| /' conftest.$ac_ext >&5
2534
2535       ac_retval=$ac_status
2536fi
2537  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2538  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2539  as_fn_set_status $ac_retval
2540
2541} # ac_fn_cxx_try_run
2542
2543# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2544# ---------------------------------------------------------
2545# Tests whether HEADER exists and can be compiled using the include files in
2546# INCLUDES, setting the cache variable VAR accordingly.
2547ac_fn_cxx_check_header_compile ()
2548{
2549  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2551$as_echo_n "checking for $2... " >&6; }
2552if eval \${$3+:} false; then :
2553  $as_echo_n "(cached) " >&6
2554else
2555  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2556/* end confdefs.h.  */
2557$4
2558#include <$2>
2559_ACEOF
2560if ac_fn_cxx_try_compile "$LINENO"; then :
2561  eval "$3=yes"
2562else
2563  eval "$3=no"
2564fi
2565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2566fi
2567eval ac_res=\$$3
2568	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2569$as_echo "$ac_res" >&6; }
2570  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2571
2572} # ac_fn_cxx_check_header_compile
2573
2574# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2575# ----------------------------------------------
2576# Tries to find the compile-time value of EXPR in a program that includes
2577# INCLUDES, setting VAR accordingly. Returns whether the value could be
2578# computed
2579ac_fn_cxx_compute_int ()
2580{
2581  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2582  if test "$cross_compiling" = yes; then
2583    # Depending upon the size, compute the lo and hi bounds.
2584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2585/* end confdefs.h.  */
2586$4
2587int
2588main ()
2589{
2590static int test_array [1 - 2 * !(($2) >= 0)];
2591test_array [0] = 0;
2592return test_array [0];
2593
2594  ;
2595  return 0;
2596}
2597_ACEOF
2598if ac_fn_cxx_try_compile "$LINENO"; then :
2599  ac_lo=0 ac_mid=0
2600  while :; do
2601    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2602/* end confdefs.h.  */
2603$4
2604int
2605main ()
2606{
2607static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2608test_array [0] = 0;
2609return test_array [0];
2610
2611  ;
2612  return 0;
2613}
2614_ACEOF
2615if ac_fn_cxx_try_compile "$LINENO"; then :
2616  ac_hi=$ac_mid; break
2617else
2618  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2619			if test $ac_lo -le $ac_mid; then
2620			  ac_lo= ac_hi=
2621			  break
2622			fi
2623			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2624fi
2625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2626  done
2627else
2628  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2629/* end confdefs.h.  */
2630$4
2631int
2632main ()
2633{
2634static int test_array [1 - 2 * !(($2) < 0)];
2635test_array [0] = 0;
2636return test_array [0];
2637
2638  ;
2639  return 0;
2640}
2641_ACEOF
2642if ac_fn_cxx_try_compile "$LINENO"; then :
2643  ac_hi=-1 ac_mid=-1
2644  while :; do
2645    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2646/* end confdefs.h.  */
2647$4
2648int
2649main ()
2650{
2651static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2652test_array [0] = 0;
2653return test_array [0];
2654
2655  ;
2656  return 0;
2657}
2658_ACEOF
2659if ac_fn_cxx_try_compile "$LINENO"; then :
2660  ac_lo=$ac_mid; break
2661else
2662  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2663			if test $ac_mid -le $ac_hi; then
2664			  ac_lo= ac_hi=
2665			  break
2666			fi
2667			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2668fi
2669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2670  done
2671else
2672  ac_lo= ac_hi=
2673fi
2674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2675fi
2676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2677# Binary search between lo and hi bounds.
2678while test "x$ac_lo" != "x$ac_hi"; do
2679  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2681/* end confdefs.h.  */
2682$4
2683int
2684main ()
2685{
2686static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2687test_array [0] = 0;
2688return test_array [0];
2689
2690  ;
2691  return 0;
2692}
2693_ACEOF
2694if ac_fn_cxx_try_compile "$LINENO"; then :
2695  ac_hi=$ac_mid
2696else
2697  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2698fi
2699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2700done
2701case $ac_lo in #((
2702?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2703'') ac_retval=1 ;;
2704esac
2705  else
2706    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2707/* end confdefs.h.  */
2708$4
2709static long int longval () { return $2; }
2710static unsigned long int ulongval () { return $2; }
2711#include <stdio.h>
2712#include <stdlib.h>
2713int
2714main ()
2715{
2716
2717  FILE *f = fopen ("conftest.val", "w");
2718  if (! f)
2719    return 1;
2720  if (($2) < 0)
2721    {
2722      long int i = longval ();
2723      if (i != ($2))
2724	return 1;
2725      fprintf (f, "%ld", i);
2726    }
2727  else
2728    {
2729      unsigned long int i = ulongval ();
2730      if (i != ($2))
2731	return 1;
2732      fprintf (f, "%lu", i);
2733    }
2734  /* Do not output a trailing newline, as this causes \r\n confusion
2735     on some platforms.  */
2736  return ferror (f) || fclose (f) != 0;
2737
2738  ;
2739  return 0;
2740}
2741_ACEOF
2742if ac_fn_cxx_try_run "$LINENO"; then :
2743  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2744else
2745  ac_retval=1
2746fi
2747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2748  conftest.$ac_objext conftest.beam conftest.$ac_ext
2749rm -f conftest.val
2750
2751  fi
2752  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2753  as_fn_set_status $ac_retval
2754
2755} # ac_fn_cxx_compute_int
2756
2757# ac_fn_cxx_try_link LINENO
2758# -------------------------
2759# Try to link conftest.$ac_ext, and return whether this succeeded.
2760ac_fn_cxx_try_link ()
2761{
2762  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2763  rm -f conftest.$ac_objext conftest$ac_exeext
2764  if { { ac_try="$ac_link"
2765case "(($ac_try" in
2766  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2767  *) ac_try_echo=$ac_try;;
2768esac
2769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2770$as_echo "$ac_try_echo"; } >&5
2771  (eval "$ac_link") 2>conftest.err
2772  ac_status=$?
2773  if test -s conftest.err; then
2774    grep -v '^ *+' conftest.err >conftest.er1
2775    cat conftest.er1 >&5
2776    mv -f conftest.er1 conftest.err
2777  fi
2778  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2779  test $ac_status = 0; } && {
2780	 test -z "$ac_cxx_werror_flag" ||
2781	 test ! -s conftest.err
2782       } && test -s conftest$ac_exeext && {
2783	 test "$cross_compiling" = yes ||
2784	 test -x conftest$ac_exeext
2785       }; then :
2786  ac_retval=0
2787else
2788  $as_echo "$as_me: failed program was:" >&5
2789sed 's/^/| /' conftest.$ac_ext >&5
2790
2791	ac_retval=1
2792fi
2793  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2794  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2795  # interfere with the next link command; also delete a directory that is
2796  # left behind by Apple's compiler.  We do this before executing the actions.
2797  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2798  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2799  as_fn_set_status $ac_retval
2800
2801} # ac_fn_cxx_try_link
2802
2803# ac_fn_cxx_check_func LINENO FUNC VAR
2804# ------------------------------------
2805# Tests whether FUNC exists, setting the cache variable VAR accordingly
2806ac_fn_cxx_check_func ()
2807{
2808  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2810$as_echo_n "checking for $2... " >&6; }
2811if eval \${$3+:} false; then :
2812  $as_echo_n "(cached) " >&6
2813else
2814  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2815/* end confdefs.h.  */
2816/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2817   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2818#define $2 innocuous_$2
2819
2820/* System header to define __stub macros and hopefully few prototypes,
2821    which can conflict with char $2 (); below.
2822    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2823    <limits.h> exists even on freestanding compilers.  */
2824
2825#ifdef __STDC__
2826# include <limits.h>
2827#else
2828# include <assert.h>
2829#endif
2830
2831#undef $2
2832
2833/* Override any GCC internal prototype to avoid an error.
2834   Use char because int might match the return type of a GCC
2835   builtin and then its argument prototype would still apply.  */
2836#ifdef __cplusplus
2837extern "C"
2838#endif
2839char $2 ();
2840/* The GNU C library defines this for functions which it implements
2841    to always fail with ENOSYS.  Some functions are actually named
2842    something starting with __ and the normal name is an alias.  */
2843#if defined __stub_$2 || defined __stub___$2
2844choke me
2845#endif
2846
2847int
2848main ()
2849{
2850return $2 ();
2851  ;
2852  return 0;
2853}
2854_ACEOF
2855if ac_fn_cxx_try_link "$LINENO"; then :
2856  eval "$3=yes"
2857else
2858  eval "$3=no"
2859fi
2860rm -f core conftest.err conftest.$ac_objext \
2861    conftest$ac_exeext conftest.$ac_ext
2862fi
2863eval ac_res=\$$3
2864	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2865$as_echo "$ac_res" >&6; }
2866  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2867
2868} # ac_fn_cxx_check_func
2869
2870# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2871# -------------------------------------------------------
2872# Tests whether HEADER exists and can be compiled using the include files in
2873# INCLUDES, setting the cache variable VAR accordingly.
2874ac_fn_c_check_header_compile ()
2875{
2876  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2878$as_echo_n "checking for $2... " >&6; }
2879if eval \${$3+:} false; then :
2880  $as_echo_n "(cached) " >&6
2881else
2882  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2883/* end confdefs.h.  */
2884$4
2885#include <$2>
2886_ACEOF
2887if ac_fn_c_try_compile "$LINENO"; then :
2888  eval "$3=yes"
2889else
2890  eval "$3=no"
2891fi
2892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2893fi
2894eval ac_res=\$$3
2895	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2896$as_echo "$ac_res" >&6; }
2897  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2898
2899} # ac_fn_c_check_header_compile
2900cat >config.log <<_ACEOF
2901This file contains any messages produced by compilers while
2902running configure, to aid debugging if configure makes a mistake.
2903
2904It was created by OpenJDK $as_me jdk9, which was
2905generated by GNU Autoconf 2.69.  Invocation command line was
2906
2907  $ $0 $@
2908
2909_ACEOF
2910exec 5>>config.log
2911{
2912cat <<_ASUNAME
2913## --------- ##
2914## Platform. ##
2915## --------- ##
2916
2917hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2918uname -m = `(uname -m) 2>/dev/null || echo unknown`
2919uname -r = `(uname -r) 2>/dev/null || echo unknown`
2920uname -s = `(uname -s) 2>/dev/null || echo unknown`
2921uname -v = `(uname -v) 2>/dev/null || echo unknown`
2922
2923/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2924/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2925
2926/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2927/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2928/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2929/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2930/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2931/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2932/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2933
2934_ASUNAME
2935
2936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2937for as_dir in $PATH
2938do
2939  IFS=$as_save_IFS
2940  test -z "$as_dir" && as_dir=.
2941    $as_echo "PATH: $as_dir"
2942  done
2943IFS=$as_save_IFS
2944
2945} >&5
2946
2947cat >&5 <<_ACEOF
2948
2949
2950## ----------- ##
2951## Core tests. ##
2952## ----------- ##
2953
2954_ACEOF
2955
2956
2957# Keep a trace of the command line.
2958# Strip out --no-create and --no-recursion so they do not pile up.
2959# Strip out --silent because we don't want to record it for future runs.
2960# Also quote any args containing shell meta-characters.
2961# Make two passes to allow for proper duplicate-argument suppression.
2962ac_configure_args=
2963ac_configure_args0=
2964ac_configure_args1=
2965ac_must_keep_next=false
2966for ac_pass in 1 2
2967do
2968  for ac_arg
2969  do
2970    case $ac_arg in
2971    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2972    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2973    | -silent | --silent | --silen | --sile | --sil)
2974      continue ;;
2975    *\'*)
2976      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2977    esac
2978    case $ac_pass in
2979    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2980    2)
2981      as_fn_append ac_configure_args1 " '$ac_arg'"
2982      if test $ac_must_keep_next = true; then
2983	ac_must_keep_next=false # Got value, back to normal.
2984      else
2985	case $ac_arg in
2986	  *=* | --config-cache | -C | -disable-* | --disable-* \
2987	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2988	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2989	  | -with-* | --with-* | -without-* | --without-* | --x)
2990	    case "$ac_configure_args0 " in
2991	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2992	    esac
2993	    ;;
2994	  -* ) ac_must_keep_next=true ;;
2995	esac
2996      fi
2997      as_fn_append ac_configure_args " '$ac_arg'"
2998      ;;
2999    esac
3000  done
3001done
3002{ ac_configure_args0=; unset ac_configure_args0;}
3003{ ac_configure_args1=; unset ac_configure_args1;}
3004
3005# When interrupted or exit'd, cleanup temporary files, and complete
3006# config.log.  We remove comments because anyway the quotes in there
3007# would cause problems or look ugly.
3008# WARNING: Use '\'' to represent an apostrophe within the trap.
3009# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3010trap 'exit_status=$?
3011  # Save into config.log some information that might help in debugging.
3012  {
3013    echo
3014
3015    $as_echo "## ---------------- ##
3016## Cache variables. ##
3017## ---------------- ##"
3018    echo
3019    # The following way of writing the cache mishandles newlines in values,
3020(
3021  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3022    eval ac_val=\$$ac_var
3023    case $ac_val in #(
3024    *${as_nl}*)
3025      case $ac_var in #(
3026      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3027$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3028      esac
3029      case $ac_var in #(
3030      _ | IFS | as_nl) ;; #(
3031      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3032      *) { eval $ac_var=; unset $ac_var;} ;;
3033      esac ;;
3034    esac
3035  done
3036  (set) 2>&1 |
3037    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3038    *${as_nl}ac_space=\ *)
3039      sed -n \
3040	"s/'\''/'\''\\\\'\'''\''/g;
3041	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3042      ;; #(
3043    *)
3044      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3045      ;;
3046    esac |
3047    sort
3048)
3049    echo
3050
3051    $as_echo "## ----------------- ##
3052## Output variables. ##
3053## ----------------- ##"
3054    echo
3055    for ac_var in $ac_subst_vars
3056    do
3057      eval ac_val=\$$ac_var
3058      case $ac_val in
3059      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3060      esac
3061      $as_echo "$ac_var='\''$ac_val'\''"
3062    done | sort
3063    echo
3064
3065    if test -n "$ac_subst_files"; then
3066      $as_echo "## ------------------- ##
3067## File substitutions. ##
3068## ------------------- ##"
3069      echo
3070      for ac_var in $ac_subst_files
3071      do
3072	eval ac_val=\$$ac_var
3073	case $ac_val in
3074	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3075	esac
3076	$as_echo "$ac_var='\''$ac_val'\''"
3077      done | sort
3078      echo
3079    fi
3080
3081    if test -s confdefs.h; then
3082      $as_echo "## ----------- ##
3083## confdefs.h. ##
3084## ----------- ##"
3085      echo
3086      cat confdefs.h
3087      echo
3088    fi
3089    test "$ac_signal" != 0 &&
3090      $as_echo "$as_me: caught signal $ac_signal"
3091    $as_echo "$as_me: exit $exit_status"
3092  } >&5
3093  rm -f core *.core core.conftest.* &&
3094    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3095    exit $exit_status
3096' 0
3097for ac_signal in 1 2 13 15; do
3098  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3099done
3100ac_signal=0
3101
3102# confdefs.h avoids OS command line length limits that DEFS can exceed.
3103rm -f -r conftest* confdefs.h
3104
3105$as_echo "/* confdefs.h */" > confdefs.h
3106
3107# Predefined preprocessor variables.
3108
3109cat >>confdefs.h <<_ACEOF
3110#define PACKAGE_NAME "$PACKAGE_NAME"
3111_ACEOF
3112
3113cat >>confdefs.h <<_ACEOF
3114#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3115_ACEOF
3116
3117cat >>confdefs.h <<_ACEOF
3118#define PACKAGE_VERSION "$PACKAGE_VERSION"
3119_ACEOF
3120
3121cat >>confdefs.h <<_ACEOF
3122#define PACKAGE_STRING "$PACKAGE_STRING"
3123_ACEOF
3124
3125cat >>confdefs.h <<_ACEOF
3126#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3127_ACEOF
3128
3129cat >>confdefs.h <<_ACEOF
3130#define PACKAGE_URL "$PACKAGE_URL"
3131_ACEOF
3132
3133
3134# Let the site file select an alternate cache file if it wants to.
3135# Prefer an explicitly selected file to automatically selected ones.
3136ac_site_file1=NONE
3137ac_site_file2=NONE
3138if test -n "$CONFIG_SITE"; then
3139  # We do not want a PATH search for config.site.
3140  case $CONFIG_SITE in #((
3141    -*)  ac_site_file1=./$CONFIG_SITE;;
3142    */*) ac_site_file1=$CONFIG_SITE;;
3143    *)   ac_site_file1=./$CONFIG_SITE;;
3144  esac
3145elif test "x$prefix" != xNONE; then
3146  ac_site_file1=$prefix/share/config.site
3147  ac_site_file2=$prefix/etc/config.site
3148else
3149  ac_site_file1=$ac_default_prefix/share/config.site
3150  ac_site_file2=$ac_default_prefix/etc/config.site
3151fi
3152for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3153do
3154  test "x$ac_site_file" = xNONE && continue
3155  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3156    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3157$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3158    sed 's/^/| /' "$ac_site_file" >&5
3159    . "$ac_site_file" \
3160      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3161$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3162as_fn_error $? "failed to load site script $ac_site_file
3163See \`config.log' for more details" "$LINENO" 5; }
3164  fi
3165done
3166
3167if test -r "$cache_file"; then
3168  # Some versions of bash will fail to source /dev/null (special files
3169  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3170  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3171    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3172$as_echo "$as_me: loading cache $cache_file" >&6;}
3173    case $cache_file in
3174      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3175      *)                      . "./$cache_file";;
3176    esac
3177  fi
3178else
3179  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3180$as_echo "$as_me: creating cache $cache_file" >&6;}
3181  >$cache_file
3182fi
3183
3184# Check that the precious variables saved in the cache have kept the same
3185# value.
3186ac_cache_corrupted=false
3187for ac_var in $ac_precious_vars; do
3188  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3189  eval ac_new_set=\$ac_env_${ac_var}_set
3190  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3191  eval ac_new_val=\$ac_env_${ac_var}_value
3192  case $ac_old_set,$ac_new_set in
3193    set,)
3194      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3195$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3196      ac_cache_corrupted=: ;;
3197    ,set)
3198      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3199$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3200      ac_cache_corrupted=: ;;
3201    ,);;
3202    *)
3203      if test "x$ac_old_val" != "x$ac_new_val"; then
3204	# differences in whitespace do not lead to failure.
3205	ac_old_val_w=`echo x $ac_old_val`
3206	ac_new_val_w=`echo x $ac_new_val`
3207	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3208	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3209$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3210	  ac_cache_corrupted=:
3211	else
3212	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3213$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3214	  eval $ac_var=\$ac_old_val
3215	fi
3216	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3217$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3218	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3219$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3220      fi;;
3221  esac
3222  # Pass precious variables to config.status.
3223  if test "$ac_new_set" = set; then
3224    case $ac_new_val in
3225    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3226    *) ac_arg=$ac_var=$ac_new_val ;;
3227    esac
3228    case " $ac_configure_args " in
3229      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3230      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3231    esac
3232  fi
3233done
3234if $ac_cache_corrupted; then
3235  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3236$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3237  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3238$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3239  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3240fi
3241## -------------------- ##
3242## Main body of script. ##
3243## -------------------- ##
3244
3245ac_ext=c
3246ac_cpp='$CPP $CPPFLAGS'
3247ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3248ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3249ac_compiler_gnu=$ac_cv_c_compiler_gnu
3250
3251
3252
3253ac_aux_dir=
3254for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3255  if test -f "$ac_dir/install-sh"; then
3256    ac_aux_dir=$ac_dir
3257    ac_install_sh="$ac_aux_dir/install-sh -c"
3258    break
3259  elif test -f "$ac_dir/install.sh"; then
3260    ac_aux_dir=$ac_dir
3261    ac_install_sh="$ac_aux_dir/install.sh -c"
3262    break
3263  elif test -f "$ac_dir/shtool"; then
3264    ac_aux_dir=$ac_dir
3265    ac_install_sh="$ac_aux_dir/shtool install -c"
3266    break
3267  fi
3268done
3269if test -z "$ac_aux_dir"; then
3270  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
3271fi
3272
3273# These three variables are undocumented and unsupported,
3274# and are intended to be withdrawn in a future Autoconf release.
3275# They can cause serious problems if a builder's source tree is in a directory
3276# whose full name contains unusual characters.
3277ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3278ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3279ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3280
3281
3282# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3283
3284#
3285# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3286# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3287#
3288# This code is free software; you can redistribute it and/or modify it
3289# under the terms of the GNU General Public License version 2 only, as
3290# published by the Free Software Foundation.  Oracle designates this
3291# particular file as subject to the "Classpath" exception as provided
3292# by Oracle in the LICENSE file that accompanied this code.
3293#
3294# This code is distributed in the hope that it will be useful, but WITHOUT
3295# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3296# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3297# version 2 for more details (a copy is included in the LICENSE file that
3298# accompanied this code).
3299#
3300# You should have received a copy of the GNU General Public License version
3301# 2 along with this work; if not, write to the Free Software Foundation,
3302# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3303#
3304# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3305# or visit www.oracle.com if you need additional information or have any
3306# questions.
3307#
3308
3309#
3310# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3311#
3312# This program is free software; you can redistribute it and/or modify
3313# it under the terms of the GNU General Public License as published by
3314# the Free Software Foundation; either version 2 of the License, or
3315# (at your option) any later version.
3316#
3317# This program is distributed in the hope that it will be useful, but
3318# WITHOUT ANY WARRANTY; without even the implied warranty of
3319# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3320# General Public License for more details.
3321#
3322# You should have received a copy of the GNU General Public License
3323# along with this program; if not, write to the Free Software
3324# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3325#
3326# As a special exception to the GNU General Public License, if you
3327# distribute this file as part of a program that contains a
3328# configuration script generated by Autoconf, you may include it under
3329# the same distribution terms that you use for the rest of that program.
3330
3331# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3332# ----------------------------------
3333# PKG_PROG_PKG_CONFIG
3334
3335# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3336#
3337# Check to see whether a particular set of modules exists.  Similar
3338# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3339#
3340#
3341# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3342# this or PKG_CHECK_MODULES is called, or make sure to call
3343# PKG_CHECK_EXISTS manually
3344# --------------------------------------------------------------
3345
3346
3347
3348# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3349# ---------------------------------------------
3350# _PKG_CONFIG
3351
3352# _PKG_SHORT_ERRORS_SUPPORTED
3353# -----------------------------
3354# _PKG_SHORT_ERRORS_SUPPORTED
3355
3356
3357# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3358# [ACTION-IF-NOT-FOUND])
3359#
3360#
3361# Note that if there is a possibility the first call to
3362# PKG_CHECK_MODULES might not happen, you should be sure to include an
3363# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3364#
3365#
3366# --------------------------------------------------------------
3367# PKG_CHECK_MODULES
3368
3369
3370# Include these first...
3371#
3372# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3373# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3374#
3375# This code is free software; you can redistribute it and/or modify it
3376# under the terms of the GNU General Public License version 2 only, as
3377# published by the Free Software Foundation.  Oracle designates this
3378# particular file as subject to the "Classpath" exception as provided
3379# by Oracle in the LICENSE file that accompanied this code.
3380#
3381# This code is distributed in the hope that it will be useful, but WITHOUT
3382# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3383# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3384# version 2 for more details (a copy is included in the LICENSE file that
3385# accompanied this code).
3386#
3387# You should have received a copy of the GNU General Public License version
3388# 2 along with this work; if not, write to the Free Software Foundation,
3389# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3390#
3391# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3392# or visit www.oracle.com if you need additional information or have any
3393# questions.
3394#
3395
3396# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3397# If so, then append $1 to $2 \
3398# Also set JVM_ARG_OK to true/false depending on outcome.
3399
3400
3401# Appends a string to a path variable, only adding the : when needed.
3402
3403
3404# Prepends a string to a path variable, only adding the : when needed.
3405
3406
3407# This will make sure the given variable points to a full and proper
3408# path. This means:
3409# 1) There will be no spaces in the path. On posix platforms,
3410#    spaces in the path will result in an error. On Windows,
3411#    the path will be rewritten using short-style to be space-free.
3412# 2) The path will be absolute, and it will be in unix-style (on
3413#     cygwin).
3414# $1: The name of the variable to fix
3415
3416
3417# This will make sure the given variable points to a executable
3418# with a full and proper path. This means:
3419# 1) There will be no spaces in the path. On posix platforms,
3420#    spaces in the path will result in an error. On Windows,
3421#    the path will be rewritten using short-style to be space-free.
3422# 2) The path will be absolute, and it will be in unix-style (on
3423#     cygwin).
3424# Any arguments given to the executable is preserved.
3425# If the input variable does not have a directory specification, then
3426# it need to be in the PATH.
3427# $1: The name of the variable to fix
3428
3429
3430
3431
3432# Register a --with argument but mark it as deprecated
3433# $1: The name of the with argument to deprecate, not including --with-
3434
3435
3436# Register a --enable argument but mark it as deprecated
3437# $1: The name of the with argument to deprecate, not including --enable-
3438# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3439
3440
3441
3442
3443# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3444# $1: variable to check
3445
3446
3447# Check that there are no unprocessed overridden variables left.
3448# If so, they are an incorrect argument and we will exit with an error.
3449
3450
3451# Setup a tool for the given variable. If correctly specified by the user,
3452# use that value, otherwise search for the tool using the supplied code snippet.
3453# $1: variable to set
3454# $2: code snippet to call to look for the tool
3455
3456
3457# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3458# $1: variable to set
3459# $2: executable name (or list of names) to look for
3460
3461
3462# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3463# $1: variable to set
3464# $2: executable name (or list of names) to look for
3465
3466
3467# Like BASIC_PATH_PROGS but fails if no tool was found.
3468# $1: variable to set
3469# $2: executable name (or list of names) to look for
3470
3471
3472# Like BASIC_SETUP_TOOL but fails if no tool was found.
3473# $1: variable to set
3474# $2: autoconf macro to call to look for the special tool
3475
3476
3477# Setup the most fundamental tools that relies on not much else to set up,
3478# but is used by much of the early bootstrap code.
3479
3480
3481# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491#%%% Simple tools %%%
3492
3493# Check if we have found a usable version of make
3494# $1: the path to a potential make binary (or empty)
3495# $2: the description on how we found this
3496
3497
3498
3499
3500# Goes looking for a usable version of GNU make.
3501
3502
3503
3504
3505
3506
3507# Check if build directory is on local disk. If not possible to determine,
3508# we prefer to claim it's local.
3509# Argument 1: directory to test
3510# Argument 2: what to do if it is on local disk
3511# Argument 3: what to do otherwise (remote disk or failure)
3512
3513
3514# Check that source files have basic read permissions set. This might
3515# not be the case in cygwin in certain conditions.
3516
3517
3518
3519
3520#
3521# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3522# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3523#
3524# This code is free software; you can redistribute it and/or modify it
3525# under the terms of the GNU General Public License version 2 only, as
3526# published by the Free Software Foundation.  Oracle designates this
3527# particular file as subject to the "Classpath" exception as provided
3528# by Oracle in the LICENSE file that accompanied this code.
3529#
3530# This code is distributed in the hope that it will be useful, but WITHOUT
3531# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3532# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3533# version 2 for more details (a copy is included in the LICENSE file that
3534# accompanied this code).
3535#
3536# You should have received a copy of the GNU General Public License version
3537# 2 along with this work; if not, write to the Free Software Foundation,
3538# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3539#
3540# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3541# or visit www.oracle.com if you need additional information or have any
3542# questions.
3543#
3544
3545
3546
3547
3548
3549# Helper function which possibly converts a path using DOS-style short mode.
3550# If so, the updated path is stored in $new_path.
3551# $1: The path to check
3552
3553
3554# Helper function which possibly converts a path using DOS-style short mode.
3555# If so, the updated path is stored in $new_path.
3556# $1: The path to check
3557
3558
3559# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3560# and could probably be heavily simplified. However, all changes in this
3561# area tend to need lot of testing in different scenarios, and in lack of
3562# proper unit testing, cleaning this up has not been deemed worth the effort
3563# at the moment.
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3574
3575
3576
3577
3578#
3579# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3580# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3581#
3582# This code is free software; you can redistribute it and/or modify it
3583# under the terms of the GNU General Public License version 2 only, as
3584# published by the Free Software Foundation.  Oracle designates this
3585# particular file as subject to the "Classpath" exception as provided
3586# by Oracle in the LICENSE file that accompanied this code.
3587#
3588# This code is distributed in the hope that it will be useful, but WITHOUT
3589# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3590# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3591# version 2 for more details (a copy is included in the LICENSE file that
3592# accompanied this code).
3593#
3594# You should have received a copy of the GNU General Public License version
3595# 2 along with this work; if not, write to the Free Software Foundation,
3596# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3597#
3598# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3599# or visit www.oracle.com if you need additional information or have any
3600# questions.
3601#
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613# ... then the rest
3614#
3615# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3616# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3617#
3618# This code is free software; you can redistribute it and/or modify it
3619# under the terms of the GNU General Public License version 2 only, as
3620# published by the Free Software Foundation.  Oracle designates this
3621# particular file as subject to the "Classpath" exception as provided
3622# by Oracle in the LICENSE file that accompanied this code.
3623#
3624# This code is distributed in the hope that it will be useful, but WITHOUT
3625# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3626# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3627# version 2 for more details (a copy is included in the LICENSE file that
3628# accompanied this code).
3629#
3630# You should have received a copy of the GNU General Public License version
3631# 2 along with this work; if not, write to the Free Software Foundation,
3632# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3633#
3634# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3635# or visit www.oracle.com if you need additional information or have any
3636# questions.
3637#
3638
3639########################################################################
3640# This file handles detection of the Boot JDK. The Boot JDK detection
3641# process has been developed as a response to solve a complex real-world
3642# problem. Initially, it was simple, but it has grown as platform after
3643# platform, idiosyncracy after idiosyncracy has been supported.
3644#
3645# The basic idea is this:
3646# 1) You need an acceptable *) JDK to use as a Boot JDK
3647# 2) There are several ways to locate a JDK, that are mostly platform
3648#    dependent **)
3649# 3) You can have multiple JDKs installed
3650# 4) If possible, configure should try to dig out an acceptable JDK
3651#    automatically, without having to resort to command-line options
3652#
3653# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3654#     javac) and not a JRE, etc.
3655#
3656# **) On Windows we typically use a well-known path.
3657#     On MacOSX we typically use the tool java_home.
3658#     On Linux we typically find javac in the $PATH, and then follow a
3659#     chain of symlinks that often ends up in a real JDK.
3660#
3661# This leads to the code where we check in different ways to locate a
3662# JDK, and if one is found, check if it is acceptable. If not, we print
3663# our reasons for rejecting it (useful when debugging non-working
3664# configure situations) and continue checking the next one.
3665########################################################################
3666
3667# Execute the check given as argument, and verify the result
3668# If the Boot JDK was previously found, do nothing
3669# $1 A command line (typically autoconf macro) to execute
3670
3671
3672# Test: Is bootjdk explicitely set by command line arguments?
3673
3674
3675# Test: Is bootjdk available from builddeps?
3676
3677
3678# Test: Is $JAVA_HOME set?
3679
3680
3681# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3682
3683
3684# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3685# $1: Argument to the java_home binary (optional)
3686
3687
3688# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3689
3690
3691# Look for a jdk in the given path. If there are multiple, try to select the newest.
3692# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3693# $1 = Path to directory containing jdk installations.
3694# $2 = String to append to the found JDK directory to get the proper JDK home
3695
3696
3697# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3698# environmental variable as base for where to look.
3699# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3700
3701
3702# Test: Is there a JDK installed in default, well-known locations?
3703
3704
3705# Check that a command-line tool in the Boot JDK is correct
3706# $1 = name of variable to assign
3707# $2 = name of binary
3708
3709
3710###############################################################################
3711#
3712# We need a Boot JDK to bootstrap the build.
3713#
3714
3715
3716
3717
3718
3719#
3720# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3721# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3722#
3723# This code is free software; you can redistribute it and/or modify it
3724# under the terms of the GNU General Public License version 2 only, as
3725# published by the Free Software Foundation.  Oracle designates this
3726# particular file as subject to the "Classpath" exception as provided
3727# by Oracle in the LICENSE file that accompanied this code.
3728#
3729# This code is distributed in the hope that it will be useful, but WITHOUT
3730# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3731# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3732# version 2 for more details (a copy is included in the LICENSE file that
3733# accompanied this code).
3734#
3735# You should have received a copy of the GNU General Public License version
3736# 2 along with this work; if not, write to the Free Software Foundation,
3737# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3738#
3739# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3740# or visit www.oracle.com if you need additional information or have any
3741# questions.
3742#
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
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
3792# Documentation on common flags used for solstudio in HIGHEST.
3793#
3794# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3795#          done with care, there are some assumptions below that need to
3796#          be understood about the use of pointers, and IEEE behavior.
3797#
3798# -fns: Use non-standard floating point mode (not IEEE 754)
3799# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3800# -fsingle: Use single precision floating point with 'float'
3801# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3802#   (Source with excessing pointer casting and data access with mixed
3803#    pointer types are not recommended)
3804# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3805#   (If you expect perfect errno behavior, do not use this)
3806# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3807# -xrestrict: Pointer parameters to functions do not overlap
3808#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3809#    If you pass in multiple pointers to the same data, do not use this)
3810# -xlibmil: Inline some library routines
3811#   (If you expect perfect errno behavior, do not use this)
3812# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3813#   (If you expect perfect errno behavior, do not use this)
3814#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3815
3816    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3817    # Bug?
3818    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3819    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3820    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3821    #fi
3822
3823
3824
3825
3826
3827# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3828#                                   [RUN-IF-FALSE])
3829# ------------------------------------------------------------
3830# Check that the c and c++ compilers support an argument
3831
3832
3833# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3834#                                    [RUN-IF-FALSE])
3835# ------------------------------------------------------------
3836# Check that the linker support an argument
3837
3838
3839
3840
3841#
3842# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3843# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3844#
3845# This code is free software; you can redistribute it and/or modify it
3846# under the terms of the GNU General Public License version 2 only, as
3847# published by the Free Software Foundation.  Oracle designates this
3848# particular file as subject to the "Classpath" exception as provided
3849# by Oracle in the LICENSE file that accompanied this code.
3850#
3851# This code is distributed in the hope that it will be useful, but WITHOUT
3852# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3853# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3854# version 2 for more details (a copy is included in the LICENSE file that
3855# accompanied this code).
3856#
3857# You should have received a copy of the GNU General Public License version
3858# 2 along with this work; if not, write to the Free Software Foundation,
3859# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3860#
3861# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3862# or visit www.oracle.com if you need additional information or have any
3863# questions.
3864#
3865
3866
3867
3868
3869
3870cygwin_help() {
3871  case $1 in
3872    unzip)
3873      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3874      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3875      ;;
3876    zip)
3877      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3878      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3879      ;;
3880    make)
3881      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3882      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3883      ;;
3884    freetype)
3885      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3886        HELP_MSG="To install freetype, run:
3887wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3888chmod +x /tmp/freetype-setup.exe
3889/tmp/freetype-setup.exe
3890Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3891After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3892      else
3893        HELP_MSG="You need to build a 64-bit version of freetype.
3894This is not readily available.
3895You can find source code and build instructions on
3896http://www.freetype.org/
3897If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3898      fi
3899      ;;
3900  esac
3901}
3902
3903msys_help() {
3904  PKGHANDLER_COMMAND=""
3905}
3906
3907apt_help() {
3908  case $1 in
3909    devkit)
3910      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3911    openjdk)
3912      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3913    alsa)
3914      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3915    cups)
3916      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3917    freetype)
3918      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3919    pulse)
3920      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3921    x11)
3922      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3923    ccache)
3924      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3925  esac
3926}
3927
3928yum_help() {
3929  case $1 in
3930    devkit)
3931      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3932    openjdk)
3933      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3934    alsa)
3935      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3936    cups)
3937      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3938    freetype)
3939      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3940    pulse)
3941      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3942    x11)
3943      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3944    ccache)
3945      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3946  esac
3947}
3948
3949port_help() {
3950  PKGHANDLER_COMMAND=""
3951}
3952
3953pkgutil_help() {
3954  PKGHANDLER_COMMAND=""
3955}
3956
3957pkgadd_help() {
3958  PKGHANDLER_COMMAND=""
3959}
3960
3961# This function will check if we're called from the "configure" wrapper while
3962# printing --help. If so, we will print out additional information that can
3963# only be extracted within the autoconf script, and then exit. This must be
3964# called at the very beginning in configure.ac.
3965
3966
3967
3968
3969#
3970# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3971# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3972#
3973# This code is free software; you can redistribute it and/or modify it
3974# under the terms of the GNU General Public License version 2 only, as
3975# published by the Free Software Foundation.  Oracle designates this
3976# particular file as subject to the "Classpath" exception as provided
3977# by Oracle in the LICENSE file that accompanied this code.
3978#
3979# This code is distributed in the hope that it will be useful, but WITHOUT
3980# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3981# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3982# version 2 for more details (a copy is included in the LICENSE file that
3983# accompanied this code).
3984#
3985# You should have received a copy of the GNU General Public License version
3986# 2 along with this work; if not, write to the Free Software Foundation,
3987# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3988#
3989# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3990# or visit www.oracle.com if you need additional information or have any
3991# questions.
3992#
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003###############################################################################
4004#
4005# Should we build only OpenJDK even if closed sources are present?
4006#
4007
4008
4009
4010
4011###############################################################################
4012#
4013# Setup version numbers
4014#
4015
4016
4017
4018
4019
4020
4021#
4022# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4023# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4024#
4025# This code is free software; you can redistribute it and/or modify it
4026# under the terms of the GNU General Public License version 2 only, as
4027# published by the Free Software Foundation.  Oracle designates this
4028# particular file as subject to the "Classpath" exception as provided
4029# by Oracle in the LICENSE file that accompanied this code.
4030#
4031# This code is distributed in the hope that it will be useful, but WITHOUT
4032# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4033# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4034# version 2 for more details (a copy is included in the LICENSE file that
4035# accompanied this code).
4036#
4037# You should have received a copy of the GNU General Public License version
4038# 2 along with this work; if not, write to the Free Software Foundation,
4039# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4040#
4041# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4042# or visit www.oracle.com if you need additional information or have any
4043# questions.
4044#
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064#
4065# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4066# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4067#
4068# This code is free software; you can redistribute it and/or modify it
4069# under the terms of the GNU General Public License version 2 only, as
4070# published by the Free Software Foundation.  Oracle designates this
4071# particular file as subject to the "Classpath" exception as provided
4072# by Oracle in the LICENSE file that accompanied this code.
4073#
4074# This code is distributed in the hope that it will be useful, but WITHOUT
4075# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4076# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4077# version 2 for more details (a copy is included in the LICENSE file that
4078# accompanied this code).
4079#
4080# You should have received a copy of the GNU General Public License version
4081# 2 along with this work; if not, write to the Free Software Foundation,
4082# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4083#
4084# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4085# or visit www.oracle.com if you need additional information or have any
4086# questions.
4087#
4088
4089# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4090# Converts autoconf style CPU name to OpenJDK style, into
4091# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4092
4093
4094# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4095# Converts autoconf style OS name to OpenJDK style, into
4096# VAR_OS and VAR_OS_API.
4097
4098
4099# Expects $host_os $host_cpu $build_os and $build_cpu
4100# and $with_target_bits to have been setup!
4101#
4102# Translate the standard triplet(quadruplet) definition
4103# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4104# OPENJDK_BUILD_OS, etc.
4105
4106
4107# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4108# accordingly. Must be done after setting up build and target system, but before
4109# doing anything else with these values.
4110
4111
4112# Setup the legacy variables, for controlling the old makefiles.
4113#
4114
4115
4116
4117
4118#%%% Build and target systems %%%
4119
4120
4121
4122
4123# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4124# Add -mX to various FLAGS variables.
4125
4126
4127
4128
4129
4130
4131#
4132# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4133# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4134#
4135# This code is free software; you can redistribute it and/or modify it
4136# under the terms of the GNU General Public License version 2 only, as
4137# published by the Free Software Foundation.  Oracle designates this
4138# particular file as subject to the "Classpath" exception as provided
4139# by Oracle in the LICENSE file that accompanied this code.
4140#
4141# This code is distributed in the hope that it will be useful, but WITHOUT
4142# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4143# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4144# version 2 for more details (a copy is included in the LICENSE file that
4145# accompanied this code).
4146#
4147# You should have received a copy of the GNU General Public License version
4148# 2 along with this work; if not, write to the Free Software Foundation,
4149# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4150#
4151# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4152# or visit www.oracle.com if you need additional information or have any
4153# questions.
4154#
4155
4156
4157
4158
4159
4160
4161
4162
4163#
4164# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4165# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4166#
4167# This code is free software; you can redistribute it and/or modify it
4168# under the terms of the GNU General Public License version 2 only, as
4169# published by the Free Software Foundation.  Oracle designates this
4170# particular file as subject to the "Classpath" exception as provided
4171# by Oracle in the LICENSE file that accompanied this code.
4172#
4173# This code is distributed in the hope that it will be useful, but WITHOUT
4174# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4175# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4176# version 2 for more details (a copy is included in the LICENSE file that
4177# accompanied this code).
4178#
4179# You should have received a copy of the GNU General Public License version
4180# 2 along with this work; if not, write to the Free Software Foundation,
4181# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4182#
4183# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4184# or visit www.oracle.com if you need additional information or have any
4185# questions.
4186#
4187
4188########################################################################
4189# This file is responsible for detecting, verifying and setting up the
4190# toolchain, i.e. the compiler, linker and related utilities. It will setup
4191# proper paths to the binaries, but it will not setup any flags.
4192#
4193# The binaries used is determined by the toolchain type, which is the family of
4194# compilers and related tools that are used.
4195########################################################################
4196
4197
4198# All valid toolchains, regardless of platform (used by help.m4)
4199VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4200
4201# These toolchains are valid on different platforms
4202VALID_TOOLCHAINS_linux="gcc clang"
4203VALID_TOOLCHAINS_solaris="solstudio"
4204VALID_TOOLCHAINS_macosx="gcc clang"
4205VALID_TOOLCHAINS_aix="xlc"
4206VALID_TOOLCHAINS_windows="microsoft"
4207
4208# Toolchain descriptions
4209TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4210TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4211TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4212TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4213TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4214
4215# Setup a number of variables describing how native output files are
4216# named on this platform/toolchain.
4217
4218
4219# Determine which toolchain type to use, and make sure it is valid for this
4220# platform. Setup various information about the selected toolchain.
4221
4222
4223# Before we start detecting the toolchain executables, we might need some
4224# special setup, e.g. additional paths etc.
4225
4226
4227# Restore path, etc
4228
4229
4230# Check if a compiler is of the toolchain type we expect, and save the version
4231# information from it. If the compiler does not match the expected type,
4232# this function will abort using AC_MSG_ERROR. If it matches, the version will
4233# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4234# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4235#
4236# $1 = compiler to test (CC or CXX)
4237# $2 = human readable name of compiler (C or C++)
4238
4239
4240# Try to locate the given C or C++ compiler in the path, or otherwise.
4241#
4242# $1 = compiler to test (CC or CXX)
4243# $2 = human readable name of compiler (C or C++)
4244# $3 = list of compiler names to search for
4245
4246
4247# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4248# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4249# archiver (AR). Verify that the compilers are correct according to the
4250# toolchain type.
4251
4252
4253# Setup additional tools that is considered a part of the toolchain, but not the
4254# core part. Many of these are highly platform-specific and do not exist,
4255# and/or are not needed on all platforms.
4256
4257
4258# Setup the build tools (i.e, the compiler and linker used to build programs
4259# that should be run on the build platform, not the target platform, as a build
4260# helper). Since the non-cross-compile case uses the normal, target compilers
4261# for this, we can only do this after these have been setup.
4262
4263
4264# Setup legacy variables that are still needed as alternative ways to refer to
4265# parts of the toolchain.
4266
4267
4268# Do some additional checks on the detected tools.
4269
4270
4271# Setup the JTReg Regression Test Harness.
4272
4273
4274#
4275# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4276# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4277#
4278# This code is free software; you can redistribute it and/or modify it
4279# under the terms of the GNU General Public License version 2 only, as
4280# published by the Free Software Foundation.  Oracle designates this
4281# particular file as subject to the "Classpath" exception as provided
4282# by Oracle in the LICENSE file that accompanied this code.
4283#
4284# This code is distributed in the hope that it will be useful, but WITHOUT
4285# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4286# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4287# version 2 for more details (a copy is included in the LICENSE file that
4288# accompanied this code).
4289#
4290# You should have received a copy of the GNU General Public License version
4291# 2 along with this work; if not, write to the Free Software Foundation,
4292# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4293#
4294# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4295# or visit www.oracle.com if you need additional information or have any
4296# questions.
4297#
4298
4299
4300
4301
4302
4303
4304
4305# Check if the VS env variables were setup prior to running configure.
4306# If not, then find vcvarsall.bat and run it automatically, and integrate
4307# the set env variables into the spec file.
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318# This line needs to be here, verbatim, after all includes and the dummy hook
4319# definitions. It is replaced with custom functionality when building
4320# custom sources.
4321#CUSTOM_AUTOCONF_INCLUDE
4322
4323# Do not change or remove the following line, it is needed for consistency checks:
4324DATE_WHEN_GENERATED=1408448519
4325
4326###############################################################################
4327#
4328# Initialization / Boot-strapping
4329#
4330# The bootstrapping process needs to solve the "chicken or the egg" problem,
4331# thus it jumps back and forth, each time gaining something needed later on.
4332#
4333###############################################################################
4334
4335# If we are requested to print additional help, do that and then exit.
4336# This must be the very first call.
4337
4338  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4339    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4340    $PRINTF "Which are valid to use depends on the build platform.\n"
4341    for toolchain in $VALID_TOOLCHAINS_all; do
4342      # Use indirect variable referencing
4343      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4344      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4345      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4346    done
4347
4348    # And now exit directly
4349    exit 0
4350  fi
4351
4352
4353# Basic initialization that must happen first of all in the normal process.
4354
4355  # Save the original command line. This is passed to us by the wrapper configure script.
4356
4357  DATE_WHEN_CONFIGURED=`LANG=C date`
4358
4359  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4360$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4361  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4362$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4363
4364
4365  # Start with tools that do not need have cross compilation support
4366  # and can be expected to be found in the default PATH. These tools are
4367  # used by configure. Nor are these tools expected to be found in the
4368  # devkit from the builddeps server either, since they are
4369  # needed to download the devkit.
4370
4371  # First are all the simple required tools.
4372
4373
4374
4375  # Publish this variable in the help.
4376
4377
4378  if test "x$BASENAME" = x; then
4379    # The variable is not set by user, try to locate tool using the code snippet
4380    for ac_prog in basename
4381do
4382  # Extract the first word of "$ac_prog", so it can be a program name with args.
4383set dummy $ac_prog; ac_word=$2
4384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4385$as_echo_n "checking for $ac_word... " >&6; }
4386if ${ac_cv_path_BASENAME+:} false; then :
4387  $as_echo_n "(cached) " >&6
4388else
4389  case $BASENAME in
4390  [\\/]* | ?:[\\/]*)
4391  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4392  ;;
4393  *)
4394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4395for as_dir in $PATH
4396do
4397  IFS=$as_save_IFS
4398  test -z "$as_dir" && as_dir=.
4399    for ac_exec_ext in '' $ac_executable_extensions; do
4400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4401    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4403    break 2
4404  fi
4405done
4406  done
4407IFS=$as_save_IFS
4408
4409  ;;
4410esac
4411fi
4412BASENAME=$ac_cv_path_BASENAME
4413if test -n "$BASENAME"; then
4414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4415$as_echo "$BASENAME" >&6; }
4416else
4417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4418$as_echo "no" >&6; }
4419fi
4420
4421
4422  test -n "$BASENAME" && break
4423done
4424
4425  else
4426    # The variable is set, but is it from the command line or the environment?
4427
4428    # Try to remove the string !BASENAME! from our list.
4429    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4430    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4431      # If it failed, the variable was not from the command line. Ignore it,
4432      # but warn the user (except for BASH, which is always set by the calling BASH).
4433      if test "xBASENAME" != xBASH; then
4434        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4435$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4436      fi
4437      # Try to locate tool using the code snippet
4438      for ac_prog in basename
4439do
4440  # Extract the first word of "$ac_prog", so it can be a program name with args.
4441set dummy $ac_prog; ac_word=$2
4442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4443$as_echo_n "checking for $ac_word... " >&6; }
4444if ${ac_cv_path_BASENAME+:} false; then :
4445  $as_echo_n "(cached) " >&6
4446else
4447  case $BASENAME in
4448  [\\/]* | ?:[\\/]*)
4449  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4450  ;;
4451  *)
4452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4453for as_dir in $PATH
4454do
4455  IFS=$as_save_IFS
4456  test -z "$as_dir" && as_dir=.
4457    for ac_exec_ext in '' $ac_executable_extensions; do
4458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4459    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4461    break 2
4462  fi
4463done
4464  done
4465IFS=$as_save_IFS
4466
4467  ;;
4468esac
4469fi
4470BASENAME=$ac_cv_path_BASENAME
4471if test -n "$BASENAME"; then
4472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4473$as_echo "$BASENAME" >&6; }
4474else
4475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4476$as_echo "no" >&6; }
4477fi
4478
4479
4480  test -n "$BASENAME" && break
4481done
4482
4483    else
4484      # If it succeeded, then it was overridden by the user. We will use it
4485      # for the tool.
4486
4487      # First remove it from the list of overridden variables, so we can test
4488      # for unknown variables in the end.
4489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4490
4491      # Check if the provided tool contains a complete path.
4492      tool_specified="$BASENAME"
4493      tool_basename="${tool_specified##*/}"
4494      if test "x$tool_basename" = "x$tool_specified"; then
4495        # A command without a complete path is provided, search $PATH.
4496        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4497$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4498        # Extract the first word of "$tool_basename", so it can be a program name with args.
4499set dummy $tool_basename; ac_word=$2
4500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4501$as_echo_n "checking for $ac_word... " >&6; }
4502if ${ac_cv_path_BASENAME+:} false; then :
4503  $as_echo_n "(cached) " >&6
4504else
4505  case $BASENAME in
4506  [\\/]* | ?:[\\/]*)
4507  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4508  ;;
4509  *)
4510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4511for as_dir in $PATH
4512do
4513  IFS=$as_save_IFS
4514  test -z "$as_dir" && as_dir=.
4515    for ac_exec_ext in '' $ac_executable_extensions; do
4516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4517    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4519    break 2
4520  fi
4521done
4522  done
4523IFS=$as_save_IFS
4524
4525  ;;
4526esac
4527fi
4528BASENAME=$ac_cv_path_BASENAME
4529if test -n "$BASENAME"; then
4530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4531$as_echo "$BASENAME" >&6; }
4532else
4533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4534$as_echo "no" >&6; }
4535fi
4536
4537
4538        if test "x$BASENAME" = x; then
4539          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4540        fi
4541      else
4542        # Otherwise we believe it is a complete path. Use it as it is.
4543        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4544$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4545        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4546$as_echo_n "checking for BASENAME... " >&6; }
4547        if test ! -x "$tool_specified"; then
4548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4549$as_echo "not found" >&6; }
4550          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4551        fi
4552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4553$as_echo "$tool_specified" >&6; }
4554      fi
4555    fi
4556  fi
4557
4558
4559
4560  if test "x$BASENAME" = x; then
4561    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4562  fi
4563
4564
4565
4566
4567
4568  # Publish this variable in the help.
4569
4570
4571  if test "x$BASH" = x; then
4572    # The variable is not set by user, try to locate tool using the code snippet
4573    for ac_prog in bash
4574do
4575  # Extract the first word of "$ac_prog", so it can be a program name with args.
4576set dummy $ac_prog; ac_word=$2
4577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4578$as_echo_n "checking for $ac_word... " >&6; }
4579if ${ac_cv_path_BASH+:} false; then :
4580  $as_echo_n "(cached) " >&6
4581else
4582  case $BASH in
4583  [\\/]* | ?:[\\/]*)
4584  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4585  ;;
4586  *)
4587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4588for as_dir in $PATH
4589do
4590  IFS=$as_save_IFS
4591  test -z "$as_dir" && as_dir=.
4592    for ac_exec_ext in '' $ac_executable_extensions; do
4593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4594    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4596    break 2
4597  fi
4598done
4599  done
4600IFS=$as_save_IFS
4601
4602  ;;
4603esac
4604fi
4605BASH=$ac_cv_path_BASH
4606if test -n "$BASH"; then
4607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4608$as_echo "$BASH" >&6; }
4609else
4610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4611$as_echo "no" >&6; }
4612fi
4613
4614
4615  test -n "$BASH" && break
4616done
4617
4618  else
4619    # The variable is set, but is it from the command line or the environment?
4620
4621    # Try to remove the string !BASH! from our list.
4622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4624      # If it failed, the variable was not from the command line. Ignore it,
4625      # but warn the user (except for BASH, which is always set by the calling BASH).
4626      if test "xBASH" != xBASH; then
4627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4628$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4629      fi
4630      # Try to locate tool using the code snippet
4631      for ac_prog in bash
4632do
4633  # Extract the first word of "$ac_prog", so it can be a program name with args.
4634set dummy $ac_prog; ac_word=$2
4635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4636$as_echo_n "checking for $ac_word... " >&6; }
4637if ${ac_cv_path_BASH+:} false; then :
4638  $as_echo_n "(cached) " >&6
4639else
4640  case $BASH in
4641  [\\/]* | ?:[\\/]*)
4642  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4643  ;;
4644  *)
4645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4646for as_dir in $PATH
4647do
4648  IFS=$as_save_IFS
4649  test -z "$as_dir" && as_dir=.
4650    for ac_exec_ext in '' $ac_executable_extensions; do
4651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4652    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4654    break 2
4655  fi
4656done
4657  done
4658IFS=$as_save_IFS
4659
4660  ;;
4661esac
4662fi
4663BASH=$ac_cv_path_BASH
4664if test -n "$BASH"; then
4665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4666$as_echo "$BASH" >&6; }
4667else
4668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4669$as_echo "no" >&6; }
4670fi
4671
4672
4673  test -n "$BASH" && break
4674done
4675
4676    else
4677      # If it succeeded, then it was overridden by the user. We will use it
4678      # for the tool.
4679
4680      # First remove it from the list of overridden variables, so we can test
4681      # for unknown variables in the end.
4682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4683
4684      # Check if the provided tool contains a complete path.
4685      tool_specified="$BASH"
4686      tool_basename="${tool_specified##*/}"
4687      if test "x$tool_basename" = "x$tool_specified"; then
4688        # A command without a complete path is provided, search $PATH.
4689        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4690$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4691        # Extract the first word of "$tool_basename", so it can be a program name with args.
4692set dummy $tool_basename; ac_word=$2
4693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4694$as_echo_n "checking for $ac_word... " >&6; }
4695if ${ac_cv_path_BASH+:} false; then :
4696  $as_echo_n "(cached) " >&6
4697else
4698  case $BASH in
4699  [\\/]* | ?:[\\/]*)
4700  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4701  ;;
4702  *)
4703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4704for as_dir in $PATH
4705do
4706  IFS=$as_save_IFS
4707  test -z "$as_dir" && as_dir=.
4708    for ac_exec_ext in '' $ac_executable_extensions; do
4709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4710    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4712    break 2
4713  fi
4714done
4715  done
4716IFS=$as_save_IFS
4717
4718  ;;
4719esac
4720fi
4721BASH=$ac_cv_path_BASH
4722if test -n "$BASH"; then
4723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4724$as_echo "$BASH" >&6; }
4725else
4726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4727$as_echo "no" >&6; }
4728fi
4729
4730
4731        if test "x$BASH" = x; then
4732          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4733        fi
4734      else
4735        # Otherwise we believe it is a complete path. Use it as it is.
4736        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4737$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4738        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4739$as_echo_n "checking for BASH... " >&6; }
4740        if test ! -x "$tool_specified"; then
4741          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4742$as_echo "not found" >&6; }
4743          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4744        fi
4745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4746$as_echo "$tool_specified" >&6; }
4747      fi
4748    fi
4749  fi
4750
4751
4752
4753  if test "x$BASH" = x; then
4754    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4755  fi
4756
4757
4758
4759
4760
4761  # Publish this variable in the help.
4762
4763
4764  if test "x$CAT" = x; then
4765    # The variable is not set by user, try to locate tool using the code snippet
4766    for ac_prog in cat
4767do
4768  # Extract the first word of "$ac_prog", so it can be a program name with args.
4769set dummy $ac_prog; ac_word=$2
4770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4771$as_echo_n "checking for $ac_word... " >&6; }
4772if ${ac_cv_path_CAT+:} false; then :
4773  $as_echo_n "(cached) " >&6
4774else
4775  case $CAT in
4776  [\\/]* | ?:[\\/]*)
4777  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4778  ;;
4779  *)
4780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4781for as_dir in $PATH
4782do
4783  IFS=$as_save_IFS
4784  test -z "$as_dir" && as_dir=.
4785    for ac_exec_ext in '' $ac_executable_extensions; do
4786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4787    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4789    break 2
4790  fi
4791done
4792  done
4793IFS=$as_save_IFS
4794
4795  ;;
4796esac
4797fi
4798CAT=$ac_cv_path_CAT
4799if test -n "$CAT"; then
4800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4801$as_echo "$CAT" >&6; }
4802else
4803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4804$as_echo "no" >&6; }
4805fi
4806
4807
4808  test -n "$CAT" && break
4809done
4810
4811  else
4812    # The variable is set, but is it from the command line or the environment?
4813
4814    # Try to remove the string !CAT! from our list.
4815    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4816    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4817      # If it failed, the variable was not from the command line. Ignore it,
4818      # but warn the user (except for BASH, which is always set by the calling BASH).
4819      if test "xCAT" != xBASH; then
4820        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4821$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4822      fi
4823      # Try to locate tool using the code snippet
4824      for ac_prog in cat
4825do
4826  # Extract the first word of "$ac_prog", so it can be a program name with args.
4827set dummy $ac_prog; ac_word=$2
4828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4829$as_echo_n "checking for $ac_word... " >&6; }
4830if ${ac_cv_path_CAT+:} false; then :
4831  $as_echo_n "(cached) " >&6
4832else
4833  case $CAT in
4834  [\\/]* | ?:[\\/]*)
4835  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4836  ;;
4837  *)
4838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4839for as_dir in $PATH
4840do
4841  IFS=$as_save_IFS
4842  test -z "$as_dir" && as_dir=.
4843    for ac_exec_ext in '' $ac_executable_extensions; do
4844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4845    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4847    break 2
4848  fi
4849done
4850  done
4851IFS=$as_save_IFS
4852
4853  ;;
4854esac
4855fi
4856CAT=$ac_cv_path_CAT
4857if test -n "$CAT"; then
4858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4859$as_echo "$CAT" >&6; }
4860else
4861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4862$as_echo "no" >&6; }
4863fi
4864
4865
4866  test -n "$CAT" && break
4867done
4868
4869    else
4870      # If it succeeded, then it was overridden by the user. We will use it
4871      # for the tool.
4872
4873      # First remove it from the list of overridden variables, so we can test
4874      # for unknown variables in the end.
4875      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4876
4877      # Check if the provided tool contains a complete path.
4878      tool_specified="$CAT"
4879      tool_basename="${tool_specified##*/}"
4880      if test "x$tool_basename" = "x$tool_specified"; then
4881        # A command without a complete path is provided, search $PATH.
4882        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4883$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4884        # Extract the first word of "$tool_basename", so it can be a program name with args.
4885set dummy $tool_basename; ac_word=$2
4886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4887$as_echo_n "checking for $ac_word... " >&6; }
4888if ${ac_cv_path_CAT+:} false; then :
4889  $as_echo_n "(cached) " >&6
4890else
4891  case $CAT in
4892  [\\/]* | ?:[\\/]*)
4893  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4894  ;;
4895  *)
4896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4897for as_dir in $PATH
4898do
4899  IFS=$as_save_IFS
4900  test -z "$as_dir" && as_dir=.
4901    for ac_exec_ext in '' $ac_executable_extensions; do
4902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4903    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4905    break 2
4906  fi
4907done
4908  done
4909IFS=$as_save_IFS
4910
4911  ;;
4912esac
4913fi
4914CAT=$ac_cv_path_CAT
4915if test -n "$CAT"; then
4916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4917$as_echo "$CAT" >&6; }
4918else
4919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4920$as_echo "no" >&6; }
4921fi
4922
4923
4924        if test "x$CAT" = x; then
4925          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4926        fi
4927      else
4928        # Otherwise we believe it is a complete path. Use it as it is.
4929        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4930$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4932$as_echo_n "checking for CAT... " >&6; }
4933        if test ! -x "$tool_specified"; then
4934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4935$as_echo "not found" >&6; }
4936          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4937        fi
4938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4939$as_echo "$tool_specified" >&6; }
4940      fi
4941    fi
4942  fi
4943
4944
4945
4946  if test "x$CAT" = x; then
4947    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4948  fi
4949
4950
4951
4952
4953
4954  # Publish this variable in the help.
4955
4956
4957  if test "x$CHMOD" = x; then
4958    # The variable is not set by user, try to locate tool using the code snippet
4959    for ac_prog in chmod
4960do
4961  # Extract the first word of "$ac_prog", so it can be a program name with args.
4962set dummy $ac_prog; ac_word=$2
4963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4964$as_echo_n "checking for $ac_word... " >&6; }
4965if ${ac_cv_path_CHMOD+:} false; then :
4966  $as_echo_n "(cached) " >&6
4967else
4968  case $CHMOD in
4969  [\\/]* | ?:[\\/]*)
4970  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4971  ;;
4972  *)
4973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4974for as_dir in $PATH
4975do
4976  IFS=$as_save_IFS
4977  test -z "$as_dir" && as_dir=.
4978    for ac_exec_ext in '' $ac_executable_extensions; do
4979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4980    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4982    break 2
4983  fi
4984done
4985  done
4986IFS=$as_save_IFS
4987
4988  ;;
4989esac
4990fi
4991CHMOD=$ac_cv_path_CHMOD
4992if test -n "$CHMOD"; then
4993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4994$as_echo "$CHMOD" >&6; }
4995else
4996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4997$as_echo "no" >&6; }
4998fi
4999
5000
5001  test -n "$CHMOD" && break
5002done
5003
5004  else
5005    # The variable is set, but is it from the command line or the environment?
5006
5007    # Try to remove the string !CHMOD! from our list.
5008    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5009    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5010      # If it failed, the variable was not from the command line. Ignore it,
5011      # but warn the user (except for BASH, which is always set by the calling BASH).
5012      if test "xCHMOD" != xBASH; then
5013        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5014$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5015      fi
5016      # Try to locate tool using the code snippet
5017      for ac_prog in chmod
5018do
5019  # Extract the first word of "$ac_prog", so it can be a program name with args.
5020set dummy $ac_prog; ac_word=$2
5021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5022$as_echo_n "checking for $ac_word... " >&6; }
5023if ${ac_cv_path_CHMOD+:} false; then :
5024  $as_echo_n "(cached) " >&6
5025else
5026  case $CHMOD in
5027  [\\/]* | ?:[\\/]*)
5028  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5029  ;;
5030  *)
5031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5032for as_dir in $PATH
5033do
5034  IFS=$as_save_IFS
5035  test -z "$as_dir" && as_dir=.
5036    for ac_exec_ext in '' $ac_executable_extensions; do
5037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5038    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5040    break 2
5041  fi
5042done
5043  done
5044IFS=$as_save_IFS
5045
5046  ;;
5047esac
5048fi
5049CHMOD=$ac_cv_path_CHMOD
5050if test -n "$CHMOD"; then
5051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5052$as_echo "$CHMOD" >&6; }
5053else
5054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5055$as_echo "no" >&6; }
5056fi
5057
5058
5059  test -n "$CHMOD" && break
5060done
5061
5062    else
5063      # If it succeeded, then it was overridden by the user. We will use it
5064      # for the tool.
5065
5066      # First remove it from the list of overridden variables, so we can test
5067      # for unknown variables in the end.
5068      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5069
5070      # Check if the provided tool contains a complete path.
5071      tool_specified="$CHMOD"
5072      tool_basename="${tool_specified##*/}"
5073      if test "x$tool_basename" = "x$tool_specified"; then
5074        # A command without a complete path is provided, search $PATH.
5075        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5076$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5077        # Extract the first word of "$tool_basename", so it can be a program name with args.
5078set dummy $tool_basename; ac_word=$2
5079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5080$as_echo_n "checking for $ac_word... " >&6; }
5081if ${ac_cv_path_CHMOD+:} false; then :
5082  $as_echo_n "(cached) " >&6
5083else
5084  case $CHMOD in
5085  [\\/]* | ?:[\\/]*)
5086  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5087  ;;
5088  *)
5089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5090for as_dir in $PATH
5091do
5092  IFS=$as_save_IFS
5093  test -z "$as_dir" && as_dir=.
5094    for ac_exec_ext in '' $ac_executable_extensions; do
5095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5096    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5098    break 2
5099  fi
5100done
5101  done
5102IFS=$as_save_IFS
5103
5104  ;;
5105esac
5106fi
5107CHMOD=$ac_cv_path_CHMOD
5108if test -n "$CHMOD"; then
5109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5110$as_echo "$CHMOD" >&6; }
5111else
5112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5113$as_echo "no" >&6; }
5114fi
5115
5116
5117        if test "x$CHMOD" = x; then
5118          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5119        fi
5120      else
5121        # Otherwise we believe it is a complete path. Use it as it is.
5122        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5123$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5124        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5125$as_echo_n "checking for CHMOD... " >&6; }
5126        if test ! -x "$tool_specified"; then
5127          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5128$as_echo "not found" >&6; }
5129          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5130        fi
5131        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5132$as_echo "$tool_specified" >&6; }
5133      fi
5134    fi
5135  fi
5136
5137
5138
5139  if test "x$CHMOD" = x; then
5140    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5141  fi
5142
5143
5144
5145
5146
5147  # Publish this variable in the help.
5148
5149
5150  if test "x$CMP" = x; then
5151    # The variable is not set by user, try to locate tool using the code snippet
5152    for ac_prog in cmp
5153do
5154  # Extract the first word of "$ac_prog", so it can be a program name with args.
5155set dummy $ac_prog; ac_word=$2
5156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5157$as_echo_n "checking for $ac_word... " >&6; }
5158if ${ac_cv_path_CMP+:} false; then :
5159  $as_echo_n "(cached) " >&6
5160else
5161  case $CMP in
5162  [\\/]* | ?:[\\/]*)
5163  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5164  ;;
5165  *)
5166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5167for as_dir in $PATH
5168do
5169  IFS=$as_save_IFS
5170  test -z "$as_dir" && as_dir=.
5171    for ac_exec_ext in '' $ac_executable_extensions; do
5172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5173    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5175    break 2
5176  fi
5177done
5178  done
5179IFS=$as_save_IFS
5180
5181  ;;
5182esac
5183fi
5184CMP=$ac_cv_path_CMP
5185if test -n "$CMP"; then
5186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5187$as_echo "$CMP" >&6; }
5188else
5189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5190$as_echo "no" >&6; }
5191fi
5192
5193
5194  test -n "$CMP" && break
5195done
5196
5197  else
5198    # The variable is set, but is it from the command line or the environment?
5199
5200    # Try to remove the string !CMP! from our list.
5201    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5202    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5203      # If it failed, the variable was not from the command line. Ignore it,
5204      # but warn the user (except for BASH, which is always set by the calling BASH).
5205      if test "xCMP" != xBASH; then
5206        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5207$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5208      fi
5209      # Try to locate tool using the code snippet
5210      for ac_prog in cmp
5211do
5212  # Extract the first word of "$ac_prog", so it can be a program name with args.
5213set dummy $ac_prog; ac_word=$2
5214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5215$as_echo_n "checking for $ac_word... " >&6; }
5216if ${ac_cv_path_CMP+:} false; then :
5217  $as_echo_n "(cached) " >&6
5218else
5219  case $CMP in
5220  [\\/]* | ?:[\\/]*)
5221  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5222  ;;
5223  *)
5224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5225for as_dir in $PATH
5226do
5227  IFS=$as_save_IFS
5228  test -z "$as_dir" && as_dir=.
5229    for ac_exec_ext in '' $ac_executable_extensions; do
5230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5231    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5233    break 2
5234  fi
5235done
5236  done
5237IFS=$as_save_IFS
5238
5239  ;;
5240esac
5241fi
5242CMP=$ac_cv_path_CMP
5243if test -n "$CMP"; then
5244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5245$as_echo "$CMP" >&6; }
5246else
5247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5248$as_echo "no" >&6; }
5249fi
5250
5251
5252  test -n "$CMP" && break
5253done
5254
5255    else
5256      # If it succeeded, then it was overridden by the user. We will use it
5257      # for the tool.
5258
5259      # First remove it from the list of overridden variables, so we can test
5260      # for unknown variables in the end.
5261      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5262
5263      # Check if the provided tool contains a complete path.
5264      tool_specified="$CMP"
5265      tool_basename="${tool_specified##*/}"
5266      if test "x$tool_basename" = "x$tool_specified"; then
5267        # A command without a complete path is provided, search $PATH.
5268        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5269$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5270        # Extract the first word of "$tool_basename", so it can be a program name with args.
5271set dummy $tool_basename; ac_word=$2
5272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5273$as_echo_n "checking for $ac_word... " >&6; }
5274if ${ac_cv_path_CMP+:} false; then :
5275  $as_echo_n "(cached) " >&6
5276else
5277  case $CMP in
5278  [\\/]* | ?:[\\/]*)
5279  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5280  ;;
5281  *)
5282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5283for as_dir in $PATH
5284do
5285  IFS=$as_save_IFS
5286  test -z "$as_dir" && as_dir=.
5287    for ac_exec_ext in '' $ac_executable_extensions; do
5288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5289    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5291    break 2
5292  fi
5293done
5294  done
5295IFS=$as_save_IFS
5296
5297  ;;
5298esac
5299fi
5300CMP=$ac_cv_path_CMP
5301if test -n "$CMP"; then
5302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5303$as_echo "$CMP" >&6; }
5304else
5305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5306$as_echo "no" >&6; }
5307fi
5308
5309
5310        if test "x$CMP" = x; then
5311          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5312        fi
5313      else
5314        # Otherwise we believe it is a complete path. Use it as it is.
5315        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5316$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5317        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5318$as_echo_n "checking for CMP... " >&6; }
5319        if test ! -x "$tool_specified"; then
5320          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5321$as_echo "not found" >&6; }
5322          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5323        fi
5324        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5325$as_echo "$tool_specified" >&6; }
5326      fi
5327    fi
5328  fi
5329
5330
5331
5332  if test "x$CMP" = x; then
5333    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5334  fi
5335
5336
5337
5338
5339
5340  # Publish this variable in the help.
5341
5342
5343  if test "x$COMM" = x; then
5344    # The variable is not set by user, try to locate tool using the code snippet
5345    for ac_prog in comm
5346do
5347  # Extract the first word of "$ac_prog", so it can be a program name with args.
5348set dummy $ac_prog; ac_word=$2
5349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5350$as_echo_n "checking for $ac_word... " >&6; }
5351if ${ac_cv_path_COMM+:} false; then :
5352  $as_echo_n "(cached) " >&6
5353else
5354  case $COMM in
5355  [\\/]* | ?:[\\/]*)
5356  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5357  ;;
5358  *)
5359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5360for as_dir in $PATH
5361do
5362  IFS=$as_save_IFS
5363  test -z "$as_dir" && as_dir=.
5364    for ac_exec_ext in '' $ac_executable_extensions; do
5365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5366    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5368    break 2
5369  fi
5370done
5371  done
5372IFS=$as_save_IFS
5373
5374  ;;
5375esac
5376fi
5377COMM=$ac_cv_path_COMM
5378if test -n "$COMM"; then
5379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5380$as_echo "$COMM" >&6; }
5381else
5382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5383$as_echo "no" >&6; }
5384fi
5385
5386
5387  test -n "$COMM" && break
5388done
5389
5390  else
5391    # The variable is set, but is it from the command line or the environment?
5392
5393    # Try to remove the string !COMM! from our list.
5394    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5395    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5396      # If it failed, the variable was not from the command line. Ignore it,
5397      # but warn the user (except for BASH, which is always set by the calling BASH).
5398      if test "xCOMM" != xBASH; then
5399        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5400$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5401      fi
5402      # Try to locate tool using the code snippet
5403      for ac_prog in comm
5404do
5405  # Extract the first word of "$ac_prog", so it can be a program name with args.
5406set dummy $ac_prog; ac_word=$2
5407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5408$as_echo_n "checking for $ac_word... " >&6; }
5409if ${ac_cv_path_COMM+:} false; then :
5410  $as_echo_n "(cached) " >&6
5411else
5412  case $COMM in
5413  [\\/]* | ?:[\\/]*)
5414  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5415  ;;
5416  *)
5417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5418for as_dir in $PATH
5419do
5420  IFS=$as_save_IFS
5421  test -z "$as_dir" && as_dir=.
5422    for ac_exec_ext in '' $ac_executable_extensions; do
5423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5424    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5426    break 2
5427  fi
5428done
5429  done
5430IFS=$as_save_IFS
5431
5432  ;;
5433esac
5434fi
5435COMM=$ac_cv_path_COMM
5436if test -n "$COMM"; then
5437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5438$as_echo "$COMM" >&6; }
5439else
5440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5441$as_echo "no" >&6; }
5442fi
5443
5444
5445  test -n "$COMM" && break
5446done
5447
5448    else
5449      # If it succeeded, then it was overridden by the user. We will use it
5450      # for the tool.
5451
5452      # First remove it from the list of overridden variables, so we can test
5453      # for unknown variables in the end.
5454      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5455
5456      # Check if the provided tool contains a complete path.
5457      tool_specified="$COMM"
5458      tool_basename="${tool_specified##*/}"
5459      if test "x$tool_basename" = "x$tool_specified"; then
5460        # A command without a complete path is provided, search $PATH.
5461        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5462$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5463        # Extract the first word of "$tool_basename", so it can be a program name with args.
5464set dummy $tool_basename; ac_word=$2
5465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5466$as_echo_n "checking for $ac_word... " >&6; }
5467if ${ac_cv_path_COMM+:} false; then :
5468  $as_echo_n "(cached) " >&6
5469else
5470  case $COMM in
5471  [\\/]* | ?:[\\/]*)
5472  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5473  ;;
5474  *)
5475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5476for as_dir in $PATH
5477do
5478  IFS=$as_save_IFS
5479  test -z "$as_dir" && as_dir=.
5480    for ac_exec_ext in '' $ac_executable_extensions; do
5481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5482    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5484    break 2
5485  fi
5486done
5487  done
5488IFS=$as_save_IFS
5489
5490  ;;
5491esac
5492fi
5493COMM=$ac_cv_path_COMM
5494if test -n "$COMM"; then
5495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5496$as_echo "$COMM" >&6; }
5497else
5498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5499$as_echo "no" >&6; }
5500fi
5501
5502
5503        if test "x$COMM" = x; then
5504          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5505        fi
5506      else
5507        # Otherwise we believe it is a complete path. Use it as it is.
5508        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5509$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5511$as_echo_n "checking for COMM... " >&6; }
5512        if test ! -x "$tool_specified"; then
5513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5514$as_echo "not found" >&6; }
5515          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5516        fi
5517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5518$as_echo "$tool_specified" >&6; }
5519      fi
5520    fi
5521  fi
5522
5523
5524
5525  if test "x$COMM" = x; then
5526    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5527  fi
5528
5529
5530
5531
5532
5533  # Publish this variable in the help.
5534
5535
5536  if test "x$CP" = x; then
5537    # The variable is not set by user, try to locate tool using the code snippet
5538    for ac_prog in cp
5539do
5540  # Extract the first word of "$ac_prog", so it can be a program name with args.
5541set dummy $ac_prog; ac_word=$2
5542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5543$as_echo_n "checking for $ac_word... " >&6; }
5544if ${ac_cv_path_CP+:} false; then :
5545  $as_echo_n "(cached) " >&6
5546else
5547  case $CP in
5548  [\\/]* | ?:[\\/]*)
5549  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5550  ;;
5551  *)
5552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5553for as_dir in $PATH
5554do
5555  IFS=$as_save_IFS
5556  test -z "$as_dir" && as_dir=.
5557    for ac_exec_ext in '' $ac_executable_extensions; do
5558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5559    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5561    break 2
5562  fi
5563done
5564  done
5565IFS=$as_save_IFS
5566
5567  ;;
5568esac
5569fi
5570CP=$ac_cv_path_CP
5571if test -n "$CP"; then
5572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5573$as_echo "$CP" >&6; }
5574else
5575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5576$as_echo "no" >&6; }
5577fi
5578
5579
5580  test -n "$CP" && break
5581done
5582
5583  else
5584    # The variable is set, but is it from the command line or the environment?
5585
5586    # Try to remove the string !CP! from our list.
5587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5589      # If it failed, the variable was not from the command line. Ignore it,
5590      # but warn the user (except for BASH, which is always set by the calling BASH).
5591      if test "xCP" != xBASH; then
5592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5593$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5594      fi
5595      # Try to locate tool using the code snippet
5596      for ac_prog in cp
5597do
5598  # Extract the first word of "$ac_prog", so it can be a program name with args.
5599set dummy $ac_prog; ac_word=$2
5600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5601$as_echo_n "checking for $ac_word... " >&6; }
5602if ${ac_cv_path_CP+:} false; then :
5603  $as_echo_n "(cached) " >&6
5604else
5605  case $CP in
5606  [\\/]* | ?:[\\/]*)
5607  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5608  ;;
5609  *)
5610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5611for as_dir in $PATH
5612do
5613  IFS=$as_save_IFS
5614  test -z "$as_dir" && as_dir=.
5615    for ac_exec_ext in '' $ac_executable_extensions; do
5616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5617    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5619    break 2
5620  fi
5621done
5622  done
5623IFS=$as_save_IFS
5624
5625  ;;
5626esac
5627fi
5628CP=$ac_cv_path_CP
5629if test -n "$CP"; then
5630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5631$as_echo "$CP" >&6; }
5632else
5633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5634$as_echo "no" >&6; }
5635fi
5636
5637
5638  test -n "$CP" && break
5639done
5640
5641    else
5642      # If it succeeded, then it was overridden by the user. We will use it
5643      # for the tool.
5644
5645      # First remove it from the list of overridden variables, so we can test
5646      # for unknown variables in the end.
5647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5648
5649      # Check if the provided tool contains a complete path.
5650      tool_specified="$CP"
5651      tool_basename="${tool_specified##*/}"
5652      if test "x$tool_basename" = "x$tool_specified"; then
5653        # A command without a complete path is provided, search $PATH.
5654        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5655$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5656        # Extract the first word of "$tool_basename", so it can be a program name with args.
5657set dummy $tool_basename; ac_word=$2
5658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5659$as_echo_n "checking for $ac_word... " >&6; }
5660if ${ac_cv_path_CP+:} false; then :
5661  $as_echo_n "(cached) " >&6
5662else
5663  case $CP in
5664  [\\/]* | ?:[\\/]*)
5665  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5666  ;;
5667  *)
5668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5669for as_dir in $PATH
5670do
5671  IFS=$as_save_IFS
5672  test -z "$as_dir" && as_dir=.
5673    for ac_exec_ext in '' $ac_executable_extensions; do
5674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5675    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5677    break 2
5678  fi
5679done
5680  done
5681IFS=$as_save_IFS
5682
5683  ;;
5684esac
5685fi
5686CP=$ac_cv_path_CP
5687if test -n "$CP"; then
5688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5689$as_echo "$CP" >&6; }
5690else
5691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692$as_echo "no" >&6; }
5693fi
5694
5695
5696        if test "x$CP" = x; then
5697          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5698        fi
5699      else
5700        # Otherwise we believe it is a complete path. Use it as it is.
5701        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5702$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5704$as_echo_n "checking for CP... " >&6; }
5705        if test ! -x "$tool_specified"; then
5706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5707$as_echo "not found" >&6; }
5708          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5709        fi
5710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5711$as_echo "$tool_specified" >&6; }
5712      fi
5713    fi
5714  fi
5715
5716
5717
5718  if test "x$CP" = x; then
5719    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5720  fi
5721
5722
5723
5724
5725
5726  # Publish this variable in the help.
5727
5728
5729  if test "x$CUT" = x; then
5730    # The variable is not set by user, try to locate tool using the code snippet
5731    for ac_prog in cut
5732do
5733  # Extract the first word of "$ac_prog", so it can be a program name with args.
5734set dummy $ac_prog; ac_word=$2
5735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5736$as_echo_n "checking for $ac_word... " >&6; }
5737if ${ac_cv_path_CUT+:} false; then :
5738  $as_echo_n "(cached) " >&6
5739else
5740  case $CUT in
5741  [\\/]* | ?:[\\/]*)
5742  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5743  ;;
5744  *)
5745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5746for as_dir in $PATH
5747do
5748  IFS=$as_save_IFS
5749  test -z "$as_dir" && as_dir=.
5750    for ac_exec_ext in '' $ac_executable_extensions; do
5751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5752    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5754    break 2
5755  fi
5756done
5757  done
5758IFS=$as_save_IFS
5759
5760  ;;
5761esac
5762fi
5763CUT=$ac_cv_path_CUT
5764if test -n "$CUT"; then
5765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5766$as_echo "$CUT" >&6; }
5767else
5768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5769$as_echo "no" >&6; }
5770fi
5771
5772
5773  test -n "$CUT" && break
5774done
5775
5776  else
5777    # The variable is set, but is it from the command line or the environment?
5778
5779    # Try to remove the string !CUT! from our list.
5780    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5781    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5782      # If it failed, the variable was not from the command line. Ignore it,
5783      # but warn the user (except for BASH, which is always set by the calling BASH).
5784      if test "xCUT" != xBASH; then
5785        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5786$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5787      fi
5788      # Try to locate tool using the code snippet
5789      for ac_prog in cut
5790do
5791  # Extract the first word of "$ac_prog", so it can be a program name with args.
5792set dummy $ac_prog; ac_word=$2
5793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5794$as_echo_n "checking for $ac_word... " >&6; }
5795if ${ac_cv_path_CUT+:} false; then :
5796  $as_echo_n "(cached) " >&6
5797else
5798  case $CUT in
5799  [\\/]* | ?:[\\/]*)
5800  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5801  ;;
5802  *)
5803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5804for as_dir in $PATH
5805do
5806  IFS=$as_save_IFS
5807  test -z "$as_dir" && as_dir=.
5808    for ac_exec_ext in '' $ac_executable_extensions; do
5809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5810    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5812    break 2
5813  fi
5814done
5815  done
5816IFS=$as_save_IFS
5817
5818  ;;
5819esac
5820fi
5821CUT=$ac_cv_path_CUT
5822if test -n "$CUT"; then
5823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5824$as_echo "$CUT" >&6; }
5825else
5826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5827$as_echo "no" >&6; }
5828fi
5829
5830
5831  test -n "$CUT" && break
5832done
5833
5834    else
5835      # If it succeeded, then it was overridden by the user. We will use it
5836      # for the tool.
5837
5838      # First remove it from the list of overridden variables, so we can test
5839      # for unknown variables in the end.
5840      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5841
5842      # Check if the provided tool contains a complete path.
5843      tool_specified="$CUT"
5844      tool_basename="${tool_specified##*/}"
5845      if test "x$tool_basename" = "x$tool_specified"; then
5846        # A command without a complete path is provided, search $PATH.
5847        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5848$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5849        # Extract the first word of "$tool_basename", so it can be a program name with args.
5850set dummy $tool_basename; ac_word=$2
5851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5852$as_echo_n "checking for $ac_word... " >&6; }
5853if ${ac_cv_path_CUT+:} false; then :
5854  $as_echo_n "(cached) " >&6
5855else
5856  case $CUT in
5857  [\\/]* | ?:[\\/]*)
5858  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5859  ;;
5860  *)
5861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5862for as_dir in $PATH
5863do
5864  IFS=$as_save_IFS
5865  test -z "$as_dir" && as_dir=.
5866    for ac_exec_ext in '' $ac_executable_extensions; do
5867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5868    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5870    break 2
5871  fi
5872done
5873  done
5874IFS=$as_save_IFS
5875
5876  ;;
5877esac
5878fi
5879CUT=$ac_cv_path_CUT
5880if test -n "$CUT"; then
5881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5882$as_echo "$CUT" >&6; }
5883else
5884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5885$as_echo "no" >&6; }
5886fi
5887
5888
5889        if test "x$CUT" = x; then
5890          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5891        fi
5892      else
5893        # Otherwise we believe it is a complete path. Use it as it is.
5894        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5895$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5897$as_echo_n "checking for CUT... " >&6; }
5898        if test ! -x "$tool_specified"; then
5899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5900$as_echo "not found" >&6; }
5901          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5902        fi
5903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5904$as_echo "$tool_specified" >&6; }
5905      fi
5906    fi
5907  fi
5908
5909
5910
5911  if test "x$CUT" = x; then
5912    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5913  fi
5914
5915
5916
5917
5918
5919  # Publish this variable in the help.
5920
5921
5922  if test "x$DATE" = x; then
5923    # The variable is not set by user, try to locate tool using the code snippet
5924    for ac_prog in date
5925do
5926  # Extract the first word of "$ac_prog", so it can be a program name with args.
5927set dummy $ac_prog; ac_word=$2
5928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929$as_echo_n "checking for $ac_word... " >&6; }
5930if ${ac_cv_path_DATE+:} false; then :
5931  $as_echo_n "(cached) " >&6
5932else
5933  case $DATE in
5934  [\\/]* | ?:[\\/]*)
5935  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5936  ;;
5937  *)
5938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5939for as_dir in $PATH
5940do
5941  IFS=$as_save_IFS
5942  test -z "$as_dir" && as_dir=.
5943    for ac_exec_ext in '' $ac_executable_extensions; do
5944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5945    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5947    break 2
5948  fi
5949done
5950  done
5951IFS=$as_save_IFS
5952
5953  ;;
5954esac
5955fi
5956DATE=$ac_cv_path_DATE
5957if test -n "$DATE"; then
5958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5959$as_echo "$DATE" >&6; }
5960else
5961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5962$as_echo "no" >&6; }
5963fi
5964
5965
5966  test -n "$DATE" && break
5967done
5968
5969  else
5970    # The variable is set, but is it from the command line or the environment?
5971
5972    # Try to remove the string !DATE! from our list.
5973    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5974    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5975      # If it failed, the variable was not from the command line. Ignore it,
5976      # but warn the user (except for BASH, which is always set by the calling BASH).
5977      if test "xDATE" != xBASH; then
5978        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5979$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5980      fi
5981      # Try to locate tool using the code snippet
5982      for ac_prog in date
5983do
5984  # Extract the first word of "$ac_prog", so it can be a program name with args.
5985set dummy $ac_prog; ac_word=$2
5986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5987$as_echo_n "checking for $ac_word... " >&6; }
5988if ${ac_cv_path_DATE+:} false; then :
5989  $as_echo_n "(cached) " >&6
5990else
5991  case $DATE in
5992  [\\/]* | ?:[\\/]*)
5993  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5994  ;;
5995  *)
5996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5997for as_dir in $PATH
5998do
5999  IFS=$as_save_IFS
6000  test -z "$as_dir" && as_dir=.
6001    for ac_exec_ext in '' $ac_executable_extensions; do
6002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6003    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6005    break 2
6006  fi
6007done
6008  done
6009IFS=$as_save_IFS
6010
6011  ;;
6012esac
6013fi
6014DATE=$ac_cv_path_DATE
6015if test -n "$DATE"; then
6016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6017$as_echo "$DATE" >&6; }
6018else
6019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6020$as_echo "no" >&6; }
6021fi
6022
6023
6024  test -n "$DATE" && break
6025done
6026
6027    else
6028      # If it succeeded, then it was overridden by the user. We will use it
6029      # for the tool.
6030
6031      # First remove it from the list of overridden variables, so we can test
6032      # for unknown variables in the end.
6033      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6034
6035      # Check if the provided tool contains a complete path.
6036      tool_specified="$DATE"
6037      tool_basename="${tool_specified##*/}"
6038      if test "x$tool_basename" = "x$tool_specified"; then
6039        # A command without a complete path is provided, search $PATH.
6040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6041$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6042        # Extract the first word of "$tool_basename", so it can be a program name with args.
6043set dummy $tool_basename; ac_word=$2
6044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6045$as_echo_n "checking for $ac_word... " >&6; }
6046if ${ac_cv_path_DATE+:} false; then :
6047  $as_echo_n "(cached) " >&6
6048else
6049  case $DATE in
6050  [\\/]* | ?:[\\/]*)
6051  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6052  ;;
6053  *)
6054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6055for as_dir in $PATH
6056do
6057  IFS=$as_save_IFS
6058  test -z "$as_dir" && as_dir=.
6059    for ac_exec_ext in '' $ac_executable_extensions; do
6060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6061    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6063    break 2
6064  fi
6065done
6066  done
6067IFS=$as_save_IFS
6068
6069  ;;
6070esac
6071fi
6072DATE=$ac_cv_path_DATE
6073if test -n "$DATE"; then
6074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6075$as_echo "$DATE" >&6; }
6076else
6077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6078$as_echo "no" >&6; }
6079fi
6080
6081
6082        if test "x$DATE" = x; then
6083          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6084        fi
6085      else
6086        # Otherwise we believe it is a complete path. Use it as it is.
6087        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6088$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6089        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6090$as_echo_n "checking for DATE... " >&6; }
6091        if test ! -x "$tool_specified"; then
6092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6093$as_echo "not found" >&6; }
6094          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6095        fi
6096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6097$as_echo "$tool_specified" >&6; }
6098      fi
6099    fi
6100  fi
6101
6102
6103
6104  if test "x$DATE" = x; then
6105    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6106  fi
6107
6108
6109
6110
6111
6112  # Publish this variable in the help.
6113
6114
6115  if test "x$DIFF" = x; then
6116    # The variable is not set by user, try to locate tool using the code snippet
6117    for ac_prog in gdiff diff
6118do
6119  # Extract the first word of "$ac_prog", so it can be a program name with args.
6120set dummy $ac_prog; ac_word=$2
6121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6122$as_echo_n "checking for $ac_word... " >&6; }
6123if ${ac_cv_path_DIFF+:} false; then :
6124  $as_echo_n "(cached) " >&6
6125else
6126  case $DIFF in
6127  [\\/]* | ?:[\\/]*)
6128  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6129  ;;
6130  *)
6131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6132for as_dir in $PATH
6133do
6134  IFS=$as_save_IFS
6135  test -z "$as_dir" && as_dir=.
6136    for ac_exec_ext in '' $ac_executable_extensions; do
6137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6138    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6140    break 2
6141  fi
6142done
6143  done
6144IFS=$as_save_IFS
6145
6146  ;;
6147esac
6148fi
6149DIFF=$ac_cv_path_DIFF
6150if test -n "$DIFF"; then
6151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6152$as_echo "$DIFF" >&6; }
6153else
6154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6155$as_echo "no" >&6; }
6156fi
6157
6158
6159  test -n "$DIFF" && break
6160done
6161
6162  else
6163    # The variable is set, but is it from the command line or the environment?
6164
6165    # Try to remove the string !DIFF! from our list.
6166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6168      # If it failed, the variable was not from the command line. Ignore it,
6169      # but warn the user (except for BASH, which is always set by the calling BASH).
6170      if test "xDIFF" != xBASH; then
6171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6172$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6173      fi
6174      # Try to locate tool using the code snippet
6175      for ac_prog in gdiff diff
6176do
6177  # Extract the first word of "$ac_prog", so it can be a program name with args.
6178set dummy $ac_prog; ac_word=$2
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6180$as_echo_n "checking for $ac_word... " >&6; }
6181if ${ac_cv_path_DIFF+:} false; then :
6182  $as_echo_n "(cached) " >&6
6183else
6184  case $DIFF in
6185  [\\/]* | ?:[\\/]*)
6186  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6187  ;;
6188  *)
6189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6190for as_dir in $PATH
6191do
6192  IFS=$as_save_IFS
6193  test -z "$as_dir" && as_dir=.
6194    for ac_exec_ext in '' $ac_executable_extensions; do
6195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6196    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6198    break 2
6199  fi
6200done
6201  done
6202IFS=$as_save_IFS
6203
6204  ;;
6205esac
6206fi
6207DIFF=$ac_cv_path_DIFF
6208if test -n "$DIFF"; then
6209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6210$as_echo "$DIFF" >&6; }
6211else
6212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6213$as_echo "no" >&6; }
6214fi
6215
6216
6217  test -n "$DIFF" && break
6218done
6219
6220    else
6221      # If it succeeded, then it was overridden by the user. We will use it
6222      # for the tool.
6223
6224      # First remove it from the list of overridden variables, so we can test
6225      # for unknown variables in the end.
6226      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6227
6228      # Check if the provided tool contains a complete path.
6229      tool_specified="$DIFF"
6230      tool_basename="${tool_specified##*/}"
6231      if test "x$tool_basename" = "x$tool_specified"; then
6232        # A command without a complete path is provided, search $PATH.
6233        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6234$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6235        # Extract the first word of "$tool_basename", so it can be a program name with args.
6236set dummy $tool_basename; ac_word=$2
6237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6238$as_echo_n "checking for $ac_word... " >&6; }
6239if ${ac_cv_path_DIFF+:} false; then :
6240  $as_echo_n "(cached) " >&6
6241else
6242  case $DIFF in
6243  [\\/]* | ?:[\\/]*)
6244  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6245  ;;
6246  *)
6247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6248for as_dir in $PATH
6249do
6250  IFS=$as_save_IFS
6251  test -z "$as_dir" && as_dir=.
6252    for ac_exec_ext in '' $ac_executable_extensions; do
6253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6254    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6256    break 2
6257  fi
6258done
6259  done
6260IFS=$as_save_IFS
6261
6262  ;;
6263esac
6264fi
6265DIFF=$ac_cv_path_DIFF
6266if test -n "$DIFF"; then
6267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6268$as_echo "$DIFF" >&6; }
6269else
6270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6271$as_echo "no" >&6; }
6272fi
6273
6274
6275        if test "x$DIFF" = x; then
6276          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6277        fi
6278      else
6279        # Otherwise we believe it is a complete path. Use it as it is.
6280        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6281$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6282        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6283$as_echo_n "checking for DIFF... " >&6; }
6284        if test ! -x "$tool_specified"; then
6285          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6286$as_echo "not found" >&6; }
6287          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6288        fi
6289        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6290$as_echo "$tool_specified" >&6; }
6291      fi
6292    fi
6293  fi
6294
6295
6296
6297  if test "x$DIFF" = x; then
6298    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6299  fi
6300
6301
6302
6303
6304
6305  # Publish this variable in the help.
6306
6307
6308  if test "x$DIRNAME" = x; then
6309    # The variable is not set by user, try to locate tool using the code snippet
6310    for ac_prog in dirname
6311do
6312  # Extract the first word of "$ac_prog", so it can be a program name with args.
6313set dummy $ac_prog; ac_word=$2
6314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6315$as_echo_n "checking for $ac_word... " >&6; }
6316if ${ac_cv_path_DIRNAME+:} false; then :
6317  $as_echo_n "(cached) " >&6
6318else
6319  case $DIRNAME in
6320  [\\/]* | ?:[\\/]*)
6321  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6322  ;;
6323  *)
6324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6325for as_dir in $PATH
6326do
6327  IFS=$as_save_IFS
6328  test -z "$as_dir" && as_dir=.
6329    for ac_exec_ext in '' $ac_executable_extensions; do
6330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6331    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6333    break 2
6334  fi
6335done
6336  done
6337IFS=$as_save_IFS
6338
6339  ;;
6340esac
6341fi
6342DIRNAME=$ac_cv_path_DIRNAME
6343if test -n "$DIRNAME"; then
6344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6345$as_echo "$DIRNAME" >&6; }
6346else
6347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6348$as_echo "no" >&6; }
6349fi
6350
6351
6352  test -n "$DIRNAME" && break
6353done
6354
6355  else
6356    # The variable is set, but is it from the command line or the environment?
6357
6358    # Try to remove the string !DIRNAME! from our list.
6359    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6360    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6361      # If it failed, the variable was not from the command line. Ignore it,
6362      # but warn the user (except for BASH, which is always set by the calling BASH).
6363      if test "xDIRNAME" != xBASH; then
6364        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6365$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6366      fi
6367      # Try to locate tool using the code snippet
6368      for ac_prog in dirname
6369do
6370  # Extract the first word of "$ac_prog", so it can be a program name with args.
6371set dummy $ac_prog; ac_word=$2
6372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6373$as_echo_n "checking for $ac_word... " >&6; }
6374if ${ac_cv_path_DIRNAME+:} false; then :
6375  $as_echo_n "(cached) " >&6
6376else
6377  case $DIRNAME in
6378  [\\/]* | ?:[\\/]*)
6379  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6380  ;;
6381  *)
6382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6383for as_dir in $PATH
6384do
6385  IFS=$as_save_IFS
6386  test -z "$as_dir" && as_dir=.
6387    for ac_exec_ext in '' $ac_executable_extensions; do
6388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6389    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6391    break 2
6392  fi
6393done
6394  done
6395IFS=$as_save_IFS
6396
6397  ;;
6398esac
6399fi
6400DIRNAME=$ac_cv_path_DIRNAME
6401if test -n "$DIRNAME"; then
6402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6403$as_echo "$DIRNAME" >&6; }
6404else
6405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6406$as_echo "no" >&6; }
6407fi
6408
6409
6410  test -n "$DIRNAME" && break
6411done
6412
6413    else
6414      # If it succeeded, then it was overridden by the user. We will use it
6415      # for the tool.
6416
6417      # First remove it from the list of overridden variables, so we can test
6418      # for unknown variables in the end.
6419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6420
6421      # Check if the provided tool contains a complete path.
6422      tool_specified="$DIRNAME"
6423      tool_basename="${tool_specified##*/}"
6424      if test "x$tool_basename" = "x$tool_specified"; then
6425        # A command without a complete path is provided, search $PATH.
6426        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6427$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6428        # Extract the first word of "$tool_basename", so it can be a program name with args.
6429set dummy $tool_basename; ac_word=$2
6430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6431$as_echo_n "checking for $ac_word... " >&6; }
6432if ${ac_cv_path_DIRNAME+:} false; then :
6433  $as_echo_n "(cached) " >&6
6434else
6435  case $DIRNAME in
6436  [\\/]* | ?:[\\/]*)
6437  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6438  ;;
6439  *)
6440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6441for as_dir in $PATH
6442do
6443  IFS=$as_save_IFS
6444  test -z "$as_dir" && as_dir=.
6445    for ac_exec_ext in '' $ac_executable_extensions; do
6446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6447    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6449    break 2
6450  fi
6451done
6452  done
6453IFS=$as_save_IFS
6454
6455  ;;
6456esac
6457fi
6458DIRNAME=$ac_cv_path_DIRNAME
6459if test -n "$DIRNAME"; then
6460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6461$as_echo "$DIRNAME" >&6; }
6462else
6463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6464$as_echo "no" >&6; }
6465fi
6466
6467
6468        if test "x$DIRNAME" = x; then
6469          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6470        fi
6471      else
6472        # Otherwise we believe it is a complete path. Use it as it is.
6473        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6474$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6476$as_echo_n "checking for DIRNAME... " >&6; }
6477        if test ! -x "$tool_specified"; then
6478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6479$as_echo "not found" >&6; }
6480          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6481        fi
6482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6483$as_echo "$tool_specified" >&6; }
6484      fi
6485    fi
6486  fi
6487
6488
6489
6490  if test "x$DIRNAME" = x; then
6491    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6492  fi
6493
6494
6495
6496
6497
6498  # Publish this variable in the help.
6499
6500
6501  if test "x$ECHO" = x; then
6502    # The variable is not set by user, try to locate tool using the code snippet
6503    for ac_prog in echo
6504do
6505  # Extract the first word of "$ac_prog", so it can be a program name with args.
6506set dummy $ac_prog; ac_word=$2
6507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6508$as_echo_n "checking for $ac_word... " >&6; }
6509if ${ac_cv_path_ECHO+:} false; then :
6510  $as_echo_n "(cached) " >&6
6511else
6512  case $ECHO in
6513  [\\/]* | ?:[\\/]*)
6514  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6515  ;;
6516  *)
6517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6518for as_dir in $PATH
6519do
6520  IFS=$as_save_IFS
6521  test -z "$as_dir" && as_dir=.
6522    for ac_exec_ext in '' $ac_executable_extensions; do
6523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6524    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6526    break 2
6527  fi
6528done
6529  done
6530IFS=$as_save_IFS
6531
6532  ;;
6533esac
6534fi
6535ECHO=$ac_cv_path_ECHO
6536if test -n "$ECHO"; then
6537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6538$as_echo "$ECHO" >&6; }
6539else
6540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6541$as_echo "no" >&6; }
6542fi
6543
6544
6545  test -n "$ECHO" && break
6546done
6547
6548  else
6549    # The variable is set, but is it from the command line or the environment?
6550
6551    # Try to remove the string !ECHO! from our list.
6552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6554      # If it failed, the variable was not from the command line. Ignore it,
6555      # but warn the user (except for BASH, which is always set by the calling BASH).
6556      if test "xECHO" != xBASH; then
6557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6558$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6559      fi
6560      # Try to locate tool using the code snippet
6561      for ac_prog in echo
6562do
6563  # Extract the first word of "$ac_prog", so it can be a program name with args.
6564set dummy $ac_prog; ac_word=$2
6565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6566$as_echo_n "checking for $ac_word... " >&6; }
6567if ${ac_cv_path_ECHO+:} false; then :
6568  $as_echo_n "(cached) " >&6
6569else
6570  case $ECHO in
6571  [\\/]* | ?:[\\/]*)
6572  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6573  ;;
6574  *)
6575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6576for as_dir in $PATH
6577do
6578  IFS=$as_save_IFS
6579  test -z "$as_dir" && as_dir=.
6580    for ac_exec_ext in '' $ac_executable_extensions; do
6581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6582    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6584    break 2
6585  fi
6586done
6587  done
6588IFS=$as_save_IFS
6589
6590  ;;
6591esac
6592fi
6593ECHO=$ac_cv_path_ECHO
6594if test -n "$ECHO"; then
6595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6596$as_echo "$ECHO" >&6; }
6597else
6598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6599$as_echo "no" >&6; }
6600fi
6601
6602
6603  test -n "$ECHO" && break
6604done
6605
6606    else
6607      # If it succeeded, then it was overridden by the user. We will use it
6608      # for the tool.
6609
6610      # First remove it from the list of overridden variables, so we can test
6611      # for unknown variables in the end.
6612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6613
6614      # Check if the provided tool contains a complete path.
6615      tool_specified="$ECHO"
6616      tool_basename="${tool_specified##*/}"
6617      if test "x$tool_basename" = "x$tool_specified"; then
6618        # A command without a complete path is provided, search $PATH.
6619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6620$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6621        # Extract the first word of "$tool_basename", so it can be a program name with args.
6622set dummy $tool_basename; ac_word=$2
6623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6624$as_echo_n "checking for $ac_word... " >&6; }
6625if ${ac_cv_path_ECHO+:} false; then :
6626  $as_echo_n "(cached) " >&6
6627else
6628  case $ECHO in
6629  [\\/]* | ?:[\\/]*)
6630  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6631  ;;
6632  *)
6633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6634for as_dir in $PATH
6635do
6636  IFS=$as_save_IFS
6637  test -z "$as_dir" && as_dir=.
6638    for ac_exec_ext in '' $ac_executable_extensions; do
6639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6640    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6642    break 2
6643  fi
6644done
6645  done
6646IFS=$as_save_IFS
6647
6648  ;;
6649esac
6650fi
6651ECHO=$ac_cv_path_ECHO
6652if test -n "$ECHO"; then
6653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6654$as_echo "$ECHO" >&6; }
6655else
6656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6657$as_echo "no" >&6; }
6658fi
6659
6660
6661        if test "x$ECHO" = x; then
6662          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6663        fi
6664      else
6665        # Otherwise we believe it is a complete path. Use it as it is.
6666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6667$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6669$as_echo_n "checking for ECHO... " >&6; }
6670        if test ! -x "$tool_specified"; then
6671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6672$as_echo "not found" >&6; }
6673          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6674        fi
6675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6676$as_echo "$tool_specified" >&6; }
6677      fi
6678    fi
6679  fi
6680
6681
6682
6683  if test "x$ECHO" = x; then
6684    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6685  fi
6686
6687
6688
6689
6690
6691  # Publish this variable in the help.
6692
6693
6694  if test "x$EXPR" = x; then
6695    # The variable is not set by user, try to locate tool using the code snippet
6696    for ac_prog in expr
6697do
6698  # Extract the first word of "$ac_prog", so it can be a program name with args.
6699set dummy $ac_prog; ac_word=$2
6700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6701$as_echo_n "checking for $ac_word... " >&6; }
6702if ${ac_cv_path_EXPR+:} false; then :
6703  $as_echo_n "(cached) " >&6
6704else
6705  case $EXPR in
6706  [\\/]* | ?:[\\/]*)
6707  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6708  ;;
6709  *)
6710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6711for as_dir in $PATH
6712do
6713  IFS=$as_save_IFS
6714  test -z "$as_dir" && as_dir=.
6715    for ac_exec_ext in '' $ac_executable_extensions; do
6716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6717    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6719    break 2
6720  fi
6721done
6722  done
6723IFS=$as_save_IFS
6724
6725  ;;
6726esac
6727fi
6728EXPR=$ac_cv_path_EXPR
6729if test -n "$EXPR"; then
6730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6731$as_echo "$EXPR" >&6; }
6732else
6733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6734$as_echo "no" >&6; }
6735fi
6736
6737
6738  test -n "$EXPR" && break
6739done
6740
6741  else
6742    # The variable is set, but is it from the command line or the environment?
6743
6744    # Try to remove the string !EXPR! from our list.
6745    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6746    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6747      # If it failed, the variable was not from the command line. Ignore it,
6748      # but warn the user (except for BASH, which is always set by the calling BASH).
6749      if test "xEXPR" != xBASH; then
6750        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6751$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6752      fi
6753      # Try to locate tool using the code snippet
6754      for ac_prog in expr
6755do
6756  # Extract the first word of "$ac_prog", so it can be a program name with args.
6757set dummy $ac_prog; ac_word=$2
6758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6759$as_echo_n "checking for $ac_word... " >&6; }
6760if ${ac_cv_path_EXPR+:} false; then :
6761  $as_echo_n "(cached) " >&6
6762else
6763  case $EXPR in
6764  [\\/]* | ?:[\\/]*)
6765  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6766  ;;
6767  *)
6768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6769for as_dir in $PATH
6770do
6771  IFS=$as_save_IFS
6772  test -z "$as_dir" && as_dir=.
6773    for ac_exec_ext in '' $ac_executable_extensions; do
6774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6775    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6777    break 2
6778  fi
6779done
6780  done
6781IFS=$as_save_IFS
6782
6783  ;;
6784esac
6785fi
6786EXPR=$ac_cv_path_EXPR
6787if test -n "$EXPR"; then
6788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6789$as_echo "$EXPR" >&6; }
6790else
6791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6792$as_echo "no" >&6; }
6793fi
6794
6795
6796  test -n "$EXPR" && break
6797done
6798
6799    else
6800      # If it succeeded, then it was overridden by the user. We will use it
6801      # for the tool.
6802
6803      # First remove it from the list of overridden variables, so we can test
6804      # for unknown variables in the end.
6805      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6806
6807      # Check if the provided tool contains a complete path.
6808      tool_specified="$EXPR"
6809      tool_basename="${tool_specified##*/}"
6810      if test "x$tool_basename" = "x$tool_specified"; then
6811        # A command without a complete path is provided, search $PATH.
6812        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6813$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6814        # Extract the first word of "$tool_basename", so it can be a program name with args.
6815set dummy $tool_basename; ac_word=$2
6816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6817$as_echo_n "checking for $ac_word... " >&6; }
6818if ${ac_cv_path_EXPR+:} false; then :
6819  $as_echo_n "(cached) " >&6
6820else
6821  case $EXPR in
6822  [\\/]* | ?:[\\/]*)
6823  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6824  ;;
6825  *)
6826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6827for as_dir in $PATH
6828do
6829  IFS=$as_save_IFS
6830  test -z "$as_dir" && as_dir=.
6831    for ac_exec_ext in '' $ac_executable_extensions; do
6832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6833    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6835    break 2
6836  fi
6837done
6838  done
6839IFS=$as_save_IFS
6840
6841  ;;
6842esac
6843fi
6844EXPR=$ac_cv_path_EXPR
6845if test -n "$EXPR"; then
6846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6847$as_echo "$EXPR" >&6; }
6848else
6849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6850$as_echo "no" >&6; }
6851fi
6852
6853
6854        if test "x$EXPR" = x; then
6855          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6856        fi
6857      else
6858        # Otherwise we believe it is a complete path. Use it as it is.
6859        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6860$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6861        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6862$as_echo_n "checking for EXPR... " >&6; }
6863        if test ! -x "$tool_specified"; then
6864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6865$as_echo "not found" >&6; }
6866          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6867        fi
6868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6869$as_echo "$tool_specified" >&6; }
6870      fi
6871    fi
6872  fi
6873
6874
6875
6876  if test "x$EXPR" = x; then
6877    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6878  fi
6879
6880
6881
6882
6883
6884  # Publish this variable in the help.
6885
6886
6887  if test "x$FILE" = x; then
6888    # The variable is not set by user, try to locate tool using the code snippet
6889    for ac_prog in file
6890do
6891  # Extract the first word of "$ac_prog", so it can be a program name with args.
6892set dummy $ac_prog; ac_word=$2
6893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6894$as_echo_n "checking for $ac_word... " >&6; }
6895if ${ac_cv_path_FILE+:} false; then :
6896  $as_echo_n "(cached) " >&6
6897else
6898  case $FILE in
6899  [\\/]* | ?:[\\/]*)
6900  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6901  ;;
6902  *)
6903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6904for as_dir in $PATH
6905do
6906  IFS=$as_save_IFS
6907  test -z "$as_dir" && as_dir=.
6908    for ac_exec_ext in '' $ac_executable_extensions; do
6909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6910    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6912    break 2
6913  fi
6914done
6915  done
6916IFS=$as_save_IFS
6917
6918  ;;
6919esac
6920fi
6921FILE=$ac_cv_path_FILE
6922if test -n "$FILE"; then
6923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6924$as_echo "$FILE" >&6; }
6925else
6926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6927$as_echo "no" >&6; }
6928fi
6929
6930
6931  test -n "$FILE" && break
6932done
6933
6934  else
6935    # The variable is set, but is it from the command line or the environment?
6936
6937    # Try to remove the string !FILE! from our list.
6938    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6939    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6940      # If it failed, the variable was not from the command line. Ignore it,
6941      # but warn the user (except for BASH, which is always set by the calling BASH).
6942      if test "xFILE" != xBASH; then
6943        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6944$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6945      fi
6946      # Try to locate tool using the code snippet
6947      for ac_prog in file
6948do
6949  # Extract the first word of "$ac_prog", so it can be a program name with args.
6950set dummy $ac_prog; ac_word=$2
6951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6952$as_echo_n "checking for $ac_word... " >&6; }
6953if ${ac_cv_path_FILE+:} false; then :
6954  $as_echo_n "(cached) " >&6
6955else
6956  case $FILE in
6957  [\\/]* | ?:[\\/]*)
6958  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6959  ;;
6960  *)
6961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6962for as_dir in $PATH
6963do
6964  IFS=$as_save_IFS
6965  test -z "$as_dir" && as_dir=.
6966    for ac_exec_ext in '' $ac_executable_extensions; do
6967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6968    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6970    break 2
6971  fi
6972done
6973  done
6974IFS=$as_save_IFS
6975
6976  ;;
6977esac
6978fi
6979FILE=$ac_cv_path_FILE
6980if test -n "$FILE"; then
6981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6982$as_echo "$FILE" >&6; }
6983else
6984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6985$as_echo "no" >&6; }
6986fi
6987
6988
6989  test -n "$FILE" && break
6990done
6991
6992    else
6993      # If it succeeded, then it was overridden by the user. We will use it
6994      # for the tool.
6995
6996      # First remove it from the list of overridden variables, so we can test
6997      # for unknown variables in the end.
6998      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6999
7000      # Check if the provided tool contains a complete path.
7001      tool_specified="$FILE"
7002      tool_basename="${tool_specified##*/}"
7003      if test "x$tool_basename" = "x$tool_specified"; then
7004        # A command without a complete path is provided, search $PATH.
7005        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7006$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7007        # Extract the first word of "$tool_basename", so it can be a program name with args.
7008set dummy $tool_basename; ac_word=$2
7009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7010$as_echo_n "checking for $ac_word... " >&6; }
7011if ${ac_cv_path_FILE+:} false; then :
7012  $as_echo_n "(cached) " >&6
7013else
7014  case $FILE in
7015  [\\/]* | ?:[\\/]*)
7016  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7017  ;;
7018  *)
7019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7020for as_dir in $PATH
7021do
7022  IFS=$as_save_IFS
7023  test -z "$as_dir" && as_dir=.
7024    for ac_exec_ext in '' $ac_executable_extensions; do
7025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7026    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7028    break 2
7029  fi
7030done
7031  done
7032IFS=$as_save_IFS
7033
7034  ;;
7035esac
7036fi
7037FILE=$ac_cv_path_FILE
7038if test -n "$FILE"; then
7039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7040$as_echo "$FILE" >&6; }
7041else
7042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7043$as_echo "no" >&6; }
7044fi
7045
7046
7047        if test "x$FILE" = x; then
7048          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7049        fi
7050      else
7051        # Otherwise we believe it is a complete path. Use it as it is.
7052        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7053$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7054        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7055$as_echo_n "checking for FILE... " >&6; }
7056        if test ! -x "$tool_specified"; then
7057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7058$as_echo "not found" >&6; }
7059          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7060        fi
7061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7062$as_echo "$tool_specified" >&6; }
7063      fi
7064    fi
7065  fi
7066
7067
7068
7069  if test "x$FILE" = x; then
7070    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7071  fi
7072
7073
7074
7075
7076
7077  # Publish this variable in the help.
7078
7079
7080  if test "x$FIND" = x; then
7081    # The variable is not set by user, try to locate tool using the code snippet
7082    for ac_prog in find
7083do
7084  # Extract the first word of "$ac_prog", so it can be a program name with args.
7085set dummy $ac_prog; ac_word=$2
7086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7087$as_echo_n "checking for $ac_word... " >&6; }
7088if ${ac_cv_path_FIND+:} false; then :
7089  $as_echo_n "(cached) " >&6
7090else
7091  case $FIND in
7092  [\\/]* | ?:[\\/]*)
7093  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7094  ;;
7095  *)
7096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7097for as_dir in $PATH
7098do
7099  IFS=$as_save_IFS
7100  test -z "$as_dir" && as_dir=.
7101    for ac_exec_ext in '' $ac_executable_extensions; do
7102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7103    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7105    break 2
7106  fi
7107done
7108  done
7109IFS=$as_save_IFS
7110
7111  ;;
7112esac
7113fi
7114FIND=$ac_cv_path_FIND
7115if test -n "$FIND"; then
7116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7117$as_echo "$FIND" >&6; }
7118else
7119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7120$as_echo "no" >&6; }
7121fi
7122
7123
7124  test -n "$FIND" && break
7125done
7126
7127  else
7128    # The variable is set, but is it from the command line or the environment?
7129
7130    # Try to remove the string !FIND! from our list.
7131    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7132    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7133      # If it failed, the variable was not from the command line. Ignore it,
7134      # but warn the user (except for BASH, which is always set by the calling BASH).
7135      if test "xFIND" != xBASH; then
7136        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7137$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7138      fi
7139      # Try to locate tool using the code snippet
7140      for ac_prog in find
7141do
7142  # Extract the first word of "$ac_prog", so it can be a program name with args.
7143set dummy $ac_prog; ac_word=$2
7144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7145$as_echo_n "checking for $ac_word... " >&6; }
7146if ${ac_cv_path_FIND+:} false; then :
7147  $as_echo_n "(cached) " >&6
7148else
7149  case $FIND in
7150  [\\/]* | ?:[\\/]*)
7151  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7152  ;;
7153  *)
7154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7155for as_dir in $PATH
7156do
7157  IFS=$as_save_IFS
7158  test -z "$as_dir" && as_dir=.
7159    for ac_exec_ext in '' $ac_executable_extensions; do
7160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7161    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7163    break 2
7164  fi
7165done
7166  done
7167IFS=$as_save_IFS
7168
7169  ;;
7170esac
7171fi
7172FIND=$ac_cv_path_FIND
7173if test -n "$FIND"; then
7174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7175$as_echo "$FIND" >&6; }
7176else
7177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7178$as_echo "no" >&6; }
7179fi
7180
7181
7182  test -n "$FIND" && break
7183done
7184
7185    else
7186      # If it succeeded, then it was overridden by the user. We will use it
7187      # for the tool.
7188
7189      # First remove it from the list of overridden variables, so we can test
7190      # for unknown variables in the end.
7191      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7192
7193      # Check if the provided tool contains a complete path.
7194      tool_specified="$FIND"
7195      tool_basename="${tool_specified##*/}"
7196      if test "x$tool_basename" = "x$tool_specified"; then
7197        # A command without a complete path is provided, search $PATH.
7198        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7199$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7200        # Extract the first word of "$tool_basename", so it can be a program name with args.
7201set dummy $tool_basename; ac_word=$2
7202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7203$as_echo_n "checking for $ac_word... " >&6; }
7204if ${ac_cv_path_FIND+:} false; then :
7205  $as_echo_n "(cached) " >&6
7206else
7207  case $FIND in
7208  [\\/]* | ?:[\\/]*)
7209  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7210  ;;
7211  *)
7212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7213for as_dir in $PATH
7214do
7215  IFS=$as_save_IFS
7216  test -z "$as_dir" && as_dir=.
7217    for ac_exec_ext in '' $ac_executable_extensions; do
7218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7219    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7221    break 2
7222  fi
7223done
7224  done
7225IFS=$as_save_IFS
7226
7227  ;;
7228esac
7229fi
7230FIND=$ac_cv_path_FIND
7231if test -n "$FIND"; then
7232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7233$as_echo "$FIND" >&6; }
7234else
7235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7236$as_echo "no" >&6; }
7237fi
7238
7239
7240        if test "x$FIND" = x; then
7241          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7242        fi
7243      else
7244        # Otherwise we believe it is a complete path. Use it as it is.
7245        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7246$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7247        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7248$as_echo_n "checking for FIND... " >&6; }
7249        if test ! -x "$tool_specified"; then
7250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7251$as_echo "not found" >&6; }
7252          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7253        fi
7254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7255$as_echo "$tool_specified" >&6; }
7256      fi
7257    fi
7258  fi
7259
7260
7261
7262  if test "x$FIND" = x; then
7263    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7264  fi
7265
7266
7267
7268
7269
7270  # Publish this variable in the help.
7271
7272
7273  if test "x$HEAD" = x; then
7274    # The variable is not set by user, try to locate tool using the code snippet
7275    for ac_prog in head
7276do
7277  # Extract the first word of "$ac_prog", so it can be a program name with args.
7278set dummy $ac_prog; ac_word=$2
7279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7280$as_echo_n "checking for $ac_word... " >&6; }
7281if ${ac_cv_path_HEAD+:} false; then :
7282  $as_echo_n "(cached) " >&6
7283else
7284  case $HEAD in
7285  [\\/]* | ?:[\\/]*)
7286  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7287  ;;
7288  *)
7289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7290for as_dir in $PATH
7291do
7292  IFS=$as_save_IFS
7293  test -z "$as_dir" && as_dir=.
7294    for ac_exec_ext in '' $ac_executable_extensions; do
7295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7296    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7298    break 2
7299  fi
7300done
7301  done
7302IFS=$as_save_IFS
7303
7304  ;;
7305esac
7306fi
7307HEAD=$ac_cv_path_HEAD
7308if test -n "$HEAD"; then
7309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7310$as_echo "$HEAD" >&6; }
7311else
7312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7313$as_echo "no" >&6; }
7314fi
7315
7316
7317  test -n "$HEAD" && break
7318done
7319
7320  else
7321    # The variable is set, but is it from the command line or the environment?
7322
7323    # Try to remove the string !HEAD! from our list.
7324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7326      # If it failed, the variable was not from the command line. Ignore it,
7327      # but warn the user (except for BASH, which is always set by the calling BASH).
7328      if test "xHEAD" != xBASH; then
7329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7330$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7331      fi
7332      # Try to locate tool using the code snippet
7333      for ac_prog in head
7334do
7335  # Extract the first word of "$ac_prog", so it can be a program name with args.
7336set dummy $ac_prog; ac_word=$2
7337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7338$as_echo_n "checking for $ac_word... " >&6; }
7339if ${ac_cv_path_HEAD+:} false; then :
7340  $as_echo_n "(cached) " >&6
7341else
7342  case $HEAD in
7343  [\\/]* | ?:[\\/]*)
7344  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7345  ;;
7346  *)
7347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7348for as_dir in $PATH
7349do
7350  IFS=$as_save_IFS
7351  test -z "$as_dir" && as_dir=.
7352    for ac_exec_ext in '' $ac_executable_extensions; do
7353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7354    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7356    break 2
7357  fi
7358done
7359  done
7360IFS=$as_save_IFS
7361
7362  ;;
7363esac
7364fi
7365HEAD=$ac_cv_path_HEAD
7366if test -n "$HEAD"; then
7367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7368$as_echo "$HEAD" >&6; }
7369else
7370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7371$as_echo "no" >&6; }
7372fi
7373
7374
7375  test -n "$HEAD" && break
7376done
7377
7378    else
7379      # If it succeeded, then it was overridden by the user. We will use it
7380      # for the tool.
7381
7382      # First remove it from the list of overridden variables, so we can test
7383      # for unknown variables in the end.
7384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7385
7386      # Check if the provided tool contains a complete path.
7387      tool_specified="$HEAD"
7388      tool_basename="${tool_specified##*/}"
7389      if test "x$tool_basename" = "x$tool_specified"; then
7390        # A command without a complete path is provided, search $PATH.
7391        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7392$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7393        # Extract the first word of "$tool_basename", so it can be a program name with args.
7394set dummy $tool_basename; ac_word=$2
7395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7396$as_echo_n "checking for $ac_word... " >&6; }
7397if ${ac_cv_path_HEAD+:} false; then :
7398  $as_echo_n "(cached) " >&6
7399else
7400  case $HEAD in
7401  [\\/]* | ?:[\\/]*)
7402  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7403  ;;
7404  *)
7405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7406for as_dir in $PATH
7407do
7408  IFS=$as_save_IFS
7409  test -z "$as_dir" && as_dir=.
7410    for ac_exec_ext in '' $ac_executable_extensions; do
7411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7412    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7414    break 2
7415  fi
7416done
7417  done
7418IFS=$as_save_IFS
7419
7420  ;;
7421esac
7422fi
7423HEAD=$ac_cv_path_HEAD
7424if test -n "$HEAD"; then
7425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7426$as_echo "$HEAD" >&6; }
7427else
7428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7429$as_echo "no" >&6; }
7430fi
7431
7432
7433        if test "x$HEAD" = x; then
7434          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7435        fi
7436      else
7437        # Otherwise we believe it is a complete path. Use it as it is.
7438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7439$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7440        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7441$as_echo_n "checking for HEAD... " >&6; }
7442        if test ! -x "$tool_specified"; then
7443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7444$as_echo "not found" >&6; }
7445          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7446        fi
7447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7448$as_echo "$tool_specified" >&6; }
7449      fi
7450    fi
7451  fi
7452
7453
7454
7455  if test "x$HEAD" = x; then
7456    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7457  fi
7458
7459
7460
7461
7462
7463  # Publish this variable in the help.
7464
7465
7466  if test "x$LN" = x; then
7467    # The variable is not set by user, try to locate tool using the code snippet
7468    for ac_prog in ln
7469do
7470  # Extract the first word of "$ac_prog", so it can be a program name with args.
7471set dummy $ac_prog; ac_word=$2
7472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7473$as_echo_n "checking for $ac_word... " >&6; }
7474if ${ac_cv_path_LN+:} false; then :
7475  $as_echo_n "(cached) " >&6
7476else
7477  case $LN in
7478  [\\/]* | ?:[\\/]*)
7479  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7480  ;;
7481  *)
7482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7483for as_dir in $PATH
7484do
7485  IFS=$as_save_IFS
7486  test -z "$as_dir" && as_dir=.
7487    for ac_exec_ext in '' $ac_executable_extensions; do
7488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7489    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7491    break 2
7492  fi
7493done
7494  done
7495IFS=$as_save_IFS
7496
7497  ;;
7498esac
7499fi
7500LN=$ac_cv_path_LN
7501if test -n "$LN"; then
7502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7503$as_echo "$LN" >&6; }
7504else
7505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7506$as_echo "no" >&6; }
7507fi
7508
7509
7510  test -n "$LN" && break
7511done
7512
7513  else
7514    # The variable is set, but is it from the command line or the environment?
7515
7516    # Try to remove the string !LN! from our list.
7517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7519      # If it failed, the variable was not from the command line. Ignore it,
7520      # but warn the user (except for BASH, which is always set by the calling BASH).
7521      if test "xLN" != xBASH; then
7522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7523$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7524      fi
7525      # Try to locate tool using the code snippet
7526      for ac_prog in ln
7527do
7528  # Extract the first word of "$ac_prog", so it can be a program name with args.
7529set dummy $ac_prog; ac_word=$2
7530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7531$as_echo_n "checking for $ac_word... " >&6; }
7532if ${ac_cv_path_LN+:} false; then :
7533  $as_echo_n "(cached) " >&6
7534else
7535  case $LN in
7536  [\\/]* | ?:[\\/]*)
7537  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7538  ;;
7539  *)
7540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7541for as_dir in $PATH
7542do
7543  IFS=$as_save_IFS
7544  test -z "$as_dir" && as_dir=.
7545    for ac_exec_ext in '' $ac_executable_extensions; do
7546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7547    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7549    break 2
7550  fi
7551done
7552  done
7553IFS=$as_save_IFS
7554
7555  ;;
7556esac
7557fi
7558LN=$ac_cv_path_LN
7559if test -n "$LN"; then
7560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7561$as_echo "$LN" >&6; }
7562else
7563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7564$as_echo "no" >&6; }
7565fi
7566
7567
7568  test -n "$LN" && break
7569done
7570
7571    else
7572      # If it succeeded, then it was overridden by the user. We will use it
7573      # for the tool.
7574
7575      # First remove it from the list of overridden variables, so we can test
7576      # for unknown variables in the end.
7577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7578
7579      # Check if the provided tool contains a complete path.
7580      tool_specified="$LN"
7581      tool_basename="${tool_specified##*/}"
7582      if test "x$tool_basename" = "x$tool_specified"; then
7583        # A command without a complete path is provided, search $PATH.
7584        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7585$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7586        # Extract the first word of "$tool_basename", so it can be a program name with args.
7587set dummy $tool_basename; ac_word=$2
7588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7589$as_echo_n "checking for $ac_word... " >&6; }
7590if ${ac_cv_path_LN+:} false; then :
7591  $as_echo_n "(cached) " >&6
7592else
7593  case $LN in
7594  [\\/]* | ?:[\\/]*)
7595  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7596  ;;
7597  *)
7598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7599for as_dir in $PATH
7600do
7601  IFS=$as_save_IFS
7602  test -z "$as_dir" && as_dir=.
7603    for ac_exec_ext in '' $ac_executable_extensions; do
7604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7605    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7607    break 2
7608  fi
7609done
7610  done
7611IFS=$as_save_IFS
7612
7613  ;;
7614esac
7615fi
7616LN=$ac_cv_path_LN
7617if test -n "$LN"; then
7618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7619$as_echo "$LN" >&6; }
7620else
7621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7622$as_echo "no" >&6; }
7623fi
7624
7625
7626        if test "x$LN" = x; then
7627          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7628        fi
7629      else
7630        # Otherwise we believe it is a complete path. Use it as it is.
7631        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7632$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7633        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7634$as_echo_n "checking for LN... " >&6; }
7635        if test ! -x "$tool_specified"; then
7636          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7637$as_echo "not found" >&6; }
7638          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7639        fi
7640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7641$as_echo "$tool_specified" >&6; }
7642      fi
7643    fi
7644  fi
7645
7646
7647
7648  if test "x$LN" = x; then
7649    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7650  fi
7651
7652
7653
7654
7655
7656  # Publish this variable in the help.
7657
7658
7659  if test "x$LS" = x; then
7660    # The variable is not set by user, try to locate tool using the code snippet
7661    for ac_prog in ls
7662do
7663  # Extract the first word of "$ac_prog", so it can be a program name with args.
7664set dummy $ac_prog; ac_word=$2
7665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7666$as_echo_n "checking for $ac_word... " >&6; }
7667if ${ac_cv_path_LS+:} false; then :
7668  $as_echo_n "(cached) " >&6
7669else
7670  case $LS in
7671  [\\/]* | ?:[\\/]*)
7672  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7673  ;;
7674  *)
7675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7676for as_dir in $PATH
7677do
7678  IFS=$as_save_IFS
7679  test -z "$as_dir" && as_dir=.
7680    for ac_exec_ext in '' $ac_executable_extensions; do
7681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7682    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7684    break 2
7685  fi
7686done
7687  done
7688IFS=$as_save_IFS
7689
7690  ;;
7691esac
7692fi
7693LS=$ac_cv_path_LS
7694if test -n "$LS"; then
7695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7696$as_echo "$LS" >&6; }
7697else
7698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7699$as_echo "no" >&6; }
7700fi
7701
7702
7703  test -n "$LS" && break
7704done
7705
7706  else
7707    # The variable is set, but is it from the command line or the environment?
7708
7709    # Try to remove the string !LS! from our list.
7710    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7711    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7712      # If it failed, the variable was not from the command line. Ignore it,
7713      # but warn the user (except for BASH, which is always set by the calling BASH).
7714      if test "xLS" != xBASH; then
7715        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7716$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7717      fi
7718      # Try to locate tool using the code snippet
7719      for ac_prog in ls
7720do
7721  # Extract the first word of "$ac_prog", so it can be a program name with args.
7722set dummy $ac_prog; ac_word=$2
7723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7724$as_echo_n "checking for $ac_word... " >&6; }
7725if ${ac_cv_path_LS+:} false; then :
7726  $as_echo_n "(cached) " >&6
7727else
7728  case $LS in
7729  [\\/]* | ?:[\\/]*)
7730  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7731  ;;
7732  *)
7733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7734for as_dir in $PATH
7735do
7736  IFS=$as_save_IFS
7737  test -z "$as_dir" && as_dir=.
7738    for ac_exec_ext in '' $ac_executable_extensions; do
7739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7740    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7742    break 2
7743  fi
7744done
7745  done
7746IFS=$as_save_IFS
7747
7748  ;;
7749esac
7750fi
7751LS=$ac_cv_path_LS
7752if test -n "$LS"; then
7753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7754$as_echo "$LS" >&6; }
7755else
7756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7757$as_echo "no" >&6; }
7758fi
7759
7760
7761  test -n "$LS" && break
7762done
7763
7764    else
7765      # If it succeeded, then it was overridden by the user. We will use it
7766      # for the tool.
7767
7768      # First remove it from the list of overridden variables, so we can test
7769      # for unknown variables in the end.
7770      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7771
7772      # Check if the provided tool contains a complete path.
7773      tool_specified="$LS"
7774      tool_basename="${tool_specified##*/}"
7775      if test "x$tool_basename" = "x$tool_specified"; then
7776        # A command without a complete path is provided, search $PATH.
7777        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7778$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7779        # Extract the first word of "$tool_basename", so it can be a program name with args.
7780set dummy $tool_basename; ac_word=$2
7781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7782$as_echo_n "checking for $ac_word... " >&6; }
7783if ${ac_cv_path_LS+:} false; then :
7784  $as_echo_n "(cached) " >&6
7785else
7786  case $LS in
7787  [\\/]* | ?:[\\/]*)
7788  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7789  ;;
7790  *)
7791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7792for as_dir in $PATH
7793do
7794  IFS=$as_save_IFS
7795  test -z "$as_dir" && as_dir=.
7796    for ac_exec_ext in '' $ac_executable_extensions; do
7797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7798    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7800    break 2
7801  fi
7802done
7803  done
7804IFS=$as_save_IFS
7805
7806  ;;
7807esac
7808fi
7809LS=$ac_cv_path_LS
7810if test -n "$LS"; then
7811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7812$as_echo "$LS" >&6; }
7813else
7814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7815$as_echo "no" >&6; }
7816fi
7817
7818
7819        if test "x$LS" = x; then
7820          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7821        fi
7822      else
7823        # Otherwise we believe it is a complete path. Use it as it is.
7824        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7825$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7826        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7827$as_echo_n "checking for LS... " >&6; }
7828        if test ! -x "$tool_specified"; then
7829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7830$as_echo "not found" >&6; }
7831          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7832        fi
7833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7834$as_echo "$tool_specified" >&6; }
7835      fi
7836    fi
7837  fi
7838
7839
7840
7841  if test "x$LS" = x; then
7842    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7843  fi
7844
7845
7846
7847
7848
7849  # Publish this variable in the help.
7850
7851
7852  if test "x$MKDIR" = x; then
7853    # The variable is not set by user, try to locate tool using the code snippet
7854    for ac_prog in mkdir
7855do
7856  # Extract the first word of "$ac_prog", so it can be a program name with args.
7857set dummy $ac_prog; ac_word=$2
7858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7859$as_echo_n "checking for $ac_word... " >&6; }
7860if ${ac_cv_path_MKDIR+:} false; then :
7861  $as_echo_n "(cached) " >&6
7862else
7863  case $MKDIR in
7864  [\\/]* | ?:[\\/]*)
7865  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7866  ;;
7867  *)
7868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7869for as_dir in $PATH
7870do
7871  IFS=$as_save_IFS
7872  test -z "$as_dir" && as_dir=.
7873    for ac_exec_ext in '' $ac_executable_extensions; do
7874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7875    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7877    break 2
7878  fi
7879done
7880  done
7881IFS=$as_save_IFS
7882
7883  ;;
7884esac
7885fi
7886MKDIR=$ac_cv_path_MKDIR
7887if test -n "$MKDIR"; then
7888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7889$as_echo "$MKDIR" >&6; }
7890else
7891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7892$as_echo "no" >&6; }
7893fi
7894
7895
7896  test -n "$MKDIR" && break
7897done
7898
7899  else
7900    # The variable is set, but is it from the command line or the environment?
7901
7902    # Try to remove the string !MKDIR! from our list.
7903    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7904    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7905      # If it failed, the variable was not from the command line. Ignore it,
7906      # but warn the user (except for BASH, which is always set by the calling BASH).
7907      if test "xMKDIR" != xBASH; then
7908        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7909$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7910      fi
7911      # Try to locate tool using the code snippet
7912      for ac_prog in mkdir
7913do
7914  # Extract the first word of "$ac_prog", so it can be a program name with args.
7915set dummy $ac_prog; ac_word=$2
7916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7917$as_echo_n "checking for $ac_word... " >&6; }
7918if ${ac_cv_path_MKDIR+:} false; then :
7919  $as_echo_n "(cached) " >&6
7920else
7921  case $MKDIR in
7922  [\\/]* | ?:[\\/]*)
7923  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7924  ;;
7925  *)
7926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7927for as_dir in $PATH
7928do
7929  IFS=$as_save_IFS
7930  test -z "$as_dir" && as_dir=.
7931    for ac_exec_ext in '' $ac_executable_extensions; do
7932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7933    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7935    break 2
7936  fi
7937done
7938  done
7939IFS=$as_save_IFS
7940
7941  ;;
7942esac
7943fi
7944MKDIR=$ac_cv_path_MKDIR
7945if test -n "$MKDIR"; then
7946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7947$as_echo "$MKDIR" >&6; }
7948else
7949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7950$as_echo "no" >&6; }
7951fi
7952
7953
7954  test -n "$MKDIR" && break
7955done
7956
7957    else
7958      # If it succeeded, then it was overridden by the user. We will use it
7959      # for the tool.
7960
7961      # First remove it from the list of overridden variables, so we can test
7962      # for unknown variables in the end.
7963      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7964
7965      # Check if the provided tool contains a complete path.
7966      tool_specified="$MKDIR"
7967      tool_basename="${tool_specified##*/}"
7968      if test "x$tool_basename" = "x$tool_specified"; then
7969        # A command without a complete path is provided, search $PATH.
7970        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7971$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7972        # Extract the first word of "$tool_basename", so it can be a program name with args.
7973set dummy $tool_basename; ac_word=$2
7974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7975$as_echo_n "checking for $ac_word... " >&6; }
7976if ${ac_cv_path_MKDIR+:} false; then :
7977  $as_echo_n "(cached) " >&6
7978else
7979  case $MKDIR in
7980  [\\/]* | ?:[\\/]*)
7981  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7982  ;;
7983  *)
7984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7985for as_dir in $PATH
7986do
7987  IFS=$as_save_IFS
7988  test -z "$as_dir" && as_dir=.
7989    for ac_exec_ext in '' $ac_executable_extensions; do
7990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7991    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7993    break 2
7994  fi
7995done
7996  done
7997IFS=$as_save_IFS
7998
7999  ;;
8000esac
8001fi
8002MKDIR=$ac_cv_path_MKDIR
8003if test -n "$MKDIR"; then
8004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8005$as_echo "$MKDIR" >&6; }
8006else
8007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8008$as_echo "no" >&6; }
8009fi
8010
8011
8012        if test "x$MKDIR" = x; then
8013          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8014        fi
8015      else
8016        # Otherwise we believe it is a complete path. Use it as it is.
8017        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8018$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8020$as_echo_n "checking for MKDIR... " >&6; }
8021        if test ! -x "$tool_specified"; then
8022          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8023$as_echo "not found" >&6; }
8024          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8025        fi
8026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8027$as_echo "$tool_specified" >&6; }
8028      fi
8029    fi
8030  fi
8031
8032
8033
8034  if test "x$MKDIR" = x; then
8035    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8036  fi
8037
8038
8039
8040
8041
8042  # Publish this variable in the help.
8043
8044
8045  if test "x$MKTEMP" = x; then
8046    # The variable is not set by user, try to locate tool using the code snippet
8047    for ac_prog in mktemp
8048do
8049  # Extract the first word of "$ac_prog", so it can be a program name with args.
8050set dummy $ac_prog; ac_word=$2
8051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8052$as_echo_n "checking for $ac_word... " >&6; }
8053if ${ac_cv_path_MKTEMP+:} false; then :
8054  $as_echo_n "(cached) " >&6
8055else
8056  case $MKTEMP in
8057  [\\/]* | ?:[\\/]*)
8058  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8059  ;;
8060  *)
8061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8062for as_dir in $PATH
8063do
8064  IFS=$as_save_IFS
8065  test -z "$as_dir" && as_dir=.
8066    for ac_exec_ext in '' $ac_executable_extensions; do
8067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8068    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8070    break 2
8071  fi
8072done
8073  done
8074IFS=$as_save_IFS
8075
8076  ;;
8077esac
8078fi
8079MKTEMP=$ac_cv_path_MKTEMP
8080if test -n "$MKTEMP"; then
8081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8082$as_echo "$MKTEMP" >&6; }
8083else
8084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8085$as_echo "no" >&6; }
8086fi
8087
8088
8089  test -n "$MKTEMP" && break
8090done
8091
8092  else
8093    # The variable is set, but is it from the command line or the environment?
8094
8095    # Try to remove the string !MKTEMP! from our list.
8096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8098      # If it failed, the variable was not from the command line. Ignore it,
8099      # but warn the user (except for BASH, which is always set by the calling BASH).
8100      if test "xMKTEMP" != xBASH; then
8101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8102$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8103      fi
8104      # Try to locate tool using the code snippet
8105      for ac_prog in mktemp
8106do
8107  # Extract the first word of "$ac_prog", so it can be a program name with args.
8108set dummy $ac_prog; ac_word=$2
8109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8110$as_echo_n "checking for $ac_word... " >&6; }
8111if ${ac_cv_path_MKTEMP+:} false; then :
8112  $as_echo_n "(cached) " >&6
8113else
8114  case $MKTEMP in
8115  [\\/]* | ?:[\\/]*)
8116  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8117  ;;
8118  *)
8119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8120for as_dir in $PATH
8121do
8122  IFS=$as_save_IFS
8123  test -z "$as_dir" && as_dir=.
8124    for ac_exec_ext in '' $ac_executable_extensions; do
8125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8126    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8128    break 2
8129  fi
8130done
8131  done
8132IFS=$as_save_IFS
8133
8134  ;;
8135esac
8136fi
8137MKTEMP=$ac_cv_path_MKTEMP
8138if test -n "$MKTEMP"; then
8139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8140$as_echo "$MKTEMP" >&6; }
8141else
8142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8143$as_echo "no" >&6; }
8144fi
8145
8146
8147  test -n "$MKTEMP" && break
8148done
8149
8150    else
8151      # If it succeeded, then it was overridden by the user. We will use it
8152      # for the tool.
8153
8154      # First remove it from the list of overridden variables, so we can test
8155      # for unknown variables in the end.
8156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8157
8158      # Check if the provided tool contains a complete path.
8159      tool_specified="$MKTEMP"
8160      tool_basename="${tool_specified##*/}"
8161      if test "x$tool_basename" = "x$tool_specified"; then
8162        # A command without a complete path is provided, search $PATH.
8163        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8164$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8165        # Extract the first word of "$tool_basename", so it can be a program name with args.
8166set dummy $tool_basename; ac_word=$2
8167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8168$as_echo_n "checking for $ac_word... " >&6; }
8169if ${ac_cv_path_MKTEMP+:} false; then :
8170  $as_echo_n "(cached) " >&6
8171else
8172  case $MKTEMP in
8173  [\\/]* | ?:[\\/]*)
8174  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8175  ;;
8176  *)
8177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8178for as_dir in $PATH
8179do
8180  IFS=$as_save_IFS
8181  test -z "$as_dir" && as_dir=.
8182    for ac_exec_ext in '' $ac_executable_extensions; do
8183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8184    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8186    break 2
8187  fi
8188done
8189  done
8190IFS=$as_save_IFS
8191
8192  ;;
8193esac
8194fi
8195MKTEMP=$ac_cv_path_MKTEMP
8196if test -n "$MKTEMP"; then
8197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8198$as_echo "$MKTEMP" >&6; }
8199else
8200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8201$as_echo "no" >&6; }
8202fi
8203
8204
8205        if test "x$MKTEMP" = x; then
8206          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8207        fi
8208      else
8209        # Otherwise we believe it is a complete path. Use it as it is.
8210        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8211$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8212        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8213$as_echo_n "checking for MKTEMP... " >&6; }
8214        if test ! -x "$tool_specified"; then
8215          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8216$as_echo "not found" >&6; }
8217          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8218        fi
8219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8220$as_echo "$tool_specified" >&6; }
8221      fi
8222    fi
8223  fi
8224
8225
8226
8227  if test "x$MKTEMP" = x; then
8228    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8229  fi
8230
8231
8232
8233
8234
8235  # Publish this variable in the help.
8236
8237
8238  if test "x$MV" = x; then
8239    # The variable is not set by user, try to locate tool using the code snippet
8240    for ac_prog in mv
8241do
8242  # Extract the first word of "$ac_prog", so it can be a program name with args.
8243set dummy $ac_prog; ac_word=$2
8244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8245$as_echo_n "checking for $ac_word... " >&6; }
8246if ${ac_cv_path_MV+:} false; then :
8247  $as_echo_n "(cached) " >&6
8248else
8249  case $MV in
8250  [\\/]* | ?:[\\/]*)
8251  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8252  ;;
8253  *)
8254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8255for as_dir in $PATH
8256do
8257  IFS=$as_save_IFS
8258  test -z "$as_dir" && as_dir=.
8259    for ac_exec_ext in '' $ac_executable_extensions; do
8260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8261    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8263    break 2
8264  fi
8265done
8266  done
8267IFS=$as_save_IFS
8268
8269  ;;
8270esac
8271fi
8272MV=$ac_cv_path_MV
8273if test -n "$MV"; then
8274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8275$as_echo "$MV" >&6; }
8276else
8277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8278$as_echo "no" >&6; }
8279fi
8280
8281
8282  test -n "$MV" && break
8283done
8284
8285  else
8286    # The variable is set, but is it from the command line or the environment?
8287
8288    # Try to remove the string !MV! from our list.
8289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8291      # If it failed, the variable was not from the command line. Ignore it,
8292      # but warn the user (except for BASH, which is always set by the calling BASH).
8293      if test "xMV" != xBASH; then
8294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8295$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8296      fi
8297      # Try to locate tool using the code snippet
8298      for ac_prog in mv
8299do
8300  # Extract the first word of "$ac_prog", so it can be a program name with args.
8301set dummy $ac_prog; ac_word=$2
8302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8303$as_echo_n "checking for $ac_word... " >&6; }
8304if ${ac_cv_path_MV+:} false; then :
8305  $as_echo_n "(cached) " >&6
8306else
8307  case $MV in
8308  [\\/]* | ?:[\\/]*)
8309  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8310  ;;
8311  *)
8312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8313for as_dir in $PATH
8314do
8315  IFS=$as_save_IFS
8316  test -z "$as_dir" && as_dir=.
8317    for ac_exec_ext in '' $ac_executable_extensions; do
8318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8319    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8321    break 2
8322  fi
8323done
8324  done
8325IFS=$as_save_IFS
8326
8327  ;;
8328esac
8329fi
8330MV=$ac_cv_path_MV
8331if test -n "$MV"; then
8332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8333$as_echo "$MV" >&6; }
8334else
8335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8336$as_echo "no" >&6; }
8337fi
8338
8339
8340  test -n "$MV" && break
8341done
8342
8343    else
8344      # If it succeeded, then it was overridden by the user. We will use it
8345      # for the tool.
8346
8347      # First remove it from the list of overridden variables, so we can test
8348      # for unknown variables in the end.
8349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8350
8351      # Check if the provided tool contains a complete path.
8352      tool_specified="$MV"
8353      tool_basename="${tool_specified##*/}"
8354      if test "x$tool_basename" = "x$tool_specified"; then
8355        # A command without a complete path is provided, search $PATH.
8356        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8357$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8358        # Extract the first word of "$tool_basename", so it can be a program name with args.
8359set dummy $tool_basename; ac_word=$2
8360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8361$as_echo_n "checking for $ac_word... " >&6; }
8362if ${ac_cv_path_MV+:} false; then :
8363  $as_echo_n "(cached) " >&6
8364else
8365  case $MV in
8366  [\\/]* | ?:[\\/]*)
8367  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8368  ;;
8369  *)
8370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8371for as_dir in $PATH
8372do
8373  IFS=$as_save_IFS
8374  test -z "$as_dir" && as_dir=.
8375    for ac_exec_ext in '' $ac_executable_extensions; do
8376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8377    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8379    break 2
8380  fi
8381done
8382  done
8383IFS=$as_save_IFS
8384
8385  ;;
8386esac
8387fi
8388MV=$ac_cv_path_MV
8389if test -n "$MV"; then
8390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8391$as_echo "$MV" >&6; }
8392else
8393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8394$as_echo "no" >&6; }
8395fi
8396
8397
8398        if test "x$MV" = x; then
8399          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8400        fi
8401      else
8402        # Otherwise we believe it is a complete path. Use it as it is.
8403        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8404$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8405        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8406$as_echo_n "checking for MV... " >&6; }
8407        if test ! -x "$tool_specified"; then
8408          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8409$as_echo "not found" >&6; }
8410          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8411        fi
8412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8413$as_echo "$tool_specified" >&6; }
8414      fi
8415    fi
8416  fi
8417
8418
8419
8420  if test "x$MV" = x; then
8421    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8422  fi
8423
8424
8425
8426
8427
8428  # Publish this variable in the help.
8429
8430
8431  if test "x$NAWK" = x; then
8432    # The variable is not set by user, try to locate tool using the code snippet
8433    for ac_prog in nawk gawk awk
8434do
8435  # Extract the first word of "$ac_prog", so it can be a program name with args.
8436set dummy $ac_prog; ac_word=$2
8437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8438$as_echo_n "checking for $ac_word... " >&6; }
8439if ${ac_cv_path_NAWK+:} false; then :
8440  $as_echo_n "(cached) " >&6
8441else
8442  case $NAWK in
8443  [\\/]* | ?:[\\/]*)
8444  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8445  ;;
8446  *)
8447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8448for as_dir in $PATH
8449do
8450  IFS=$as_save_IFS
8451  test -z "$as_dir" && as_dir=.
8452    for ac_exec_ext in '' $ac_executable_extensions; do
8453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8454    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8456    break 2
8457  fi
8458done
8459  done
8460IFS=$as_save_IFS
8461
8462  ;;
8463esac
8464fi
8465NAWK=$ac_cv_path_NAWK
8466if test -n "$NAWK"; then
8467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8468$as_echo "$NAWK" >&6; }
8469else
8470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8471$as_echo "no" >&6; }
8472fi
8473
8474
8475  test -n "$NAWK" && break
8476done
8477
8478  else
8479    # The variable is set, but is it from the command line or the environment?
8480
8481    # Try to remove the string !NAWK! from our list.
8482    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8483    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8484      # If it failed, the variable was not from the command line. Ignore it,
8485      # but warn the user (except for BASH, which is always set by the calling BASH).
8486      if test "xNAWK" != xBASH; then
8487        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8488$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8489      fi
8490      # Try to locate tool using the code snippet
8491      for ac_prog in nawk gawk awk
8492do
8493  # Extract the first word of "$ac_prog", so it can be a program name with args.
8494set dummy $ac_prog; ac_word=$2
8495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8496$as_echo_n "checking for $ac_word... " >&6; }
8497if ${ac_cv_path_NAWK+:} false; then :
8498  $as_echo_n "(cached) " >&6
8499else
8500  case $NAWK in
8501  [\\/]* | ?:[\\/]*)
8502  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8503  ;;
8504  *)
8505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8506for as_dir in $PATH
8507do
8508  IFS=$as_save_IFS
8509  test -z "$as_dir" && as_dir=.
8510    for ac_exec_ext in '' $ac_executable_extensions; do
8511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8512    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8514    break 2
8515  fi
8516done
8517  done
8518IFS=$as_save_IFS
8519
8520  ;;
8521esac
8522fi
8523NAWK=$ac_cv_path_NAWK
8524if test -n "$NAWK"; then
8525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8526$as_echo "$NAWK" >&6; }
8527else
8528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8529$as_echo "no" >&6; }
8530fi
8531
8532
8533  test -n "$NAWK" && break
8534done
8535
8536    else
8537      # If it succeeded, then it was overridden by the user. We will use it
8538      # for the tool.
8539
8540      # First remove it from the list of overridden variables, so we can test
8541      # for unknown variables in the end.
8542      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8543
8544      # Check if the provided tool contains a complete path.
8545      tool_specified="$NAWK"
8546      tool_basename="${tool_specified##*/}"
8547      if test "x$tool_basename" = "x$tool_specified"; then
8548        # A command without a complete path is provided, search $PATH.
8549        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8550$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8551        # Extract the first word of "$tool_basename", so it can be a program name with args.
8552set dummy $tool_basename; ac_word=$2
8553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8554$as_echo_n "checking for $ac_word... " >&6; }
8555if ${ac_cv_path_NAWK+:} false; then :
8556  $as_echo_n "(cached) " >&6
8557else
8558  case $NAWK in
8559  [\\/]* | ?:[\\/]*)
8560  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8561  ;;
8562  *)
8563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8564for as_dir in $PATH
8565do
8566  IFS=$as_save_IFS
8567  test -z "$as_dir" && as_dir=.
8568    for ac_exec_ext in '' $ac_executable_extensions; do
8569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8570    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8572    break 2
8573  fi
8574done
8575  done
8576IFS=$as_save_IFS
8577
8578  ;;
8579esac
8580fi
8581NAWK=$ac_cv_path_NAWK
8582if test -n "$NAWK"; then
8583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8584$as_echo "$NAWK" >&6; }
8585else
8586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8587$as_echo "no" >&6; }
8588fi
8589
8590
8591        if test "x$NAWK" = x; then
8592          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8593        fi
8594      else
8595        # Otherwise we believe it is a complete path. Use it as it is.
8596        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8597$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8598        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8599$as_echo_n "checking for NAWK... " >&6; }
8600        if test ! -x "$tool_specified"; then
8601          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8602$as_echo "not found" >&6; }
8603          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8604        fi
8605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8606$as_echo "$tool_specified" >&6; }
8607      fi
8608    fi
8609  fi
8610
8611
8612
8613  if test "x$NAWK" = x; then
8614    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8615  fi
8616
8617
8618
8619
8620
8621  # Publish this variable in the help.
8622
8623
8624  if test "x$PRINTF" = x; then
8625    # The variable is not set by user, try to locate tool using the code snippet
8626    for ac_prog in printf
8627do
8628  # Extract the first word of "$ac_prog", so it can be a program name with args.
8629set dummy $ac_prog; ac_word=$2
8630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8631$as_echo_n "checking for $ac_word... " >&6; }
8632if ${ac_cv_path_PRINTF+:} false; then :
8633  $as_echo_n "(cached) " >&6
8634else
8635  case $PRINTF in
8636  [\\/]* | ?:[\\/]*)
8637  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8638  ;;
8639  *)
8640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8641for as_dir in $PATH
8642do
8643  IFS=$as_save_IFS
8644  test -z "$as_dir" && as_dir=.
8645    for ac_exec_ext in '' $ac_executable_extensions; do
8646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8647    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8649    break 2
8650  fi
8651done
8652  done
8653IFS=$as_save_IFS
8654
8655  ;;
8656esac
8657fi
8658PRINTF=$ac_cv_path_PRINTF
8659if test -n "$PRINTF"; then
8660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8661$as_echo "$PRINTF" >&6; }
8662else
8663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8664$as_echo "no" >&6; }
8665fi
8666
8667
8668  test -n "$PRINTF" && break
8669done
8670
8671  else
8672    # The variable is set, but is it from the command line or the environment?
8673
8674    # Try to remove the string !PRINTF! from our list.
8675    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8676    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8677      # If it failed, the variable was not from the command line. Ignore it,
8678      # but warn the user (except for BASH, which is always set by the calling BASH).
8679      if test "xPRINTF" != xBASH; then
8680        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8681$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8682      fi
8683      # Try to locate tool using the code snippet
8684      for ac_prog in printf
8685do
8686  # Extract the first word of "$ac_prog", so it can be a program name with args.
8687set dummy $ac_prog; ac_word=$2
8688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8689$as_echo_n "checking for $ac_word... " >&6; }
8690if ${ac_cv_path_PRINTF+:} false; then :
8691  $as_echo_n "(cached) " >&6
8692else
8693  case $PRINTF in
8694  [\\/]* | ?:[\\/]*)
8695  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8696  ;;
8697  *)
8698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8699for as_dir in $PATH
8700do
8701  IFS=$as_save_IFS
8702  test -z "$as_dir" && as_dir=.
8703    for ac_exec_ext in '' $ac_executable_extensions; do
8704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8705    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8707    break 2
8708  fi
8709done
8710  done
8711IFS=$as_save_IFS
8712
8713  ;;
8714esac
8715fi
8716PRINTF=$ac_cv_path_PRINTF
8717if test -n "$PRINTF"; then
8718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8719$as_echo "$PRINTF" >&6; }
8720else
8721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8722$as_echo "no" >&6; }
8723fi
8724
8725
8726  test -n "$PRINTF" && break
8727done
8728
8729    else
8730      # If it succeeded, then it was overridden by the user. We will use it
8731      # for the tool.
8732
8733      # First remove it from the list of overridden variables, so we can test
8734      # for unknown variables in the end.
8735      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8736
8737      # Check if the provided tool contains a complete path.
8738      tool_specified="$PRINTF"
8739      tool_basename="${tool_specified##*/}"
8740      if test "x$tool_basename" = "x$tool_specified"; then
8741        # A command without a complete path is provided, search $PATH.
8742        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8743$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8744        # Extract the first word of "$tool_basename", so it can be a program name with args.
8745set dummy $tool_basename; ac_word=$2
8746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8747$as_echo_n "checking for $ac_word... " >&6; }
8748if ${ac_cv_path_PRINTF+:} false; then :
8749  $as_echo_n "(cached) " >&6
8750else
8751  case $PRINTF in
8752  [\\/]* | ?:[\\/]*)
8753  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8754  ;;
8755  *)
8756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8757for as_dir in $PATH
8758do
8759  IFS=$as_save_IFS
8760  test -z "$as_dir" && as_dir=.
8761    for ac_exec_ext in '' $ac_executable_extensions; do
8762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8763    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8765    break 2
8766  fi
8767done
8768  done
8769IFS=$as_save_IFS
8770
8771  ;;
8772esac
8773fi
8774PRINTF=$ac_cv_path_PRINTF
8775if test -n "$PRINTF"; then
8776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8777$as_echo "$PRINTF" >&6; }
8778else
8779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8780$as_echo "no" >&6; }
8781fi
8782
8783
8784        if test "x$PRINTF" = x; then
8785          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8786        fi
8787      else
8788        # Otherwise we believe it is a complete path. Use it as it is.
8789        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8790$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8791        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8792$as_echo_n "checking for PRINTF... " >&6; }
8793        if test ! -x "$tool_specified"; then
8794          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8795$as_echo "not found" >&6; }
8796          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8797        fi
8798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8799$as_echo "$tool_specified" >&6; }
8800      fi
8801    fi
8802  fi
8803
8804
8805
8806  if test "x$PRINTF" = x; then
8807    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8808  fi
8809
8810
8811
8812
8813
8814  # Publish this variable in the help.
8815
8816
8817  if test "x$RM" = x; then
8818    # The variable is not set by user, try to locate tool using the code snippet
8819    for ac_prog in rm
8820do
8821  # Extract the first word of "$ac_prog", so it can be a program name with args.
8822set dummy $ac_prog; ac_word=$2
8823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8824$as_echo_n "checking for $ac_word... " >&6; }
8825if ${ac_cv_path_RM+:} false; then :
8826  $as_echo_n "(cached) " >&6
8827else
8828  case $RM in
8829  [\\/]* | ?:[\\/]*)
8830  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8831  ;;
8832  *)
8833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8834for as_dir in $PATH
8835do
8836  IFS=$as_save_IFS
8837  test -z "$as_dir" && as_dir=.
8838    for ac_exec_ext in '' $ac_executable_extensions; do
8839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8840    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8842    break 2
8843  fi
8844done
8845  done
8846IFS=$as_save_IFS
8847
8848  ;;
8849esac
8850fi
8851RM=$ac_cv_path_RM
8852if test -n "$RM"; then
8853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8854$as_echo "$RM" >&6; }
8855else
8856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8857$as_echo "no" >&6; }
8858fi
8859
8860
8861  test -n "$RM" && break
8862done
8863
8864  else
8865    # The variable is set, but is it from the command line or the environment?
8866
8867    # Try to remove the string !RM! from our list.
8868    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8869    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8870      # If it failed, the variable was not from the command line. Ignore it,
8871      # but warn the user (except for BASH, which is always set by the calling BASH).
8872      if test "xRM" != xBASH; then
8873        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8874$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8875      fi
8876      # Try to locate tool using the code snippet
8877      for ac_prog in rm
8878do
8879  # Extract the first word of "$ac_prog", so it can be a program name with args.
8880set dummy $ac_prog; ac_word=$2
8881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8882$as_echo_n "checking for $ac_word... " >&6; }
8883if ${ac_cv_path_RM+:} false; then :
8884  $as_echo_n "(cached) " >&6
8885else
8886  case $RM in
8887  [\\/]* | ?:[\\/]*)
8888  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8889  ;;
8890  *)
8891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8892for as_dir in $PATH
8893do
8894  IFS=$as_save_IFS
8895  test -z "$as_dir" && as_dir=.
8896    for ac_exec_ext in '' $ac_executable_extensions; do
8897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8898    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8900    break 2
8901  fi
8902done
8903  done
8904IFS=$as_save_IFS
8905
8906  ;;
8907esac
8908fi
8909RM=$ac_cv_path_RM
8910if test -n "$RM"; then
8911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8912$as_echo "$RM" >&6; }
8913else
8914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8915$as_echo "no" >&6; }
8916fi
8917
8918
8919  test -n "$RM" && break
8920done
8921
8922    else
8923      # If it succeeded, then it was overridden by the user. We will use it
8924      # for the tool.
8925
8926      # First remove it from the list of overridden variables, so we can test
8927      # for unknown variables in the end.
8928      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8929
8930      # Check if the provided tool contains a complete path.
8931      tool_specified="$RM"
8932      tool_basename="${tool_specified##*/}"
8933      if test "x$tool_basename" = "x$tool_specified"; then
8934        # A command without a complete path is provided, search $PATH.
8935        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8936$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8937        # Extract the first word of "$tool_basename", so it can be a program name with args.
8938set dummy $tool_basename; ac_word=$2
8939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8940$as_echo_n "checking for $ac_word... " >&6; }
8941if ${ac_cv_path_RM+:} false; then :
8942  $as_echo_n "(cached) " >&6
8943else
8944  case $RM in
8945  [\\/]* | ?:[\\/]*)
8946  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8947  ;;
8948  *)
8949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8950for as_dir in $PATH
8951do
8952  IFS=$as_save_IFS
8953  test -z "$as_dir" && as_dir=.
8954    for ac_exec_ext in '' $ac_executable_extensions; do
8955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8956    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8958    break 2
8959  fi
8960done
8961  done
8962IFS=$as_save_IFS
8963
8964  ;;
8965esac
8966fi
8967RM=$ac_cv_path_RM
8968if test -n "$RM"; then
8969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8970$as_echo "$RM" >&6; }
8971else
8972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8973$as_echo "no" >&6; }
8974fi
8975
8976
8977        if test "x$RM" = x; then
8978          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8979        fi
8980      else
8981        # Otherwise we believe it is a complete path. Use it as it is.
8982        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8983$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8984        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8985$as_echo_n "checking for RM... " >&6; }
8986        if test ! -x "$tool_specified"; then
8987          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8988$as_echo "not found" >&6; }
8989          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
8990        fi
8991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8992$as_echo "$tool_specified" >&6; }
8993      fi
8994    fi
8995  fi
8996
8997
8998
8999  if test "x$RM" = x; then
9000    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9001  fi
9002
9003
9004
9005
9006
9007  # Publish this variable in the help.
9008
9009
9010  if test "x$SH" = x; then
9011    # The variable is not set by user, try to locate tool using the code snippet
9012    for ac_prog in sh
9013do
9014  # Extract the first word of "$ac_prog", so it can be a program name with args.
9015set dummy $ac_prog; ac_word=$2
9016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9017$as_echo_n "checking for $ac_word... " >&6; }
9018if ${ac_cv_path_SH+:} false; then :
9019  $as_echo_n "(cached) " >&6
9020else
9021  case $SH in
9022  [\\/]* | ?:[\\/]*)
9023  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9024  ;;
9025  *)
9026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9027for as_dir in $PATH
9028do
9029  IFS=$as_save_IFS
9030  test -z "$as_dir" && as_dir=.
9031    for ac_exec_ext in '' $ac_executable_extensions; do
9032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9033    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9035    break 2
9036  fi
9037done
9038  done
9039IFS=$as_save_IFS
9040
9041  ;;
9042esac
9043fi
9044SH=$ac_cv_path_SH
9045if test -n "$SH"; then
9046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9047$as_echo "$SH" >&6; }
9048else
9049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9050$as_echo "no" >&6; }
9051fi
9052
9053
9054  test -n "$SH" && break
9055done
9056
9057  else
9058    # The variable is set, but is it from the command line or the environment?
9059
9060    # Try to remove the string !SH! from our list.
9061    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9062    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9063      # If it failed, the variable was not from the command line. Ignore it,
9064      # but warn the user (except for BASH, which is always set by the calling BASH).
9065      if test "xSH" != xBASH; then
9066        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9067$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9068      fi
9069      # Try to locate tool using the code snippet
9070      for ac_prog in sh
9071do
9072  # Extract the first word of "$ac_prog", so it can be a program name with args.
9073set dummy $ac_prog; ac_word=$2
9074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9075$as_echo_n "checking for $ac_word... " >&6; }
9076if ${ac_cv_path_SH+:} false; then :
9077  $as_echo_n "(cached) " >&6
9078else
9079  case $SH in
9080  [\\/]* | ?:[\\/]*)
9081  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9082  ;;
9083  *)
9084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9085for as_dir in $PATH
9086do
9087  IFS=$as_save_IFS
9088  test -z "$as_dir" && as_dir=.
9089    for ac_exec_ext in '' $ac_executable_extensions; do
9090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9091    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9093    break 2
9094  fi
9095done
9096  done
9097IFS=$as_save_IFS
9098
9099  ;;
9100esac
9101fi
9102SH=$ac_cv_path_SH
9103if test -n "$SH"; then
9104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9105$as_echo "$SH" >&6; }
9106else
9107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9108$as_echo "no" >&6; }
9109fi
9110
9111
9112  test -n "$SH" && break
9113done
9114
9115    else
9116      # If it succeeded, then it was overridden by the user. We will use it
9117      # for the tool.
9118
9119      # First remove it from the list of overridden variables, so we can test
9120      # for unknown variables in the end.
9121      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9122
9123      # Check if the provided tool contains a complete path.
9124      tool_specified="$SH"
9125      tool_basename="${tool_specified##*/}"
9126      if test "x$tool_basename" = "x$tool_specified"; then
9127        # A command without a complete path is provided, search $PATH.
9128        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9129$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9130        # Extract the first word of "$tool_basename", so it can be a program name with args.
9131set dummy $tool_basename; ac_word=$2
9132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9133$as_echo_n "checking for $ac_word... " >&6; }
9134if ${ac_cv_path_SH+:} false; then :
9135  $as_echo_n "(cached) " >&6
9136else
9137  case $SH in
9138  [\\/]* | ?:[\\/]*)
9139  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9140  ;;
9141  *)
9142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9143for as_dir in $PATH
9144do
9145  IFS=$as_save_IFS
9146  test -z "$as_dir" && as_dir=.
9147    for ac_exec_ext in '' $ac_executable_extensions; do
9148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9149    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9151    break 2
9152  fi
9153done
9154  done
9155IFS=$as_save_IFS
9156
9157  ;;
9158esac
9159fi
9160SH=$ac_cv_path_SH
9161if test -n "$SH"; then
9162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9163$as_echo "$SH" >&6; }
9164else
9165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9166$as_echo "no" >&6; }
9167fi
9168
9169
9170        if test "x$SH" = x; then
9171          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9172        fi
9173      else
9174        # Otherwise we believe it is a complete path. Use it as it is.
9175        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9176$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9177        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9178$as_echo_n "checking for SH... " >&6; }
9179        if test ! -x "$tool_specified"; then
9180          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9181$as_echo "not found" >&6; }
9182          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9183        fi
9184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9185$as_echo "$tool_specified" >&6; }
9186      fi
9187    fi
9188  fi
9189
9190
9191
9192  if test "x$SH" = x; then
9193    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9194  fi
9195
9196
9197
9198
9199
9200  # Publish this variable in the help.
9201
9202
9203  if test "x$SORT" = x; then
9204    # The variable is not set by user, try to locate tool using the code snippet
9205    for ac_prog in sort
9206do
9207  # Extract the first word of "$ac_prog", so it can be a program name with args.
9208set dummy $ac_prog; ac_word=$2
9209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9210$as_echo_n "checking for $ac_word... " >&6; }
9211if ${ac_cv_path_SORT+:} false; then :
9212  $as_echo_n "(cached) " >&6
9213else
9214  case $SORT in
9215  [\\/]* | ?:[\\/]*)
9216  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9217  ;;
9218  *)
9219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9220for as_dir in $PATH
9221do
9222  IFS=$as_save_IFS
9223  test -z "$as_dir" && as_dir=.
9224    for ac_exec_ext in '' $ac_executable_extensions; do
9225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9226    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9228    break 2
9229  fi
9230done
9231  done
9232IFS=$as_save_IFS
9233
9234  ;;
9235esac
9236fi
9237SORT=$ac_cv_path_SORT
9238if test -n "$SORT"; then
9239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9240$as_echo "$SORT" >&6; }
9241else
9242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9243$as_echo "no" >&6; }
9244fi
9245
9246
9247  test -n "$SORT" && break
9248done
9249
9250  else
9251    # The variable is set, but is it from the command line or the environment?
9252
9253    # Try to remove the string !SORT! from our list.
9254    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9255    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9256      # If it failed, the variable was not from the command line. Ignore it,
9257      # but warn the user (except for BASH, which is always set by the calling BASH).
9258      if test "xSORT" != xBASH; then
9259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9260$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9261      fi
9262      # Try to locate tool using the code snippet
9263      for ac_prog in sort
9264do
9265  # Extract the first word of "$ac_prog", so it can be a program name with args.
9266set dummy $ac_prog; ac_word=$2
9267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9268$as_echo_n "checking for $ac_word... " >&6; }
9269if ${ac_cv_path_SORT+:} false; then :
9270  $as_echo_n "(cached) " >&6
9271else
9272  case $SORT in
9273  [\\/]* | ?:[\\/]*)
9274  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9275  ;;
9276  *)
9277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9278for as_dir in $PATH
9279do
9280  IFS=$as_save_IFS
9281  test -z "$as_dir" && as_dir=.
9282    for ac_exec_ext in '' $ac_executable_extensions; do
9283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9284    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9286    break 2
9287  fi
9288done
9289  done
9290IFS=$as_save_IFS
9291
9292  ;;
9293esac
9294fi
9295SORT=$ac_cv_path_SORT
9296if test -n "$SORT"; then
9297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9298$as_echo "$SORT" >&6; }
9299else
9300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9301$as_echo "no" >&6; }
9302fi
9303
9304
9305  test -n "$SORT" && break
9306done
9307
9308    else
9309      # If it succeeded, then it was overridden by the user. We will use it
9310      # for the tool.
9311
9312      # First remove it from the list of overridden variables, so we can test
9313      # for unknown variables in the end.
9314      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9315
9316      # Check if the provided tool contains a complete path.
9317      tool_specified="$SORT"
9318      tool_basename="${tool_specified##*/}"
9319      if test "x$tool_basename" = "x$tool_specified"; then
9320        # A command without a complete path is provided, search $PATH.
9321        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9322$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9323        # Extract the first word of "$tool_basename", so it can be a program name with args.
9324set dummy $tool_basename; ac_word=$2
9325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9326$as_echo_n "checking for $ac_word... " >&6; }
9327if ${ac_cv_path_SORT+:} false; then :
9328  $as_echo_n "(cached) " >&6
9329else
9330  case $SORT in
9331  [\\/]* | ?:[\\/]*)
9332  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9333  ;;
9334  *)
9335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9336for as_dir in $PATH
9337do
9338  IFS=$as_save_IFS
9339  test -z "$as_dir" && as_dir=.
9340    for ac_exec_ext in '' $ac_executable_extensions; do
9341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9342    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9344    break 2
9345  fi
9346done
9347  done
9348IFS=$as_save_IFS
9349
9350  ;;
9351esac
9352fi
9353SORT=$ac_cv_path_SORT
9354if test -n "$SORT"; then
9355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9356$as_echo "$SORT" >&6; }
9357else
9358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9359$as_echo "no" >&6; }
9360fi
9361
9362
9363        if test "x$SORT" = x; then
9364          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9365        fi
9366      else
9367        # Otherwise we believe it is a complete path. Use it as it is.
9368        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9369$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9370        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9371$as_echo_n "checking for SORT... " >&6; }
9372        if test ! -x "$tool_specified"; then
9373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9374$as_echo "not found" >&6; }
9375          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9376        fi
9377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9378$as_echo "$tool_specified" >&6; }
9379      fi
9380    fi
9381  fi
9382
9383
9384
9385  if test "x$SORT" = x; then
9386    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9387  fi
9388
9389
9390
9391
9392
9393  # Publish this variable in the help.
9394
9395
9396  if test "x$TAIL" = x; then
9397    # The variable is not set by user, try to locate tool using the code snippet
9398    for ac_prog in tail
9399do
9400  # Extract the first word of "$ac_prog", so it can be a program name with args.
9401set dummy $ac_prog; ac_word=$2
9402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9403$as_echo_n "checking for $ac_word... " >&6; }
9404if ${ac_cv_path_TAIL+:} false; then :
9405  $as_echo_n "(cached) " >&6
9406else
9407  case $TAIL in
9408  [\\/]* | ?:[\\/]*)
9409  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9410  ;;
9411  *)
9412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9413for as_dir in $PATH
9414do
9415  IFS=$as_save_IFS
9416  test -z "$as_dir" && as_dir=.
9417    for ac_exec_ext in '' $ac_executable_extensions; do
9418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9419    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9421    break 2
9422  fi
9423done
9424  done
9425IFS=$as_save_IFS
9426
9427  ;;
9428esac
9429fi
9430TAIL=$ac_cv_path_TAIL
9431if test -n "$TAIL"; then
9432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9433$as_echo "$TAIL" >&6; }
9434else
9435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9436$as_echo "no" >&6; }
9437fi
9438
9439
9440  test -n "$TAIL" && break
9441done
9442
9443  else
9444    # The variable is set, but is it from the command line or the environment?
9445
9446    # Try to remove the string !TAIL! from our list.
9447    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9448    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9449      # If it failed, the variable was not from the command line. Ignore it,
9450      # but warn the user (except for BASH, which is always set by the calling BASH).
9451      if test "xTAIL" != xBASH; then
9452        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9453$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9454      fi
9455      # Try to locate tool using the code snippet
9456      for ac_prog in tail
9457do
9458  # Extract the first word of "$ac_prog", so it can be a program name with args.
9459set dummy $ac_prog; ac_word=$2
9460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9461$as_echo_n "checking for $ac_word... " >&6; }
9462if ${ac_cv_path_TAIL+:} false; then :
9463  $as_echo_n "(cached) " >&6
9464else
9465  case $TAIL in
9466  [\\/]* | ?:[\\/]*)
9467  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9468  ;;
9469  *)
9470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9471for as_dir in $PATH
9472do
9473  IFS=$as_save_IFS
9474  test -z "$as_dir" && as_dir=.
9475    for ac_exec_ext in '' $ac_executable_extensions; do
9476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9477    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9479    break 2
9480  fi
9481done
9482  done
9483IFS=$as_save_IFS
9484
9485  ;;
9486esac
9487fi
9488TAIL=$ac_cv_path_TAIL
9489if test -n "$TAIL"; then
9490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9491$as_echo "$TAIL" >&6; }
9492else
9493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9494$as_echo "no" >&6; }
9495fi
9496
9497
9498  test -n "$TAIL" && break
9499done
9500
9501    else
9502      # If it succeeded, then it was overridden by the user. We will use it
9503      # for the tool.
9504
9505      # First remove it from the list of overridden variables, so we can test
9506      # for unknown variables in the end.
9507      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9508
9509      # Check if the provided tool contains a complete path.
9510      tool_specified="$TAIL"
9511      tool_basename="${tool_specified##*/}"
9512      if test "x$tool_basename" = "x$tool_specified"; then
9513        # A command without a complete path is provided, search $PATH.
9514        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9515$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9516        # Extract the first word of "$tool_basename", so it can be a program name with args.
9517set dummy $tool_basename; ac_word=$2
9518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9519$as_echo_n "checking for $ac_word... " >&6; }
9520if ${ac_cv_path_TAIL+:} false; then :
9521  $as_echo_n "(cached) " >&6
9522else
9523  case $TAIL in
9524  [\\/]* | ?:[\\/]*)
9525  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9526  ;;
9527  *)
9528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9529for as_dir in $PATH
9530do
9531  IFS=$as_save_IFS
9532  test -z "$as_dir" && as_dir=.
9533    for ac_exec_ext in '' $ac_executable_extensions; do
9534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9535    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9537    break 2
9538  fi
9539done
9540  done
9541IFS=$as_save_IFS
9542
9543  ;;
9544esac
9545fi
9546TAIL=$ac_cv_path_TAIL
9547if test -n "$TAIL"; then
9548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9549$as_echo "$TAIL" >&6; }
9550else
9551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9552$as_echo "no" >&6; }
9553fi
9554
9555
9556        if test "x$TAIL" = x; then
9557          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9558        fi
9559      else
9560        # Otherwise we believe it is a complete path. Use it as it is.
9561        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9562$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9563        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9564$as_echo_n "checking for TAIL... " >&6; }
9565        if test ! -x "$tool_specified"; then
9566          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9567$as_echo "not found" >&6; }
9568          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9569        fi
9570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9571$as_echo "$tool_specified" >&6; }
9572      fi
9573    fi
9574  fi
9575
9576
9577
9578  if test "x$TAIL" = x; then
9579    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9580  fi
9581
9582
9583
9584
9585
9586  # Publish this variable in the help.
9587
9588
9589  if test "x$TAR" = x; then
9590    # The variable is not set by user, try to locate tool using the code snippet
9591    for ac_prog in tar
9592do
9593  # Extract the first word of "$ac_prog", so it can be a program name with args.
9594set dummy $ac_prog; ac_word=$2
9595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9596$as_echo_n "checking for $ac_word... " >&6; }
9597if ${ac_cv_path_TAR+:} false; then :
9598  $as_echo_n "(cached) " >&6
9599else
9600  case $TAR in
9601  [\\/]* | ?:[\\/]*)
9602  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9603  ;;
9604  *)
9605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9606for as_dir in $PATH
9607do
9608  IFS=$as_save_IFS
9609  test -z "$as_dir" && as_dir=.
9610    for ac_exec_ext in '' $ac_executable_extensions; do
9611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9612    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9614    break 2
9615  fi
9616done
9617  done
9618IFS=$as_save_IFS
9619
9620  ;;
9621esac
9622fi
9623TAR=$ac_cv_path_TAR
9624if test -n "$TAR"; then
9625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9626$as_echo "$TAR" >&6; }
9627else
9628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9629$as_echo "no" >&6; }
9630fi
9631
9632
9633  test -n "$TAR" && break
9634done
9635
9636  else
9637    # The variable is set, but is it from the command line or the environment?
9638
9639    # Try to remove the string !TAR! from our list.
9640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9642      # If it failed, the variable was not from the command line. Ignore it,
9643      # but warn the user (except for BASH, which is always set by the calling BASH).
9644      if test "xTAR" != xBASH; then
9645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9646$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9647      fi
9648      # Try to locate tool using the code snippet
9649      for ac_prog in tar
9650do
9651  # Extract the first word of "$ac_prog", so it can be a program name with args.
9652set dummy $ac_prog; ac_word=$2
9653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9654$as_echo_n "checking for $ac_word... " >&6; }
9655if ${ac_cv_path_TAR+:} false; then :
9656  $as_echo_n "(cached) " >&6
9657else
9658  case $TAR in
9659  [\\/]* | ?:[\\/]*)
9660  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9661  ;;
9662  *)
9663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9664for as_dir in $PATH
9665do
9666  IFS=$as_save_IFS
9667  test -z "$as_dir" && as_dir=.
9668    for ac_exec_ext in '' $ac_executable_extensions; do
9669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9670    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9672    break 2
9673  fi
9674done
9675  done
9676IFS=$as_save_IFS
9677
9678  ;;
9679esac
9680fi
9681TAR=$ac_cv_path_TAR
9682if test -n "$TAR"; then
9683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9684$as_echo "$TAR" >&6; }
9685else
9686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9687$as_echo "no" >&6; }
9688fi
9689
9690
9691  test -n "$TAR" && break
9692done
9693
9694    else
9695      # If it succeeded, then it was overridden by the user. We will use it
9696      # for the tool.
9697
9698      # First remove it from the list of overridden variables, so we can test
9699      # for unknown variables in the end.
9700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9701
9702      # Check if the provided tool contains a complete path.
9703      tool_specified="$TAR"
9704      tool_basename="${tool_specified##*/}"
9705      if test "x$tool_basename" = "x$tool_specified"; then
9706        # A command without a complete path is provided, search $PATH.
9707        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9708$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9709        # Extract the first word of "$tool_basename", so it can be a program name with args.
9710set dummy $tool_basename; ac_word=$2
9711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9712$as_echo_n "checking for $ac_word... " >&6; }
9713if ${ac_cv_path_TAR+:} false; then :
9714  $as_echo_n "(cached) " >&6
9715else
9716  case $TAR in
9717  [\\/]* | ?:[\\/]*)
9718  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9719  ;;
9720  *)
9721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9722for as_dir in $PATH
9723do
9724  IFS=$as_save_IFS
9725  test -z "$as_dir" && as_dir=.
9726    for ac_exec_ext in '' $ac_executable_extensions; do
9727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9728    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9730    break 2
9731  fi
9732done
9733  done
9734IFS=$as_save_IFS
9735
9736  ;;
9737esac
9738fi
9739TAR=$ac_cv_path_TAR
9740if test -n "$TAR"; then
9741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9742$as_echo "$TAR" >&6; }
9743else
9744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9745$as_echo "no" >&6; }
9746fi
9747
9748
9749        if test "x$TAR" = x; then
9750          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9751        fi
9752      else
9753        # Otherwise we believe it is a complete path. Use it as it is.
9754        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9755$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9757$as_echo_n "checking for TAR... " >&6; }
9758        if test ! -x "$tool_specified"; then
9759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9760$as_echo "not found" >&6; }
9761          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9762        fi
9763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9764$as_echo "$tool_specified" >&6; }
9765      fi
9766    fi
9767  fi
9768
9769
9770
9771  if test "x$TAR" = x; then
9772    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9773  fi
9774
9775
9776
9777
9778
9779  # Publish this variable in the help.
9780
9781
9782  if test "x$TEE" = x; then
9783    # The variable is not set by user, try to locate tool using the code snippet
9784    for ac_prog in tee
9785do
9786  # Extract the first word of "$ac_prog", so it can be a program name with args.
9787set dummy $ac_prog; ac_word=$2
9788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9789$as_echo_n "checking for $ac_word... " >&6; }
9790if ${ac_cv_path_TEE+:} false; then :
9791  $as_echo_n "(cached) " >&6
9792else
9793  case $TEE in
9794  [\\/]* | ?:[\\/]*)
9795  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9796  ;;
9797  *)
9798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9799for as_dir in $PATH
9800do
9801  IFS=$as_save_IFS
9802  test -z "$as_dir" && as_dir=.
9803    for ac_exec_ext in '' $ac_executable_extensions; do
9804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9805    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9807    break 2
9808  fi
9809done
9810  done
9811IFS=$as_save_IFS
9812
9813  ;;
9814esac
9815fi
9816TEE=$ac_cv_path_TEE
9817if test -n "$TEE"; then
9818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9819$as_echo "$TEE" >&6; }
9820else
9821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9822$as_echo "no" >&6; }
9823fi
9824
9825
9826  test -n "$TEE" && break
9827done
9828
9829  else
9830    # The variable is set, but is it from the command line or the environment?
9831
9832    # Try to remove the string !TEE! from our list.
9833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9835      # If it failed, the variable was not from the command line. Ignore it,
9836      # but warn the user (except for BASH, which is always set by the calling BASH).
9837      if test "xTEE" != xBASH; then
9838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9839$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9840      fi
9841      # Try to locate tool using the code snippet
9842      for ac_prog in tee
9843do
9844  # Extract the first word of "$ac_prog", so it can be a program name with args.
9845set dummy $ac_prog; ac_word=$2
9846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9847$as_echo_n "checking for $ac_word... " >&6; }
9848if ${ac_cv_path_TEE+:} false; then :
9849  $as_echo_n "(cached) " >&6
9850else
9851  case $TEE in
9852  [\\/]* | ?:[\\/]*)
9853  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9854  ;;
9855  *)
9856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9857for as_dir in $PATH
9858do
9859  IFS=$as_save_IFS
9860  test -z "$as_dir" && as_dir=.
9861    for ac_exec_ext in '' $ac_executable_extensions; do
9862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9863    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9865    break 2
9866  fi
9867done
9868  done
9869IFS=$as_save_IFS
9870
9871  ;;
9872esac
9873fi
9874TEE=$ac_cv_path_TEE
9875if test -n "$TEE"; then
9876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9877$as_echo "$TEE" >&6; }
9878else
9879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9880$as_echo "no" >&6; }
9881fi
9882
9883
9884  test -n "$TEE" && break
9885done
9886
9887    else
9888      # If it succeeded, then it was overridden by the user. We will use it
9889      # for the tool.
9890
9891      # First remove it from the list of overridden variables, so we can test
9892      # for unknown variables in the end.
9893      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9894
9895      # Check if the provided tool contains a complete path.
9896      tool_specified="$TEE"
9897      tool_basename="${tool_specified##*/}"
9898      if test "x$tool_basename" = "x$tool_specified"; then
9899        # A command without a complete path is provided, search $PATH.
9900        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9901$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9902        # Extract the first word of "$tool_basename", so it can be a program name with args.
9903set dummy $tool_basename; ac_word=$2
9904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9905$as_echo_n "checking for $ac_word... " >&6; }
9906if ${ac_cv_path_TEE+:} false; then :
9907  $as_echo_n "(cached) " >&6
9908else
9909  case $TEE in
9910  [\\/]* | ?:[\\/]*)
9911  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9912  ;;
9913  *)
9914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9915for as_dir in $PATH
9916do
9917  IFS=$as_save_IFS
9918  test -z "$as_dir" && as_dir=.
9919    for ac_exec_ext in '' $ac_executable_extensions; do
9920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9921    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9923    break 2
9924  fi
9925done
9926  done
9927IFS=$as_save_IFS
9928
9929  ;;
9930esac
9931fi
9932TEE=$ac_cv_path_TEE
9933if test -n "$TEE"; then
9934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9935$as_echo "$TEE" >&6; }
9936else
9937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9938$as_echo "no" >&6; }
9939fi
9940
9941
9942        if test "x$TEE" = x; then
9943          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9944        fi
9945      else
9946        # Otherwise we believe it is a complete path. Use it as it is.
9947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9948$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9949        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9950$as_echo_n "checking for TEE... " >&6; }
9951        if test ! -x "$tool_specified"; then
9952          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9953$as_echo "not found" >&6; }
9954          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9955        fi
9956        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9957$as_echo "$tool_specified" >&6; }
9958      fi
9959    fi
9960  fi
9961
9962
9963
9964  if test "x$TEE" = x; then
9965    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9966  fi
9967
9968
9969
9970
9971
9972  # Publish this variable in the help.
9973
9974
9975  if test "x$TOUCH" = x; then
9976    # The variable is not set by user, try to locate tool using the code snippet
9977    for ac_prog in touch
9978do
9979  # Extract the first word of "$ac_prog", so it can be a program name with args.
9980set dummy $ac_prog; ac_word=$2
9981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9982$as_echo_n "checking for $ac_word... " >&6; }
9983if ${ac_cv_path_TOUCH+:} false; then :
9984  $as_echo_n "(cached) " >&6
9985else
9986  case $TOUCH in
9987  [\\/]* | ?:[\\/]*)
9988  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9989  ;;
9990  *)
9991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9992for as_dir in $PATH
9993do
9994  IFS=$as_save_IFS
9995  test -z "$as_dir" && as_dir=.
9996    for ac_exec_ext in '' $ac_executable_extensions; do
9997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9998    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
9999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10000    break 2
10001  fi
10002done
10003  done
10004IFS=$as_save_IFS
10005
10006  ;;
10007esac
10008fi
10009TOUCH=$ac_cv_path_TOUCH
10010if test -n "$TOUCH"; then
10011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10012$as_echo "$TOUCH" >&6; }
10013else
10014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10015$as_echo "no" >&6; }
10016fi
10017
10018
10019  test -n "$TOUCH" && break
10020done
10021
10022  else
10023    # The variable is set, but is it from the command line or the environment?
10024
10025    # Try to remove the string !TOUCH! from our list.
10026    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10027    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10028      # If it failed, the variable was not from the command line. Ignore it,
10029      # but warn the user (except for BASH, which is always set by the calling BASH).
10030      if test "xTOUCH" != xBASH; then
10031        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10032$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10033      fi
10034      # Try to locate tool using the code snippet
10035      for ac_prog in touch
10036do
10037  # Extract the first word of "$ac_prog", so it can be a program name with args.
10038set dummy $ac_prog; ac_word=$2
10039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10040$as_echo_n "checking for $ac_word... " >&6; }
10041if ${ac_cv_path_TOUCH+:} false; then :
10042  $as_echo_n "(cached) " >&6
10043else
10044  case $TOUCH in
10045  [\\/]* | ?:[\\/]*)
10046  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10047  ;;
10048  *)
10049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10050for as_dir in $PATH
10051do
10052  IFS=$as_save_IFS
10053  test -z "$as_dir" && as_dir=.
10054    for ac_exec_ext in '' $ac_executable_extensions; do
10055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10056    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10058    break 2
10059  fi
10060done
10061  done
10062IFS=$as_save_IFS
10063
10064  ;;
10065esac
10066fi
10067TOUCH=$ac_cv_path_TOUCH
10068if test -n "$TOUCH"; then
10069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10070$as_echo "$TOUCH" >&6; }
10071else
10072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10073$as_echo "no" >&6; }
10074fi
10075
10076
10077  test -n "$TOUCH" && break
10078done
10079
10080    else
10081      # If it succeeded, then it was overridden by the user. We will use it
10082      # for the tool.
10083
10084      # First remove it from the list of overridden variables, so we can test
10085      # for unknown variables in the end.
10086      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10087
10088      # Check if the provided tool contains a complete path.
10089      tool_specified="$TOUCH"
10090      tool_basename="${tool_specified##*/}"
10091      if test "x$tool_basename" = "x$tool_specified"; then
10092        # A command without a complete path is provided, search $PATH.
10093        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10094$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10095        # Extract the first word of "$tool_basename", so it can be a program name with args.
10096set dummy $tool_basename; ac_word=$2
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10098$as_echo_n "checking for $ac_word... " >&6; }
10099if ${ac_cv_path_TOUCH+:} false; then :
10100  $as_echo_n "(cached) " >&6
10101else
10102  case $TOUCH in
10103  [\\/]* | ?:[\\/]*)
10104  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10105  ;;
10106  *)
10107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10108for as_dir in $PATH
10109do
10110  IFS=$as_save_IFS
10111  test -z "$as_dir" && as_dir=.
10112    for ac_exec_ext in '' $ac_executable_extensions; do
10113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10114    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10116    break 2
10117  fi
10118done
10119  done
10120IFS=$as_save_IFS
10121
10122  ;;
10123esac
10124fi
10125TOUCH=$ac_cv_path_TOUCH
10126if test -n "$TOUCH"; then
10127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10128$as_echo "$TOUCH" >&6; }
10129else
10130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10131$as_echo "no" >&6; }
10132fi
10133
10134
10135        if test "x$TOUCH" = x; then
10136          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10137        fi
10138      else
10139        # Otherwise we believe it is a complete path. Use it as it is.
10140        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10141$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10142        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10143$as_echo_n "checking for TOUCH... " >&6; }
10144        if test ! -x "$tool_specified"; then
10145          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10146$as_echo "not found" >&6; }
10147          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10148        fi
10149        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10150$as_echo "$tool_specified" >&6; }
10151      fi
10152    fi
10153  fi
10154
10155
10156
10157  if test "x$TOUCH" = x; then
10158    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10159  fi
10160
10161
10162
10163
10164
10165  # Publish this variable in the help.
10166
10167
10168  if test "x$TR" = x; then
10169    # The variable is not set by user, try to locate tool using the code snippet
10170    for ac_prog in tr
10171do
10172  # Extract the first word of "$ac_prog", so it can be a program name with args.
10173set dummy $ac_prog; ac_word=$2
10174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10175$as_echo_n "checking for $ac_word... " >&6; }
10176if ${ac_cv_path_TR+:} false; then :
10177  $as_echo_n "(cached) " >&6
10178else
10179  case $TR in
10180  [\\/]* | ?:[\\/]*)
10181  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10182  ;;
10183  *)
10184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10185for as_dir in $PATH
10186do
10187  IFS=$as_save_IFS
10188  test -z "$as_dir" && as_dir=.
10189    for ac_exec_ext in '' $ac_executable_extensions; do
10190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10191    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10193    break 2
10194  fi
10195done
10196  done
10197IFS=$as_save_IFS
10198
10199  ;;
10200esac
10201fi
10202TR=$ac_cv_path_TR
10203if test -n "$TR"; then
10204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10205$as_echo "$TR" >&6; }
10206else
10207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10208$as_echo "no" >&6; }
10209fi
10210
10211
10212  test -n "$TR" && break
10213done
10214
10215  else
10216    # The variable is set, but is it from the command line or the environment?
10217
10218    # Try to remove the string !TR! from our list.
10219    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10220    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10221      # If it failed, the variable was not from the command line. Ignore it,
10222      # but warn the user (except for BASH, which is always set by the calling BASH).
10223      if test "xTR" != xBASH; then
10224        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10225$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10226      fi
10227      # Try to locate tool using the code snippet
10228      for ac_prog in tr
10229do
10230  # Extract the first word of "$ac_prog", so it can be a program name with args.
10231set dummy $ac_prog; ac_word=$2
10232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10233$as_echo_n "checking for $ac_word... " >&6; }
10234if ${ac_cv_path_TR+:} false; then :
10235  $as_echo_n "(cached) " >&6
10236else
10237  case $TR in
10238  [\\/]* | ?:[\\/]*)
10239  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10240  ;;
10241  *)
10242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10243for as_dir in $PATH
10244do
10245  IFS=$as_save_IFS
10246  test -z "$as_dir" && as_dir=.
10247    for ac_exec_ext in '' $ac_executable_extensions; do
10248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10249    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10251    break 2
10252  fi
10253done
10254  done
10255IFS=$as_save_IFS
10256
10257  ;;
10258esac
10259fi
10260TR=$ac_cv_path_TR
10261if test -n "$TR"; then
10262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10263$as_echo "$TR" >&6; }
10264else
10265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10266$as_echo "no" >&6; }
10267fi
10268
10269
10270  test -n "$TR" && break
10271done
10272
10273    else
10274      # If it succeeded, then it was overridden by the user. We will use it
10275      # for the tool.
10276
10277      # First remove it from the list of overridden variables, so we can test
10278      # for unknown variables in the end.
10279      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10280
10281      # Check if the provided tool contains a complete path.
10282      tool_specified="$TR"
10283      tool_basename="${tool_specified##*/}"
10284      if test "x$tool_basename" = "x$tool_specified"; then
10285        # A command without a complete path is provided, search $PATH.
10286        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10287$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10288        # Extract the first word of "$tool_basename", so it can be a program name with args.
10289set dummy $tool_basename; ac_word=$2
10290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10291$as_echo_n "checking for $ac_word... " >&6; }
10292if ${ac_cv_path_TR+:} false; then :
10293  $as_echo_n "(cached) " >&6
10294else
10295  case $TR in
10296  [\\/]* | ?:[\\/]*)
10297  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10298  ;;
10299  *)
10300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10301for as_dir in $PATH
10302do
10303  IFS=$as_save_IFS
10304  test -z "$as_dir" && as_dir=.
10305    for ac_exec_ext in '' $ac_executable_extensions; do
10306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10307    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10309    break 2
10310  fi
10311done
10312  done
10313IFS=$as_save_IFS
10314
10315  ;;
10316esac
10317fi
10318TR=$ac_cv_path_TR
10319if test -n "$TR"; then
10320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10321$as_echo "$TR" >&6; }
10322else
10323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10324$as_echo "no" >&6; }
10325fi
10326
10327
10328        if test "x$TR" = x; then
10329          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10330        fi
10331      else
10332        # Otherwise we believe it is a complete path. Use it as it is.
10333        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10334$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10335        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10336$as_echo_n "checking for TR... " >&6; }
10337        if test ! -x "$tool_specified"; then
10338          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10339$as_echo "not found" >&6; }
10340          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10341        fi
10342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10343$as_echo "$tool_specified" >&6; }
10344      fi
10345    fi
10346  fi
10347
10348
10349
10350  if test "x$TR" = x; then
10351    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10352  fi
10353
10354
10355
10356
10357
10358  # Publish this variable in the help.
10359
10360
10361  if test "x$UNAME" = x; then
10362    # The variable is not set by user, try to locate tool using the code snippet
10363    for ac_prog in uname
10364do
10365  # Extract the first word of "$ac_prog", so it can be a program name with args.
10366set dummy $ac_prog; ac_word=$2
10367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10368$as_echo_n "checking for $ac_word... " >&6; }
10369if ${ac_cv_path_UNAME+:} false; then :
10370  $as_echo_n "(cached) " >&6
10371else
10372  case $UNAME in
10373  [\\/]* | ?:[\\/]*)
10374  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10375  ;;
10376  *)
10377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10378for as_dir in $PATH
10379do
10380  IFS=$as_save_IFS
10381  test -z "$as_dir" && as_dir=.
10382    for ac_exec_ext in '' $ac_executable_extensions; do
10383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10384    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10386    break 2
10387  fi
10388done
10389  done
10390IFS=$as_save_IFS
10391
10392  ;;
10393esac
10394fi
10395UNAME=$ac_cv_path_UNAME
10396if test -n "$UNAME"; then
10397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10398$as_echo "$UNAME" >&6; }
10399else
10400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10401$as_echo "no" >&6; }
10402fi
10403
10404
10405  test -n "$UNAME" && break
10406done
10407
10408  else
10409    # The variable is set, but is it from the command line or the environment?
10410
10411    # Try to remove the string !UNAME! from our list.
10412    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10413    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10414      # If it failed, the variable was not from the command line. Ignore it,
10415      # but warn the user (except for BASH, which is always set by the calling BASH).
10416      if test "xUNAME" != xBASH; then
10417        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10418$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10419      fi
10420      # Try to locate tool using the code snippet
10421      for ac_prog in uname
10422do
10423  # Extract the first word of "$ac_prog", so it can be a program name with args.
10424set dummy $ac_prog; ac_word=$2
10425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10426$as_echo_n "checking for $ac_word... " >&6; }
10427if ${ac_cv_path_UNAME+:} false; then :
10428  $as_echo_n "(cached) " >&6
10429else
10430  case $UNAME in
10431  [\\/]* | ?:[\\/]*)
10432  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10433  ;;
10434  *)
10435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10436for as_dir in $PATH
10437do
10438  IFS=$as_save_IFS
10439  test -z "$as_dir" && as_dir=.
10440    for ac_exec_ext in '' $ac_executable_extensions; do
10441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10442    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10444    break 2
10445  fi
10446done
10447  done
10448IFS=$as_save_IFS
10449
10450  ;;
10451esac
10452fi
10453UNAME=$ac_cv_path_UNAME
10454if test -n "$UNAME"; then
10455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10456$as_echo "$UNAME" >&6; }
10457else
10458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10459$as_echo "no" >&6; }
10460fi
10461
10462
10463  test -n "$UNAME" && break
10464done
10465
10466    else
10467      # If it succeeded, then it was overridden by the user. We will use it
10468      # for the tool.
10469
10470      # First remove it from the list of overridden variables, so we can test
10471      # for unknown variables in the end.
10472      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10473
10474      # Check if the provided tool contains a complete path.
10475      tool_specified="$UNAME"
10476      tool_basename="${tool_specified##*/}"
10477      if test "x$tool_basename" = "x$tool_specified"; then
10478        # A command without a complete path is provided, search $PATH.
10479        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10480$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10481        # Extract the first word of "$tool_basename", so it can be a program name with args.
10482set dummy $tool_basename; ac_word=$2
10483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10484$as_echo_n "checking for $ac_word... " >&6; }
10485if ${ac_cv_path_UNAME+:} false; then :
10486  $as_echo_n "(cached) " >&6
10487else
10488  case $UNAME in
10489  [\\/]* | ?:[\\/]*)
10490  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10491  ;;
10492  *)
10493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10494for as_dir in $PATH
10495do
10496  IFS=$as_save_IFS
10497  test -z "$as_dir" && as_dir=.
10498    for ac_exec_ext in '' $ac_executable_extensions; do
10499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10500    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10502    break 2
10503  fi
10504done
10505  done
10506IFS=$as_save_IFS
10507
10508  ;;
10509esac
10510fi
10511UNAME=$ac_cv_path_UNAME
10512if test -n "$UNAME"; then
10513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10514$as_echo "$UNAME" >&6; }
10515else
10516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10517$as_echo "no" >&6; }
10518fi
10519
10520
10521        if test "x$UNAME" = x; then
10522          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10523        fi
10524      else
10525        # Otherwise we believe it is a complete path. Use it as it is.
10526        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10527$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10529$as_echo_n "checking for UNAME... " >&6; }
10530        if test ! -x "$tool_specified"; then
10531          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10532$as_echo "not found" >&6; }
10533          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10534        fi
10535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10536$as_echo "$tool_specified" >&6; }
10537      fi
10538    fi
10539  fi
10540
10541
10542
10543  if test "x$UNAME" = x; then
10544    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10545  fi
10546
10547
10548
10549
10550
10551  # Publish this variable in the help.
10552
10553
10554  if test "x$UNIQ" = x; then
10555    # The variable is not set by user, try to locate tool using the code snippet
10556    for ac_prog in uniq
10557do
10558  # Extract the first word of "$ac_prog", so it can be a program name with args.
10559set dummy $ac_prog; ac_word=$2
10560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10561$as_echo_n "checking for $ac_word... " >&6; }
10562if ${ac_cv_path_UNIQ+:} false; then :
10563  $as_echo_n "(cached) " >&6
10564else
10565  case $UNIQ in
10566  [\\/]* | ?:[\\/]*)
10567  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10568  ;;
10569  *)
10570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10571for as_dir in $PATH
10572do
10573  IFS=$as_save_IFS
10574  test -z "$as_dir" && as_dir=.
10575    for ac_exec_ext in '' $ac_executable_extensions; do
10576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10577    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10579    break 2
10580  fi
10581done
10582  done
10583IFS=$as_save_IFS
10584
10585  ;;
10586esac
10587fi
10588UNIQ=$ac_cv_path_UNIQ
10589if test -n "$UNIQ"; then
10590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10591$as_echo "$UNIQ" >&6; }
10592else
10593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10594$as_echo "no" >&6; }
10595fi
10596
10597
10598  test -n "$UNIQ" && break
10599done
10600
10601  else
10602    # The variable is set, but is it from the command line or the environment?
10603
10604    # Try to remove the string !UNIQ! from our list.
10605    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10606    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10607      # If it failed, the variable was not from the command line. Ignore it,
10608      # but warn the user (except for BASH, which is always set by the calling BASH).
10609      if test "xUNIQ" != xBASH; then
10610        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10611$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10612      fi
10613      # Try to locate tool using the code snippet
10614      for ac_prog in uniq
10615do
10616  # Extract the first word of "$ac_prog", so it can be a program name with args.
10617set dummy $ac_prog; ac_word=$2
10618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10619$as_echo_n "checking for $ac_word... " >&6; }
10620if ${ac_cv_path_UNIQ+:} false; then :
10621  $as_echo_n "(cached) " >&6
10622else
10623  case $UNIQ in
10624  [\\/]* | ?:[\\/]*)
10625  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10626  ;;
10627  *)
10628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10629for as_dir in $PATH
10630do
10631  IFS=$as_save_IFS
10632  test -z "$as_dir" && as_dir=.
10633    for ac_exec_ext in '' $ac_executable_extensions; do
10634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10635    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10637    break 2
10638  fi
10639done
10640  done
10641IFS=$as_save_IFS
10642
10643  ;;
10644esac
10645fi
10646UNIQ=$ac_cv_path_UNIQ
10647if test -n "$UNIQ"; then
10648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10649$as_echo "$UNIQ" >&6; }
10650else
10651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10652$as_echo "no" >&6; }
10653fi
10654
10655
10656  test -n "$UNIQ" && break
10657done
10658
10659    else
10660      # If it succeeded, then it was overridden by the user. We will use it
10661      # for the tool.
10662
10663      # First remove it from the list of overridden variables, so we can test
10664      # for unknown variables in the end.
10665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10666
10667      # Check if the provided tool contains a complete path.
10668      tool_specified="$UNIQ"
10669      tool_basename="${tool_specified##*/}"
10670      if test "x$tool_basename" = "x$tool_specified"; then
10671        # A command without a complete path is provided, search $PATH.
10672        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10673$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10674        # Extract the first word of "$tool_basename", so it can be a program name with args.
10675set dummy $tool_basename; ac_word=$2
10676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10677$as_echo_n "checking for $ac_word... " >&6; }
10678if ${ac_cv_path_UNIQ+:} false; then :
10679  $as_echo_n "(cached) " >&6
10680else
10681  case $UNIQ in
10682  [\\/]* | ?:[\\/]*)
10683  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10684  ;;
10685  *)
10686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10687for as_dir in $PATH
10688do
10689  IFS=$as_save_IFS
10690  test -z "$as_dir" && as_dir=.
10691    for ac_exec_ext in '' $ac_executable_extensions; do
10692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10693    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10695    break 2
10696  fi
10697done
10698  done
10699IFS=$as_save_IFS
10700
10701  ;;
10702esac
10703fi
10704UNIQ=$ac_cv_path_UNIQ
10705if test -n "$UNIQ"; then
10706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10707$as_echo "$UNIQ" >&6; }
10708else
10709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10710$as_echo "no" >&6; }
10711fi
10712
10713
10714        if test "x$UNIQ" = x; then
10715          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10716        fi
10717      else
10718        # Otherwise we believe it is a complete path. Use it as it is.
10719        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10720$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10721        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10722$as_echo_n "checking for UNIQ... " >&6; }
10723        if test ! -x "$tool_specified"; then
10724          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10725$as_echo "not found" >&6; }
10726          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10727        fi
10728        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10729$as_echo "$tool_specified" >&6; }
10730      fi
10731    fi
10732  fi
10733
10734
10735
10736  if test "x$UNIQ" = x; then
10737    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10738  fi
10739
10740
10741
10742
10743
10744  # Publish this variable in the help.
10745
10746
10747  if test "x$WC" = x; then
10748    # The variable is not set by user, try to locate tool using the code snippet
10749    for ac_prog in wc
10750do
10751  # Extract the first word of "$ac_prog", so it can be a program name with args.
10752set dummy $ac_prog; ac_word=$2
10753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10754$as_echo_n "checking for $ac_word... " >&6; }
10755if ${ac_cv_path_WC+:} false; then :
10756  $as_echo_n "(cached) " >&6
10757else
10758  case $WC in
10759  [\\/]* | ?:[\\/]*)
10760  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10761  ;;
10762  *)
10763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10764for as_dir in $PATH
10765do
10766  IFS=$as_save_IFS
10767  test -z "$as_dir" && as_dir=.
10768    for ac_exec_ext in '' $ac_executable_extensions; do
10769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10770    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10772    break 2
10773  fi
10774done
10775  done
10776IFS=$as_save_IFS
10777
10778  ;;
10779esac
10780fi
10781WC=$ac_cv_path_WC
10782if test -n "$WC"; then
10783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10784$as_echo "$WC" >&6; }
10785else
10786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10787$as_echo "no" >&6; }
10788fi
10789
10790
10791  test -n "$WC" && break
10792done
10793
10794  else
10795    # The variable is set, but is it from the command line or the environment?
10796
10797    # Try to remove the string !WC! from our list.
10798    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10799    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10800      # If it failed, the variable was not from the command line. Ignore it,
10801      # but warn the user (except for BASH, which is always set by the calling BASH).
10802      if test "xWC" != xBASH; then
10803        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10804$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10805      fi
10806      # Try to locate tool using the code snippet
10807      for ac_prog in wc
10808do
10809  # Extract the first word of "$ac_prog", so it can be a program name with args.
10810set dummy $ac_prog; ac_word=$2
10811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10812$as_echo_n "checking for $ac_word... " >&6; }
10813if ${ac_cv_path_WC+:} false; then :
10814  $as_echo_n "(cached) " >&6
10815else
10816  case $WC in
10817  [\\/]* | ?:[\\/]*)
10818  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10819  ;;
10820  *)
10821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10822for as_dir in $PATH
10823do
10824  IFS=$as_save_IFS
10825  test -z "$as_dir" && as_dir=.
10826    for ac_exec_ext in '' $ac_executable_extensions; do
10827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10828    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10830    break 2
10831  fi
10832done
10833  done
10834IFS=$as_save_IFS
10835
10836  ;;
10837esac
10838fi
10839WC=$ac_cv_path_WC
10840if test -n "$WC"; then
10841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10842$as_echo "$WC" >&6; }
10843else
10844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10845$as_echo "no" >&6; }
10846fi
10847
10848
10849  test -n "$WC" && break
10850done
10851
10852    else
10853      # If it succeeded, then it was overridden by the user. We will use it
10854      # for the tool.
10855
10856      # First remove it from the list of overridden variables, so we can test
10857      # for unknown variables in the end.
10858      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10859
10860      # Check if the provided tool contains a complete path.
10861      tool_specified="$WC"
10862      tool_basename="${tool_specified##*/}"
10863      if test "x$tool_basename" = "x$tool_specified"; then
10864        # A command without a complete path is provided, search $PATH.
10865        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10866$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10867        # Extract the first word of "$tool_basename", so it can be a program name with args.
10868set dummy $tool_basename; ac_word=$2
10869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10870$as_echo_n "checking for $ac_word... " >&6; }
10871if ${ac_cv_path_WC+:} false; then :
10872  $as_echo_n "(cached) " >&6
10873else
10874  case $WC in
10875  [\\/]* | ?:[\\/]*)
10876  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10877  ;;
10878  *)
10879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10880for as_dir in $PATH
10881do
10882  IFS=$as_save_IFS
10883  test -z "$as_dir" && as_dir=.
10884    for ac_exec_ext in '' $ac_executable_extensions; do
10885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10886    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10888    break 2
10889  fi
10890done
10891  done
10892IFS=$as_save_IFS
10893
10894  ;;
10895esac
10896fi
10897WC=$ac_cv_path_WC
10898if test -n "$WC"; then
10899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10900$as_echo "$WC" >&6; }
10901else
10902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10903$as_echo "no" >&6; }
10904fi
10905
10906
10907        if test "x$WC" = x; then
10908          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10909        fi
10910      else
10911        # Otherwise we believe it is a complete path. Use it as it is.
10912        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10913$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10914        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10915$as_echo_n "checking for WC... " >&6; }
10916        if test ! -x "$tool_specified"; then
10917          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10918$as_echo "not found" >&6; }
10919          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10920        fi
10921        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10922$as_echo "$tool_specified" >&6; }
10923      fi
10924    fi
10925  fi
10926
10927
10928
10929  if test "x$WC" = x; then
10930    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10931  fi
10932
10933
10934
10935
10936
10937  # Publish this variable in the help.
10938
10939
10940  if test "x$WHICH" = x; then
10941    # The variable is not set by user, try to locate tool using the code snippet
10942    for ac_prog in which
10943do
10944  # Extract the first word of "$ac_prog", so it can be a program name with args.
10945set dummy $ac_prog; ac_word=$2
10946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10947$as_echo_n "checking for $ac_word... " >&6; }
10948if ${ac_cv_path_WHICH+:} false; then :
10949  $as_echo_n "(cached) " >&6
10950else
10951  case $WHICH in
10952  [\\/]* | ?:[\\/]*)
10953  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10954  ;;
10955  *)
10956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10957for as_dir in $PATH
10958do
10959  IFS=$as_save_IFS
10960  test -z "$as_dir" && as_dir=.
10961    for ac_exec_ext in '' $ac_executable_extensions; do
10962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10963    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10965    break 2
10966  fi
10967done
10968  done
10969IFS=$as_save_IFS
10970
10971  ;;
10972esac
10973fi
10974WHICH=$ac_cv_path_WHICH
10975if test -n "$WHICH"; then
10976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10977$as_echo "$WHICH" >&6; }
10978else
10979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10980$as_echo "no" >&6; }
10981fi
10982
10983
10984  test -n "$WHICH" && break
10985done
10986
10987  else
10988    # The variable is set, but is it from the command line or the environment?
10989
10990    # Try to remove the string !WHICH! from our list.
10991    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
10992    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10993      # If it failed, the variable was not from the command line. Ignore it,
10994      # but warn the user (except for BASH, which is always set by the calling BASH).
10995      if test "xWHICH" != xBASH; then
10996        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
10997$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
10998      fi
10999      # Try to locate tool using the code snippet
11000      for ac_prog in which
11001do
11002  # Extract the first word of "$ac_prog", so it can be a program name with args.
11003set dummy $ac_prog; ac_word=$2
11004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11005$as_echo_n "checking for $ac_word... " >&6; }
11006if ${ac_cv_path_WHICH+:} false; then :
11007  $as_echo_n "(cached) " >&6
11008else
11009  case $WHICH in
11010  [\\/]* | ?:[\\/]*)
11011  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11012  ;;
11013  *)
11014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11015for as_dir in $PATH
11016do
11017  IFS=$as_save_IFS
11018  test -z "$as_dir" && as_dir=.
11019    for ac_exec_ext in '' $ac_executable_extensions; do
11020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11021    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11023    break 2
11024  fi
11025done
11026  done
11027IFS=$as_save_IFS
11028
11029  ;;
11030esac
11031fi
11032WHICH=$ac_cv_path_WHICH
11033if test -n "$WHICH"; then
11034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11035$as_echo "$WHICH" >&6; }
11036else
11037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11038$as_echo "no" >&6; }
11039fi
11040
11041
11042  test -n "$WHICH" && break
11043done
11044
11045    else
11046      # If it succeeded, then it was overridden by the user. We will use it
11047      # for the tool.
11048
11049      # First remove it from the list of overridden variables, so we can test
11050      # for unknown variables in the end.
11051      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11052
11053      # Check if the provided tool contains a complete path.
11054      tool_specified="$WHICH"
11055      tool_basename="${tool_specified##*/}"
11056      if test "x$tool_basename" = "x$tool_specified"; then
11057        # A command without a complete path is provided, search $PATH.
11058        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11059$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11060        # Extract the first word of "$tool_basename", so it can be a program name with args.
11061set dummy $tool_basename; ac_word=$2
11062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11063$as_echo_n "checking for $ac_word... " >&6; }
11064if ${ac_cv_path_WHICH+:} false; then :
11065  $as_echo_n "(cached) " >&6
11066else
11067  case $WHICH in
11068  [\\/]* | ?:[\\/]*)
11069  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11070  ;;
11071  *)
11072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11073for as_dir in $PATH
11074do
11075  IFS=$as_save_IFS
11076  test -z "$as_dir" && as_dir=.
11077    for ac_exec_ext in '' $ac_executable_extensions; do
11078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11079    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11081    break 2
11082  fi
11083done
11084  done
11085IFS=$as_save_IFS
11086
11087  ;;
11088esac
11089fi
11090WHICH=$ac_cv_path_WHICH
11091if test -n "$WHICH"; then
11092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11093$as_echo "$WHICH" >&6; }
11094else
11095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11096$as_echo "no" >&6; }
11097fi
11098
11099
11100        if test "x$WHICH" = x; then
11101          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11102        fi
11103      else
11104        # Otherwise we believe it is a complete path. Use it as it is.
11105        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11106$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11107        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11108$as_echo_n "checking for WHICH... " >&6; }
11109        if test ! -x "$tool_specified"; then
11110          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11111$as_echo "not found" >&6; }
11112          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11113        fi
11114        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11115$as_echo "$tool_specified" >&6; }
11116      fi
11117    fi
11118  fi
11119
11120
11121
11122  if test "x$WHICH" = x; then
11123    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11124  fi
11125
11126
11127
11128
11129
11130  # Publish this variable in the help.
11131
11132
11133  if test "x$XARGS" = x; then
11134    # The variable is not set by user, try to locate tool using the code snippet
11135    for ac_prog in xargs
11136do
11137  # Extract the first word of "$ac_prog", so it can be a program name with args.
11138set dummy $ac_prog; ac_word=$2
11139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11140$as_echo_n "checking for $ac_word... " >&6; }
11141if ${ac_cv_path_XARGS+:} false; then :
11142  $as_echo_n "(cached) " >&6
11143else
11144  case $XARGS in
11145  [\\/]* | ?:[\\/]*)
11146  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11147  ;;
11148  *)
11149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11150for as_dir in $PATH
11151do
11152  IFS=$as_save_IFS
11153  test -z "$as_dir" && as_dir=.
11154    for ac_exec_ext in '' $ac_executable_extensions; do
11155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11156    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11158    break 2
11159  fi
11160done
11161  done
11162IFS=$as_save_IFS
11163
11164  ;;
11165esac
11166fi
11167XARGS=$ac_cv_path_XARGS
11168if test -n "$XARGS"; then
11169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11170$as_echo "$XARGS" >&6; }
11171else
11172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11173$as_echo "no" >&6; }
11174fi
11175
11176
11177  test -n "$XARGS" && break
11178done
11179
11180  else
11181    # The variable is set, but is it from the command line or the environment?
11182
11183    # Try to remove the string !XARGS! from our list.
11184    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11185    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11186      # If it failed, the variable was not from the command line. Ignore it,
11187      # but warn the user (except for BASH, which is always set by the calling BASH).
11188      if test "xXARGS" != xBASH; then
11189        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11190$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11191      fi
11192      # Try to locate tool using the code snippet
11193      for ac_prog in xargs
11194do
11195  # Extract the first word of "$ac_prog", so it can be a program name with args.
11196set dummy $ac_prog; ac_word=$2
11197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11198$as_echo_n "checking for $ac_word... " >&6; }
11199if ${ac_cv_path_XARGS+:} false; then :
11200  $as_echo_n "(cached) " >&6
11201else
11202  case $XARGS in
11203  [\\/]* | ?:[\\/]*)
11204  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11205  ;;
11206  *)
11207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11208for as_dir in $PATH
11209do
11210  IFS=$as_save_IFS
11211  test -z "$as_dir" && as_dir=.
11212    for ac_exec_ext in '' $ac_executable_extensions; do
11213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11214    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11216    break 2
11217  fi
11218done
11219  done
11220IFS=$as_save_IFS
11221
11222  ;;
11223esac
11224fi
11225XARGS=$ac_cv_path_XARGS
11226if test -n "$XARGS"; then
11227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11228$as_echo "$XARGS" >&6; }
11229else
11230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11231$as_echo "no" >&6; }
11232fi
11233
11234
11235  test -n "$XARGS" && break
11236done
11237
11238    else
11239      # If it succeeded, then it was overridden by the user. We will use it
11240      # for the tool.
11241
11242      # First remove it from the list of overridden variables, so we can test
11243      # for unknown variables in the end.
11244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11245
11246      # Check if the provided tool contains a complete path.
11247      tool_specified="$XARGS"
11248      tool_basename="${tool_specified##*/}"
11249      if test "x$tool_basename" = "x$tool_specified"; then
11250        # A command without a complete path is provided, search $PATH.
11251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11252$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11253        # Extract the first word of "$tool_basename", so it can be a program name with args.
11254set dummy $tool_basename; ac_word=$2
11255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11256$as_echo_n "checking for $ac_word... " >&6; }
11257if ${ac_cv_path_XARGS+:} false; then :
11258  $as_echo_n "(cached) " >&6
11259else
11260  case $XARGS in
11261  [\\/]* | ?:[\\/]*)
11262  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11263  ;;
11264  *)
11265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11266for as_dir in $PATH
11267do
11268  IFS=$as_save_IFS
11269  test -z "$as_dir" && as_dir=.
11270    for ac_exec_ext in '' $ac_executable_extensions; do
11271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11272    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11274    break 2
11275  fi
11276done
11277  done
11278IFS=$as_save_IFS
11279
11280  ;;
11281esac
11282fi
11283XARGS=$ac_cv_path_XARGS
11284if test -n "$XARGS"; then
11285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11286$as_echo "$XARGS" >&6; }
11287else
11288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11289$as_echo "no" >&6; }
11290fi
11291
11292
11293        if test "x$XARGS" = x; then
11294          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11295        fi
11296      else
11297        # Otherwise we believe it is a complete path. Use it as it is.
11298        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11299$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11301$as_echo_n "checking for XARGS... " >&6; }
11302        if test ! -x "$tool_specified"; then
11303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11304$as_echo "not found" >&6; }
11305          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11306        fi
11307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11308$as_echo "$tool_specified" >&6; }
11309      fi
11310    fi
11311  fi
11312
11313
11314
11315  if test "x$XARGS" = x; then
11316    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11317  fi
11318
11319
11320
11321  # Then required tools that require some special treatment.
11322
11323
11324  # Publish this variable in the help.
11325
11326
11327  if test "x$AWK" = x; then
11328    # The variable is not set by user, try to locate tool using the code snippet
11329    for ac_prog in gawk mawk nawk awk
11330do
11331  # Extract the first word of "$ac_prog", so it can be a program name with args.
11332set dummy $ac_prog; ac_word=$2
11333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11334$as_echo_n "checking for $ac_word... " >&6; }
11335if ${ac_cv_prog_AWK+:} false; then :
11336  $as_echo_n "(cached) " >&6
11337else
11338  if test -n "$AWK"; then
11339  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11340else
11341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11342for as_dir in $PATH
11343do
11344  IFS=$as_save_IFS
11345  test -z "$as_dir" && as_dir=.
11346    for ac_exec_ext in '' $ac_executable_extensions; do
11347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11348    ac_cv_prog_AWK="$ac_prog"
11349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11350    break 2
11351  fi
11352done
11353  done
11354IFS=$as_save_IFS
11355
11356fi
11357fi
11358AWK=$ac_cv_prog_AWK
11359if test -n "$AWK"; then
11360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11361$as_echo "$AWK" >&6; }
11362else
11363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11364$as_echo "no" >&6; }
11365fi
11366
11367
11368  test -n "$AWK" && break
11369done
11370
11371  else
11372    # The variable is set, but is it from the command line or the environment?
11373
11374    # Try to remove the string !AWK! from our list.
11375    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11376    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11377      # If it failed, the variable was not from the command line. Ignore it,
11378      # but warn the user (except for BASH, which is always set by the calling BASH).
11379      if test "xAWK" != xBASH; then
11380        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11381$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11382      fi
11383      # Try to locate tool using the code snippet
11384      for ac_prog in gawk mawk nawk awk
11385do
11386  # Extract the first word of "$ac_prog", so it can be a program name with args.
11387set dummy $ac_prog; ac_word=$2
11388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11389$as_echo_n "checking for $ac_word... " >&6; }
11390if ${ac_cv_prog_AWK+:} false; then :
11391  $as_echo_n "(cached) " >&6
11392else
11393  if test -n "$AWK"; then
11394  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11395else
11396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11397for as_dir in $PATH
11398do
11399  IFS=$as_save_IFS
11400  test -z "$as_dir" && as_dir=.
11401    for ac_exec_ext in '' $ac_executable_extensions; do
11402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11403    ac_cv_prog_AWK="$ac_prog"
11404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11405    break 2
11406  fi
11407done
11408  done
11409IFS=$as_save_IFS
11410
11411fi
11412fi
11413AWK=$ac_cv_prog_AWK
11414if test -n "$AWK"; then
11415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11416$as_echo "$AWK" >&6; }
11417else
11418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11419$as_echo "no" >&6; }
11420fi
11421
11422
11423  test -n "$AWK" && break
11424done
11425
11426    else
11427      # If it succeeded, then it was overridden by the user. We will use it
11428      # for the tool.
11429
11430      # First remove it from the list of overridden variables, so we can test
11431      # for unknown variables in the end.
11432      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11433
11434      # Check if the provided tool contains a complete path.
11435      tool_specified="$AWK"
11436      tool_basename="${tool_specified##*/}"
11437      if test "x$tool_basename" = "x$tool_specified"; then
11438        # A command without a complete path is provided, search $PATH.
11439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11440$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11441        # Extract the first word of "$tool_basename", so it can be a program name with args.
11442set dummy $tool_basename; ac_word=$2
11443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11444$as_echo_n "checking for $ac_word... " >&6; }
11445if ${ac_cv_path_AWK+:} false; then :
11446  $as_echo_n "(cached) " >&6
11447else
11448  case $AWK in
11449  [\\/]* | ?:[\\/]*)
11450  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11451  ;;
11452  *)
11453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11454for as_dir in $PATH
11455do
11456  IFS=$as_save_IFS
11457  test -z "$as_dir" && as_dir=.
11458    for ac_exec_ext in '' $ac_executable_extensions; do
11459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11460    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11462    break 2
11463  fi
11464done
11465  done
11466IFS=$as_save_IFS
11467
11468  ;;
11469esac
11470fi
11471AWK=$ac_cv_path_AWK
11472if test -n "$AWK"; then
11473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11474$as_echo "$AWK" >&6; }
11475else
11476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11477$as_echo "no" >&6; }
11478fi
11479
11480
11481        if test "x$AWK" = x; then
11482          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11483        fi
11484      else
11485        # Otherwise we believe it is a complete path. Use it as it is.
11486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11487$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11489$as_echo_n "checking for AWK... " >&6; }
11490        if test ! -x "$tool_specified"; then
11491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11492$as_echo "not found" >&6; }
11493          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11494        fi
11495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11496$as_echo "$tool_specified" >&6; }
11497      fi
11498    fi
11499  fi
11500
11501
11502  if test "x$AWK" = x; then
11503    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11504  fi
11505
11506
11507
11508
11509  # Publish this variable in the help.
11510
11511
11512  if test "x$GREP" = x; then
11513    # The variable is not set by user, try to locate tool using the code snippet
11514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11515$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11516if ${ac_cv_path_GREP+:} false; then :
11517  $as_echo_n "(cached) " >&6
11518else
11519  if test -z "$GREP"; then
11520  ac_path_GREP_found=false
11521  # Loop through the user's path and test for each of PROGNAME-LIST
11522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11523for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11524do
11525  IFS=$as_save_IFS
11526  test -z "$as_dir" && as_dir=.
11527    for ac_prog in grep ggrep; do
11528    for ac_exec_ext in '' $ac_executable_extensions; do
11529      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11530      as_fn_executable_p "$ac_path_GREP" || continue
11531# Check for GNU ac_path_GREP and select it if it is found.
11532  # Check for GNU $ac_path_GREP
11533case `"$ac_path_GREP" --version 2>&1` in
11534*GNU*)
11535  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11536*)
11537  ac_count=0
11538  $as_echo_n 0123456789 >"conftest.in"
11539  while :
11540  do
11541    cat "conftest.in" "conftest.in" >"conftest.tmp"
11542    mv "conftest.tmp" "conftest.in"
11543    cp "conftest.in" "conftest.nl"
11544    $as_echo 'GREP' >> "conftest.nl"
11545    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11546    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11547    as_fn_arith $ac_count + 1 && ac_count=$as_val
11548    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11549      # Best one so far, save it but keep looking for a better one
11550      ac_cv_path_GREP="$ac_path_GREP"
11551      ac_path_GREP_max=$ac_count
11552    fi
11553    # 10*(2^10) chars as input seems more than enough
11554    test $ac_count -gt 10 && break
11555  done
11556  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11557esac
11558
11559      $ac_path_GREP_found && break 3
11560    done
11561  done
11562  done
11563IFS=$as_save_IFS
11564  if test -z "$ac_cv_path_GREP"; then
11565    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11566  fi
11567else
11568  ac_cv_path_GREP=$GREP
11569fi
11570
11571fi
11572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11573$as_echo "$ac_cv_path_GREP" >&6; }
11574 GREP="$ac_cv_path_GREP"
11575
11576
11577  else
11578    # The variable is set, but is it from the command line or the environment?
11579
11580    # Try to remove the string !GREP! from our list.
11581    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11582    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11583      # If it failed, the variable was not from the command line. Ignore it,
11584      # but warn the user (except for BASH, which is always set by the calling BASH).
11585      if test "xGREP" != xBASH; then
11586        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11587$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11588      fi
11589      # Try to locate tool using the code snippet
11590      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11591$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11592if ${ac_cv_path_GREP+:} false; then :
11593  $as_echo_n "(cached) " >&6
11594else
11595  if test -z "$GREP"; then
11596  ac_path_GREP_found=false
11597  # Loop through the user's path and test for each of PROGNAME-LIST
11598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11599for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11600do
11601  IFS=$as_save_IFS
11602  test -z "$as_dir" && as_dir=.
11603    for ac_prog in grep ggrep; do
11604    for ac_exec_ext in '' $ac_executable_extensions; do
11605      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11606      as_fn_executable_p "$ac_path_GREP" || continue
11607# Check for GNU ac_path_GREP and select it if it is found.
11608  # Check for GNU $ac_path_GREP
11609case `"$ac_path_GREP" --version 2>&1` in
11610*GNU*)
11611  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11612*)
11613  ac_count=0
11614  $as_echo_n 0123456789 >"conftest.in"
11615  while :
11616  do
11617    cat "conftest.in" "conftest.in" >"conftest.tmp"
11618    mv "conftest.tmp" "conftest.in"
11619    cp "conftest.in" "conftest.nl"
11620    $as_echo 'GREP' >> "conftest.nl"
11621    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11622    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11623    as_fn_arith $ac_count + 1 && ac_count=$as_val
11624    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11625      # Best one so far, save it but keep looking for a better one
11626      ac_cv_path_GREP="$ac_path_GREP"
11627      ac_path_GREP_max=$ac_count
11628    fi
11629    # 10*(2^10) chars as input seems more than enough
11630    test $ac_count -gt 10 && break
11631  done
11632  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11633esac
11634
11635      $ac_path_GREP_found && break 3
11636    done
11637  done
11638  done
11639IFS=$as_save_IFS
11640  if test -z "$ac_cv_path_GREP"; then
11641    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11642  fi
11643else
11644  ac_cv_path_GREP=$GREP
11645fi
11646
11647fi
11648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11649$as_echo "$ac_cv_path_GREP" >&6; }
11650 GREP="$ac_cv_path_GREP"
11651
11652
11653    else
11654      # If it succeeded, then it was overridden by the user. We will use it
11655      # for the tool.
11656
11657      # First remove it from the list of overridden variables, so we can test
11658      # for unknown variables in the end.
11659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11660
11661      # Check if the provided tool contains a complete path.
11662      tool_specified="$GREP"
11663      tool_basename="${tool_specified##*/}"
11664      if test "x$tool_basename" = "x$tool_specified"; then
11665        # A command without a complete path is provided, search $PATH.
11666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11667$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11668        # Extract the first word of "$tool_basename", so it can be a program name with args.
11669set dummy $tool_basename; ac_word=$2
11670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11671$as_echo_n "checking for $ac_word... " >&6; }
11672if ${ac_cv_path_GREP+:} false; then :
11673  $as_echo_n "(cached) " >&6
11674else
11675  case $GREP in
11676  [\\/]* | ?:[\\/]*)
11677  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11678  ;;
11679  *)
11680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11681for as_dir in $PATH
11682do
11683  IFS=$as_save_IFS
11684  test -z "$as_dir" && as_dir=.
11685    for ac_exec_ext in '' $ac_executable_extensions; do
11686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11687    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11689    break 2
11690  fi
11691done
11692  done
11693IFS=$as_save_IFS
11694
11695  ;;
11696esac
11697fi
11698GREP=$ac_cv_path_GREP
11699if test -n "$GREP"; then
11700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11701$as_echo "$GREP" >&6; }
11702else
11703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11704$as_echo "no" >&6; }
11705fi
11706
11707
11708        if test "x$GREP" = x; then
11709          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11710        fi
11711      else
11712        # Otherwise we believe it is a complete path. Use it as it is.
11713        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11714$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11716$as_echo_n "checking for GREP... " >&6; }
11717        if test ! -x "$tool_specified"; then
11718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11719$as_echo "not found" >&6; }
11720          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11721        fi
11722        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11723$as_echo "$tool_specified" >&6; }
11724      fi
11725    fi
11726  fi
11727
11728
11729  if test "x$GREP" = x; then
11730    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11731  fi
11732
11733
11734
11735
11736  # Publish this variable in the help.
11737
11738
11739  if test "x$EGREP" = x; then
11740    # The variable is not set by user, try to locate tool using the code snippet
11741    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11742$as_echo_n "checking for egrep... " >&6; }
11743if ${ac_cv_path_EGREP+:} false; then :
11744  $as_echo_n "(cached) " >&6
11745else
11746  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11747   then ac_cv_path_EGREP="$GREP -E"
11748   else
11749     if test -z "$EGREP"; then
11750  ac_path_EGREP_found=false
11751  # Loop through the user's path and test for each of PROGNAME-LIST
11752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11753for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11754do
11755  IFS=$as_save_IFS
11756  test -z "$as_dir" && as_dir=.
11757    for ac_prog in egrep; do
11758    for ac_exec_ext in '' $ac_executable_extensions; do
11759      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11760      as_fn_executable_p "$ac_path_EGREP" || continue
11761# Check for GNU ac_path_EGREP and select it if it is found.
11762  # Check for GNU $ac_path_EGREP
11763case `"$ac_path_EGREP" --version 2>&1` in
11764*GNU*)
11765  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11766*)
11767  ac_count=0
11768  $as_echo_n 0123456789 >"conftest.in"
11769  while :
11770  do
11771    cat "conftest.in" "conftest.in" >"conftest.tmp"
11772    mv "conftest.tmp" "conftest.in"
11773    cp "conftest.in" "conftest.nl"
11774    $as_echo 'EGREP' >> "conftest.nl"
11775    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11776    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11777    as_fn_arith $ac_count + 1 && ac_count=$as_val
11778    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11779      # Best one so far, save it but keep looking for a better one
11780      ac_cv_path_EGREP="$ac_path_EGREP"
11781      ac_path_EGREP_max=$ac_count
11782    fi
11783    # 10*(2^10) chars as input seems more than enough
11784    test $ac_count -gt 10 && break
11785  done
11786  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11787esac
11788
11789      $ac_path_EGREP_found && break 3
11790    done
11791  done
11792  done
11793IFS=$as_save_IFS
11794  if test -z "$ac_cv_path_EGREP"; then
11795    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11796  fi
11797else
11798  ac_cv_path_EGREP=$EGREP
11799fi
11800
11801   fi
11802fi
11803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11804$as_echo "$ac_cv_path_EGREP" >&6; }
11805 EGREP="$ac_cv_path_EGREP"
11806
11807
11808  else
11809    # The variable is set, but is it from the command line or the environment?
11810
11811    # Try to remove the string !EGREP! from our list.
11812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11814      # If it failed, the variable was not from the command line. Ignore it,
11815      # but warn the user (except for BASH, which is always set by the calling BASH).
11816      if test "xEGREP" != xBASH; then
11817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11818$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11819      fi
11820      # Try to locate tool using the code snippet
11821      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11822$as_echo_n "checking for egrep... " >&6; }
11823if ${ac_cv_path_EGREP+:} false; then :
11824  $as_echo_n "(cached) " >&6
11825else
11826  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11827   then ac_cv_path_EGREP="$GREP -E"
11828   else
11829     if test -z "$EGREP"; then
11830  ac_path_EGREP_found=false
11831  # Loop through the user's path and test for each of PROGNAME-LIST
11832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11833for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11834do
11835  IFS=$as_save_IFS
11836  test -z "$as_dir" && as_dir=.
11837    for ac_prog in egrep; do
11838    for ac_exec_ext in '' $ac_executable_extensions; do
11839      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11840      as_fn_executable_p "$ac_path_EGREP" || continue
11841# Check for GNU ac_path_EGREP and select it if it is found.
11842  # Check for GNU $ac_path_EGREP
11843case `"$ac_path_EGREP" --version 2>&1` in
11844*GNU*)
11845  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11846*)
11847  ac_count=0
11848  $as_echo_n 0123456789 >"conftest.in"
11849  while :
11850  do
11851    cat "conftest.in" "conftest.in" >"conftest.tmp"
11852    mv "conftest.tmp" "conftest.in"
11853    cp "conftest.in" "conftest.nl"
11854    $as_echo 'EGREP' >> "conftest.nl"
11855    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11856    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11857    as_fn_arith $ac_count + 1 && ac_count=$as_val
11858    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11859      # Best one so far, save it but keep looking for a better one
11860      ac_cv_path_EGREP="$ac_path_EGREP"
11861      ac_path_EGREP_max=$ac_count
11862    fi
11863    # 10*(2^10) chars as input seems more than enough
11864    test $ac_count -gt 10 && break
11865  done
11866  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11867esac
11868
11869      $ac_path_EGREP_found && break 3
11870    done
11871  done
11872  done
11873IFS=$as_save_IFS
11874  if test -z "$ac_cv_path_EGREP"; then
11875    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11876  fi
11877else
11878  ac_cv_path_EGREP=$EGREP
11879fi
11880
11881   fi
11882fi
11883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11884$as_echo "$ac_cv_path_EGREP" >&6; }
11885 EGREP="$ac_cv_path_EGREP"
11886
11887
11888    else
11889      # If it succeeded, then it was overridden by the user. We will use it
11890      # for the tool.
11891
11892      # First remove it from the list of overridden variables, so we can test
11893      # for unknown variables in the end.
11894      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11895
11896      # Check if the provided tool contains a complete path.
11897      tool_specified="$EGREP"
11898      tool_basename="${tool_specified##*/}"
11899      if test "x$tool_basename" = "x$tool_specified"; then
11900        # A command without a complete path is provided, search $PATH.
11901        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11902$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11903        # Extract the first word of "$tool_basename", so it can be a program name with args.
11904set dummy $tool_basename; ac_word=$2
11905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11906$as_echo_n "checking for $ac_word... " >&6; }
11907if ${ac_cv_path_EGREP+:} false; then :
11908  $as_echo_n "(cached) " >&6
11909else
11910  case $EGREP in
11911  [\\/]* | ?:[\\/]*)
11912  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11913  ;;
11914  *)
11915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11916for as_dir in $PATH
11917do
11918  IFS=$as_save_IFS
11919  test -z "$as_dir" && as_dir=.
11920    for ac_exec_ext in '' $ac_executable_extensions; do
11921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11922    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11924    break 2
11925  fi
11926done
11927  done
11928IFS=$as_save_IFS
11929
11930  ;;
11931esac
11932fi
11933EGREP=$ac_cv_path_EGREP
11934if test -n "$EGREP"; then
11935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11936$as_echo "$EGREP" >&6; }
11937else
11938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11939$as_echo "no" >&6; }
11940fi
11941
11942
11943        if test "x$EGREP" = x; then
11944          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11945        fi
11946      else
11947        # Otherwise we believe it is a complete path. Use it as it is.
11948        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11949$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11950        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11951$as_echo_n "checking for EGREP... " >&6; }
11952        if test ! -x "$tool_specified"; then
11953          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11954$as_echo "not found" >&6; }
11955          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11956        fi
11957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11958$as_echo "$tool_specified" >&6; }
11959      fi
11960    fi
11961  fi
11962
11963
11964  if test "x$EGREP" = x; then
11965    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11966  fi
11967
11968
11969
11970
11971  # Publish this variable in the help.
11972
11973
11974  if test "x$FGREP" = x; then
11975    # The variable is not set by user, try to locate tool using the code snippet
11976    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11977$as_echo_n "checking for fgrep... " >&6; }
11978if ${ac_cv_path_FGREP+:} false; then :
11979  $as_echo_n "(cached) " >&6
11980else
11981  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11982   then ac_cv_path_FGREP="$GREP -F"
11983   else
11984     if test -z "$FGREP"; then
11985  ac_path_FGREP_found=false
11986  # Loop through the user's path and test for each of PROGNAME-LIST
11987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11988for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11989do
11990  IFS=$as_save_IFS
11991  test -z "$as_dir" && as_dir=.
11992    for ac_prog in fgrep; do
11993    for ac_exec_ext in '' $ac_executable_extensions; do
11994      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
11995      as_fn_executable_p "$ac_path_FGREP" || continue
11996# Check for GNU ac_path_FGREP and select it if it is found.
11997  # Check for GNU $ac_path_FGREP
11998case `"$ac_path_FGREP" --version 2>&1` in
11999*GNU*)
12000  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12001*)
12002  ac_count=0
12003  $as_echo_n 0123456789 >"conftest.in"
12004  while :
12005  do
12006    cat "conftest.in" "conftest.in" >"conftest.tmp"
12007    mv "conftest.tmp" "conftest.in"
12008    cp "conftest.in" "conftest.nl"
12009    $as_echo 'FGREP' >> "conftest.nl"
12010    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12011    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12012    as_fn_arith $ac_count + 1 && ac_count=$as_val
12013    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12014      # Best one so far, save it but keep looking for a better one
12015      ac_cv_path_FGREP="$ac_path_FGREP"
12016      ac_path_FGREP_max=$ac_count
12017    fi
12018    # 10*(2^10) chars as input seems more than enough
12019    test $ac_count -gt 10 && break
12020  done
12021  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12022esac
12023
12024      $ac_path_FGREP_found && break 3
12025    done
12026  done
12027  done
12028IFS=$as_save_IFS
12029  if test -z "$ac_cv_path_FGREP"; then
12030    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12031  fi
12032else
12033  ac_cv_path_FGREP=$FGREP
12034fi
12035
12036   fi
12037fi
12038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12039$as_echo "$ac_cv_path_FGREP" >&6; }
12040 FGREP="$ac_cv_path_FGREP"
12041
12042
12043  else
12044    # The variable is set, but is it from the command line or the environment?
12045
12046    # Try to remove the string !FGREP! from our list.
12047    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12048    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12049      # If it failed, the variable was not from the command line. Ignore it,
12050      # but warn the user (except for BASH, which is always set by the calling BASH).
12051      if test "xFGREP" != xBASH; then
12052        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12053$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12054      fi
12055      # Try to locate tool using the code snippet
12056      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12057$as_echo_n "checking for fgrep... " >&6; }
12058if ${ac_cv_path_FGREP+:} false; then :
12059  $as_echo_n "(cached) " >&6
12060else
12061  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12062   then ac_cv_path_FGREP="$GREP -F"
12063   else
12064     if test -z "$FGREP"; then
12065  ac_path_FGREP_found=false
12066  # Loop through the user's path and test for each of PROGNAME-LIST
12067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12068for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12069do
12070  IFS=$as_save_IFS
12071  test -z "$as_dir" && as_dir=.
12072    for ac_prog in fgrep; do
12073    for ac_exec_ext in '' $ac_executable_extensions; do
12074      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12075      as_fn_executable_p "$ac_path_FGREP" || continue
12076# Check for GNU ac_path_FGREP and select it if it is found.
12077  # Check for GNU $ac_path_FGREP
12078case `"$ac_path_FGREP" --version 2>&1` in
12079*GNU*)
12080  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12081*)
12082  ac_count=0
12083  $as_echo_n 0123456789 >"conftest.in"
12084  while :
12085  do
12086    cat "conftest.in" "conftest.in" >"conftest.tmp"
12087    mv "conftest.tmp" "conftest.in"
12088    cp "conftest.in" "conftest.nl"
12089    $as_echo 'FGREP' >> "conftest.nl"
12090    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12091    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12092    as_fn_arith $ac_count + 1 && ac_count=$as_val
12093    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12094      # Best one so far, save it but keep looking for a better one
12095      ac_cv_path_FGREP="$ac_path_FGREP"
12096      ac_path_FGREP_max=$ac_count
12097    fi
12098    # 10*(2^10) chars as input seems more than enough
12099    test $ac_count -gt 10 && break
12100  done
12101  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12102esac
12103
12104      $ac_path_FGREP_found && break 3
12105    done
12106  done
12107  done
12108IFS=$as_save_IFS
12109  if test -z "$ac_cv_path_FGREP"; then
12110    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12111  fi
12112else
12113  ac_cv_path_FGREP=$FGREP
12114fi
12115
12116   fi
12117fi
12118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12119$as_echo "$ac_cv_path_FGREP" >&6; }
12120 FGREP="$ac_cv_path_FGREP"
12121
12122
12123    else
12124      # If it succeeded, then it was overridden by the user. We will use it
12125      # for the tool.
12126
12127      # First remove it from the list of overridden variables, so we can test
12128      # for unknown variables in the end.
12129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12130
12131      # Check if the provided tool contains a complete path.
12132      tool_specified="$FGREP"
12133      tool_basename="${tool_specified##*/}"
12134      if test "x$tool_basename" = "x$tool_specified"; then
12135        # A command without a complete path is provided, search $PATH.
12136        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12137$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12138        # Extract the first word of "$tool_basename", so it can be a program name with args.
12139set dummy $tool_basename; ac_word=$2
12140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12141$as_echo_n "checking for $ac_word... " >&6; }
12142if ${ac_cv_path_FGREP+:} false; then :
12143  $as_echo_n "(cached) " >&6
12144else
12145  case $FGREP in
12146  [\\/]* | ?:[\\/]*)
12147  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12148  ;;
12149  *)
12150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12151for as_dir in $PATH
12152do
12153  IFS=$as_save_IFS
12154  test -z "$as_dir" && as_dir=.
12155    for ac_exec_ext in '' $ac_executable_extensions; do
12156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12157    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12159    break 2
12160  fi
12161done
12162  done
12163IFS=$as_save_IFS
12164
12165  ;;
12166esac
12167fi
12168FGREP=$ac_cv_path_FGREP
12169if test -n "$FGREP"; then
12170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12171$as_echo "$FGREP" >&6; }
12172else
12173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12174$as_echo "no" >&6; }
12175fi
12176
12177
12178        if test "x$FGREP" = x; then
12179          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12180        fi
12181      else
12182        # Otherwise we believe it is a complete path. Use it as it is.
12183        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12184$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12186$as_echo_n "checking for FGREP... " >&6; }
12187        if test ! -x "$tool_specified"; then
12188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12189$as_echo "not found" >&6; }
12190          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12191        fi
12192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12193$as_echo "$tool_specified" >&6; }
12194      fi
12195    fi
12196  fi
12197
12198
12199  if test "x$FGREP" = x; then
12200    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12201  fi
12202
12203
12204
12205
12206  # Publish this variable in the help.
12207
12208
12209  if test "x$SED" = x; then
12210    # The variable is not set by user, try to locate tool using the code snippet
12211    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12212$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12213if ${ac_cv_path_SED+:} false; then :
12214  $as_echo_n "(cached) " >&6
12215else
12216            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12217     for ac_i in 1 2 3 4 5 6 7; do
12218       ac_script="$ac_script$as_nl$ac_script"
12219     done
12220     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12221     { ac_script=; unset ac_script;}
12222     if test -z "$SED"; then
12223  ac_path_SED_found=false
12224  # Loop through the user's path and test for each of PROGNAME-LIST
12225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12226for as_dir in $PATH
12227do
12228  IFS=$as_save_IFS
12229  test -z "$as_dir" && as_dir=.
12230    for ac_prog in sed gsed; do
12231    for ac_exec_ext in '' $ac_executable_extensions; do
12232      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12233      as_fn_executable_p "$ac_path_SED" || continue
12234# Check for GNU ac_path_SED and select it if it is found.
12235  # Check for GNU $ac_path_SED
12236case `"$ac_path_SED" --version 2>&1` in
12237*GNU*)
12238  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12239*)
12240  ac_count=0
12241  $as_echo_n 0123456789 >"conftest.in"
12242  while :
12243  do
12244    cat "conftest.in" "conftest.in" >"conftest.tmp"
12245    mv "conftest.tmp" "conftest.in"
12246    cp "conftest.in" "conftest.nl"
12247    $as_echo '' >> "conftest.nl"
12248    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12249    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12250    as_fn_arith $ac_count + 1 && ac_count=$as_val
12251    if test $ac_count -gt ${ac_path_SED_max-0}; then
12252      # Best one so far, save it but keep looking for a better one
12253      ac_cv_path_SED="$ac_path_SED"
12254      ac_path_SED_max=$ac_count
12255    fi
12256    # 10*(2^10) chars as input seems more than enough
12257    test $ac_count -gt 10 && break
12258  done
12259  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12260esac
12261
12262      $ac_path_SED_found && break 3
12263    done
12264  done
12265  done
12266IFS=$as_save_IFS
12267  if test -z "$ac_cv_path_SED"; then
12268    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12269  fi
12270else
12271  ac_cv_path_SED=$SED
12272fi
12273
12274fi
12275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12276$as_echo "$ac_cv_path_SED" >&6; }
12277 SED="$ac_cv_path_SED"
12278  rm -f conftest.sed
12279
12280  else
12281    # The variable is set, but is it from the command line or the environment?
12282
12283    # Try to remove the string !SED! from our list.
12284    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12285    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12286      # If it failed, the variable was not from the command line. Ignore it,
12287      # but warn the user (except for BASH, which is always set by the calling BASH).
12288      if test "xSED" != xBASH; then
12289        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12290$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12291      fi
12292      # Try to locate tool using the code snippet
12293      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12294$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12295if ${ac_cv_path_SED+:} false; then :
12296  $as_echo_n "(cached) " >&6
12297else
12298            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12299     for ac_i in 1 2 3 4 5 6 7; do
12300       ac_script="$ac_script$as_nl$ac_script"
12301     done
12302     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12303     { ac_script=; unset ac_script;}
12304     if test -z "$SED"; then
12305  ac_path_SED_found=false
12306  # Loop through the user's path and test for each of PROGNAME-LIST
12307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12308for as_dir in $PATH
12309do
12310  IFS=$as_save_IFS
12311  test -z "$as_dir" && as_dir=.
12312    for ac_prog in sed gsed; do
12313    for ac_exec_ext in '' $ac_executable_extensions; do
12314      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12315      as_fn_executable_p "$ac_path_SED" || continue
12316# Check for GNU ac_path_SED and select it if it is found.
12317  # Check for GNU $ac_path_SED
12318case `"$ac_path_SED" --version 2>&1` in
12319*GNU*)
12320  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12321*)
12322  ac_count=0
12323  $as_echo_n 0123456789 >"conftest.in"
12324  while :
12325  do
12326    cat "conftest.in" "conftest.in" >"conftest.tmp"
12327    mv "conftest.tmp" "conftest.in"
12328    cp "conftest.in" "conftest.nl"
12329    $as_echo '' >> "conftest.nl"
12330    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12331    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12332    as_fn_arith $ac_count + 1 && ac_count=$as_val
12333    if test $ac_count -gt ${ac_path_SED_max-0}; then
12334      # Best one so far, save it but keep looking for a better one
12335      ac_cv_path_SED="$ac_path_SED"
12336      ac_path_SED_max=$ac_count
12337    fi
12338    # 10*(2^10) chars as input seems more than enough
12339    test $ac_count -gt 10 && break
12340  done
12341  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12342esac
12343
12344      $ac_path_SED_found && break 3
12345    done
12346  done
12347  done
12348IFS=$as_save_IFS
12349  if test -z "$ac_cv_path_SED"; then
12350    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12351  fi
12352else
12353  ac_cv_path_SED=$SED
12354fi
12355
12356fi
12357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12358$as_echo "$ac_cv_path_SED" >&6; }
12359 SED="$ac_cv_path_SED"
12360  rm -f conftest.sed
12361
12362    else
12363      # If it succeeded, then it was overridden by the user. We will use it
12364      # for the tool.
12365
12366      # First remove it from the list of overridden variables, so we can test
12367      # for unknown variables in the end.
12368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12369
12370      # Check if the provided tool contains a complete path.
12371      tool_specified="$SED"
12372      tool_basename="${tool_specified##*/}"
12373      if test "x$tool_basename" = "x$tool_specified"; then
12374        # A command without a complete path is provided, search $PATH.
12375        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12376$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12377        # Extract the first word of "$tool_basename", so it can be a program name with args.
12378set dummy $tool_basename; ac_word=$2
12379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12380$as_echo_n "checking for $ac_word... " >&6; }
12381if ${ac_cv_path_SED+:} false; then :
12382  $as_echo_n "(cached) " >&6
12383else
12384  case $SED in
12385  [\\/]* | ?:[\\/]*)
12386  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12387  ;;
12388  *)
12389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12390for as_dir in $PATH
12391do
12392  IFS=$as_save_IFS
12393  test -z "$as_dir" && as_dir=.
12394    for ac_exec_ext in '' $ac_executable_extensions; do
12395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12396    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12398    break 2
12399  fi
12400done
12401  done
12402IFS=$as_save_IFS
12403
12404  ;;
12405esac
12406fi
12407SED=$ac_cv_path_SED
12408if test -n "$SED"; then
12409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12410$as_echo "$SED" >&6; }
12411else
12412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12413$as_echo "no" >&6; }
12414fi
12415
12416
12417        if test "x$SED" = x; then
12418          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12419        fi
12420      else
12421        # Otherwise we believe it is a complete path. Use it as it is.
12422        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12423$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12425$as_echo_n "checking for SED... " >&6; }
12426        if test ! -x "$tool_specified"; then
12427          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12428$as_echo "not found" >&6; }
12429          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12430        fi
12431        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12432$as_echo "$tool_specified" >&6; }
12433      fi
12434    fi
12435  fi
12436
12437
12438  if test "x$SED" = x; then
12439    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12440  fi
12441
12442
12443
12444  # Always force rm.
12445  RM="$RM -f"
12446
12447  # pwd behaves differently on various platforms and some don't support the -L flag.
12448  # Always use the bash builtin pwd to get uniform behavior.
12449  THEPWDCMD=pwd
12450
12451  # These are not required on all platforms
12452
12453
12454  # Publish this variable in the help.
12455
12456
12457  if test "x$CYGPATH" = x; then
12458    # The variable is not set by user, try to locate tool using the code snippet
12459    for ac_prog in cygpath
12460do
12461  # Extract the first word of "$ac_prog", so it can be a program name with args.
12462set dummy $ac_prog; ac_word=$2
12463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12464$as_echo_n "checking for $ac_word... " >&6; }
12465if ${ac_cv_path_CYGPATH+:} false; then :
12466  $as_echo_n "(cached) " >&6
12467else
12468  case $CYGPATH in
12469  [\\/]* | ?:[\\/]*)
12470  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12471  ;;
12472  *)
12473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12474for as_dir in $PATH
12475do
12476  IFS=$as_save_IFS
12477  test -z "$as_dir" && as_dir=.
12478    for ac_exec_ext in '' $ac_executable_extensions; do
12479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12480    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12482    break 2
12483  fi
12484done
12485  done
12486IFS=$as_save_IFS
12487
12488  ;;
12489esac
12490fi
12491CYGPATH=$ac_cv_path_CYGPATH
12492if test -n "$CYGPATH"; then
12493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12494$as_echo "$CYGPATH" >&6; }
12495else
12496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12497$as_echo "no" >&6; }
12498fi
12499
12500
12501  test -n "$CYGPATH" && break
12502done
12503
12504  else
12505    # The variable is set, but is it from the command line or the environment?
12506
12507    # Try to remove the string !CYGPATH! from our list.
12508    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12509    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12510      # If it failed, the variable was not from the command line. Ignore it,
12511      # but warn the user (except for BASH, which is always set by the calling BASH).
12512      if test "xCYGPATH" != xBASH; then
12513        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12514$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12515      fi
12516      # Try to locate tool using the code snippet
12517      for ac_prog in cygpath
12518do
12519  # Extract the first word of "$ac_prog", so it can be a program name with args.
12520set dummy $ac_prog; ac_word=$2
12521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12522$as_echo_n "checking for $ac_word... " >&6; }
12523if ${ac_cv_path_CYGPATH+:} false; then :
12524  $as_echo_n "(cached) " >&6
12525else
12526  case $CYGPATH in
12527  [\\/]* | ?:[\\/]*)
12528  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12529  ;;
12530  *)
12531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12532for as_dir in $PATH
12533do
12534  IFS=$as_save_IFS
12535  test -z "$as_dir" && as_dir=.
12536    for ac_exec_ext in '' $ac_executable_extensions; do
12537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12538    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12540    break 2
12541  fi
12542done
12543  done
12544IFS=$as_save_IFS
12545
12546  ;;
12547esac
12548fi
12549CYGPATH=$ac_cv_path_CYGPATH
12550if test -n "$CYGPATH"; then
12551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12552$as_echo "$CYGPATH" >&6; }
12553else
12554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12555$as_echo "no" >&6; }
12556fi
12557
12558
12559  test -n "$CYGPATH" && break
12560done
12561
12562    else
12563      # If it succeeded, then it was overridden by the user. We will use it
12564      # for the tool.
12565
12566      # First remove it from the list of overridden variables, so we can test
12567      # for unknown variables in the end.
12568      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12569
12570      # Check if the provided tool contains a complete path.
12571      tool_specified="$CYGPATH"
12572      tool_basename="${tool_specified##*/}"
12573      if test "x$tool_basename" = "x$tool_specified"; then
12574        # A command without a complete path is provided, search $PATH.
12575        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12576$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12577        # Extract the first word of "$tool_basename", so it can be a program name with args.
12578set dummy $tool_basename; ac_word=$2
12579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12580$as_echo_n "checking for $ac_word... " >&6; }
12581if ${ac_cv_path_CYGPATH+:} false; then :
12582  $as_echo_n "(cached) " >&6
12583else
12584  case $CYGPATH in
12585  [\\/]* | ?:[\\/]*)
12586  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12587  ;;
12588  *)
12589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12590for as_dir in $PATH
12591do
12592  IFS=$as_save_IFS
12593  test -z "$as_dir" && as_dir=.
12594    for ac_exec_ext in '' $ac_executable_extensions; do
12595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12596    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12598    break 2
12599  fi
12600done
12601  done
12602IFS=$as_save_IFS
12603
12604  ;;
12605esac
12606fi
12607CYGPATH=$ac_cv_path_CYGPATH
12608if test -n "$CYGPATH"; then
12609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12610$as_echo "$CYGPATH" >&6; }
12611else
12612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12613$as_echo "no" >&6; }
12614fi
12615
12616
12617        if test "x$CYGPATH" = x; then
12618          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12619        fi
12620      else
12621        # Otherwise we believe it is a complete path. Use it as it is.
12622        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12623$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12624        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12625$as_echo_n "checking for CYGPATH... " >&6; }
12626        if test ! -x "$tool_specified"; then
12627          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12628$as_echo "not found" >&6; }
12629          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12630        fi
12631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12632$as_echo "$tool_specified" >&6; }
12633      fi
12634    fi
12635  fi
12636
12637
12638
12639
12640  # Publish this variable in the help.
12641
12642
12643  if test "x$READLINK" = x; then
12644    # The variable is not set by user, try to locate tool using the code snippet
12645    for ac_prog in greadlink readlink
12646do
12647  # Extract the first word of "$ac_prog", so it can be a program name with args.
12648set dummy $ac_prog; ac_word=$2
12649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12650$as_echo_n "checking for $ac_word... " >&6; }
12651if ${ac_cv_path_READLINK+:} false; then :
12652  $as_echo_n "(cached) " >&6
12653else
12654  case $READLINK in
12655  [\\/]* | ?:[\\/]*)
12656  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12657  ;;
12658  *)
12659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12660for as_dir in $PATH
12661do
12662  IFS=$as_save_IFS
12663  test -z "$as_dir" && as_dir=.
12664    for ac_exec_ext in '' $ac_executable_extensions; do
12665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12666    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12668    break 2
12669  fi
12670done
12671  done
12672IFS=$as_save_IFS
12673
12674  ;;
12675esac
12676fi
12677READLINK=$ac_cv_path_READLINK
12678if test -n "$READLINK"; then
12679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12680$as_echo "$READLINK" >&6; }
12681else
12682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12683$as_echo "no" >&6; }
12684fi
12685
12686
12687  test -n "$READLINK" && break
12688done
12689
12690  else
12691    # The variable is set, but is it from the command line or the environment?
12692
12693    # Try to remove the string !READLINK! from our list.
12694    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12695    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12696      # If it failed, the variable was not from the command line. Ignore it,
12697      # but warn the user (except for BASH, which is always set by the calling BASH).
12698      if test "xREADLINK" != xBASH; then
12699        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12700$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12701      fi
12702      # Try to locate tool using the code snippet
12703      for ac_prog in greadlink readlink
12704do
12705  # Extract the first word of "$ac_prog", so it can be a program name with args.
12706set dummy $ac_prog; ac_word=$2
12707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12708$as_echo_n "checking for $ac_word... " >&6; }
12709if ${ac_cv_path_READLINK+:} false; then :
12710  $as_echo_n "(cached) " >&6
12711else
12712  case $READLINK in
12713  [\\/]* | ?:[\\/]*)
12714  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12715  ;;
12716  *)
12717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12718for as_dir in $PATH
12719do
12720  IFS=$as_save_IFS
12721  test -z "$as_dir" && as_dir=.
12722    for ac_exec_ext in '' $ac_executable_extensions; do
12723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12724    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12726    break 2
12727  fi
12728done
12729  done
12730IFS=$as_save_IFS
12731
12732  ;;
12733esac
12734fi
12735READLINK=$ac_cv_path_READLINK
12736if test -n "$READLINK"; then
12737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12738$as_echo "$READLINK" >&6; }
12739else
12740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12741$as_echo "no" >&6; }
12742fi
12743
12744
12745  test -n "$READLINK" && break
12746done
12747
12748    else
12749      # If it succeeded, then it was overridden by the user. We will use it
12750      # for the tool.
12751
12752      # First remove it from the list of overridden variables, so we can test
12753      # for unknown variables in the end.
12754      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12755
12756      # Check if the provided tool contains a complete path.
12757      tool_specified="$READLINK"
12758      tool_basename="${tool_specified##*/}"
12759      if test "x$tool_basename" = "x$tool_specified"; then
12760        # A command without a complete path is provided, search $PATH.
12761        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12762$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12763        # Extract the first word of "$tool_basename", so it can be a program name with args.
12764set dummy $tool_basename; ac_word=$2
12765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12766$as_echo_n "checking for $ac_word... " >&6; }
12767if ${ac_cv_path_READLINK+:} false; then :
12768  $as_echo_n "(cached) " >&6
12769else
12770  case $READLINK in
12771  [\\/]* | ?:[\\/]*)
12772  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12773  ;;
12774  *)
12775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12776for as_dir in $PATH
12777do
12778  IFS=$as_save_IFS
12779  test -z "$as_dir" && as_dir=.
12780    for ac_exec_ext in '' $ac_executable_extensions; do
12781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12782    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12784    break 2
12785  fi
12786done
12787  done
12788IFS=$as_save_IFS
12789
12790  ;;
12791esac
12792fi
12793READLINK=$ac_cv_path_READLINK
12794if test -n "$READLINK"; then
12795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12796$as_echo "$READLINK" >&6; }
12797else
12798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12799$as_echo "no" >&6; }
12800fi
12801
12802
12803        if test "x$READLINK" = x; then
12804          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12805        fi
12806      else
12807        # Otherwise we believe it is a complete path. Use it as it is.
12808        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12809$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12810        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12811$as_echo_n "checking for READLINK... " >&6; }
12812        if test ! -x "$tool_specified"; then
12813          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12814$as_echo "not found" >&6; }
12815          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12816        fi
12817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12818$as_echo "$tool_specified" >&6; }
12819      fi
12820    fi
12821  fi
12822
12823
12824
12825
12826  # Publish this variable in the help.
12827
12828
12829  if test "x$DF" = x; then
12830    # The variable is not set by user, try to locate tool using the code snippet
12831    for ac_prog in df
12832do
12833  # Extract the first word of "$ac_prog", so it can be a program name with args.
12834set dummy $ac_prog; ac_word=$2
12835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12836$as_echo_n "checking for $ac_word... " >&6; }
12837if ${ac_cv_path_DF+:} false; then :
12838  $as_echo_n "(cached) " >&6
12839else
12840  case $DF in
12841  [\\/]* | ?:[\\/]*)
12842  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12843  ;;
12844  *)
12845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12846for as_dir in $PATH
12847do
12848  IFS=$as_save_IFS
12849  test -z "$as_dir" && as_dir=.
12850    for ac_exec_ext in '' $ac_executable_extensions; do
12851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12852    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12854    break 2
12855  fi
12856done
12857  done
12858IFS=$as_save_IFS
12859
12860  ;;
12861esac
12862fi
12863DF=$ac_cv_path_DF
12864if test -n "$DF"; then
12865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12866$as_echo "$DF" >&6; }
12867else
12868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12869$as_echo "no" >&6; }
12870fi
12871
12872
12873  test -n "$DF" && break
12874done
12875
12876  else
12877    # The variable is set, but is it from the command line or the environment?
12878
12879    # Try to remove the string !DF! from our list.
12880    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12881    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12882      # If it failed, the variable was not from the command line. Ignore it,
12883      # but warn the user (except for BASH, which is always set by the calling BASH).
12884      if test "xDF" != xBASH; then
12885        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12886$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12887      fi
12888      # Try to locate tool using the code snippet
12889      for ac_prog in df
12890do
12891  # Extract the first word of "$ac_prog", so it can be a program name with args.
12892set dummy $ac_prog; ac_word=$2
12893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12894$as_echo_n "checking for $ac_word... " >&6; }
12895if ${ac_cv_path_DF+:} false; then :
12896  $as_echo_n "(cached) " >&6
12897else
12898  case $DF in
12899  [\\/]* | ?:[\\/]*)
12900  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12901  ;;
12902  *)
12903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12904for as_dir in $PATH
12905do
12906  IFS=$as_save_IFS
12907  test -z "$as_dir" && as_dir=.
12908    for ac_exec_ext in '' $ac_executable_extensions; do
12909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12910    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12912    break 2
12913  fi
12914done
12915  done
12916IFS=$as_save_IFS
12917
12918  ;;
12919esac
12920fi
12921DF=$ac_cv_path_DF
12922if test -n "$DF"; then
12923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12924$as_echo "$DF" >&6; }
12925else
12926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12927$as_echo "no" >&6; }
12928fi
12929
12930
12931  test -n "$DF" && break
12932done
12933
12934    else
12935      # If it succeeded, then it was overridden by the user. We will use it
12936      # for the tool.
12937
12938      # First remove it from the list of overridden variables, so we can test
12939      # for unknown variables in the end.
12940      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12941
12942      # Check if the provided tool contains a complete path.
12943      tool_specified="$DF"
12944      tool_basename="${tool_specified##*/}"
12945      if test "x$tool_basename" = "x$tool_specified"; then
12946        # A command without a complete path is provided, search $PATH.
12947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12948$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12949        # Extract the first word of "$tool_basename", so it can be a program name with args.
12950set dummy $tool_basename; ac_word=$2
12951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12952$as_echo_n "checking for $ac_word... " >&6; }
12953if ${ac_cv_path_DF+:} false; then :
12954  $as_echo_n "(cached) " >&6
12955else
12956  case $DF in
12957  [\\/]* | ?:[\\/]*)
12958  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12959  ;;
12960  *)
12961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12962for as_dir in $PATH
12963do
12964  IFS=$as_save_IFS
12965  test -z "$as_dir" && as_dir=.
12966    for ac_exec_ext in '' $ac_executable_extensions; do
12967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12968    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12970    break 2
12971  fi
12972done
12973  done
12974IFS=$as_save_IFS
12975
12976  ;;
12977esac
12978fi
12979DF=$ac_cv_path_DF
12980if test -n "$DF"; then
12981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12982$as_echo "$DF" >&6; }
12983else
12984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12985$as_echo "no" >&6; }
12986fi
12987
12988
12989        if test "x$DF" = x; then
12990          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12991        fi
12992      else
12993        # Otherwise we believe it is a complete path. Use it as it is.
12994        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
12995$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
12996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
12997$as_echo_n "checking for DF... " >&6; }
12998        if test ! -x "$tool_specified"; then
12999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13000$as_echo "not found" >&6; }
13001          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13002        fi
13003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13004$as_echo "$tool_specified" >&6; }
13005      fi
13006    fi
13007  fi
13008
13009
13010
13011
13012  # Publish this variable in the help.
13013
13014
13015  if test "x$SETFILE" = x; then
13016    # The variable is not set by user, try to locate tool using the code snippet
13017    for ac_prog in SetFile
13018do
13019  # Extract the first word of "$ac_prog", so it can be a program name with args.
13020set dummy $ac_prog; ac_word=$2
13021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13022$as_echo_n "checking for $ac_word... " >&6; }
13023if ${ac_cv_path_SETFILE+:} false; then :
13024  $as_echo_n "(cached) " >&6
13025else
13026  case $SETFILE in
13027  [\\/]* | ?:[\\/]*)
13028  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13029  ;;
13030  *)
13031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13032for as_dir in $PATH
13033do
13034  IFS=$as_save_IFS
13035  test -z "$as_dir" && as_dir=.
13036    for ac_exec_ext in '' $ac_executable_extensions; do
13037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13038    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13040    break 2
13041  fi
13042done
13043  done
13044IFS=$as_save_IFS
13045
13046  ;;
13047esac
13048fi
13049SETFILE=$ac_cv_path_SETFILE
13050if test -n "$SETFILE"; then
13051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13052$as_echo "$SETFILE" >&6; }
13053else
13054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13055$as_echo "no" >&6; }
13056fi
13057
13058
13059  test -n "$SETFILE" && break
13060done
13061
13062  else
13063    # The variable is set, but is it from the command line or the environment?
13064
13065    # Try to remove the string !SETFILE! from our list.
13066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13068      # If it failed, the variable was not from the command line. Ignore it,
13069      # but warn the user (except for BASH, which is always set by the calling BASH).
13070      if test "xSETFILE" != xBASH; then
13071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13072$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13073      fi
13074      # Try to locate tool using the code snippet
13075      for ac_prog in SetFile
13076do
13077  # Extract the first word of "$ac_prog", so it can be a program name with args.
13078set dummy $ac_prog; ac_word=$2
13079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13080$as_echo_n "checking for $ac_word... " >&6; }
13081if ${ac_cv_path_SETFILE+:} false; then :
13082  $as_echo_n "(cached) " >&6
13083else
13084  case $SETFILE in
13085  [\\/]* | ?:[\\/]*)
13086  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13087  ;;
13088  *)
13089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13090for as_dir in $PATH
13091do
13092  IFS=$as_save_IFS
13093  test -z "$as_dir" && as_dir=.
13094    for ac_exec_ext in '' $ac_executable_extensions; do
13095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13096    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13098    break 2
13099  fi
13100done
13101  done
13102IFS=$as_save_IFS
13103
13104  ;;
13105esac
13106fi
13107SETFILE=$ac_cv_path_SETFILE
13108if test -n "$SETFILE"; then
13109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13110$as_echo "$SETFILE" >&6; }
13111else
13112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13113$as_echo "no" >&6; }
13114fi
13115
13116
13117  test -n "$SETFILE" && break
13118done
13119
13120    else
13121      # If it succeeded, then it was overridden by the user. We will use it
13122      # for the tool.
13123
13124      # First remove it from the list of overridden variables, so we can test
13125      # for unknown variables in the end.
13126      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13127
13128      # Check if the provided tool contains a complete path.
13129      tool_specified="$SETFILE"
13130      tool_basename="${tool_specified##*/}"
13131      if test "x$tool_basename" = "x$tool_specified"; then
13132        # A command without a complete path is provided, search $PATH.
13133        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13134$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13135        # Extract the first word of "$tool_basename", so it can be a program name with args.
13136set dummy $tool_basename; ac_word=$2
13137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13138$as_echo_n "checking for $ac_word... " >&6; }
13139if ${ac_cv_path_SETFILE+:} false; then :
13140  $as_echo_n "(cached) " >&6
13141else
13142  case $SETFILE in
13143  [\\/]* | ?:[\\/]*)
13144  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13145  ;;
13146  *)
13147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13148for as_dir in $PATH
13149do
13150  IFS=$as_save_IFS
13151  test -z "$as_dir" && as_dir=.
13152    for ac_exec_ext in '' $ac_executable_extensions; do
13153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13154    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13156    break 2
13157  fi
13158done
13159  done
13160IFS=$as_save_IFS
13161
13162  ;;
13163esac
13164fi
13165SETFILE=$ac_cv_path_SETFILE
13166if test -n "$SETFILE"; then
13167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13168$as_echo "$SETFILE" >&6; }
13169else
13170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13171$as_echo "no" >&6; }
13172fi
13173
13174
13175        if test "x$SETFILE" = x; then
13176          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13177        fi
13178      else
13179        # Otherwise we believe it is a complete path. Use it as it is.
13180        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13181$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13183$as_echo_n "checking for SETFILE... " >&6; }
13184        if test ! -x "$tool_specified"; then
13185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13186$as_echo "not found" >&6; }
13187          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13188        fi
13189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13190$as_echo "$tool_specified" >&6; }
13191      fi
13192    fi
13193  fi
13194
13195
13196
13197
13198  # Publish this variable in the help.
13199
13200
13201  if test "x$CPIO" = x; then
13202    # The variable is not set by user, try to locate tool using the code snippet
13203    for ac_prog in cpio bsdcpio
13204do
13205  # Extract the first word of "$ac_prog", so it can be a program name with args.
13206set dummy $ac_prog; ac_word=$2
13207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13208$as_echo_n "checking for $ac_word... " >&6; }
13209if ${ac_cv_path_CPIO+:} false; then :
13210  $as_echo_n "(cached) " >&6
13211else
13212  case $CPIO in
13213  [\\/]* | ?:[\\/]*)
13214  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13215  ;;
13216  *)
13217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13218for as_dir in $PATH
13219do
13220  IFS=$as_save_IFS
13221  test -z "$as_dir" && as_dir=.
13222    for ac_exec_ext in '' $ac_executable_extensions; do
13223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13224    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13226    break 2
13227  fi
13228done
13229  done
13230IFS=$as_save_IFS
13231
13232  ;;
13233esac
13234fi
13235CPIO=$ac_cv_path_CPIO
13236if test -n "$CPIO"; then
13237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13238$as_echo "$CPIO" >&6; }
13239else
13240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13241$as_echo "no" >&6; }
13242fi
13243
13244
13245  test -n "$CPIO" && break
13246done
13247
13248  else
13249    # The variable is set, but is it from the command line or the environment?
13250
13251    # Try to remove the string !CPIO! from our list.
13252    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13253    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13254      # If it failed, the variable was not from the command line. Ignore it,
13255      # but warn the user (except for BASH, which is always set by the calling BASH).
13256      if test "xCPIO" != xBASH; then
13257        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13258$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13259      fi
13260      # Try to locate tool using the code snippet
13261      for ac_prog in cpio bsdcpio
13262do
13263  # Extract the first word of "$ac_prog", so it can be a program name with args.
13264set dummy $ac_prog; ac_word=$2
13265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13266$as_echo_n "checking for $ac_word... " >&6; }
13267if ${ac_cv_path_CPIO+:} false; then :
13268  $as_echo_n "(cached) " >&6
13269else
13270  case $CPIO in
13271  [\\/]* | ?:[\\/]*)
13272  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13273  ;;
13274  *)
13275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13276for as_dir in $PATH
13277do
13278  IFS=$as_save_IFS
13279  test -z "$as_dir" && as_dir=.
13280    for ac_exec_ext in '' $ac_executable_extensions; do
13281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13282    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13284    break 2
13285  fi
13286done
13287  done
13288IFS=$as_save_IFS
13289
13290  ;;
13291esac
13292fi
13293CPIO=$ac_cv_path_CPIO
13294if test -n "$CPIO"; then
13295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13296$as_echo "$CPIO" >&6; }
13297else
13298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13299$as_echo "no" >&6; }
13300fi
13301
13302
13303  test -n "$CPIO" && break
13304done
13305
13306    else
13307      # If it succeeded, then it was overridden by the user. We will use it
13308      # for the tool.
13309
13310      # First remove it from the list of overridden variables, so we can test
13311      # for unknown variables in the end.
13312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13313
13314      # Check if the provided tool contains a complete path.
13315      tool_specified="$CPIO"
13316      tool_basename="${tool_specified##*/}"
13317      if test "x$tool_basename" = "x$tool_specified"; then
13318        # A command without a complete path is provided, search $PATH.
13319        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13320$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13321        # Extract the first word of "$tool_basename", so it can be a program name with args.
13322set dummy $tool_basename; ac_word=$2
13323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13324$as_echo_n "checking for $ac_word... " >&6; }
13325if ${ac_cv_path_CPIO+:} false; then :
13326  $as_echo_n "(cached) " >&6
13327else
13328  case $CPIO in
13329  [\\/]* | ?:[\\/]*)
13330  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13331  ;;
13332  *)
13333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13334for as_dir in $PATH
13335do
13336  IFS=$as_save_IFS
13337  test -z "$as_dir" && as_dir=.
13338    for ac_exec_ext in '' $ac_executable_extensions; do
13339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13340    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13342    break 2
13343  fi
13344done
13345  done
13346IFS=$as_save_IFS
13347
13348  ;;
13349esac
13350fi
13351CPIO=$ac_cv_path_CPIO
13352if test -n "$CPIO"; then
13353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13354$as_echo "$CPIO" >&6; }
13355else
13356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13357$as_echo "no" >&6; }
13358fi
13359
13360
13361        if test "x$CPIO" = x; then
13362          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13363        fi
13364      else
13365        # Otherwise we believe it is a complete path. Use it as it is.
13366        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13367$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13369$as_echo_n "checking for CPIO... " >&6; }
13370        if test ! -x "$tool_specified"; then
13371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13372$as_echo "not found" >&6; }
13373          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13374        fi
13375        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13376$as_echo "$tool_specified" >&6; }
13377      fi
13378    fi
13379  fi
13380
13381
13382
13383
13384# Now we can determine OpenJDK build and target platforms. This is required to
13385# have early on.
13386# Make sure we can run config.sub.
13387$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13388  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13389
13390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13391$as_echo_n "checking build system type... " >&6; }
13392if ${ac_cv_build+:} false; then :
13393  $as_echo_n "(cached) " >&6
13394else
13395  ac_build_alias=$build_alias
13396test "x$ac_build_alias" = x &&
13397  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13398test "x$ac_build_alias" = x &&
13399  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13400ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13401  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13402
13403fi
13404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13405$as_echo "$ac_cv_build" >&6; }
13406case $ac_cv_build in
13407*-*-*) ;;
13408*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13409esac
13410build=$ac_cv_build
13411ac_save_IFS=$IFS; IFS='-'
13412set x $ac_cv_build
13413shift
13414build_cpu=$1
13415build_vendor=$2
13416shift; shift
13417# Remember, the first character of IFS is used to create $*,
13418# except with old shells:
13419build_os=$*
13420IFS=$ac_save_IFS
13421case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13422
13423
13424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13425$as_echo_n "checking host system type... " >&6; }
13426if ${ac_cv_host+:} false; then :
13427  $as_echo_n "(cached) " >&6
13428else
13429  if test "x$host_alias" = x; then
13430  ac_cv_host=$ac_cv_build
13431else
13432  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13433    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13434fi
13435
13436fi
13437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13438$as_echo "$ac_cv_host" >&6; }
13439case $ac_cv_host in
13440*-*-*) ;;
13441*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13442esac
13443host=$ac_cv_host
13444ac_save_IFS=$IFS; IFS='-'
13445set x $ac_cv_host
13446shift
13447host_cpu=$1
13448host_vendor=$2
13449shift; shift
13450# Remember, the first character of IFS is used to create $*,
13451# except with old shells:
13452host_os=$*
13453IFS=$ac_save_IFS
13454case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13455
13456
13457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13458$as_echo_n "checking target system type... " >&6; }
13459if ${ac_cv_target+:} false; then :
13460  $as_echo_n "(cached) " >&6
13461else
13462  if test "x$target_alias" = x; then
13463  ac_cv_target=$ac_cv_host
13464else
13465  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13466    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13467fi
13468
13469fi
13470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13471$as_echo "$ac_cv_target" >&6; }
13472case $ac_cv_target in
13473*-*-*) ;;
13474*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13475esac
13476target=$ac_cv_target
13477ac_save_IFS=$IFS; IFS='-'
13478set x $ac_cv_target
13479shift
13480target_cpu=$1
13481target_vendor=$2
13482shift; shift
13483# Remember, the first character of IFS is used to create $*,
13484# except with old shells:
13485target_os=$*
13486IFS=$ac_save_IFS
13487case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13488
13489
13490# The aliases save the names the user supplied, while $host etc.
13491# will get canonicalized.
13492test -n "$target_alias" &&
13493  test "$program_prefix$program_suffix$program_transform_name" = \
13494    NONENONEs,x,x, &&
13495  program_prefix=${target_alias}-
13496
13497  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13498  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13499  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13500  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13501  # to use the configure naming style.
13502
13503
13504
13505
13506
13507  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13508  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13509  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13510  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13511  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13512  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13513
13514
13515
13516  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13517
13518  case "$build_os" in
13519    *linux*)
13520      VAR_OS=linux
13521      VAR_OS_API=posix
13522      VAR_OS_ENV=linux
13523      ;;
13524    *solaris*)
13525      VAR_OS=solaris
13526      VAR_OS_API=posix
13527      VAR_OS_ENV=solaris
13528      ;;
13529    *darwin*)
13530      VAR_OS=macosx
13531      VAR_OS_API=posix
13532      VAR_OS_ENV=macosx
13533      ;;
13534    *bsd*)
13535      VAR_OS=bsd
13536      VAR_OS_API=posix
13537      VAR_OS_ENV=bsd
13538      ;;
13539    *cygwin*)
13540      VAR_OS=windows
13541      VAR_OS_API=winapi
13542      VAR_OS_ENV=windows.cygwin
13543      ;;
13544    *mingw*)
13545      VAR_OS=windows
13546      VAR_OS_API=winapi
13547      VAR_OS_ENV=windows.msys
13548      ;;
13549    *aix*)
13550      VAR_OS=aix
13551      VAR_OS_API=posix
13552      VAR_OS_ENV=aix
13553      ;;
13554    *)
13555      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13556      ;;
13557  esac
13558
13559
13560  # First argument is the cpu name from the trip/quad
13561  case "$build_cpu" in
13562    x86_64)
13563      VAR_CPU=x86_64
13564      VAR_CPU_ARCH=x86
13565      VAR_CPU_BITS=64
13566      VAR_CPU_ENDIAN=little
13567      ;;
13568    i?86)
13569      VAR_CPU=x86
13570      VAR_CPU_ARCH=x86
13571      VAR_CPU_BITS=32
13572      VAR_CPU_ENDIAN=little
13573      ;;
13574    arm*)
13575      VAR_CPU=arm
13576      VAR_CPU_ARCH=arm
13577      VAR_CPU_BITS=32
13578      VAR_CPU_ENDIAN=little
13579      ;;
13580    powerpc)
13581      VAR_CPU=ppc
13582      VAR_CPU_ARCH=ppc
13583      VAR_CPU_BITS=32
13584      VAR_CPU_ENDIAN=big
13585      ;;
13586    powerpc64)
13587      VAR_CPU=ppc64
13588      VAR_CPU_ARCH=ppc
13589      VAR_CPU_BITS=64
13590      VAR_CPU_ENDIAN=big
13591      ;;
13592    powerpc64le)
13593      VAR_CPU=ppc64
13594      VAR_CPU_ARCH=ppc
13595      VAR_CPU_BITS=64
13596      VAR_CPU_ENDIAN=little
13597      ;;
13598    s390)
13599      VAR_CPU=s390
13600      VAR_CPU_ARCH=s390
13601      VAR_CPU_BITS=32
13602      VAR_CPU_ENDIAN=big
13603      ;;
13604    s390x)
13605      VAR_CPU=s390x
13606      VAR_CPU_ARCH=s390
13607      VAR_CPU_BITS=64
13608      VAR_CPU_ENDIAN=big
13609      ;;
13610    sparc)
13611      VAR_CPU=sparc
13612      VAR_CPU_ARCH=sparc
13613      VAR_CPU_BITS=32
13614      VAR_CPU_ENDIAN=big
13615      ;;
13616    sparcv9|sparc64)
13617      VAR_CPU=sparcv9
13618      VAR_CPU_ARCH=sparc
13619      VAR_CPU_BITS=64
13620      VAR_CPU_ENDIAN=big
13621      ;;
13622    *)
13623      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13624      ;;
13625  esac
13626
13627  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13628  OPENJDK_BUILD_OS="$VAR_OS"
13629  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13630  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13631  OPENJDK_BUILD_CPU="$VAR_CPU"
13632  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13633  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13634  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13635
13636
13637
13638
13639
13640
13641
13642
13643  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13644$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13646$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13647
13648  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13649
13650  case "$host_os" in
13651    *linux*)
13652      VAR_OS=linux
13653      VAR_OS_API=posix
13654      VAR_OS_ENV=linux
13655      ;;
13656    *solaris*)
13657      VAR_OS=solaris
13658      VAR_OS_API=posix
13659      VAR_OS_ENV=solaris
13660      ;;
13661    *darwin*)
13662      VAR_OS=macosx
13663      VAR_OS_API=posix
13664      VAR_OS_ENV=macosx
13665      ;;
13666    *bsd*)
13667      VAR_OS=bsd
13668      VAR_OS_API=posix
13669      VAR_OS_ENV=bsd
13670      ;;
13671    *cygwin*)
13672      VAR_OS=windows
13673      VAR_OS_API=winapi
13674      VAR_OS_ENV=windows.cygwin
13675      ;;
13676    *mingw*)
13677      VAR_OS=windows
13678      VAR_OS_API=winapi
13679      VAR_OS_ENV=windows.msys
13680      ;;
13681    *aix*)
13682      VAR_OS=aix
13683      VAR_OS_API=posix
13684      VAR_OS_ENV=aix
13685      ;;
13686    *)
13687      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13688      ;;
13689  esac
13690
13691
13692  # First argument is the cpu name from the trip/quad
13693  case "$host_cpu" in
13694    x86_64)
13695      VAR_CPU=x86_64
13696      VAR_CPU_ARCH=x86
13697      VAR_CPU_BITS=64
13698      VAR_CPU_ENDIAN=little
13699      ;;
13700    i?86)
13701      VAR_CPU=x86
13702      VAR_CPU_ARCH=x86
13703      VAR_CPU_BITS=32
13704      VAR_CPU_ENDIAN=little
13705      ;;
13706    arm*)
13707      VAR_CPU=arm
13708      VAR_CPU_ARCH=arm
13709      VAR_CPU_BITS=32
13710      VAR_CPU_ENDIAN=little
13711      ;;
13712    powerpc)
13713      VAR_CPU=ppc
13714      VAR_CPU_ARCH=ppc
13715      VAR_CPU_BITS=32
13716      VAR_CPU_ENDIAN=big
13717      ;;
13718    powerpc64)
13719      VAR_CPU=ppc64
13720      VAR_CPU_ARCH=ppc
13721      VAR_CPU_BITS=64
13722      VAR_CPU_ENDIAN=big
13723      ;;
13724    powerpc64le)
13725      VAR_CPU=ppc64
13726      VAR_CPU_ARCH=ppc
13727      VAR_CPU_BITS=64
13728      VAR_CPU_ENDIAN=little
13729      ;;
13730    s390)
13731      VAR_CPU=s390
13732      VAR_CPU_ARCH=s390
13733      VAR_CPU_BITS=32
13734      VAR_CPU_ENDIAN=big
13735      ;;
13736    s390x)
13737      VAR_CPU=s390x
13738      VAR_CPU_ARCH=s390
13739      VAR_CPU_BITS=64
13740      VAR_CPU_ENDIAN=big
13741      ;;
13742    sparc)
13743      VAR_CPU=sparc
13744      VAR_CPU_ARCH=sparc
13745      VAR_CPU_BITS=32
13746      VAR_CPU_ENDIAN=big
13747      ;;
13748    sparcv9|sparc64)
13749      VAR_CPU=sparcv9
13750      VAR_CPU_ARCH=sparc
13751      VAR_CPU_BITS=64
13752      VAR_CPU_ENDIAN=big
13753      ;;
13754    *)
13755      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13756      ;;
13757  esac
13758
13759  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13760  OPENJDK_TARGET_OS="$VAR_OS"
13761  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13762  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13763  OPENJDK_TARGET_CPU="$VAR_CPU"
13764  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13765  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13766  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13767
13768
13769
13770
13771
13772
13773
13774
13775  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13776$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13778$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13779
13780
13781
13782# Check whether --with-target-bits was given.
13783if test "${with_target_bits+set}" = set; then :
13784  withval=$with_target_bits;
13785fi
13786
13787
13788  # We have three types of compiles:
13789  # native  == normal compilation, target system == build system
13790  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13791  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13792  #
13793  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13794    # We're doing a proper cross-compilation
13795    COMPILE_TYPE="cross"
13796  else
13797    COMPILE_TYPE="native"
13798  fi
13799
13800  if test "x$with_target_bits" != x; then
13801    if test "x$COMPILE_TYPE" = "xcross"; then
13802      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13803    fi
13804
13805    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13806      # A reduced build is requested
13807      COMPILE_TYPE="reduced"
13808      OPENJDK_TARGET_CPU_BITS=32
13809      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13810        OPENJDK_TARGET_CPU=x86
13811      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13812        OPENJDK_TARGET_CPU=sparc
13813      else
13814        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13815      fi
13816    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13817      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
13818    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13819      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13820$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13821    else
13822      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13823    fi
13824  fi
13825
13826
13827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13828$as_echo_n "checking compilation type... " >&6; }
13829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13830$as_echo "$COMPILE_TYPE" >&6; }
13831
13832
13833  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13834    REQUIRED_OS_NAME=SunOS
13835    REQUIRED_OS_VERSION=5.10
13836  fi
13837  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13838    REQUIRED_OS_NAME=Linux
13839    REQUIRED_OS_VERSION=2.6
13840  fi
13841  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13842    REQUIRED_OS_NAME=Windows
13843    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13844      REQUIRED_OS_VERSION=5.2
13845    else
13846      REQUIRED_OS_VERSION=5.1
13847    fi
13848  fi
13849  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13850    REQUIRED_OS_NAME=Darwin
13851    REQUIRED_OS_VERSION=11.2
13852  fi
13853
13854
13855
13856
13857
13858  # Also store the legacy naming of the cpu.
13859  # Ie i586 and amd64 instead of x86 and x86_64
13860  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13861  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13862    OPENJDK_TARGET_CPU_LEGACY="i586"
13863  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13864    # On all platforms except MacOSX replace x86_64 with amd64.
13865    OPENJDK_TARGET_CPU_LEGACY="amd64"
13866  fi
13867
13868
13869  # And the second legacy naming of the cpu.
13870  # Ie i386 and amd64 instead of x86 and x86_64.
13871  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13872  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13873    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13874  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13875    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13876  fi
13877
13878
13879  # This is the name of the cpu (but using i386 and amd64 instead of
13880  # x86 and x86_64, respectively), preceeded by a /, to be used when
13881  # locating libraries. On macosx, it's empty, though.
13882  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13883  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13884    OPENJDK_TARGET_CPU_LIBDIR=""
13885  fi
13886
13887
13888  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13889  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13890  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13891  OPENJDK_TARGET_CPU_ISADIR=""
13892  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13893    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13894      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13895    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13896      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13897    fi
13898  fi
13899
13900
13901  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13902  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13903  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13904    # On linux only, we replace x86 with i386.
13905    OPENJDK_TARGET_CPU_OSARCH="i386"
13906  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13907    # On all platforms except macosx, we replace x86_64 with amd64.
13908    OPENJDK_TARGET_CPU_OSARCH="amd64"
13909  fi
13910
13911
13912  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13913  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13914    OPENJDK_TARGET_CPU_JLI="i386"
13915  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13916    # On all platforms except macosx, we replace x86_64 with amd64.
13917    OPENJDK_TARGET_CPU_JLI="amd64"
13918  fi
13919  # Now setup the -D flags for building libjli.
13920  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13921  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13922    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13923      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13924    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13925      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13926    fi
13927  fi
13928
13929
13930  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13931  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13932    OPENJDK_TARGET_OS_API_DIR="unix"
13933  fi
13934  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13935    OPENJDK_TARGET_OS_API_DIR="windows"
13936  fi
13937
13938
13939  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13940      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13941  else
13942      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13943  fi
13944
13945
13946  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13947    A_LP64="LP64:="
13948    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13949    # unpack200.exe
13950    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13951      ADD_LP64="-D_LP64=1"
13952    fi
13953  fi
13954  LP64=$A_LP64
13955
13956
13957  if test "x$COMPILE_TYPE" = "xcross"; then
13958    # FIXME: ... or should this include reduced builds..?
13959    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13960  else
13961    DEFINE_CROSS_COMPILE_ARCH=""
13962  fi
13963
13964
13965  # ZERO_ARCHDEF is used to enable architecture-specific code
13966  case "${OPENJDK_TARGET_CPU}" in
13967    ppc*)    ZERO_ARCHDEF=PPC   ;;
13968    s390*)   ZERO_ARCHDEF=S390  ;;
13969    sparc*)  ZERO_ARCHDEF=SPARC ;;
13970    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13971    x86)     ZERO_ARCHDEF=IA32  ;;
13972    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13973  esac
13974
13975
13976
13977
13978# Continue setting up basic stuff. Most remaining code require fundamental tools.
13979
13980  # Save the current directory this script was started from
13981  CURDIR="$PWD"
13982
13983  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13984    PATH_SEP=";"
13985
13986  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13987  if test $SRC_ROOT_LENGTH -gt 100; then
13988    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13989  fi
13990
13991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13992    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13993$as_echo_n "checking cygwin release... " >&6; }
13994    CYGWIN_VERSION=`$UNAME -r`
13995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13996$as_echo "$CYGWIN_VERSION" >&6; }
13997    WINDOWS_ENV_VENDOR='cygwin'
13998    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13999
14000    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14001    if test "x$CYGWIN_VERSION_OK" = x; then
14002      { $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
14003$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;}
14004      as_fn_error $? "Cannot continue" "$LINENO" 5
14005    fi
14006    if test "x$CYGPATH" = x; then
14007      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14008    fi
14009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14010$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14011    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14012    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14013    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14014    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14016$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14017    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14018    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14019    if test "x$test_cygdrive_prefix" = x; then
14020      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14021    fi
14022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14023    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14024$as_echo_n "checking msys release... " >&6; }
14025    MSYS_VERSION=`$UNAME -r`
14026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14027$as_echo "$MSYS_VERSION" >&6; }
14028
14029    WINDOWS_ENV_VENDOR='msys'
14030    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14031
14032    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14033$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14034    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14035    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14036
14037  windows_path="$MSYS_ROOT_PATH"
14038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14039    unix_path=`$CYGPATH -u "$windows_path"`
14040    MSYS_ROOT_PATH="$unix_path"
14041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14043    MSYS_ROOT_PATH="$unix_path"
14044  fi
14045
14046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14047$as_echo "$MSYS_ROOT_PATH" >&6; }
14048    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14049  else
14050    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14051  fi
14052
14053  # Test if windows or unix (cygwin/msys) find is first in path.
14054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14055$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14056  FIND_BINARY_OUTPUT=`find --version 2>&1`
14057  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14058    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14059$as_echo "unix style" >&6; }
14060  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14062$as_echo "Windows" >&6; }
14063    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14064$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14065    { $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
14066$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14067    as_fn_error $? "Cannot continue" "$LINENO" 5
14068  else
14069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14070$as_echo "unknown" >&6; }
14071    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14072$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14073  fi
14074
14075  else
14076    PATH_SEP=":"
14077  fi
14078
14079
14080  # We get the top-level directory from the supporting wrappers.
14081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14082$as_echo_n "checking for top-level directory... " >&6; }
14083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14084$as_echo "$TOPDIR" >&6; }
14085
14086
14087  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14088
14089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14090
14091  # Input might be given as Windows format, start by converting to
14092  # unix format.
14093  path="$CURDIR"
14094  new_path=`$CYGPATH -u "$path"`
14095
14096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14099  # "foo.exe" is OK but "foo" is an error.
14100  #
14101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14102  # It is also a way to make sure we got the proper file name for the real test later on.
14103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14104  if test "x$test_shortpath" = x; then
14105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14106$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14107    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14108  fi
14109
14110  # Call helper function which possibly converts this using DOS-style short mode.
14111  # If so, the updated path is stored in $new_path.
14112
14113  input_path="$new_path"
14114  # Check if we need to convert this using DOS-style short mode. If the path
14115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14116  # take no chances and rewrite it.
14117  # Note: m4 eats our [], so we need to use [ and ] instead.
14118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14119  if test "x$has_forbidden_chars" != x; then
14120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14124      # Going to short mode and back again did indeed matter. Since short mode is
14125      # case insensitive, let's make it lowercase to improve readability.
14126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14127      # Now convert it back to Unix-stile (cygpath)
14128      input_path=`$CYGPATH -u "$shortmode_path"`
14129      new_path="$input_path"
14130    fi
14131  fi
14132
14133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14134  if test "x$test_cygdrive_prefix" = x; then
14135    # As a simple fix, exclude /usr/bin since it's not a real path.
14136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14138      # a path prefixed by /cygdrive for fixpath to work.
14139      new_path="$CYGWIN_ROOT_PATH$input_path"
14140    fi
14141  fi
14142
14143
14144  if test "x$path" != "x$new_path"; then
14145    CURDIR="$new_path"
14146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14147$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14148  fi
14149
14150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14151
14152  path="$CURDIR"
14153  has_colon=`$ECHO $path | $GREP ^.:`
14154  new_path="$path"
14155  if test "x$has_colon" = x; then
14156    # Not in mixed or Windows style, start by that.
14157    new_path=`cmd //c echo $path`
14158  fi
14159
14160
14161  input_path="$new_path"
14162  # Check if we need to convert this using DOS-style short mode. If the path
14163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14164  # take no chances and rewrite it.
14165  # Note: m4 eats our [], so we need to use [ and ] instead.
14166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14167  if test "x$has_forbidden_chars" != x; then
14168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14170  fi
14171
14172
14173  windows_path="$new_path"
14174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14175    unix_path=`$CYGPATH -u "$windows_path"`
14176    new_path="$unix_path"
14177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14179    new_path="$unix_path"
14180  fi
14181
14182  if test "x$path" != "x$new_path"; then
14183    CURDIR="$new_path"
14184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14185$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14186  fi
14187
14188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14190
14191  else
14192    # We're on a posix platform. Hooray! :)
14193    path="$CURDIR"
14194    has_space=`$ECHO "$path" | $GREP " "`
14195    if test "x$has_space" != x; then
14196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14197$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14198      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14199    fi
14200
14201    # Use eval to expand a potential ~
14202    eval path="$path"
14203    if test ! -f "$path" && test ! -d "$path"; then
14204      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14205    fi
14206
14207    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14208  fi
14209
14210
14211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14212
14213  # Input might be given as Windows format, start by converting to
14214  # unix format.
14215  path="$TOPDIR"
14216  new_path=`$CYGPATH -u "$path"`
14217
14218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14221  # "foo.exe" is OK but "foo" is an error.
14222  #
14223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14224  # It is also a way to make sure we got the proper file name for the real test later on.
14225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14226  if test "x$test_shortpath" = x; then
14227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14228$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14229    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14230  fi
14231
14232  # Call helper function which possibly converts this using DOS-style short mode.
14233  # If so, the updated path is stored in $new_path.
14234
14235  input_path="$new_path"
14236  # Check if we need to convert this using DOS-style short mode. If the path
14237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14238  # take no chances and rewrite it.
14239  # Note: m4 eats our [], so we need to use [ and ] instead.
14240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14241  if test "x$has_forbidden_chars" != x; then
14242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14246      # Going to short mode and back again did indeed matter. Since short mode is
14247      # case insensitive, let's make it lowercase to improve readability.
14248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14249      # Now convert it back to Unix-stile (cygpath)
14250      input_path=`$CYGPATH -u "$shortmode_path"`
14251      new_path="$input_path"
14252    fi
14253  fi
14254
14255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14256  if test "x$test_cygdrive_prefix" = x; then
14257    # As a simple fix, exclude /usr/bin since it's not a real path.
14258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14260      # a path prefixed by /cygdrive for fixpath to work.
14261      new_path="$CYGWIN_ROOT_PATH$input_path"
14262    fi
14263  fi
14264
14265
14266  if test "x$path" != "x$new_path"; then
14267    TOPDIR="$new_path"
14268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14269$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14270  fi
14271
14272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14273
14274  path="$TOPDIR"
14275  has_colon=`$ECHO $path | $GREP ^.:`
14276  new_path="$path"
14277  if test "x$has_colon" = x; then
14278    # Not in mixed or Windows style, start by that.
14279    new_path=`cmd //c echo $path`
14280  fi
14281
14282
14283  input_path="$new_path"
14284  # Check if we need to convert this using DOS-style short mode. If the path
14285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14286  # take no chances and rewrite it.
14287  # Note: m4 eats our [], so we need to use [ and ] instead.
14288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14289  if test "x$has_forbidden_chars" != x; then
14290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14292  fi
14293
14294
14295  windows_path="$new_path"
14296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14297    unix_path=`$CYGPATH -u "$windows_path"`
14298    new_path="$unix_path"
14299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14301    new_path="$unix_path"
14302  fi
14303
14304  if test "x$path" != "x$new_path"; then
14305    TOPDIR="$new_path"
14306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14307$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14308  fi
14309
14310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14312
14313  else
14314    # We're on a posix platform. Hooray! :)
14315    path="$TOPDIR"
14316    has_space=`$ECHO "$path" | $GREP " "`
14317    if test "x$has_space" != x; then
14318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14319$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14320      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14321    fi
14322
14323    # Use eval to expand a potential ~
14324    eval path="$path"
14325    if test ! -f "$path" && test ! -d "$path"; then
14326      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14327    fi
14328
14329    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14330  fi
14331
14332  # SRC_ROOT is a traditional alias for TOPDIR.
14333  SRC_ROOT=$TOPDIR
14334
14335  # Locate the directory of this script.
14336  AUTOCONF_DIR=$TOPDIR/common/autoconf
14337
14338
14339  # Setup default logging of stdout and stderr to build.log in the output root.
14340  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14341  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14342  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14343
14344
14345
14346
14347
14348# Check if it's a pure open build or if custom sources are to be used.
14349
14350  # Check whether --enable-openjdk-only was given.
14351if test "${enable_openjdk_only+set}" = set; then :
14352  enableval=$enable_openjdk_only;
14353else
14354  enable_openjdk_only="no"
14355fi
14356
14357
14358  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14359$as_echo_n "checking for presence of closed sources... " >&6; }
14360  if test -d "$SRC_ROOT/jdk/src/closed"; then
14361    CLOSED_SOURCE_PRESENT=yes
14362  else
14363    CLOSED_SOURCE_PRESENT=no
14364  fi
14365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14366$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14367
14368  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14369$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14370  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14372$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14373
14374  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14375    OPENJDK=true
14376    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14377      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14378$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14379    fi
14380  else
14381    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14382      OPENJDK=true
14383    else
14384      OPENJDK=false
14385    fi
14386  fi
14387
14388  if test "x$OPENJDK" = "xtrue"; then
14389    SET_OPENJDK="OPENJDK=true"
14390  fi
14391
14392
14393
14394  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14395  # the IncludeCustomExtension macro.
14396
14397
14398# Check whether --with-custom-make-dir was given.
14399if test "${with_custom_make_dir+set}" = set; then :
14400  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
14401$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14402fi
14403
14404
14405
14406
14407# These are needed to be able to create a configuration name (and thus the output directory)
14408
14409  ###############################################################################
14410  #
14411  # Check which variant of the JDK that we want to build.
14412  # Currently we have:
14413  #    normal:   standard edition
14414  # but the custom make system may add other variants
14415  #
14416  # Effectively the JDK variant gives a name to a specific set of
14417  # modules to compile into the JDK. In the future, these modules
14418  # might even be Jigsaw modules.
14419  #
14420  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14421$as_echo_n "checking which variant of the JDK to build... " >&6; }
14422
14423# Check whether --with-jdk-variant was given.
14424if test "${with_jdk_variant+set}" = set; then :
14425  withval=$with_jdk_variant;
14426fi
14427
14428
14429  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14430    JDK_VARIANT="normal"
14431  else
14432    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14433  fi
14434
14435
14436
14437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14438$as_echo "$JDK_VARIANT" >&6; }
14439
14440
14441###############################################################################
14442#
14443# Check which interpreter of the JVM we want to build.
14444# Currently we have:
14445#    template: Template interpreter (the default)
14446#    cpp     : C++ interpreter
14447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14448$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14449
14450# Check whether --with-jvm-interpreter was given.
14451if test "${with_jvm_interpreter+set}" = set; then :
14452  withval=$with_jvm_interpreter;
14453fi
14454
14455
14456if test "x$with_jvm_interpreter" = x; then
14457     with_jvm_interpreter="template"
14458fi
14459
14460JVM_INTERPRETER="$with_jvm_interpreter"
14461
14462if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14463   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14464fi
14465
14466
14467
14468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14469$as_echo "$with_jvm_interpreter" >&6; }
14470
14471
14472
14473  ###############################################################################
14474  #
14475  # Check which variants of the JVM that we want to build.
14476  # Currently we have:
14477  #    server: normal interpreter and a tiered C1/C2 compiler
14478  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14479  #    minimal1: reduced form of client with optional VM services and features stripped out
14480  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14481  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14482  #    zero: no machine code interpreter, no compiler
14483  #    zeroshark: zero interpreter and shark/llvm compiler backend
14484#    core: interpreter only, no compiler (only works on some platforms)
14485  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14486$as_echo_n "checking which variants of the JVM to build... " >&6; }
14487
14488# Check whether --with-jvm-variants was given.
14489if test "${with_jvm_variants+set}" = set; then :
14490  withval=$with_jvm_variants;
14491fi
14492
14493
14494  if test "x$with_jvm_variants" = x; then
14495    with_jvm_variants="server"
14496  fi
14497
14498  JVM_VARIANTS=",$with_jvm_variants,"
14499  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,//'`
14500
14501  if test "x$TEST_VARIANTS" != "x,"; then
14502     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14503  fi
14504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14505$as_echo "$with_jvm_variants" >&6; }
14506
14507  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14508  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14509  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14510  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14511  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14512  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14513  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14514
14515  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14516    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14517      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14518    fi
14519  fi
14520  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14521    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14522      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14523    fi
14524  fi
14525  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14526    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14527      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14528    fi
14529  fi
14530
14531  # Replace the commas with AND for use in the build directory name.
14532  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14533  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/'`
14534  if test "x$COUNT_VARIANTS" != "x,1"; then
14535    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14536  else
14537    BUILDING_MULTIPLE_JVM_VARIANTS=no
14538  fi
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549  INCLUDE_SA=true
14550  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14551    INCLUDE_SA=false
14552  fi
14553  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14554    INCLUDE_SA=false
14555  fi
14556  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14557    INCLUDE_SA=false
14558  fi
14559
14560
14561  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14562    MACOSX_UNIVERSAL="true"
14563  fi
14564
14565
14566
14567
14568  ###############################################################################
14569  #
14570  # Set the debug level
14571  #    release: no debug information, all optimizations, no asserts.
14572  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14573  #    fastdebug: debug information (-g), all optimizations, all asserts
14574  #    slowdebug: debug information (-g), no optimizations, all asserts
14575  #
14576  DEBUG_LEVEL="release"
14577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14578$as_echo_n "checking which debug level to use... " >&6; }
14579  # Check whether --enable-debug was given.
14580if test "${enable_debug+set}" = set; then :
14581  enableval=$enable_debug;
14582        ENABLE_DEBUG="${enableval}"
14583        DEBUG_LEVEL="fastdebug"
14584
14585else
14586  ENABLE_DEBUG="no"
14587fi
14588
14589
14590
14591# Check whether --with-debug-level was given.
14592if test "${with_debug_level+set}" = set; then :
14593  withval=$with_debug_level;
14594        DEBUG_LEVEL="${withval}"
14595        if test "x$ENABLE_DEBUG" = xyes; then
14596          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14597        fi
14598
14599fi
14600
14601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14602$as_echo "$DEBUG_LEVEL" >&6; }
14603
14604  if test "x$DEBUG_LEVEL" != xrelease && \
14605      test "x$DEBUG_LEVEL" != xoptimized && \
14606      test "x$DEBUG_LEVEL" != xfastdebug && \
14607      test "x$DEBUG_LEVEL" != xslowdebug; then
14608    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14609  fi
14610
14611
14612  ###############################################################################
14613  #
14614  # Setup legacy vars/targets and new vars to deal with different debug levels.
14615  #
14616
14617  case $DEBUG_LEVEL in
14618    release )
14619      VARIANT="OPT"
14620      FASTDEBUG="false"
14621      DEBUG_CLASSFILES="false"
14622      BUILD_VARIANT_RELEASE=""
14623      HOTSPOT_DEBUG_LEVEL="product"
14624      HOTSPOT_EXPORT="product"
14625      ;;
14626    fastdebug )
14627      VARIANT="DBG"
14628      FASTDEBUG="true"
14629      DEBUG_CLASSFILES="true"
14630      BUILD_VARIANT_RELEASE="-fastdebug"
14631      HOTSPOT_DEBUG_LEVEL="fastdebug"
14632      HOTSPOT_EXPORT="fastdebug"
14633      ;;
14634    slowdebug )
14635      VARIANT="DBG"
14636      FASTDEBUG="false"
14637      DEBUG_CLASSFILES="true"
14638      BUILD_VARIANT_RELEASE="-debug"
14639      HOTSPOT_DEBUG_LEVEL="jvmg"
14640      HOTSPOT_EXPORT="debug"
14641      ;;
14642    optimized )
14643      VARIANT="OPT"
14644      FASTDEBUG="false"
14645      DEBUG_CLASSFILES="false"
14646      BUILD_VARIANT_RELEASE="-optimized"
14647      HOTSPOT_DEBUG_LEVEL="optimized"
14648      HOTSPOT_EXPORT="optimized"
14649      ;;
14650  esac
14651
14652  # The debug level 'optimized' is a little special because it is currently only
14653  # applicable to the HotSpot build where it means to build a completely
14654  # optimized version of the VM without any debugging code (like for the
14655  # 'release' debug level which is called 'product' in the HotSpot build) but
14656  # with the exception that it can contain additional code which is otherwise
14657  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14658  # test new and/or experimental features which are not intended for customer
14659  # shipment. Because these new features need to be tested and benchmarked in
14660  # real world scenarios, we want to build the containing JDK at the 'release'
14661  # debug level.
14662  if test "x$DEBUG_LEVEL" = xoptimized; then
14663    DEBUG_LEVEL="release"
14664  fi
14665
14666  #####
14667  # Generate the legacy makefile targets for hotspot.
14668  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14669  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14670  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14671  # But until then ...
14672  HOTSPOT_TARGET=""
14673
14674  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14675    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14676  fi
14677
14678  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14679    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14680  fi
14681
14682  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14683    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14684  fi
14685
14686  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14687    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14688  fi
14689
14690  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14691    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14692  fi
14693
14694  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14695    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14696  fi
14697
14698  if test "x$JVM_VARIANT_CORE" = xtrue; then
14699    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14700  fi
14701
14702  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14703
14704  # On Macosx universal binaries are produced, but they only contain
14705  # 64 bit intel. This invalidates control of which jvms are built
14706  # from configure, but only server is valid anyway. Fix this
14707  # when hotspot makefiles are rewritten.
14708  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14709    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14710  fi
14711
14712  #####
14713
14714
14715
14716
14717
14718
14719
14720
14721# With basic setup done, call the custom early hook.
14722
14723
14724# Check if we have devkits, extra paths or sysroot set.
14725
14726
14727# Check whether --with-devkit was given.
14728if test "${with_devkit+set}" = set; then :
14729  withval=$with_devkit;
14730
14731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14732
14733  # Input might be given as Windows format, start by converting to
14734  # unix format.
14735  path="$with_devkit"
14736  new_path=`$CYGPATH -u "$path"`
14737
14738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14741  # "foo.exe" is OK but "foo" is an error.
14742  #
14743  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14744  # It is also a way to make sure we got the proper file name for the real test later on.
14745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14746  if test "x$test_shortpath" = x; then
14747    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14748$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14749    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14750  fi
14751
14752  # Call helper function which possibly converts this using DOS-style short mode.
14753  # If so, the updated path is stored in $new_path.
14754
14755  input_path="$new_path"
14756  # Check if we need to convert this using DOS-style short mode. If the path
14757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14758  # take no chances and rewrite it.
14759  # Note: m4 eats our [], so we need to use [ and ] instead.
14760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14761  if test "x$has_forbidden_chars" != x; then
14762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14766      # Going to short mode and back again did indeed matter. Since short mode is
14767      # case insensitive, let's make it lowercase to improve readability.
14768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14769      # Now convert it back to Unix-stile (cygpath)
14770      input_path=`$CYGPATH -u "$shortmode_path"`
14771      new_path="$input_path"
14772    fi
14773  fi
14774
14775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14776  if test "x$test_cygdrive_prefix" = x; then
14777    # As a simple fix, exclude /usr/bin since it's not a real path.
14778    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14780      # a path prefixed by /cygdrive for fixpath to work.
14781      new_path="$CYGWIN_ROOT_PATH$input_path"
14782    fi
14783  fi
14784
14785
14786  if test "x$path" != "x$new_path"; then
14787    with_devkit="$new_path"
14788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14789$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14790  fi
14791
14792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14793
14794  path="$with_devkit"
14795  has_colon=`$ECHO $path | $GREP ^.:`
14796  new_path="$path"
14797  if test "x$has_colon" = x; then
14798    # Not in mixed or Windows style, start by that.
14799    new_path=`cmd //c echo $path`
14800  fi
14801
14802
14803  input_path="$new_path"
14804  # Check if we need to convert this using DOS-style short mode. If the path
14805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14806  # take no chances and rewrite it.
14807  # Note: m4 eats our [], so we need to use [ and ] instead.
14808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14809  if test "x$has_forbidden_chars" != x; then
14810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14812  fi
14813
14814
14815  windows_path="$new_path"
14816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14817    unix_path=`$CYGPATH -u "$windows_path"`
14818    new_path="$unix_path"
14819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14821    new_path="$unix_path"
14822  fi
14823
14824  if test "x$path" != "x$new_path"; then
14825    with_devkit="$new_path"
14826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14827$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14828  fi
14829
14830  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14831  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14832
14833  else
14834    # We're on a posix platform. Hooray! :)
14835    path="$with_devkit"
14836    has_space=`$ECHO "$path" | $GREP " "`
14837    if test "x$has_space" != x; then
14838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14839$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14840      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14841    fi
14842
14843    # Use eval to expand a potential ~
14844    eval path="$path"
14845    if test ! -f "$path" && test ! -d "$path"; then
14846      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14847    fi
14848
14849    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14850  fi
14851
14852        DEVKIT_ROOT="$with_devkit"
14853        # Check for a meta data info file in the root of the devkit
14854        if test -f "$DEVKIT_ROOT/devkit.info"; then
14855          # This potentially sets the following:
14856          # DEVKIT_NAME: A descriptive name of the devkit
14857          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14858          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14859          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14860          . $DEVKIT_ROOT/devkit.info
14861        fi
14862
14863        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14864$as_echo_n "checking for devkit... " >&6; }
14865        if test "x$DEVKIT_NAME" != x; then
14866          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14867$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14868        else
14869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14870$as_echo "$DEVKIT_ROOT" >&6; }
14871        fi
14872
14873        if test "x$DEVKIT_EXTRA_PATH" != x; then
14874
14875  if test "x$DEVKIT_EXTRA_PATH" != x; then
14876    if test "x$EXTRA_PATH" = x; then
14877      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14878    else
14879      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14880    fi
14881  fi
14882
14883        fi
14884
14885        # Fallback default of just /bin if DEVKIT_PATH is not defined
14886        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14887          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14888        fi
14889
14890  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14891    if test "x$TOOLCHAIN_PATH" = x; then
14892      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14893    else
14894      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14895    fi
14896  fi
14897
14898
14899        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14900        # places for backwards compatiblity.
14901        if test "x$DEVKIT_SYSROOT" != x; then
14902          SYSROOT="$DEVKIT_SYSROOT"
14903        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14904          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14905        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14906          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14907        fi
14908
14909
14910fi
14911
14912
14913  # You can force the sysroot if the sysroot encoded into the compiler tools
14914  # is not correct.
14915
14916# Check whether --with-sys-root was given.
14917if test "${with_sys_root+set}" = set; then :
14918  withval=$with_sys_root; SYSROOT=$with_sys_root
14919
14920fi
14921
14922
14923
14924# Check whether --with-sysroot was given.
14925if test "${with_sysroot+set}" = set; then :
14926  withval=$with_sysroot; SYSROOT=$with_sysroot
14927
14928fi
14929
14930
14931
14932# Check whether --with-tools-dir was given.
14933if test "${with_tools_dir+set}" = set; then :
14934  withval=$with_tools_dir;
14935  if test "x$with_tools_dir" != x; then
14936    if test "x$TOOLCHAIN_PATH" = x; then
14937      TOOLCHAIN_PATH="$with_tools_dir"
14938    else
14939      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14940    fi
14941  fi
14942
14943
14944fi
14945
14946
14947
14948# Check whether --with-toolchain-path was given.
14949if test "${with_toolchain_path+set}" = set; then :
14950  withval=$with_toolchain_path;
14951  if test "x$with_toolchain_path" != x; then
14952    if test "x$TOOLCHAIN_PATH" = x; then
14953      TOOLCHAIN_PATH="$with_toolchain_path"
14954    else
14955      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14956    fi
14957  fi
14958
14959
14960fi
14961
14962
14963
14964# Check whether --with-extra-path was given.
14965if test "${with_extra_path+set}" = set; then :
14966  withval=$with_extra_path;
14967  if test "x$with_extra_path" != x; then
14968    if test "x$EXTRA_PATH" = x; then
14969      EXTRA_PATH="$with_extra_path"
14970    else
14971      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14972    fi
14973  fi
14974
14975
14976fi
14977
14978
14979  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14980    # detect if Xcode is installed by running xcodebuild -version
14981    # if no Xcode installed, xcodebuild exits with 1
14982    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14983    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14984      # We need to use xcodebuild in the toolchain dir provided by the user, this will
14985      # fall back on the stub binary in /usr/bin/xcodebuild
14986      # Extract the first word of "xcodebuild", so it can be a program name with args.
14987set dummy xcodebuild; ac_word=$2
14988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14989$as_echo_n "checking for $ac_word... " >&6; }
14990if ${ac_cv_path_XCODEBUILD+:} false; then :
14991  $as_echo_n "(cached) " >&6
14992else
14993  case $XCODEBUILD in
14994  [\\/]* | ?:[\\/]*)
14995  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
14996  ;;
14997  *)
14998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14999for as_dir in $TOOLCHAIN_PATH
15000do
15001  IFS=$as_save_IFS
15002  test -z "$as_dir" && as_dir=.
15003    for ac_exec_ext in '' $ac_executable_extensions; do
15004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15005    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15007    break 2
15008  fi
15009done
15010  done
15011IFS=$as_save_IFS
15012
15013  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15014  ;;
15015esac
15016fi
15017XCODEBUILD=$ac_cv_path_XCODEBUILD
15018if test -n "$XCODEBUILD"; then
15019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15020$as_echo "$XCODEBUILD" >&6; }
15021else
15022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15023$as_echo "no" >&6; }
15024fi
15025
15026
15027    else
15028      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15029      # when only the command line tools are installed there are no SDKs, so headers
15030      # are copied into the system frameworks
15031      XCODEBUILD=
15032
15033    fi
15034
15035    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15036$as_echo_n "checking for sdk name... " >&6; }
15037
15038# Check whether --with-sdk-name was given.
15039if test "${with_sdk_name+set}" = set; then :
15040  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15041
15042fi
15043
15044    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15045$as_echo "$SDKNAME" >&6; }
15046
15047    # if toolchain path is specified then don't rely on system headers, they may not compile
15048    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15049    test -z "$TOOLCHAIN_PATH" && \
15050      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15051
15052    if test -z "$SYSROOT"; then
15053      if test -n "$XCODEBUILD"; then
15054        # if we don't have system headers, use default SDK name (last resort)
15055        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15056          SDKNAME=${SDKNAME:-macosx}
15057        fi
15058
15059        if test -n "$SDKNAME"; then
15060          # Call xcodebuild to determine SYSROOT
15061          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15062        fi
15063      else
15064        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15065          as_fn_error $? "No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK" "$LINENO" 5
15066        fi
15067      fi
15068    else
15069      # warn user if --with-sdk-name was also set
15070      if test -n "$with_sdk_name"; then
15071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15072$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15073      fi
15074    fi
15075
15076    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15077      # If no system framework headers, then SYSROOT must be set, or we won't build
15078      as_fn_error $? "Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments." "$LINENO" 5
15079    fi
15080
15081    # Perform a basic sanity test
15082    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15083      if test -z "$SYSROOT"; then
15084        as_fn_error $? "Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly" "$LINENO" 5
15085      else
15086        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15087      fi
15088    fi
15089
15090    # set SDKROOT too, Xcode tools will pick it up
15091    SDKROOT=$SYSROOT
15092
15093  fi
15094
15095  # Prepend the extra path to the global path
15096
15097  if test "x$EXTRA_PATH" != x; then
15098    if test "x$PATH" = x; then
15099      PATH="$EXTRA_PATH"
15100    else
15101      PATH="$EXTRA_PATH:$PATH"
15102    fi
15103  fi
15104
15105
15106  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15107    # Add extra search paths on solaris for utilities like ar and as etc...
15108    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15109  fi
15110
15111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15112$as_echo_n "checking for sysroot... " >&6; }
15113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15114$as_echo "$SYSROOT" >&6; }
15115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15116$as_echo_n "checking for toolchain path... " >&6; }
15117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15118$as_echo "$TOOLCHAIN_PATH" >&6; }
15119  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15120$as_echo_n "checking for extra path... " >&6; }
15121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15122$as_echo "$EXTRA_PATH" >&6; }
15123
15124
15125# To properly create a configuration name, we need to have the OpenJDK target
15126# and options (variants and debug level) parsed.
15127
15128
15129
15130# Check whether --with-conf-name was given.
15131if test "${with_conf_name+set}" = set; then :
15132  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15133fi
15134
15135
15136  # Test from where we are running configure, in or outside of src root.
15137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15138$as_echo_n "checking where to store configuration... " >&6; }
15139  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15140      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15141      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15142    # We are running configure from the src root.
15143    # Create a default ./build/target-variant-debuglevel output root.
15144    if test "x${CONF_NAME}" = x; then
15145      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15146$as_echo "in default location" >&6; }
15147      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15148    else
15149      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15150$as_echo "in build directory with custom name" >&6; }
15151    fi
15152    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15153    $MKDIR -p "$OUTPUT_ROOT"
15154    if test ! -d "$OUTPUT_ROOT"; then
15155      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15156    fi
15157  else
15158    # We are running configure from outside of the src dir.
15159    # Then use the current directory as output dir!
15160    # If configuration is situated in normal build directory, just use the build
15161    # directory name as configuration name, otherwise use the complete path.
15162    if test "x${CONF_NAME}" = x; then
15163      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15164    fi
15165    OUTPUT_ROOT="$CURDIR"
15166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15167$as_echo "in current directory" >&6; }
15168
15169    # WARNING: This might be a bad thing to do. You need to be sure you want to
15170    # have a configuration in this directory. Do some sanity checks!
15171
15172    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15173      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15174      # other files
15175      files_present=`$LS $OUTPUT_ROOT`
15176      # Configure has already touched config.log and confdefs.h in the current dir when this check
15177      # is performed.
15178      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15179      | $TR -d '\n'`
15180      if test "x$filtered_files" != x; then
15181        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15182$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15183        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15184$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15185        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15186$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15187        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15188$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15189        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15190$as_echo "$as_me: seriously mess up just about everything." >&6;}
15191        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15192$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15193        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15194$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15195        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15196      fi
15197    fi
15198  fi
15199  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15200$as_echo_n "checking what configuration name to use... " >&6; }
15201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15202$as_echo "$CONF_NAME" >&6; }
15203
15204
15205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15206
15207  # Input might be given as Windows format, start by converting to
15208  # unix format.
15209  path="$OUTPUT_ROOT"
15210  new_path=`$CYGPATH -u "$path"`
15211
15212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15215  # "foo.exe" is OK but "foo" is an error.
15216  #
15217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15218  # It is also a way to make sure we got the proper file name for the real test later on.
15219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15220  if test "x$test_shortpath" = x; then
15221    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15222$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15223    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15224  fi
15225
15226  # Call helper function which possibly converts this using DOS-style short mode.
15227  # If so, the updated path is stored in $new_path.
15228
15229  input_path="$new_path"
15230  # Check if we need to convert this using DOS-style short mode. If the path
15231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15232  # take no chances and rewrite it.
15233  # Note: m4 eats our [], so we need to use [ and ] instead.
15234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15235  if test "x$has_forbidden_chars" != x; then
15236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15240      # Going to short mode and back again did indeed matter. Since short mode is
15241      # case insensitive, let's make it lowercase to improve readability.
15242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15243      # Now convert it back to Unix-stile (cygpath)
15244      input_path=`$CYGPATH -u "$shortmode_path"`
15245      new_path="$input_path"
15246    fi
15247  fi
15248
15249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15250  if test "x$test_cygdrive_prefix" = x; then
15251    # As a simple fix, exclude /usr/bin since it's not a real path.
15252    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15254      # a path prefixed by /cygdrive for fixpath to work.
15255      new_path="$CYGWIN_ROOT_PATH$input_path"
15256    fi
15257  fi
15258
15259
15260  if test "x$path" != "x$new_path"; then
15261    OUTPUT_ROOT="$new_path"
15262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15263$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15264  fi
15265
15266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15267
15268  path="$OUTPUT_ROOT"
15269  has_colon=`$ECHO $path | $GREP ^.:`
15270  new_path="$path"
15271  if test "x$has_colon" = x; then
15272    # Not in mixed or Windows style, start by that.
15273    new_path=`cmd //c echo $path`
15274  fi
15275
15276
15277  input_path="$new_path"
15278  # Check if we need to convert this using DOS-style short mode. If the path
15279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15280  # take no chances and rewrite it.
15281  # Note: m4 eats our [], so we need to use [ and ] instead.
15282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15283  if test "x$has_forbidden_chars" != x; then
15284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15286  fi
15287
15288
15289  windows_path="$new_path"
15290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15291    unix_path=`$CYGPATH -u "$windows_path"`
15292    new_path="$unix_path"
15293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15295    new_path="$unix_path"
15296  fi
15297
15298  if test "x$path" != "x$new_path"; then
15299    OUTPUT_ROOT="$new_path"
15300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15301$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15302  fi
15303
15304  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15305  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15306
15307  else
15308    # We're on a posix platform. Hooray! :)
15309    path="$OUTPUT_ROOT"
15310    has_space=`$ECHO "$path" | $GREP " "`
15311    if test "x$has_space" != x; then
15312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15313$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15314      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15315    fi
15316
15317    # Use eval to expand a potential ~
15318    eval path="$path"
15319    if test ! -f "$path" && test ! -d "$path"; then
15320      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15321    fi
15322
15323    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15324  fi
15325
15326
15327  SPEC=$OUTPUT_ROOT/spec.gmk
15328
15329  CONF_NAME=$CONF_NAME
15330
15331  OUTPUT_ROOT=$OUTPUT_ROOT
15332
15333
15334  # Most of the probed defines are put into config.h
15335  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15336
15337  # The spec.gmk file contains all variables for the make system.
15338  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15339
15340  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15341  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15342
15343  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15344  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15345
15346  # The compare.sh is used to compare the build output to other builds.
15347  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15348
15349  # Spec.sh is currently used by compare-objects.sh
15350  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15351
15352  # The generated Makefile knows where the spec.gmk is and where the source is.
15353  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15354  # which will look for generated configurations
15355  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15356
15357
15358
15359# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15360
15361  for ac_prog in apt-get yum port pkgutil pkgadd
15362do
15363  # Extract the first word of "$ac_prog", so it can be a program name with args.
15364set dummy $ac_prog; ac_word=$2
15365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15366$as_echo_n "checking for $ac_word... " >&6; }
15367if ${ac_cv_prog_PKGHANDLER+:} false; then :
15368  $as_echo_n "(cached) " >&6
15369else
15370  if test -n "$PKGHANDLER"; then
15371  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15372else
15373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15374for as_dir in $PATH
15375do
15376  IFS=$as_save_IFS
15377  test -z "$as_dir" && as_dir=.
15378    for ac_exec_ext in '' $ac_executable_extensions; do
15379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15380    ac_cv_prog_PKGHANDLER="$ac_prog"
15381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15382    break 2
15383  fi
15384done
15385  done
15386IFS=$as_save_IFS
15387
15388fi
15389fi
15390PKGHANDLER=$ac_cv_prog_PKGHANDLER
15391if test -n "$PKGHANDLER"; then
15392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15393$as_echo "$PKGHANDLER" >&6; }
15394else
15395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15396$as_echo "no" >&6; }
15397fi
15398
15399
15400  test -n "$PKGHANDLER" && break
15401done
15402
15403
15404
15405# Setup tools that requires more complex handling, or that is not needed by the configure script.
15406
15407
15408  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15409  if test "x$MAKE" != x; then
15410    # User has supplied a make, test it.
15411    if test ! -f "$MAKE"; then
15412      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15413    fi
15414
15415  MAKE_CANDIDATE=""$MAKE""
15416  DESCRIPTION="user supplied MAKE=$MAKE"
15417  if test "x$MAKE_CANDIDATE" != x; then
15418    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15419$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15420    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15421    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15422    if test "x$IS_GNU_MAKE" = x; then
15423      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15424$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15425    else
15426      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15427      if test "x$IS_MODERN_MAKE" = x; then
15428        { $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
15429$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;}
15430      else
15431        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15432          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15433            MAKE_EXPECTED_ENV='cygwin'
15434          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15435            MAKE_EXPECTED_ENV='msys'
15436          else
15437            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15438          fi
15439          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15440          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15441        else
15442          # Not relevant for non-Windows
15443          IS_MAKE_CORRECT_ENV=true
15444        fi
15445        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15446          { $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
15447$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;}
15448        else
15449          FOUND_MAKE=$MAKE_CANDIDATE
15450
15451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15452
15453  # First separate the path from the arguments. This will split at the first
15454  # space.
15455  complete="$FOUND_MAKE"
15456  path="${complete%% *}"
15457  tmp="$complete EOL"
15458  arguments="${tmp#* }"
15459
15460  # Input might be given as Windows format, start by converting to
15461  # unix format.
15462  new_path=`$CYGPATH -u "$path"`
15463
15464  # Now try to locate executable using which
15465  new_path=`$WHICH "$new_path" 2> /dev/null`
15466  # bat and cmd files are not always considered executable in cygwin causing which
15467  # to not find them
15468  if test "x$new_path" = x \
15469      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15470      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15471    new_path=`$CYGPATH -u "$path"`
15472  fi
15473  if test "x$new_path" = x; then
15474    # Oops. Which didn't find the executable.
15475    # The splitting of arguments from the executable at a space might have been incorrect,
15476    # since paths with space are more likely in Windows. Give it another try with the whole
15477    # argument.
15478    path="$complete"
15479    arguments="EOL"
15480    new_path=`$CYGPATH -u "$path"`
15481    new_path=`$WHICH "$new_path" 2> /dev/null`
15482    # bat and cmd files are not always considered executable in cygwin causing which
15483    # to not find them
15484    if test "x$new_path" = x \
15485        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15486        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15487      new_path=`$CYGPATH -u "$path"`
15488    fi
15489    if test "x$new_path" = x; then
15490      # It's still not found. Now this is an unrecoverable error.
15491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15492$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15493      has_space=`$ECHO "$complete" | $GREP " "`
15494      if test "x$has_space" != x; then
15495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15497      fi
15498      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15499    fi
15500  fi
15501
15502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15505  # "foo.exe" is OK but "foo" is an error.
15506  #
15507  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15508  # It is also a way to make sure we got the proper file name for the real test later on.
15509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15510  if test "x$test_shortpath" = x; then
15511    # Short path failed, file does not exist as specified.
15512    # Try adding .exe or .cmd
15513    if test -f "${new_path}.exe"; then
15514      input_to_shortpath="${new_path}.exe"
15515    elif test -f "${new_path}.cmd"; then
15516      input_to_shortpath="${new_path}.cmd"
15517    else
15518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15519$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15520      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15521$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15522      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15523    fi
15524  else
15525    input_to_shortpath="$new_path"
15526  fi
15527
15528  # Call helper function which possibly converts this using DOS-style short mode.
15529  # If so, the updated path is stored in $new_path.
15530  new_path="$input_to_shortpath"
15531
15532  input_path="$input_to_shortpath"
15533  # Check if we need to convert this using DOS-style short mode. If the path
15534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15535  # take no chances and rewrite it.
15536  # Note: m4 eats our [], so we need to use [ and ] instead.
15537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15538  if test "x$has_forbidden_chars" != x; then
15539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15543      # Going to short mode and back again did indeed matter. Since short mode is
15544      # case insensitive, let's make it lowercase to improve readability.
15545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15546      # Now convert it back to Unix-stile (cygpath)
15547      input_path=`$CYGPATH -u "$shortmode_path"`
15548      new_path="$input_path"
15549    fi
15550  fi
15551
15552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15553  if test "x$test_cygdrive_prefix" = x; then
15554    # As a simple fix, exclude /usr/bin since it's not a real path.
15555    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15557      # a path prefixed by /cygdrive for fixpath to work.
15558      new_path="$CYGWIN_ROOT_PATH$input_path"
15559    fi
15560  fi
15561
15562  # remove trailing .exe if any
15563  new_path="${new_path/%.exe/}"
15564
15565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15566
15567  # First separate the path from the arguments. This will split at the first
15568  # space.
15569  complete="$FOUND_MAKE"
15570  path="${complete%% *}"
15571  tmp="$complete EOL"
15572  arguments="${tmp#* }"
15573
15574  # Input might be given as Windows format, start by converting to
15575  # unix format.
15576  new_path="$path"
15577
15578  windows_path="$new_path"
15579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15580    unix_path=`$CYGPATH -u "$windows_path"`
15581    new_path="$unix_path"
15582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15584    new_path="$unix_path"
15585  fi
15586
15587
15588  # Now try to locate executable using which
15589  new_path=`$WHICH "$new_path" 2> /dev/null`
15590
15591  if test "x$new_path" = x; then
15592    # Oops. Which didn't find the executable.
15593    # The splitting of arguments from the executable at a space might have been incorrect,
15594    # since paths with space are more likely in Windows. Give it another try with the whole
15595    # argument.
15596    path="$complete"
15597    arguments="EOL"
15598    new_path="$path"
15599
15600  windows_path="$new_path"
15601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15602    unix_path=`$CYGPATH -u "$windows_path"`
15603    new_path="$unix_path"
15604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15606    new_path="$unix_path"
15607  fi
15608
15609
15610    new_path=`$WHICH "$new_path" 2> /dev/null`
15611    # bat and cmd files are not always considered executable in MSYS causing which
15612    # to not find them
15613    if test "x$new_path" = x \
15614        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15615        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15616      new_path="$path"
15617
15618  windows_path="$new_path"
15619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15620    unix_path=`$CYGPATH -u "$windows_path"`
15621    new_path="$unix_path"
15622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15624    new_path="$unix_path"
15625  fi
15626
15627    fi
15628
15629    if test "x$new_path" = x; then
15630      # It's still not found. Now this is an unrecoverable error.
15631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15632$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15633      has_space=`$ECHO "$complete" | $GREP " "`
15634      if test "x$has_space" != x; then
15635        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15636$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15637      fi
15638      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15639    fi
15640  fi
15641
15642  # Now new_path has a complete unix path to the binary
15643  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15644    # Keep paths in /bin as-is, but remove trailing .exe if any
15645    new_path="${new_path/%.exe/}"
15646    # Do not save /bin paths to all_fixpath_prefixes!
15647  else
15648    # Not in mixed or Windows style, start by that.
15649    new_path=`cmd //c echo $new_path`
15650
15651  input_path="$new_path"
15652  # Check if we need to convert this using DOS-style short mode. If the path
15653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15654  # take no chances and rewrite it.
15655  # Note: m4 eats our [], so we need to use [ and ] instead.
15656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15657  if test "x$has_forbidden_chars" != x; then
15658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15660  fi
15661
15662    # Output is in $new_path
15663
15664  windows_path="$new_path"
15665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15666    unix_path=`$CYGPATH -u "$windows_path"`
15667    new_path="$unix_path"
15668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15670    new_path="$unix_path"
15671  fi
15672
15673    # remove trailing .exe if any
15674    new_path="${new_path/%.exe/}"
15675
15676    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15677    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15678  fi
15679
15680  else
15681    # We're on a posix platform. Hooray! :)
15682    # First separate the path from the arguments. This will split at the first
15683    # space.
15684    complete="$FOUND_MAKE"
15685    path="${complete%% *}"
15686    tmp="$complete EOL"
15687    arguments="${tmp#* }"
15688
15689    # Cannot rely on the command "which" here since it doesn't always work.
15690    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15691    if test -z "$is_absolute_path"; then
15692      # Path to executable is not absolute. Find it.
15693      IFS_save="$IFS"
15694      IFS=:
15695      for p in $PATH; do
15696        if test -f "$p/$path" && test -x "$p/$path"; then
15697          new_path="$p/$path"
15698          break
15699        fi
15700      done
15701      IFS="$IFS_save"
15702    else
15703      # This is an absolute path, we can use it without further modifications.
15704      new_path="$path"
15705    fi
15706
15707    if test "x$new_path" = x; then
15708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15709$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15710      has_space=`$ECHO "$complete" | $GREP " "`
15711      if test "x$has_space" != x; then
15712        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15713$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15714      fi
15715      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15716    fi
15717  fi
15718
15719  # Now join together the path and the arguments once again
15720  if test "x$arguments" != xEOL; then
15721    new_complete="$new_path ${arguments% *}"
15722  else
15723    new_complete="$new_path"
15724  fi
15725
15726  if test "x$complete" != "x$new_complete"; then
15727    FOUND_MAKE="$new_complete"
15728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15729$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15730  fi
15731
15732        fi
15733      fi
15734    fi
15735  fi
15736
15737    if test "x$FOUND_MAKE" = x; then
15738      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15739    fi
15740  else
15741    # Try our hardest to locate a correct version of GNU make
15742    for ac_prog in gmake
15743do
15744  # Extract the first word of "$ac_prog", so it can be a program name with args.
15745set dummy $ac_prog; ac_word=$2
15746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15747$as_echo_n "checking for $ac_word... " >&6; }
15748if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15749  $as_echo_n "(cached) " >&6
15750else
15751  case $CHECK_GMAKE in
15752  [\\/]* | ?:[\\/]*)
15753  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15754  ;;
15755  *)
15756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15757for as_dir in $PATH
15758do
15759  IFS=$as_save_IFS
15760  test -z "$as_dir" && as_dir=.
15761    for ac_exec_ext in '' $ac_executable_extensions; do
15762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15763    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15765    break 2
15766  fi
15767done
15768  done
15769IFS=$as_save_IFS
15770
15771  ;;
15772esac
15773fi
15774CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15775if test -n "$CHECK_GMAKE"; then
15776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15777$as_echo "$CHECK_GMAKE" >&6; }
15778else
15779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15780$as_echo "no" >&6; }
15781fi
15782
15783
15784  test -n "$CHECK_GMAKE" && break
15785done
15786
15787
15788  MAKE_CANDIDATE=""$CHECK_GMAKE""
15789  DESCRIPTION="gmake in PATH"
15790  if test "x$MAKE_CANDIDATE" != x; then
15791    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15792$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15793    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15794    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15795    if test "x$IS_GNU_MAKE" = x; then
15796      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15797$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15798    else
15799      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15800      if test "x$IS_MODERN_MAKE" = x; then
15801        { $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
15802$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;}
15803      else
15804        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15805          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15806            MAKE_EXPECTED_ENV='cygwin'
15807          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15808            MAKE_EXPECTED_ENV='msys'
15809          else
15810            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15811          fi
15812          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15813          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15814        else
15815          # Not relevant for non-Windows
15816          IS_MAKE_CORRECT_ENV=true
15817        fi
15818        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15819          { $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
15820$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;}
15821        else
15822          FOUND_MAKE=$MAKE_CANDIDATE
15823
15824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15825
15826  # First separate the path from the arguments. This will split at the first
15827  # space.
15828  complete="$FOUND_MAKE"
15829  path="${complete%% *}"
15830  tmp="$complete EOL"
15831  arguments="${tmp#* }"
15832
15833  # Input might be given as Windows format, start by converting to
15834  # unix format.
15835  new_path=`$CYGPATH -u "$path"`
15836
15837  # Now try to locate executable using which
15838  new_path=`$WHICH "$new_path" 2> /dev/null`
15839  # bat and cmd files are not always considered executable in cygwin causing which
15840  # to not find them
15841  if test "x$new_path" = x \
15842      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15843      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15844    new_path=`$CYGPATH -u "$path"`
15845  fi
15846  if test "x$new_path" = x; then
15847    # Oops. Which didn't find the executable.
15848    # The splitting of arguments from the executable at a space might have been incorrect,
15849    # since paths with space are more likely in Windows. Give it another try with the whole
15850    # argument.
15851    path="$complete"
15852    arguments="EOL"
15853    new_path=`$CYGPATH -u "$path"`
15854    new_path=`$WHICH "$new_path" 2> /dev/null`
15855    # bat and cmd files are not always considered executable in cygwin causing which
15856    # to not find them
15857    if test "x$new_path" = x \
15858        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15859        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15860      new_path=`$CYGPATH -u "$path"`
15861    fi
15862    if test "x$new_path" = x; then
15863      # It's still not found. Now this is an unrecoverable error.
15864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15865$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15866      has_space=`$ECHO "$complete" | $GREP " "`
15867      if test "x$has_space" != x; then
15868        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15869$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15870      fi
15871      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15872    fi
15873  fi
15874
15875  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15876  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15877  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15878  # "foo.exe" is OK but "foo" is an error.
15879  #
15880  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15881  # It is also a way to make sure we got the proper file name for the real test later on.
15882  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15883  if test "x$test_shortpath" = x; then
15884    # Short path failed, file does not exist as specified.
15885    # Try adding .exe or .cmd
15886    if test -f "${new_path}.exe"; then
15887      input_to_shortpath="${new_path}.exe"
15888    elif test -f "${new_path}.cmd"; then
15889      input_to_shortpath="${new_path}.cmd"
15890    else
15891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15892$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15893      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15894$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15895      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15896    fi
15897  else
15898    input_to_shortpath="$new_path"
15899  fi
15900
15901  # Call helper function which possibly converts this using DOS-style short mode.
15902  # If so, the updated path is stored in $new_path.
15903  new_path="$input_to_shortpath"
15904
15905  input_path="$input_to_shortpath"
15906  # Check if we need to convert this using DOS-style short mode. If the path
15907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15908  # take no chances and rewrite it.
15909  # Note: m4 eats our [], so we need to use [ and ] instead.
15910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15911  if test "x$has_forbidden_chars" != x; then
15912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15913    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15914    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15915    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15916      # Going to short mode and back again did indeed matter. Since short mode is
15917      # case insensitive, let's make it lowercase to improve readability.
15918      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15919      # Now convert it back to Unix-stile (cygpath)
15920      input_path=`$CYGPATH -u "$shortmode_path"`
15921      new_path="$input_path"
15922    fi
15923  fi
15924
15925  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15926  if test "x$test_cygdrive_prefix" = x; then
15927    # As a simple fix, exclude /usr/bin since it's not a real path.
15928    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15929      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15930      # a path prefixed by /cygdrive for fixpath to work.
15931      new_path="$CYGWIN_ROOT_PATH$input_path"
15932    fi
15933  fi
15934
15935  # remove trailing .exe if any
15936  new_path="${new_path/%.exe/}"
15937
15938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15939
15940  # First separate the path from the arguments. This will split at the first
15941  # space.
15942  complete="$FOUND_MAKE"
15943  path="${complete%% *}"
15944  tmp="$complete EOL"
15945  arguments="${tmp#* }"
15946
15947  # Input might be given as Windows format, start by converting to
15948  # unix format.
15949  new_path="$path"
15950
15951  windows_path="$new_path"
15952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15953    unix_path=`$CYGPATH -u "$windows_path"`
15954    new_path="$unix_path"
15955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15957    new_path="$unix_path"
15958  fi
15959
15960
15961  # Now try to locate executable using which
15962  new_path=`$WHICH "$new_path" 2> /dev/null`
15963
15964  if test "x$new_path" = x; then
15965    # Oops. Which didn't find the executable.
15966    # The splitting of arguments from the executable at a space might have been incorrect,
15967    # since paths with space are more likely in Windows. Give it another try with the whole
15968    # argument.
15969    path="$complete"
15970    arguments="EOL"
15971    new_path="$path"
15972
15973  windows_path="$new_path"
15974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15975    unix_path=`$CYGPATH -u "$windows_path"`
15976    new_path="$unix_path"
15977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15979    new_path="$unix_path"
15980  fi
15981
15982
15983    new_path=`$WHICH "$new_path" 2> /dev/null`
15984    # bat and cmd files are not always considered executable in MSYS causing which
15985    # to not find them
15986    if test "x$new_path" = x \
15987        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15988        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15989      new_path="$path"
15990
15991  windows_path="$new_path"
15992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15993    unix_path=`$CYGPATH -u "$windows_path"`
15994    new_path="$unix_path"
15995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15997    new_path="$unix_path"
15998  fi
15999
16000    fi
16001
16002    if test "x$new_path" = x; then
16003      # It's still not found. Now this is an unrecoverable error.
16004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16005$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16006      has_space=`$ECHO "$complete" | $GREP " "`
16007      if test "x$has_space" != x; then
16008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16010      fi
16011      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16012    fi
16013  fi
16014
16015  # Now new_path has a complete unix path to the binary
16016  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16017    # Keep paths in /bin as-is, but remove trailing .exe if any
16018    new_path="${new_path/%.exe/}"
16019    # Do not save /bin paths to all_fixpath_prefixes!
16020  else
16021    # Not in mixed or Windows style, start by that.
16022    new_path=`cmd //c echo $new_path`
16023
16024  input_path="$new_path"
16025  # Check if we need to convert this using DOS-style short mode. If the path
16026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16027  # take no chances and rewrite it.
16028  # Note: m4 eats our [], so we need to use [ and ] instead.
16029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16030  if test "x$has_forbidden_chars" != x; then
16031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16032    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16033  fi
16034
16035    # Output is in $new_path
16036
16037  windows_path="$new_path"
16038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16039    unix_path=`$CYGPATH -u "$windows_path"`
16040    new_path="$unix_path"
16041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16043    new_path="$unix_path"
16044  fi
16045
16046    # remove trailing .exe if any
16047    new_path="${new_path/%.exe/}"
16048
16049    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16050    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16051  fi
16052
16053  else
16054    # We're on a posix platform. Hooray! :)
16055    # First separate the path from the arguments. This will split at the first
16056    # space.
16057    complete="$FOUND_MAKE"
16058    path="${complete%% *}"
16059    tmp="$complete EOL"
16060    arguments="${tmp#* }"
16061
16062    # Cannot rely on the command "which" here since it doesn't always work.
16063    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16064    if test -z "$is_absolute_path"; then
16065      # Path to executable is not absolute. Find it.
16066      IFS_save="$IFS"
16067      IFS=:
16068      for p in $PATH; do
16069        if test -f "$p/$path" && test -x "$p/$path"; then
16070          new_path="$p/$path"
16071          break
16072        fi
16073      done
16074      IFS="$IFS_save"
16075    else
16076      # This is an absolute path, we can use it without further modifications.
16077      new_path="$path"
16078    fi
16079
16080    if test "x$new_path" = x; then
16081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16082$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16083      has_space=`$ECHO "$complete" | $GREP " "`
16084      if test "x$has_space" != x; then
16085        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16086$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16087      fi
16088      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16089    fi
16090  fi
16091
16092  # Now join together the path and the arguments once again
16093  if test "x$arguments" != xEOL; then
16094    new_complete="$new_path ${arguments% *}"
16095  else
16096    new_complete="$new_path"
16097  fi
16098
16099  if test "x$complete" != "x$new_complete"; then
16100    FOUND_MAKE="$new_complete"
16101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16102$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16103  fi
16104
16105        fi
16106      fi
16107    fi
16108  fi
16109
16110
16111    if test "x$FOUND_MAKE" = x; then
16112      for ac_prog in make
16113do
16114  # Extract the first word of "$ac_prog", so it can be a program name with args.
16115set dummy $ac_prog; ac_word=$2
16116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16117$as_echo_n "checking for $ac_word... " >&6; }
16118if ${ac_cv_path_CHECK_MAKE+:} false; then :
16119  $as_echo_n "(cached) " >&6
16120else
16121  case $CHECK_MAKE in
16122  [\\/]* | ?:[\\/]*)
16123  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16124  ;;
16125  *)
16126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16127for as_dir in $PATH
16128do
16129  IFS=$as_save_IFS
16130  test -z "$as_dir" && as_dir=.
16131    for ac_exec_ext in '' $ac_executable_extensions; do
16132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16133    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16135    break 2
16136  fi
16137done
16138  done
16139IFS=$as_save_IFS
16140
16141  ;;
16142esac
16143fi
16144CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16145if test -n "$CHECK_MAKE"; then
16146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16147$as_echo "$CHECK_MAKE" >&6; }
16148else
16149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16150$as_echo "no" >&6; }
16151fi
16152
16153
16154  test -n "$CHECK_MAKE" && break
16155done
16156
16157
16158  MAKE_CANDIDATE=""$CHECK_MAKE""
16159  DESCRIPTION="make in PATH"
16160  if test "x$MAKE_CANDIDATE" != x; then
16161    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16162$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16163    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16164    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16165    if test "x$IS_GNU_MAKE" = x; then
16166      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16167$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16168    else
16169      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16170      if test "x$IS_MODERN_MAKE" = x; then
16171        { $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
16172$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;}
16173      else
16174        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16175          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16176            MAKE_EXPECTED_ENV='cygwin'
16177          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16178            MAKE_EXPECTED_ENV='msys'
16179          else
16180            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16181          fi
16182          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16183          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16184        else
16185          # Not relevant for non-Windows
16186          IS_MAKE_CORRECT_ENV=true
16187        fi
16188        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16189          { $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
16190$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;}
16191        else
16192          FOUND_MAKE=$MAKE_CANDIDATE
16193
16194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16195
16196  # First separate the path from the arguments. This will split at the first
16197  # space.
16198  complete="$FOUND_MAKE"
16199  path="${complete%% *}"
16200  tmp="$complete EOL"
16201  arguments="${tmp#* }"
16202
16203  # Input might be given as Windows format, start by converting to
16204  # unix format.
16205  new_path=`$CYGPATH -u "$path"`
16206
16207  # Now try to locate executable using which
16208  new_path=`$WHICH "$new_path" 2> /dev/null`
16209  # bat and cmd files are not always considered executable in cygwin causing which
16210  # to not find them
16211  if test "x$new_path" = x \
16212      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16213      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16214    new_path=`$CYGPATH -u "$path"`
16215  fi
16216  if test "x$new_path" = x; then
16217    # Oops. Which didn't find the executable.
16218    # The splitting of arguments from the executable at a space might have been incorrect,
16219    # since paths with space are more likely in Windows. Give it another try with the whole
16220    # argument.
16221    path="$complete"
16222    arguments="EOL"
16223    new_path=`$CYGPATH -u "$path"`
16224    new_path=`$WHICH "$new_path" 2> /dev/null`
16225    # bat and cmd files are not always considered executable in cygwin causing which
16226    # to not find them
16227    if test "x$new_path" = x \
16228        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16229        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16230      new_path=`$CYGPATH -u "$path"`
16231    fi
16232    if test "x$new_path" = x; then
16233      # It's still not found. Now this is an unrecoverable error.
16234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16235$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16236      has_space=`$ECHO "$complete" | $GREP " "`
16237      if test "x$has_space" != x; then
16238        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16239$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16240      fi
16241      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16242    fi
16243  fi
16244
16245  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16246  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16247  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16248  # "foo.exe" is OK but "foo" is an error.
16249  #
16250  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16251  # It is also a way to make sure we got the proper file name for the real test later on.
16252  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16253  if test "x$test_shortpath" = x; then
16254    # Short path failed, file does not exist as specified.
16255    # Try adding .exe or .cmd
16256    if test -f "${new_path}.exe"; then
16257      input_to_shortpath="${new_path}.exe"
16258    elif test -f "${new_path}.cmd"; then
16259      input_to_shortpath="${new_path}.cmd"
16260    else
16261      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16262$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16263      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16264$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16265      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16266    fi
16267  else
16268    input_to_shortpath="$new_path"
16269  fi
16270
16271  # Call helper function which possibly converts this using DOS-style short mode.
16272  # If so, the updated path is stored in $new_path.
16273  new_path="$input_to_shortpath"
16274
16275  input_path="$input_to_shortpath"
16276  # Check if we need to convert this using DOS-style short mode. If the path
16277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16278  # take no chances and rewrite it.
16279  # Note: m4 eats our [], so we need to use [ and ] instead.
16280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16281  if test "x$has_forbidden_chars" != x; then
16282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16283    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16284    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16285    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16286      # Going to short mode and back again did indeed matter. Since short mode is
16287      # case insensitive, let's make it lowercase to improve readability.
16288      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16289      # Now convert it back to Unix-stile (cygpath)
16290      input_path=`$CYGPATH -u "$shortmode_path"`
16291      new_path="$input_path"
16292    fi
16293  fi
16294
16295  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16296  if test "x$test_cygdrive_prefix" = x; then
16297    # As a simple fix, exclude /usr/bin since it's not a real path.
16298    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16299      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16300      # a path prefixed by /cygdrive for fixpath to work.
16301      new_path="$CYGWIN_ROOT_PATH$input_path"
16302    fi
16303  fi
16304
16305  # remove trailing .exe if any
16306  new_path="${new_path/%.exe/}"
16307
16308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16309
16310  # First separate the path from the arguments. This will split at the first
16311  # space.
16312  complete="$FOUND_MAKE"
16313  path="${complete%% *}"
16314  tmp="$complete EOL"
16315  arguments="${tmp#* }"
16316
16317  # Input might be given as Windows format, start by converting to
16318  # unix format.
16319  new_path="$path"
16320
16321  windows_path="$new_path"
16322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16323    unix_path=`$CYGPATH -u "$windows_path"`
16324    new_path="$unix_path"
16325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16327    new_path="$unix_path"
16328  fi
16329
16330
16331  # Now try to locate executable using which
16332  new_path=`$WHICH "$new_path" 2> /dev/null`
16333
16334  if test "x$new_path" = x; then
16335    # Oops. Which didn't find the executable.
16336    # The splitting of arguments from the executable at a space might have been incorrect,
16337    # since paths with space are more likely in Windows. Give it another try with the whole
16338    # argument.
16339    path="$complete"
16340    arguments="EOL"
16341    new_path="$path"
16342
16343  windows_path="$new_path"
16344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16345    unix_path=`$CYGPATH -u "$windows_path"`
16346    new_path="$unix_path"
16347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16349    new_path="$unix_path"
16350  fi
16351
16352
16353    new_path=`$WHICH "$new_path" 2> /dev/null`
16354    # bat and cmd files are not always considered executable in MSYS causing which
16355    # to not find them
16356    if test "x$new_path" = x \
16357        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16358        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16359      new_path="$path"
16360
16361  windows_path="$new_path"
16362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16363    unix_path=`$CYGPATH -u "$windows_path"`
16364    new_path="$unix_path"
16365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16367    new_path="$unix_path"
16368  fi
16369
16370    fi
16371
16372    if test "x$new_path" = x; then
16373      # It's still not found. Now this is an unrecoverable error.
16374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16375$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16376      has_space=`$ECHO "$complete" | $GREP " "`
16377      if test "x$has_space" != x; then
16378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16380      fi
16381      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16382    fi
16383  fi
16384
16385  # Now new_path has a complete unix path to the binary
16386  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16387    # Keep paths in /bin as-is, but remove trailing .exe if any
16388    new_path="${new_path/%.exe/}"
16389    # Do not save /bin paths to all_fixpath_prefixes!
16390  else
16391    # Not in mixed or Windows style, start by that.
16392    new_path=`cmd //c echo $new_path`
16393
16394  input_path="$new_path"
16395  # Check if we need to convert this using DOS-style short mode. If the path
16396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16397  # take no chances and rewrite it.
16398  # Note: m4 eats our [], so we need to use [ and ] instead.
16399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16400  if test "x$has_forbidden_chars" != x; then
16401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16403  fi
16404
16405    # Output is in $new_path
16406
16407  windows_path="$new_path"
16408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16409    unix_path=`$CYGPATH -u "$windows_path"`
16410    new_path="$unix_path"
16411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16413    new_path="$unix_path"
16414  fi
16415
16416    # remove trailing .exe if any
16417    new_path="${new_path/%.exe/}"
16418
16419    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16420    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16421  fi
16422
16423  else
16424    # We're on a posix platform. Hooray! :)
16425    # First separate the path from the arguments. This will split at the first
16426    # space.
16427    complete="$FOUND_MAKE"
16428    path="${complete%% *}"
16429    tmp="$complete EOL"
16430    arguments="${tmp#* }"
16431
16432    # Cannot rely on the command "which" here since it doesn't always work.
16433    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16434    if test -z "$is_absolute_path"; then
16435      # Path to executable is not absolute. Find it.
16436      IFS_save="$IFS"
16437      IFS=:
16438      for p in $PATH; do
16439        if test -f "$p/$path" && test -x "$p/$path"; then
16440          new_path="$p/$path"
16441          break
16442        fi
16443      done
16444      IFS="$IFS_save"
16445    else
16446      # This is an absolute path, we can use it without further modifications.
16447      new_path="$path"
16448    fi
16449
16450    if test "x$new_path" = x; then
16451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16452$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16453      has_space=`$ECHO "$complete" | $GREP " "`
16454      if test "x$has_space" != x; then
16455        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16456$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16457      fi
16458      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16459    fi
16460  fi
16461
16462  # Now join together the path and the arguments once again
16463  if test "x$arguments" != xEOL; then
16464    new_complete="$new_path ${arguments% *}"
16465  else
16466    new_complete="$new_path"
16467  fi
16468
16469  if test "x$complete" != "x$new_complete"; then
16470    FOUND_MAKE="$new_complete"
16471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16472$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16473  fi
16474
16475        fi
16476      fi
16477    fi
16478  fi
16479
16480    fi
16481
16482    if test "x$FOUND_MAKE" = x; then
16483      if test "x$TOOLCHAIN_PATH" != x; then
16484        # We have a toolchain path, check that as well before giving up.
16485        OLD_PATH=$PATH
16486        PATH=$TOOLCHAIN_PATH:$PATH
16487        for ac_prog in gmake
16488do
16489  # Extract the first word of "$ac_prog", so it can be a program name with args.
16490set dummy $ac_prog; ac_word=$2
16491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16492$as_echo_n "checking for $ac_word... " >&6; }
16493if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16494  $as_echo_n "(cached) " >&6
16495else
16496  case $CHECK_TOOLSDIR_GMAKE in
16497  [\\/]* | ?:[\\/]*)
16498  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16499  ;;
16500  *)
16501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16502for as_dir in $PATH
16503do
16504  IFS=$as_save_IFS
16505  test -z "$as_dir" && as_dir=.
16506    for ac_exec_ext in '' $ac_executable_extensions; do
16507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16508    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16510    break 2
16511  fi
16512done
16513  done
16514IFS=$as_save_IFS
16515
16516  ;;
16517esac
16518fi
16519CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16520if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16522$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16523else
16524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16525$as_echo "no" >&6; }
16526fi
16527
16528
16529  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16530done
16531
16532
16533  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16534  DESCRIPTION="gmake in tools-dir"
16535  if test "x$MAKE_CANDIDATE" != x; then
16536    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16537$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16538    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16539    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16540    if test "x$IS_GNU_MAKE" = x; then
16541      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16542$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16543    else
16544      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16545      if test "x$IS_MODERN_MAKE" = x; then
16546        { $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
16547$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;}
16548      else
16549        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16550          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16551            MAKE_EXPECTED_ENV='cygwin'
16552          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16553            MAKE_EXPECTED_ENV='msys'
16554          else
16555            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16556          fi
16557          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16558          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16559        else
16560          # Not relevant for non-Windows
16561          IS_MAKE_CORRECT_ENV=true
16562        fi
16563        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16564          { $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
16565$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;}
16566        else
16567          FOUND_MAKE=$MAKE_CANDIDATE
16568
16569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16570
16571  # First separate the path from the arguments. This will split at the first
16572  # space.
16573  complete="$FOUND_MAKE"
16574  path="${complete%% *}"
16575  tmp="$complete EOL"
16576  arguments="${tmp#* }"
16577
16578  # Input might be given as Windows format, start by converting to
16579  # unix format.
16580  new_path=`$CYGPATH -u "$path"`
16581
16582  # Now try to locate executable using which
16583  new_path=`$WHICH "$new_path" 2> /dev/null`
16584  # bat and cmd files are not always considered executable in cygwin causing which
16585  # to not find them
16586  if test "x$new_path" = x \
16587      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16588      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16589    new_path=`$CYGPATH -u "$path"`
16590  fi
16591  if test "x$new_path" = x; then
16592    # Oops. Which didn't find the executable.
16593    # The splitting of arguments from the executable at a space might have been incorrect,
16594    # since paths with space are more likely in Windows. Give it another try with the whole
16595    # argument.
16596    path="$complete"
16597    arguments="EOL"
16598    new_path=`$CYGPATH -u "$path"`
16599    new_path=`$WHICH "$new_path" 2> /dev/null`
16600    # bat and cmd files are not always considered executable in cygwin causing which
16601    # to not find them
16602    if test "x$new_path" = x \
16603        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16604        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16605      new_path=`$CYGPATH -u "$path"`
16606    fi
16607    if test "x$new_path" = x; then
16608      # It's still not found. Now this is an unrecoverable error.
16609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16610$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16611      has_space=`$ECHO "$complete" | $GREP " "`
16612      if test "x$has_space" != x; then
16613        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16614$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16615      fi
16616      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16617    fi
16618  fi
16619
16620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16623  # "foo.exe" is OK but "foo" is an error.
16624  #
16625  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16626  # It is also a way to make sure we got the proper file name for the real test later on.
16627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16628  if test "x$test_shortpath" = x; then
16629    # Short path failed, file does not exist as specified.
16630    # Try adding .exe or .cmd
16631    if test -f "${new_path}.exe"; then
16632      input_to_shortpath="${new_path}.exe"
16633    elif test -f "${new_path}.cmd"; then
16634      input_to_shortpath="${new_path}.cmd"
16635    else
16636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16637$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16638      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16639$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16640      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16641    fi
16642  else
16643    input_to_shortpath="$new_path"
16644  fi
16645
16646  # Call helper function which possibly converts this using DOS-style short mode.
16647  # If so, the updated path is stored in $new_path.
16648  new_path="$input_to_shortpath"
16649
16650  input_path="$input_to_shortpath"
16651  # Check if we need to convert this using DOS-style short mode. If the path
16652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16653  # take no chances and rewrite it.
16654  # Note: m4 eats our [], so we need to use [ and ] instead.
16655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16656  if test "x$has_forbidden_chars" != x; then
16657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16661      # Going to short mode and back again did indeed matter. Since short mode is
16662      # case insensitive, let's make it lowercase to improve readability.
16663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16664      # Now convert it back to Unix-stile (cygpath)
16665      input_path=`$CYGPATH -u "$shortmode_path"`
16666      new_path="$input_path"
16667    fi
16668  fi
16669
16670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16671  if test "x$test_cygdrive_prefix" = x; then
16672    # As a simple fix, exclude /usr/bin since it's not a real path.
16673    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16675      # a path prefixed by /cygdrive for fixpath to work.
16676      new_path="$CYGWIN_ROOT_PATH$input_path"
16677    fi
16678  fi
16679
16680  # remove trailing .exe if any
16681  new_path="${new_path/%.exe/}"
16682
16683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16684
16685  # First separate the path from the arguments. This will split at the first
16686  # space.
16687  complete="$FOUND_MAKE"
16688  path="${complete%% *}"
16689  tmp="$complete EOL"
16690  arguments="${tmp#* }"
16691
16692  # Input might be given as Windows format, start by converting to
16693  # unix format.
16694  new_path="$path"
16695
16696  windows_path="$new_path"
16697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16698    unix_path=`$CYGPATH -u "$windows_path"`
16699    new_path="$unix_path"
16700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16702    new_path="$unix_path"
16703  fi
16704
16705
16706  # Now try to locate executable using which
16707  new_path=`$WHICH "$new_path" 2> /dev/null`
16708
16709  if test "x$new_path" = x; then
16710    # Oops. Which didn't find the executable.
16711    # The splitting of arguments from the executable at a space might have been incorrect,
16712    # since paths with space are more likely in Windows. Give it another try with the whole
16713    # argument.
16714    path="$complete"
16715    arguments="EOL"
16716    new_path="$path"
16717
16718  windows_path="$new_path"
16719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16720    unix_path=`$CYGPATH -u "$windows_path"`
16721    new_path="$unix_path"
16722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16724    new_path="$unix_path"
16725  fi
16726
16727
16728    new_path=`$WHICH "$new_path" 2> /dev/null`
16729    # bat and cmd files are not always considered executable in MSYS causing which
16730    # to not find them
16731    if test "x$new_path" = x \
16732        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16733        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16734      new_path="$path"
16735
16736  windows_path="$new_path"
16737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16738    unix_path=`$CYGPATH -u "$windows_path"`
16739    new_path="$unix_path"
16740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16742    new_path="$unix_path"
16743  fi
16744
16745    fi
16746
16747    if test "x$new_path" = x; then
16748      # It's still not found. Now this is an unrecoverable error.
16749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16750$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16751      has_space=`$ECHO "$complete" | $GREP " "`
16752      if test "x$has_space" != x; then
16753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16755      fi
16756      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16757    fi
16758  fi
16759
16760  # Now new_path has a complete unix path to the binary
16761  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16762    # Keep paths in /bin as-is, but remove trailing .exe if any
16763    new_path="${new_path/%.exe/}"
16764    # Do not save /bin paths to all_fixpath_prefixes!
16765  else
16766    # Not in mixed or Windows style, start by that.
16767    new_path=`cmd //c echo $new_path`
16768
16769  input_path="$new_path"
16770  # Check if we need to convert this using DOS-style short mode. If the path
16771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16772  # take no chances and rewrite it.
16773  # Note: m4 eats our [], so we need to use [ and ] instead.
16774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16775  if test "x$has_forbidden_chars" != x; then
16776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16778  fi
16779
16780    # Output is in $new_path
16781
16782  windows_path="$new_path"
16783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16784    unix_path=`$CYGPATH -u "$windows_path"`
16785    new_path="$unix_path"
16786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16788    new_path="$unix_path"
16789  fi
16790
16791    # remove trailing .exe if any
16792    new_path="${new_path/%.exe/}"
16793
16794    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16795    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16796  fi
16797
16798  else
16799    # We're on a posix platform. Hooray! :)
16800    # First separate the path from the arguments. This will split at the first
16801    # space.
16802    complete="$FOUND_MAKE"
16803    path="${complete%% *}"
16804    tmp="$complete EOL"
16805    arguments="${tmp#* }"
16806
16807    # Cannot rely on the command "which" here since it doesn't always work.
16808    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16809    if test -z "$is_absolute_path"; then
16810      # Path to executable is not absolute. Find it.
16811      IFS_save="$IFS"
16812      IFS=:
16813      for p in $PATH; do
16814        if test -f "$p/$path" && test -x "$p/$path"; then
16815          new_path="$p/$path"
16816          break
16817        fi
16818      done
16819      IFS="$IFS_save"
16820    else
16821      # This is an absolute path, we can use it without further modifications.
16822      new_path="$path"
16823    fi
16824
16825    if test "x$new_path" = x; then
16826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16827$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16828      has_space=`$ECHO "$complete" | $GREP " "`
16829      if test "x$has_space" != x; then
16830        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16831$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16832      fi
16833      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16834    fi
16835  fi
16836
16837  # Now join together the path and the arguments once again
16838  if test "x$arguments" != xEOL; then
16839    new_complete="$new_path ${arguments% *}"
16840  else
16841    new_complete="$new_path"
16842  fi
16843
16844  if test "x$complete" != "x$new_complete"; then
16845    FOUND_MAKE="$new_complete"
16846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16847$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16848  fi
16849
16850        fi
16851      fi
16852    fi
16853  fi
16854
16855        if test "x$FOUND_MAKE" = x; then
16856          for ac_prog in make
16857do
16858  # Extract the first word of "$ac_prog", so it can be a program name with args.
16859set dummy $ac_prog; ac_word=$2
16860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16861$as_echo_n "checking for $ac_word... " >&6; }
16862if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16863  $as_echo_n "(cached) " >&6
16864else
16865  case $CHECK_TOOLSDIR_MAKE in
16866  [\\/]* | ?:[\\/]*)
16867  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16868  ;;
16869  *)
16870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16871for as_dir in $PATH
16872do
16873  IFS=$as_save_IFS
16874  test -z "$as_dir" && as_dir=.
16875    for ac_exec_ext in '' $ac_executable_extensions; do
16876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16877    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16879    break 2
16880  fi
16881done
16882  done
16883IFS=$as_save_IFS
16884
16885  ;;
16886esac
16887fi
16888CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16889if test -n "$CHECK_TOOLSDIR_MAKE"; then
16890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16891$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16892else
16893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16894$as_echo "no" >&6; }
16895fi
16896
16897
16898  test -n "$CHECK_TOOLSDIR_MAKE" && break
16899done
16900
16901
16902  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16903  DESCRIPTION="make in tools-dir"
16904  if test "x$MAKE_CANDIDATE" != x; then
16905    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16906$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16907    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16908    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16909    if test "x$IS_GNU_MAKE" = x; then
16910      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16911$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16912    else
16913      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16914      if test "x$IS_MODERN_MAKE" = x; then
16915        { $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
16916$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;}
16917      else
16918        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16919          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16920            MAKE_EXPECTED_ENV='cygwin'
16921          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16922            MAKE_EXPECTED_ENV='msys'
16923          else
16924            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16925          fi
16926          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16927          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16928        else
16929          # Not relevant for non-Windows
16930          IS_MAKE_CORRECT_ENV=true
16931        fi
16932        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16933          { $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
16934$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;}
16935        else
16936          FOUND_MAKE=$MAKE_CANDIDATE
16937
16938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16939
16940  # First separate the path from the arguments. This will split at the first
16941  # space.
16942  complete="$FOUND_MAKE"
16943  path="${complete%% *}"
16944  tmp="$complete EOL"
16945  arguments="${tmp#* }"
16946
16947  # Input might be given as Windows format, start by converting to
16948  # unix format.
16949  new_path=`$CYGPATH -u "$path"`
16950
16951  # Now try to locate executable using which
16952  new_path=`$WHICH "$new_path" 2> /dev/null`
16953  # bat and cmd files are not always considered executable in cygwin causing which
16954  # to not find them
16955  if test "x$new_path" = x \
16956      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16957      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16958    new_path=`$CYGPATH -u "$path"`
16959  fi
16960  if test "x$new_path" = x; then
16961    # Oops. Which didn't find the executable.
16962    # The splitting of arguments from the executable at a space might have been incorrect,
16963    # since paths with space are more likely in Windows. Give it another try with the whole
16964    # argument.
16965    path="$complete"
16966    arguments="EOL"
16967    new_path=`$CYGPATH -u "$path"`
16968    new_path=`$WHICH "$new_path" 2> /dev/null`
16969    # bat and cmd files are not always considered executable in cygwin causing which
16970    # to not find them
16971    if test "x$new_path" = x \
16972        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16973        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16974      new_path=`$CYGPATH -u "$path"`
16975    fi
16976    if test "x$new_path" = x; then
16977      # It's still not found. Now this is an unrecoverable error.
16978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16979$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16980      has_space=`$ECHO "$complete" | $GREP " "`
16981      if test "x$has_space" != x; then
16982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16984      fi
16985      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16986    fi
16987  fi
16988
16989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16992  # "foo.exe" is OK but "foo" is an error.
16993  #
16994  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16995  # It is also a way to make sure we got the proper file name for the real test later on.
16996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16997  if test "x$test_shortpath" = x; then
16998    # Short path failed, file does not exist as specified.
16999    # Try adding .exe or .cmd
17000    if test -f "${new_path}.exe"; then
17001      input_to_shortpath="${new_path}.exe"
17002    elif test -f "${new_path}.cmd"; then
17003      input_to_shortpath="${new_path}.cmd"
17004    else
17005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17006$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17007      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17008$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17009      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17010    fi
17011  else
17012    input_to_shortpath="$new_path"
17013  fi
17014
17015  # Call helper function which possibly converts this using DOS-style short mode.
17016  # If so, the updated path is stored in $new_path.
17017  new_path="$input_to_shortpath"
17018
17019  input_path="$input_to_shortpath"
17020  # Check if we need to convert this using DOS-style short mode. If the path
17021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17022  # take no chances and rewrite it.
17023  # Note: m4 eats our [], so we need to use [ and ] instead.
17024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17025  if test "x$has_forbidden_chars" != x; then
17026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17027    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17028    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17029    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17030      # Going to short mode and back again did indeed matter. Since short mode is
17031      # case insensitive, let's make it lowercase to improve readability.
17032      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17033      # Now convert it back to Unix-stile (cygpath)
17034      input_path=`$CYGPATH -u "$shortmode_path"`
17035      new_path="$input_path"
17036    fi
17037  fi
17038
17039  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17040  if test "x$test_cygdrive_prefix" = x; then
17041    # As a simple fix, exclude /usr/bin since it's not a real path.
17042    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17043      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17044      # a path prefixed by /cygdrive for fixpath to work.
17045      new_path="$CYGWIN_ROOT_PATH$input_path"
17046    fi
17047  fi
17048
17049  # remove trailing .exe if any
17050  new_path="${new_path/%.exe/}"
17051
17052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17053
17054  # First separate the path from the arguments. This will split at the first
17055  # space.
17056  complete="$FOUND_MAKE"
17057  path="${complete%% *}"
17058  tmp="$complete EOL"
17059  arguments="${tmp#* }"
17060
17061  # Input might be given as Windows format, start by converting to
17062  # unix format.
17063  new_path="$path"
17064
17065  windows_path="$new_path"
17066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17067    unix_path=`$CYGPATH -u "$windows_path"`
17068    new_path="$unix_path"
17069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17071    new_path="$unix_path"
17072  fi
17073
17074
17075  # Now try to locate executable using which
17076  new_path=`$WHICH "$new_path" 2> /dev/null`
17077
17078  if test "x$new_path" = x; then
17079    # Oops. Which didn't find the executable.
17080    # The splitting of arguments from the executable at a space might have been incorrect,
17081    # since paths with space are more likely in Windows. Give it another try with the whole
17082    # argument.
17083    path="$complete"
17084    arguments="EOL"
17085    new_path="$path"
17086
17087  windows_path="$new_path"
17088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17089    unix_path=`$CYGPATH -u "$windows_path"`
17090    new_path="$unix_path"
17091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17093    new_path="$unix_path"
17094  fi
17095
17096
17097    new_path=`$WHICH "$new_path" 2> /dev/null`
17098    # bat and cmd files are not always considered executable in MSYS causing which
17099    # to not find them
17100    if test "x$new_path" = x \
17101        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17102        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17103      new_path="$path"
17104
17105  windows_path="$new_path"
17106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17107    unix_path=`$CYGPATH -u "$windows_path"`
17108    new_path="$unix_path"
17109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17111    new_path="$unix_path"
17112  fi
17113
17114    fi
17115
17116    if test "x$new_path" = x; then
17117      # It's still not found. Now this is an unrecoverable error.
17118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17119$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17120      has_space=`$ECHO "$complete" | $GREP " "`
17121      if test "x$has_space" != x; then
17122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17124      fi
17125      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17126    fi
17127  fi
17128
17129  # Now new_path has a complete unix path to the binary
17130  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17131    # Keep paths in /bin as-is, but remove trailing .exe if any
17132    new_path="${new_path/%.exe/}"
17133    # Do not save /bin paths to all_fixpath_prefixes!
17134  else
17135    # Not in mixed or Windows style, start by that.
17136    new_path=`cmd //c echo $new_path`
17137
17138  input_path="$new_path"
17139  # Check if we need to convert this using DOS-style short mode. If the path
17140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17141  # take no chances and rewrite it.
17142  # Note: m4 eats our [], so we need to use [ and ] instead.
17143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17144  if test "x$has_forbidden_chars" != x; then
17145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17147  fi
17148
17149    # Output is in $new_path
17150
17151  windows_path="$new_path"
17152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17153    unix_path=`$CYGPATH -u "$windows_path"`
17154    new_path="$unix_path"
17155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17157    new_path="$unix_path"
17158  fi
17159
17160    # remove trailing .exe if any
17161    new_path="${new_path/%.exe/}"
17162
17163    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17164    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17165  fi
17166
17167  else
17168    # We're on a posix platform. Hooray! :)
17169    # First separate the path from the arguments. This will split at the first
17170    # space.
17171    complete="$FOUND_MAKE"
17172    path="${complete%% *}"
17173    tmp="$complete EOL"
17174    arguments="${tmp#* }"
17175
17176    # Cannot rely on the command "which" here since it doesn't always work.
17177    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17178    if test -z "$is_absolute_path"; then
17179      # Path to executable is not absolute. Find it.
17180      IFS_save="$IFS"
17181      IFS=:
17182      for p in $PATH; do
17183        if test -f "$p/$path" && test -x "$p/$path"; then
17184          new_path="$p/$path"
17185          break
17186        fi
17187      done
17188      IFS="$IFS_save"
17189    else
17190      # This is an absolute path, we can use it without further modifications.
17191      new_path="$path"
17192    fi
17193
17194    if test "x$new_path" = x; then
17195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17196$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17197      has_space=`$ECHO "$complete" | $GREP " "`
17198      if test "x$has_space" != x; then
17199        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17200$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17201      fi
17202      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17203    fi
17204  fi
17205
17206  # Now join together the path and the arguments once again
17207  if test "x$arguments" != xEOL; then
17208    new_complete="$new_path ${arguments% *}"
17209  else
17210    new_complete="$new_path"
17211  fi
17212
17213  if test "x$complete" != "x$new_complete"; then
17214    FOUND_MAKE="$new_complete"
17215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17216$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17217  fi
17218
17219        fi
17220      fi
17221    fi
17222  fi
17223
17224        fi
17225        PATH=$OLD_PATH
17226      fi
17227    fi
17228
17229    if test "x$FOUND_MAKE" = x; then
17230      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
17231    fi
17232  fi
17233
17234  MAKE=$FOUND_MAKE
17235
17236  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17237$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17238
17239
17240  # Check if make supports the output sync option and if so, setup using it.
17241  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17242$as_echo_n "checking if make --output-sync is supported... " >&6; }
17243  if $MAKE --version -O > /dev/null 2>&1; then
17244    OUTPUT_SYNC_SUPPORTED=true
17245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17246$as_echo "yes" >&6; }
17247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17248$as_echo_n "checking for output-sync value... " >&6; }
17249
17250# Check whether --with-output-sync was given.
17251if test "${with_output_sync+set}" = set; then :
17252  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17253fi
17254
17255    if test "x$OUTPUT_SYNC" = "x"; then
17256      OUTPUT_SYNC=none
17257    fi
17258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17259$as_echo "$OUTPUT_SYNC" >&6; }
17260    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17261      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17262    fi
17263  else
17264    OUTPUT_SYNC_SUPPORTED=false
17265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17266$as_echo "no" >&6; }
17267  fi
17268
17269
17270
17271
17272
17273
17274  # Test if find supports -delete
17275  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17276$as_echo_n "checking if find supports -delete... " >&6; }
17277  FIND_DELETE="-delete"
17278
17279  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17280
17281  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17282
17283  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17284  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17285    # No, it does not.
17286    rm $DELETEDIR/TestIfFindSupportsDelete
17287    FIND_DELETE="-exec rm \{\} \+"
17288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17289$as_echo "no" >&6; }
17290  else
17291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17292$as_echo "yes" >&6; }
17293  fi
17294  rmdir $DELETEDIR
17295
17296
17297
17298  # These tools might not be installed by default,
17299  # need hint on how to install them.
17300
17301
17302
17303  # Publish this variable in the help.
17304
17305
17306  if test "x$UNZIP" = x; then
17307    # The variable is not set by user, try to locate tool using the code snippet
17308    for ac_prog in unzip
17309do
17310  # Extract the first word of "$ac_prog", so it can be a program name with args.
17311set dummy $ac_prog; ac_word=$2
17312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17313$as_echo_n "checking for $ac_word... " >&6; }
17314if ${ac_cv_path_UNZIP+:} false; then :
17315  $as_echo_n "(cached) " >&6
17316else
17317  case $UNZIP in
17318  [\\/]* | ?:[\\/]*)
17319  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17320  ;;
17321  *)
17322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17323for as_dir in $PATH
17324do
17325  IFS=$as_save_IFS
17326  test -z "$as_dir" && as_dir=.
17327    for ac_exec_ext in '' $ac_executable_extensions; do
17328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17329    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17331    break 2
17332  fi
17333done
17334  done
17335IFS=$as_save_IFS
17336
17337  ;;
17338esac
17339fi
17340UNZIP=$ac_cv_path_UNZIP
17341if test -n "$UNZIP"; then
17342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17343$as_echo "$UNZIP" >&6; }
17344else
17345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17346$as_echo "no" >&6; }
17347fi
17348
17349
17350  test -n "$UNZIP" && break
17351done
17352
17353  else
17354    # The variable is set, but is it from the command line or the environment?
17355
17356    # Try to remove the string !UNZIP! from our list.
17357    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17358    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17359      # If it failed, the variable was not from the command line. Ignore it,
17360      # but warn the user (except for BASH, which is always set by the calling BASH).
17361      if test "xUNZIP" != xBASH; then
17362        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17363$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17364      fi
17365      # Try to locate tool using the code snippet
17366      for ac_prog in unzip
17367do
17368  # Extract the first word of "$ac_prog", so it can be a program name with args.
17369set dummy $ac_prog; ac_word=$2
17370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17371$as_echo_n "checking for $ac_word... " >&6; }
17372if ${ac_cv_path_UNZIP+:} false; then :
17373  $as_echo_n "(cached) " >&6
17374else
17375  case $UNZIP in
17376  [\\/]* | ?:[\\/]*)
17377  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17378  ;;
17379  *)
17380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17381for as_dir in $PATH
17382do
17383  IFS=$as_save_IFS
17384  test -z "$as_dir" && as_dir=.
17385    for ac_exec_ext in '' $ac_executable_extensions; do
17386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17387    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17389    break 2
17390  fi
17391done
17392  done
17393IFS=$as_save_IFS
17394
17395  ;;
17396esac
17397fi
17398UNZIP=$ac_cv_path_UNZIP
17399if test -n "$UNZIP"; then
17400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17401$as_echo "$UNZIP" >&6; }
17402else
17403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17404$as_echo "no" >&6; }
17405fi
17406
17407
17408  test -n "$UNZIP" && break
17409done
17410
17411    else
17412      # If it succeeded, then it was overridden by the user. We will use it
17413      # for the tool.
17414
17415      # First remove it from the list of overridden variables, so we can test
17416      # for unknown variables in the end.
17417      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17418
17419      # Check if the provided tool contains a complete path.
17420      tool_specified="$UNZIP"
17421      tool_basename="${tool_specified##*/}"
17422      if test "x$tool_basename" = "x$tool_specified"; then
17423        # A command without a complete path is provided, search $PATH.
17424        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17425$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17426        # Extract the first word of "$tool_basename", so it can be a program name with args.
17427set dummy $tool_basename; ac_word=$2
17428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17429$as_echo_n "checking for $ac_word... " >&6; }
17430if ${ac_cv_path_UNZIP+:} false; then :
17431  $as_echo_n "(cached) " >&6
17432else
17433  case $UNZIP in
17434  [\\/]* | ?:[\\/]*)
17435  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17436  ;;
17437  *)
17438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17439for as_dir in $PATH
17440do
17441  IFS=$as_save_IFS
17442  test -z "$as_dir" && as_dir=.
17443    for ac_exec_ext in '' $ac_executable_extensions; do
17444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17445    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17447    break 2
17448  fi
17449done
17450  done
17451IFS=$as_save_IFS
17452
17453  ;;
17454esac
17455fi
17456UNZIP=$ac_cv_path_UNZIP
17457if test -n "$UNZIP"; then
17458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17459$as_echo "$UNZIP" >&6; }
17460else
17461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17462$as_echo "no" >&6; }
17463fi
17464
17465
17466        if test "x$UNZIP" = x; then
17467          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17468        fi
17469      else
17470        # Otherwise we believe it is a complete path. Use it as it is.
17471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17472$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17473        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17474$as_echo_n "checking for UNZIP... " >&6; }
17475        if test ! -x "$tool_specified"; then
17476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17477$as_echo "not found" >&6; }
17478          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17479        fi
17480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17481$as_echo "$tool_specified" >&6; }
17482      fi
17483    fi
17484  fi
17485
17486
17487
17488  if test "x$UNZIP" = x; then
17489    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17490  fi
17491
17492
17493
17494
17495
17496  # Publish this variable in the help.
17497
17498
17499  if test "x$ZIP" = x; then
17500    # The variable is not set by user, try to locate tool using the code snippet
17501    for ac_prog in zip
17502do
17503  # Extract the first word of "$ac_prog", so it can be a program name with args.
17504set dummy $ac_prog; ac_word=$2
17505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17506$as_echo_n "checking for $ac_word... " >&6; }
17507if ${ac_cv_path_ZIP+:} false; then :
17508  $as_echo_n "(cached) " >&6
17509else
17510  case $ZIP in
17511  [\\/]* | ?:[\\/]*)
17512  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17513  ;;
17514  *)
17515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17516for as_dir in $PATH
17517do
17518  IFS=$as_save_IFS
17519  test -z "$as_dir" && as_dir=.
17520    for ac_exec_ext in '' $ac_executable_extensions; do
17521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17522    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17524    break 2
17525  fi
17526done
17527  done
17528IFS=$as_save_IFS
17529
17530  ;;
17531esac
17532fi
17533ZIP=$ac_cv_path_ZIP
17534if test -n "$ZIP"; then
17535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17536$as_echo "$ZIP" >&6; }
17537else
17538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17539$as_echo "no" >&6; }
17540fi
17541
17542
17543  test -n "$ZIP" && break
17544done
17545
17546  else
17547    # The variable is set, but is it from the command line or the environment?
17548
17549    # Try to remove the string !ZIP! from our list.
17550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17552      # If it failed, the variable was not from the command line. Ignore it,
17553      # but warn the user (except for BASH, which is always set by the calling BASH).
17554      if test "xZIP" != xBASH; then
17555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17556$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17557      fi
17558      # Try to locate tool using the code snippet
17559      for ac_prog in zip
17560do
17561  # Extract the first word of "$ac_prog", so it can be a program name with args.
17562set dummy $ac_prog; ac_word=$2
17563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17564$as_echo_n "checking for $ac_word... " >&6; }
17565if ${ac_cv_path_ZIP+:} false; then :
17566  $as_echo_n "(cached) " >&6
17567else
17568  case $ZIP in
17569  [\\/]* | ?:[\\/]*)
17570  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17571  ;;
17572  *)
17573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17574for as_dir in $PATH
17575do
17576  IFS=$as_save_IFS
17577  test -z "$as_dir" && as_dir=.
17578    for ac_exec_ext in '' $ac_executable_extensions; do
17579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17580    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17582    break 2
17583  fi
17584done
17585  done
17586IFS=$as_save_IFS
17587
17588  ;;
17589esac
17590fi
17591ZIP=$ac_cv_path_ZIP
17592if test -n "$ZIP"; then
17593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17594$as_echo "$ZIP" >&6; }
17595else
17596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17597$as_echo "no" >&6; }
17598fi
17599
17600
17601  test -n "$ZIP" && break
17602done
17603
17604    else
17605      # If it succeeded, then it was overridden by the user. We will use it
17606      # for the tool.
17607
17608      # First remove it from the list of overridden variables, so we can test
17609      # for unknown variables in the end.
17610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17611
17612      # Check if the provided tool contains a complete path.
17613      tool_specified="$ZIP"
17614      tool_basename="${tool_specified##*/}"
17615      if test "x$tool_basename" = "x$tool_specified"; then
17616        # A command without a complete path is provided, search $PATH.
17617        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17618$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17619        # Extract the first word of "$tool_basename", so it can be a program name with args.
17620set dummy $tool_basename; ac_word=$2
17621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17622$as_echo_n "checking for $ac_word... " >&6; }
17623if ${ac_cv_path_ZIP+:} false; then :
17624  $as_echo_n "(cached) " >&6
17625else
17626  case $ZIP in
17627  [\\/]* | ?:[\\/]*)
17628  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17629  ;;
17630  *)
17631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17632for as_dir in $PATH
17633do
17634  IFS=$as_save_IFS
17635  test -z "$as_dir" && as_dir=.
17636    for ac_exec_ext in '' $ac_executable_extensions; do
17637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17638    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17640    break 2
17641  fi
17642done
17643  done
17644IFS=$as_save_IFS
17645
17646  ;;
17647esac
17648fi
17649ZIP=$ac_cv_path_ZIP
17650if test -n "$ZIP"; then
17651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17652$as_echo "$ZIP" >&6; }
17653else
17654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17655$as_echo "no" >&6; }
17656fi
17657
17658
17659        if test "x$ZIP" = x; then
17660          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17661        fi
17662      else
17663        # Otherwise we believe it is a complete path. Use it as it is.
17664        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17665$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17667$as_echo_n "checking for ZIP... " >&6; }
17668        if test ! -x "$tool_specified"; then
17669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17670$as_echo "not found" >&6; }
17671          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17672        fi
17673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17674$as_echo "$tool_specified" >&6; }
17675      fi
17676    fi
17677  fi
17678
17679
17680
17681  if test "x$ZIP" = x; then
17682    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17683  fi
17684
17685
17686
17687  # Non-required basic tools
17688
17689
17690
17691  # Publish this variable in the help.
17692
17693
17694  if test "x$LDD" = x; then
17695    # The variable is not set by user, try to locate tool using the code snippet
17696    for ac_prog in ldd
17697do
17698  # Extract the first word of "$ac_prog", so it can be a program name with args.
17699set dummy $ac_prog; ac_word=$2
17700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17701$as_echo_n "checking for $ac_word... " >&6; }
17702if ${ac_cv_path_LDD+:} false; then :
17703  $as_echo_n "(cached) " >&6
17704else
17705  case $LDD in
17706  [\\/]* | ?:[\\/]*)
17707  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17708  ;;
17709  *)
17710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17711for as_dir in $PATH
17712do
17713  IFS=$as_save_IFS
17714  test -z "$as_dir" && as_dir=.
17715    for ac_exec_ext in '' $ac_executable_extensions; do
17716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17717    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17719    break 2
17720  fi
17721done
17722  done
17723IFS=$as_save_IFS
17724
17725  ;;
17726esac
17727fi
17728LDD=$ac_cv_path_LDD
17729if test -n "$LDD"; then
17730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17731$as_echo "$LDD" >&6; }
17732else
17733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17734$as_echo "no" >&6; }
17735fi
17736
17737
17738  test -n "$LDD" && break
17739done
17740
17741  else
17742    # The variable is set, but is it from the command line or the environment?
17743
17744    # Try to remove the string !LDD! from our list.
17745    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17746    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17747      # If it failed, the variable was not from the command line. Ignore it,
17748      # but warn the user (except for BASH, which is always set by the calling BASH).
17749      if test "xLDD" != xBASH; then
17750        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17751$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17752      fi
17753      # Try to locate tool using the code snippet
17754      for ac_prog in ldd
17755do
17756  # Extract the first word of "$ac_prog", so it can be a program name with args.
17757set dummy $ac_prog; ac_word=$2
17758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17759$as_echo_n "checking for $ac_word... " >&6; }
17760if ${ac_cv_path_LDD+:} false; then :
17761  $as_echo_n "(cached) " >&6
17762else
17763  case $LDD in
17764  [\\/]* | ?:[\\/]*)
17765  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17766  ;;
17767  *)
17768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17769for as_dir in $PATH
17770do
17771  IFS=$as_save_IFS
17772  test -z "$as_dir" && as_dir=.
17773    for ac_exec_ext in '' $ac_executable_extensions; do
17774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17775    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17777    break 2
17778  fi
17779done
17780  done
17781IFS=$as_save_IFS
17782
17783  ;;
17784esac
17785fi
17786LDD=$ac_cv_path_LDD
17787if test -n "$LDD"; then
17788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17789$as_echo "$LDD" >&6; }
17790else
17791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17792$as_echo "no" >&6; }
17793fi
17794
17795
17796  test -n "$LDD" && break
17797done
17798
17799    else
17800      # If it succeeded, then it was overridden by the user. We will use it
17801      # for the tool.
17802
17803      # First remove it from the list of overridden variables, so we can test
17804      # for unknown variables in the end.
17805      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17806
17807      # Check if the provided tool contains a complete path.
17808      tool_specified="$LDD"
17809      tool_basename="${tool_specified##*/}"
17810      if test "x$tool_basename" = "x$tool_specified"; then
17811        # A command without a complete path is provided, search $PATH.
17812        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17813$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17814        # Extract the first word of "$tool_basename", so it can be a program name with args.
17815set dummy $tool_basename; ac_word=$2
17816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17817$as_echo_n "checking for $ac_word... " >&6; }
17818if ${ac_cv_path_LDD+:} false; then :
17819  $as_echo_n "(cached) " >&6
17820else
17821  case $LDD in
17822  [\\/]* | ?:[\\/]*)
17823  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17824  ;;
17825  *)
17826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17827for as_dir in $PATH
17828do
17829  IFS=$as_save_IFS
17830  test -z "$as_dir" && as_dir=.
17831    for ac_exec_ext in '' $ac_executable_extensions; do
17832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17833    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17835    break 2
17836  fi
17837done
17838  done
17839IFS=$as_save_IFS
17840
17841  ;;
17842esac
17843fi
17844LDD=$ac_cv_path_LDD
17845if test -n "$LDD"; then
17846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17847$as_echo "$LDD" >&6; }
17848else
17849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17850$as_echo "no" >&6; }
17851fi
17852
17853
17854        if test "x$LDD" = x; then
17855          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17856        fi
17857      else
17858        # Otherwise we believe it is a complete path. Use it as it is.
17859        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17860$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17861        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17862$as_echo_n "checking for LDD... " >&6; }
17863        if test ! -x "$tool_specified"; then
17864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17865$as_echo "not found" >&6; }
17866          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17867        fi
17868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17869$as_echo "$tool_specified" >&6; }
17870      fi
17871    fi
17872  fi
17873
17874
17875  if test "x$LDD" = "x"; then
17876    # List shared lib dependencies is used for
17877    # debug output and checking for forbidden dependencies.
17878    # We can build without it.
17879    LDD="true"
17880  fi
17881
17882
17883  # Publish this variable in the help.
17884
17885
17886  if test "x$OTOOL" = x; then
17887    # The variable is not set by user, try to locate tool using the code snippet
17888    for ac_prog in otool
17889do
17890  # Extract the first word of "$ac_prog", so it can be a program name with args.
17891set dummy $ac_prog; ac_word=$2
17892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17893$as_echo_n "checking for $ac_word... " >&6; }
17894if ${ac_cv_path_OTOOL+:} false; then :
17895  $as_echo_n "(cached) " >&6
17896else
17897  case $OTOOL in
17898  [\\/]* | ?:[\\/]*)
17899  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17900  ;;
17901  *)
17902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17903for as_dir in $PATH
17904do
17905  IFS=$as_save_IFS
17906  test -z "$as_dir" && as_dir=.
17907    for ac_exec_ext in '' $ac_executable_extensions; do
17908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17909    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17911    break 2
17912  fi
17913done
17914  done
17915IFS=$as_save_IFS
17916
17917  ;;
17918esac
17919fi
17920OTOOL=$ac_cv_path_OTOOL
17921if test -n "$OTOOL"; then
17922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17923$as_echo "$OTOOL" >&6; }
17924else
17925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17926$as_echo "no" >&6; }
17927fi
17928
17929
17930  test -n "$OTOOL" && break
17931done
17932
17933  else
17934    # The variable is set, but is it from the command line or the environment?
17935
17936    # Try to remove the string !OTOOL! from our list.
17937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17939      # If it failed, the variable was not from the command line. Ignore it,
17940      # but warn the user (except for BASH, which is always set by the calling BASH).
17941      if test "xOTOOL" != xBASH; then
17942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17943$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17944      fi
17945      # Try to locate tool using the code snippet
17946      for ac_prog in otool
17947do
17948  # Extract the first word of "$ac_prog", so it can be a program name with args.
17949set dummy $ac_prog; ac_word=$2
17950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17951$as_echo_n "checking for $ac_word... " >&6; }
17952if ${ac_cv_path_OTOOL+:} false; then :
17953  $as_echo_n "(cached) " >&6
17954else
17955  case $OTOOL in
17956  [\\/]* | ?:[\\/]*)
17957  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17958  ;;
17959  *)
17960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17961for as_dir in $PATH
17962do
17963  IFS=$as_save_IFS
17964  test -z "$as_dir" && as_dir=.
17965    for ac_exec_ext in '' $ac_executable_extensions; do
17966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17967    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17969    break 2
17970  fi
17971done
17972  done
17973IFS=$as_save_IFS
17974
17975  ;;
17976esac
17977fi
17978OTOOL=$ac_cv_path_OTOOL
17979if test -n "$OTOOL"; then
17980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17981$as_echo "$OTOOL" >&6; }
17982else
17983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17984$as_echo "no" >&6; }
17985fi
17986
17987
17988  test -n "$OTOOL" && break
17989done
17990
17991    else
17992      # If it succeeded, then it was overridden by the user. We will use it
17993      # for the tool.
17994
17995      # First remove it from the list of overridden variables, so we can test
17996      # for unknown variables in the end.
17997      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17998
17999      # Check if the provided tool contains a complete path.
18000      tool_specified="$OTOOL"
18001      tool_basename="${tool_specified##*/}"
18002      if test "x$tool_basename" = "x$tool_specified"; then
18003        # A command without a complete path is provided, search $PATH.
18004        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18005$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18006        # Extract the first word of "$tool_basename", so it can be a program name with args.
18007set dummy $tool_basename; ac_word=$2
18008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18009$as_echo_n "checking for $ac_word... " >&6; }
18010if ${ac_cv_path_OTOOL+:} false; then :
18011  $as_echo_n "(cached) " >&6
18012else
18013  case $OTOOL in
18014  [\\/]* | ?:[\\/]*)
18015  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18016  ;;
18017  *)
18018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18019for as_dir in $PATH
18020do
18021  IFS=$as_save_IFS
18022  test -z "$as_dir" && as_dir=.
18023    for ac_exec_ext in '' $ac_executable_extensions; do
18024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18025    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18027    break 2
18028  fi
18029done
18030  done
18031IFS=$as_save_IFS
18032
18033  ;;
18034esac
18035fi
18036OTOOL=$ac_cv_path_OTOOL
18037if test -n "$OTOOL"; then
18038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18039$as_echo "$OTOOL" >&6; }
18040else
18041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18042$as_echo "no" >&6; }
18043fi
18044
18045
18046        if test "x$OTOOL" = x; then
18047          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18048        fi
18049      else
18050        # Otherwise we believe it is a complete path. Use it as it is.
18051        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18052$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18053        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18054$as_echo_n "checking for OTOOL... " >&6; }
18055        if test ! -x "$tool_specified"; then
18056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18057$as_echo "not found" >&6; }
18058          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18059        fi
18060        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18061$as_echo "$tool_specified" >&6; }
18062      fi
18063    fi
18064  fi
18065
18066
18067  if test "x$OTOOL" = "x"; then
18068    OTOOL="true"
18069  fi
18070
18071
18072  # Publish this variable in the help.
18073
18074
18075  if test "x$READELF" = x; then
18076    # The variable is not set by user, try to locate tool using the code snippet
18077    for ac_prog in greadelf readelf
18078do
18079  # Extract the first word of "$ac_prog", so it can be a program name with args.
18080set dummy $ac_prog; ac_word=$2
18081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18082$as_echo_n "checking for $ac_word... " >&6; }
18083if ${ac_cv_path_READELF+:} false; then :
18084  $as_echo_n "(cached) " >&6
18085else
18086  case $READELF in
18087  [\\/]* | ?:[\\/]*)
18088  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18089  ;;
18090  *)
18091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18092for as_dir in $PATH
18093do
18094  IFS=$as_save_IFS
18095  test -z "$as_dir" && as_dir=.
18096    for ac_exec_ext in '' $ac_executable_extensions; do
18097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18098    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18100    break 2
18101  fi
18102done
18103  done
18104IFS=$as_save_IFS
18105
18106  ;;
18107esac
18108fi
18109READELF=$ac_cv_path_READELF
18110if test -n "$READELF"; then
18111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18112$as_echo "$READELF" >&6; }
18113else
18114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18115$as_echo "no" >&6; }
18116fi
18117
18118
18119  test -n "$READELF" && break
18120done
18121
18122  else
18123    # The variable is set, but is it from the command line or the environment?
18124
18125    # Try to remove the string !READELF! from our list.
18126    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18127    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18128      # If it failed, the variable was not from the command line. Ignore it,
18129      # but warn the user (except for BASH, which is always set by the calling BASH).
18130      if test "xREADELF" != xBASH; then
18131        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18132$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18133      fi
18134      # Try to locate tool using the code snippet
18135      for ac_prog in greadelf readelf
18136do
18137  # Extract the first word of "$ac_prog", so it can be a program name with args.
18138set dummy $ac_prog; ac_word=$2
18139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18140$as_echo_n "checking for $ac_word... " >&6; }
18141if ${ac_cv_path_READELF+:} false; then :
18142  $as_echo_n "(cached) " >&6
18143else
18144  case $READELF in
18145  [\\/]* | ?:[\\/]*)
18146  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18147  ;;
18148  *)
18149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18150for as_dir in $PATH
18151do
18152  IFS=$as_save_IFS
18153  test -z "$as_dir" && as_dir=.
18154    for ac_exec_ext in '' $ac_executable_extensions; do
18155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18156    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18158    break 2
18159  fi
18160done
18161  done
18162IFS=$as_save_IFS
18163
18164  ;;
18165esac
18166fi
18167READELF=$ac_cv_path_READELF
18168if test -n "$READELF"; then
18169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18170$as_echo "$READELF" >&6; }
18171else
18172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18173$as_echo "no" >&6; }
18174fi
18175
18176
18177  test -n "$READELF" && break
18178done
18179
18180    else
18181      # If it succeeded, then it was overridden by the user. We will use it
18182      # for the tool.
18183
18184      # First remove it from the list of overridden variables, so we can test
18185      # for unknown variables in the end.
18186      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18187
18188      # Check if the provided tool contains a complete path.
18189      tool_specified="$READELF"
18190      tool_basename="${tool_specified##*/}"
18191      if test "x$tool_basename" = "x$tool_specified"; then
18192        # A command without a complete path is provided, search $PATH.
18193        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18194$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18195        # Extract the first word of "$tool_basename", so it can be a program name with args.
18196set dummy $tool_basename; ac_word=$2
18197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18198$as_echo_n "checking for $ac_word... " >&6; }
18199if ${ac_cv_path_READELF+:} false; then :
18200  $as_echo_n "(cached) " >&6
18201else
18202  case $READELF in
18203  [\\/]* | ?:[\\/]*)
18204  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18205  ;;
18206  *)
18207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18208for as_dir in $PATH
18209do
18210  IFS=$as_save_IFS
18211  test -z "$as_dir" && as_dir=.
18212    for ac_exec_ext in '' $ac_executable_extensions; do
18213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18214    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18216    break 2
18217  fi
18218done
18219  done
18220IFS=$as_save_IFS
18221
18222  ;;
18223esac
18224fi
18225READELF=$ac_cv_path_READELF
18226if test -n "$READELF"; then
18227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18228$as_echo "$READELF" >&6; }
18229else
18230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18231$as_echo "no" >&6; }
18232fi
18233
18234
18235        if test "x$READELF" = x; then
18236          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18237        fi
18238      else
18239        # Otherwise we believe it is a complete path. Use it as it is.
18240        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18241$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18242        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18243$as_echo_n "checking for READELF... " >&6; }
18244        if test ! -x "$tool_specified"; then
18245          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18246$as_echo "not found" >&6; }
18247          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18248        fi
18249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18250$as_echo "$tool_specified" >&6; }
18251      fi
18252    fi
18253  fi
18254
18255
18256
18257
18258  # Publish this variable in the help.
18259
18260
18261  if test "x$HG" = x; then
18262    # The variable is not set by user, try to locate tool using the code snippet
18263    for ac_prog in hg
18264do
18265  # Extract the first word of "$ac_prog", so it can be a program name with args.
18266set dummy $ac_prog; ac_word=$2
18267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18268$as_echo_n "checking for $ac_word... " >&6; }
18269if ${ac_cv_path_HG+:} false; then :
18270  $as_echo_n "(cached) " >&6
18271else
18272  case $HG in
18273  [\\/]* | ?:[\\/]*)
18274  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18275  ;;
18276  *)
18277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18278for as_dir in $PATH
18279do
18280  IFS=$as_save_IFS
18281  test -z "$as_dir" && as_dir=.
18282    for ac_exec_ext in '' $ac_executable_extensions; do
18283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18284    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18286    break 2
18287  fi
18288done
18289  done
18290IFS=$as_save_IFS
18291
18292  ;;
18293esac
18294fi
18295HG=$ac_cv_path_HG
18296if test -n "$HG"; then
18297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18298$as_echo "$HG" >&6; }
18299else
18300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18301$as_echo "no" >&6; }
18302fi
18303
18304
18305  test -n "$HG" && break
18306done
18307
18308  else
18309    # The variable is set, but is it from the command line or the environment?
18310
18311    # Try to remove the string !HG! from our list.
18312    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18313    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18314      # If it failed, the variable was not from the command line. Ignore it,
18315      # but warn the user (except for BASH, which is always set by the calling BASH).
18316      if test "xHG" != xBASH; then
18317        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18318$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18319      fi
18320      # Try to locate tool using the code snippet
18321      for ac_prog in hg
18322do
18323  # Extract the first word of "$ac_prog", so it can be a program name with args.
18324set dummy $ac_prog; ac_word=$2
18325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18326$as_echo_n "checking for $ac_word... " >&6; }
18327if ${ac_cv_path_HG+:} false; then :
18328  $as_echo_n "(cached) " >&6
18329else
18330  case $HG in
18331  [\\/]* | ?:[\\/]*)
18332  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18333  ;;
18334  *)
18335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18336for as_dir in $PATH
18337do
18338  IFS=$as_save_IFS
18339  test -z "$as_dir" && as_dir=.
18340    for ac_exec_ext in '' $ac_executable_extensions; do
18341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18342    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18344    break 2
18345  fi
18346done
18347  done
18348IFS=$as_save_IFS
18349
18350  ;;
18351esac
18352fi
18353HG=$ac_cv_path_HG
18354if test -n "$HG"; then
18355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18356$as_echo "$HG" >&6; }
18357else
18358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18359$as_echo "no" >&6; }
18360fi
18361
18362
18363  test -n "$HG" && break
18364done
18365
18366    else
18367      # If it succeeded, then it was overridden by the user. We will use it
18368      # for the tool.
18369
18370      # First remove it from the list of overridden variables, so we can test
18371      # for unknown variables in the end.
18372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18373
18374      # Check if the provided tool contains a complete path.
18375      tool_specified="$HG"
18376      tool_basename="${tool_specified##*/}"
18377      if test "x$tool_basename" = "x$tool_specified"; then
18378        # A command without a complete path is provided, search $PATH.
18379        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18380$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18381        # Extract the first word of "$tool_basename", so it can be a program name with args.
18382set dummy $tool_basename; ac_word=$2
18383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18384$as_echo_n "checking for $ac_word... " >&6; }
18385if ${ac_cv_path_HG+:} false; then :
18386  $as_echo_n "(cached) " >&6
18387else
18388  case $HG in
18389  [\\/]* | ?:[\\/]*)
18390  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18391  ;;
18392  *)
18393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18394for as_dir in $PATH
18395do
18396  IFS=$as_save_IFS
18397  test -z "$as_dir" && as_dir=.
18398    for ac_exec_ext in '' $ac_executable_extensions; do
18399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18400    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18402    break 2
18403  fi
18404done
18405  done
18406IFS=$as_save_IFS
18407
18408  ;;
18409esac
18410fi
18411HG=$ac_cv_path_HG
18412if test -n "$HG"; then
18413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18414$as_echo "$HG" >&6; }
18415else
18416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18417$as_echo "no" >&6; }
18418fi
18419
18420
18421        if test "x$HG" = x; then
18422          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18423        fi
18424      else
18425        # Otherwise we believe it is a complete path. Use it as it is.
18426        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18427$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18428        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18429$as_echo_n "checking for HG... " >&6; }
18430        if test ! -x "$tool_specified"; then
18431          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18432$as_echo "not found" >&6; }
18433          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18434        fi
18435        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18436$as_echo "$tool_specified" >&6; }
18437      fi
18438    fi
18439  fi
18440
18441
18442
18443
18444  # Publish this variable in the help.
18445
18446
18447  if test "x$STAT" = x; then
18448    # The variable is not set by user, try to locate tool using the code snippet
18449    for ac_prog in stat
18450do
18451  # Extract the first word of "$ac_prog", so it can be a program name with args.
18452set dummy $ac_prog; ac_word=$2
18453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18454$as_echo_n "checking for $ac_word... " >&6; }
18455if ${ac_cv_path_STAT+:} false; then :
18456  $as_echo_n "(cached) " >&6
18457else
18458  case $STAT in
18459  [\\/]* | ?:[\\/]*)
18460  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18461  ;;
18462  *)
18463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18464for as_dir in $PATH
18465do
18466  IFS=$as_save_IFS
18467  test -z "$as_dir" && as_dir=.
18468    for ac_exec_ext in '' $ac_executable_extensions; do
18469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18470    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18472    break 2
18473  fi
18474done
18475  done
18476IFS=$as_save_IFS
18477
18478  ;;
18479esac
18480fi
18481STAT=$ac_cv_path_STAT
18482if test -n "$STAT"; then
18483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18484$as_echo "$STAT" >&6; }
18485else
18486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18487$as_echo "no" >&6; }
18488fi
18489
18490
18491  test -n "$STAT" && break
18492done
18493
18494  else
18495    # The variable is set, but is it from the command line or the environment?
18496
18497    # Try to remove the string !STAT! from our list.
18498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18500      # If it failed, the variable was not from the command line. Ignore it,
18501      # but warn the user (except for BASH, which is always set by the calling BASH).
18502      if test "xSTAT" != xBASH; then
18503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18504$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18505      fi
18506      # Try to locate tool using the code snippet
18507      for ac_prog in stat
18508do
18509  # Extract the first word of "$ac_prog", so it can be a program name with args.
18510set dummy $ac_prog; ac_word=$2
18511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18512$as_echo_n "checking for $ac_word... " >&6; }
18513if ${ac_cv_path_STAT+:} false; then :
18514  $as_echo_n "(cached) " >&6
18515else
18516  case $STAT in
18517  [\\/]* | ?:[\\/]*)
18518  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18519  ;;
18520  *)
18521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18522for as_dir in $PATH
18523do
18524  IFS=$as_save_IFS
18525  test -z "$as_dir" && as_dir=.
18526    for ac_exec_ext in '' $ac_executable_extensions; do
18527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18528    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18530    break 2
18531  fi
18532done
18533  done
18534IFS=$as_save_IFS
18535
18536  ;;
18537esac
18538fi
18539STAT=$ac_cv_path_STAT
18540if test -n "$STAT"; then
18541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18542$as_echo "$STAT" >&6; }
18543else
18544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18545$as_echo "no" >&6; }
18546fi
18547
18548
18549  test -n "$STAT" && break
18550done
18551
18552    else
18553      # If it succeeded, then it was overridden by the user. We will use it
18554      # for the tool.
18555
18556      # First remove it from the list of overridden variables, so we can test
18557      # for unknown variables in the end.
18558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18559
18560      # Check if the provided tool contains a complete path.
18561      tool_specified="$STAT"
18562      tool_basename="${tool_specified##*/}"
18563      if test "x$tool_basename" = "x$tool_specified"; then
18564        # A command without a complete path is provided, search $PATH.
18565        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18566$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18567        # Extract the first word of "$tool_basename", so it can be a program name with args.
18568set dummy $tool_basename; ac_word=$2
18569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18570$as_echo_n "checking for $ac_word... " >&6; }
18571if ${ac_cv_path_STAT+:} false; then :
18572  $as_echo_n "(cached) " >&6
18573else
18574  case $STAT in
18575  [\\/]* | ?:[\\/]*)
18576  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18577  ;;
18578  *)
18579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18580for as_dir in $PATH
18581do
18582  IFS=$as_save_IFS
18583  test -z "$as_dir" && as_dir=.
18584    for ac_exec_ext in '' $ac_executable_extensions; do
18585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18586    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18588    break 2
18589  fi
18590done
18591  done
18592IFS=$as_save_IFS
18593
18594  ;;
18595esac
18596fi
18597STAT=$ac_cv_path_STAT
18598if test -n "$STAT"; then
18599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18600$as_echo "$STAT" >&6; }
18601else
18602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18603$as_echo "no" >&6; }
18604fi
18605
18606
18607        if test "x$STAT" = x; then
18608          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18609        fi
18610      else
18611        # Otherwise we believe it is a complete path. Use it as it is.
18612        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18613$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18615$as_echo_n "checking for STAT... " >&6; }
18616        if test ! -x "$tool_specified"; then
18617          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18618$as_echo "not found" >&6; }
18619          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18620        fi
18621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18622$as_echo "$tool_specified" >&6; }
18623      fi
18624    fi
18625  fi
18626
18627
18628
18629
18630  # Publish this variable in the help.
18631
18632
18633  if test "x$TIME" = x; then
18634    # The variable is not set by user, try to locate tool using the code snippet
18635    for ac_prog in time
18636do
18637  # Extract the first word of "$ac_prog", so it can be a program name with args.
18638set dummy $ac_prog; ac_word=$2
18639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18640$as_echo_n "checking for $ac_word... " >&6; }
18641if ${ac_cv_path_TIME+:} false; then :
18642  $as_echo_n "(cached) " >&6
18643else
18644  case $TIME in
18645  [\\/]* | ?:[\\/]*)
18646  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18647  ;;
18648  *)
18649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18650for as_dir in $PATH
18651do
18652  IFS=$as_save_IFS
18653  test -z "$as_dir" && as_dir=.
18654    for ac_exec_ext in '' $ac_executable_extensions; do
18655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18656    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18658    break 2
18659  fi
18660done
18661  done
18662IFS=$as_save_IFS
18663
18664  ;;
18665esac
18666fi
18667TIME=$ac_cv_path_TIME
18668if test -n "$TIME"; then
18669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18670$as_echo "$TIME" >&6; }
18671else
18672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18673$as_echo "no" >&6; }
18674fi
18675
18676
18677  test -n "$TIME" && break
18678done
18679
18680  else
18681    # The variable is set, but is it from the command line or the environment?
18682
18683    # Try to remove the string !TIME! from our list.
18684    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18685    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18686      # If it failed, the variable was not from the command line. Ignore it,
18687      # but warn the user (except for BASH, which is always set by the calling BASH).
18688      if test "xTIME" != xBASH; then
18689        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18690$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18691      fi
18692      # Try to locate tool using the code snippet
18693      for ac_prog in time
18694do
18695  # Extract the first word of "$ac_prog", so it can be a program name with args.
18696set dummy $ac_prog; ac_word=$2
18697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18698$as_echo_n "checking for $ac_word... " >&6; }
18699if ${ac_cv_path_TIME+:} false; then :
18700  $as_echo_n "(cached) " >&6
18701else
18702  case $TIME in
18703  [\\/]* | ?:[\\/]*)
18704  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18705  ;;
18706  *)
18707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18708for as_dir in $PATH
18709do
18710  IFS=$as_save_IFS
18711  test -z "$as_dir" && as_dir=.
18712    for ac_exec_ext in '' $ac_executable_extensions; do
18713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18714    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18716    break 2
18717  fi
18718done
18719  done
18720IFS=$as_save_IFS
18721
18722  ;;
18723esac
18724fi
18725TIME=$ac_cv_path_TIME
18726if test -n "$TIME"; then
18727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18728$as_echo "$TIME" >&6; }
18729else
18730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18731$as_echo "no" >&6; }
18732fi
18733
18734
18735  test -n "$TIME" && break
18736done
18737
18738    else
18739      # If it succeeded, then it was overridden by the user. We will use it
18740      # for the tool.
18741
18742      # First remove it from the list of overridden variables, so we can test
18743      # for unknown variables in the end.
18744      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18745
18746      # Check if the provided tool contains a complete path.
18747      tool_specified="$TIME"
18748      tool_basename="${tool_specified##*/}"
18749      if test "x$tool_basename" = "x$tool_specified"; then
18750        # A command without a complete path is provided, search $PATH.
18751        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18752$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18753        # Extract the first word of "$tool_basename", so it can be a program name with args.
18754set dummy $tool_basename; ac_word=$2
18755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18756$as_echo_n "checking for $ac_word... " >&6; }
18757if ${ac_cv_path_TIME+:} false; then :
18758  $as_echo_n "(cached) " >&6
18759else
18760  case $TIME in
18761  [\\/]* | ?:[\\/]*)
18762  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18763  ;;
18764  *)
18765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18766for as_dir in $PATH
18767do
18768  IFS=$as_save_IFS
18769  test -z "$as_dir" && as_dir=.
18770    for ac_exec_ext in '' $ac_executable_extensions; do
18771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18772    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18774    break 2
18775  fi
18776done
18777  done
18778IFS=$as_save_IFS
18779
18780  ;;
18781esac
18782fi
18783TIME=$ac_cv_path_TIME
18784if test -n "$TIME"; then
18785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18786$as_echo "$TIME" >&6; }
18787else
18788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18789$as_echo "no" >&6; }
18790fi
18791
18792
18793        if test "x$TIME" = x; then
18794          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18795        fi
18796      else
18797        # Otherwise we believe it is a complete path. Use it as it is.
18798        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18799$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18800        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18801$as_echo_n "checking for TIME... " >&6; }
18802        if test ! -x "$tool_specified"; then
18803          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18804$as_echo "not found" >&6; }
18805          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18806        fi
18807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18808$as_echo "$tool_specified" >&6; }
18809      fi
18810    fi
18811  fi
18812
18813
18814  # Check if it's GNU time
18815  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18816  if test "x$IS_GNU_TIME" != x; then
18817    IS_GNU_TIME=yes
18818  else
18819    IS_GNU_TIME=no
18820  fi
18821
18822
18823  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18824
18825
18826
18827  # Publish this variable in the help.
18828
18829
18830  if test "x$COMM" = x; then
18831    # The variable is not set by user, try to locate tool using the code snippet
18832    for ac_prog in comm
18833do
18834  # Extract the first word of "$ac_prog", so it can be a program name with args.
18835set dummy $ac_prog; ac_word=$2
18836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18837$as_echo_n "checking for $ac_word... " >&6; }
18838if ${ac_cv_path_COMM+:} false; then :
18839  $as_echo_n "(cached) " >&6
18840else
18841  case $COMM in
18842  [\\/]* | ?:[\\/]*)
18843  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18844  ;;
18845  *)
18846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18847for as_dir in $PATH
18848do
18849  IFS=$as_save_IFS
18850  test -z "$as_dir" && as_dir=.
18851    for ac_exec_ext in '' $ac_executable_extensions; do
18852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18853    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18855    break 2
18856  fi
18857done
18858  done
18859IFS=$as_save_IFS
18860
18861  ;;
18862esac
18863fi
18864COMM=$ac_cv_path_COMM
18865if test -n "$COMM"; then
18866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18867$as_echo "$COMM" >&6; }
18868else
18869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18870$as_echo "no" >&6; }
18871fi
18872
18873
18874  test -n "$COMM" && break
18875done
18876
18877  else
18878    # The variable is set, but is it from the command line or the environment?
18879
18880    # Try to remove the string !COMM! from our list.
18881    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18882    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18883      # If it failed, the variable was not from the command line. Ignore it,
18884      # but warn the user (except for BASH, which is always set by the calling BASH).
18885      if test "xCOMM" != xBASH; then
18886        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18887$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18888      fi
18889      # Try to locate tool using the code snippet
18890      for ac_prog in comm
18891do
18892  # Extract the first word of "$ac_prog", so it can be a program name with args.
18893set dummy $ac_prog; ac_word=$2
18894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18895$as_echo_n "checking for $ac_word... " >&6; }
18896if ${ac_cv_path_COMM+:} false; then :
18897  $as_echo_n "(cached) " >&6
18898else
18899  case $COMM in
18900  [\\/]* | ?:[\\/]*)
18901  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18902  ;;
18903  *)
18904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18905for as_dir in $PATH
18906do
18907  IFS=$as_save_IFS
18908  test -z "$as_dir" && as_dir=.
18909    for ac_exec_ext in '' $ac_executable_extensions; do
18910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18911    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18913    break 2
18914  fi
18915done
18916  done
18917IFS=$as_save_IFS
18918
18919  ;;
18920esac
18921fi
18922COMM=$ac_cv_path_COMM
18923if test -n "$COMM"; then
18924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18925$as_echo "$COMM" >&6; }
18926else
18927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18928$as_echo "no" >&6; }
18929fi
18930
18931
18932  test -n "$COMM" && break
18933done
18934
18935    else
18936      # If it succeeded, then it was overridden by the user. We will use it
18937      # for the tool.
18938
18939      # First remove it from the list of overridden variables, so we can test
18940      # for unknown variables in the end.
18941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18942
18943      # Check if the provided tool contains a complete path.
18944      tool_specified="$COMM"
18945      tool_basename="${tool_specified##*/}"
18946      if test "x$tool_basename" = "x$tool_specified"; then
18947        # A command without a complete path is provided, search $PATH.
18948        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18949$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18950        # Extract the first word of "$tool_basename", so it can be a program name with args.
18951set dummy $tool_basename; ac_word=$2
18952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18953$as_echo_n "checking for $ac_word... " >&6; }
18954if ${ac_cv_path_COMM+:} false; then :
18955  $as_echo_n "(cached) " >&6
18956else
18957  case $COMM in
18958  [\\/]* | ?:[\\/]*)
18959  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18960  ;;
18961  *)
18962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18963for as_dir in $PATH
18964do
18965  IFS=$as_save_IFS
18966  test -z "$as_dir" && as_dir=.
18967    for ac_exec_ext in '' $ac_executable_extensions; do
18968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18969    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18971    break 2
18972  fi
18973done
18974  done
18975IFS=$as_save_IFS
18976
18977  ;;
18978esac
18979fi
18980COMM=$ac_cv_path_COMM
18981if test -n "$COMM"; then
18982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18983$as_echo "$COMM" >&6; }
18984else
18985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18986$as_echo "no" >&6; }
18987fi
18988
18989
18990        if test "x$COMM" = x; then
18991          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18992        fi
18993      else
18994        # Otherwise we believe it is a complete path. Use it as it is.
18995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18996$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18998$as_echo_n "checking for COMM... " >&6; }
18999        if test ! -x "$tool_specified"; then
19000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19001$as_echo "not found" >&6; }
19002          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
19003        fi
19004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19005$as_echo "$tool_specified" >&6; }
19006      fi
19007    fi
19008  fi
19009
19010
19011
19012  if test "x$COMM" = x; then
19013    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
19014  fi
19015
19016
19017  fi
19018
19019  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19020
19021
19022
19023  # Publish this variable in the help.
19024
19025
19026  if test "x$DSYMUTIL" = x; then
19027    # The variable is not set by user, try to locate tool using the code snippet
19028    for ac_prog in dsymutil
19029do
19030  # Extract the first word of "$ac_prog", so it can be a program name with args.
19031set dummy $ac_prog; ac_word=$2
19032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19033$as_echo_n "checking for $ac_word... " >&6; }
19034if ${ac_cv_path_DSYMUTIL+:} false; then :
19035  $as_echo_n "(cached) " >&6
19036else
19037  case $DSYMUTIL in
19038  [\\/]* | ?:[\\/]*)
19039  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19040  ;;
19041  *)
19042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19043for as_dir in $PATH
19044do
19045  IFS=$as_save_IFS
19046  test -z "$as_dir" && as_dir=.
19047    for ac_exec_ext in '' $ac_executable_extensions; do
19048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19049    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19051    break 2
19052  fi
19053done
19054  done
19055IFS=$as_save_IFS
19056
19057  ;;
19058esac
19059fi
19060DSYMUTIL=$ac_cv_path_DSYMUTIL
19061if test -n "$DSYMUTIL"; then
19062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19063$as_echo "$DSYMUTIL" >&6; }
19064else
19065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19066$as_echo "no" >&6; }
19067fi
19068
19069
19070  test -n "$DSYMUTIL" && break
19071done
19072
19073  else
19074    # The variable is set, but is it from the command line or the environment?
19075
19076    # Try to remove the string !DSYMUTIL! from our list.
19077    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19078    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19079      # If it failed, the variable was not from the command line. Ignore it,
19080      # but warn the user (except for BASH, which is always set by the calling BASH).
19081      if test "xDSYMUTIL" != xBASH; then
19082        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19083$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19084      fi
19085      # Try to locate tool using the code snippet
19086      for ac_prog in dsymutil
19087do
19088  # Extract the first word of "$ac_prog", so it can be a program name with args.
19089set dummy $ac_prog; ac_word=$2
19090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19091$as_echo_n "checking for $ac_word... " >&6; }
19092if ${ac_cv_path_DSYMUTIL+:} false; then :
19093  $as_echo_n "(cached) " >&6
19094else
19095  case $DSYMUTIL in
19096  [\\/]* | ?:[\\/]*)
19097  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19098  ;;
19099  *)
19100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19101for as_dir in $PATH
19102do
19103  IFS=$as_save_IFS
19104  test -z "$as_dir" && as_dir=.
19105    for ac_exec_ext in '' $ac_executable_extensions; do
19106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19107    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19109    break 2
19110  fi
19111done
19112  done
19113IFS=$as_save_IFS
19114
19115  ;;
19116esac
19117fi
19118DSYMUTIL=$ac_cv_path_DSYMUTIL
19119if test -n "$DSYMUTIL"; then
19120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19121$as_echo "$DSYMUTIL" >&6; }
19122else
19123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19124$as_echo "no" >&6; }
19125fi
19126
19127
19128  test -n "$DSYMUTIL" && break
19129done
19130
19131    else
19132      # If it succeeded, then it was overridden by the user. We will use it
19133      # for the tool.
19134
19135      # First remove it from the list of overridden variables, so we can test
19136      # for unknown variables in the end.
19137      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19138
19139      # Check if the provided tool contains a complete path.
19140      tool_specified="$DSYMUTIL"
19141      tool_basename="${tool_specified##*/}"
19142      if test "x$tool_basename" = "x$tool_specified"; then
19143        # A command without a complete path is provided, search $PATH.
19144        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19145$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19146        # Extract the first word of "$tool_basename", so it can be a program name with args.
19147set dummy $tool_basename; ac_word=$2
19148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19149$as_echo_n "checking for $ac_word... " >&6; }
19150if ${ac_cv_path_DSYMUTIL+:} false; then :
19151  $as_echo_n "(cached) " >&6
19152else
19153  case $DSYMUTIL in
19154  [\\/]* | ?:[\\/]*)
19155  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19156  ;;
19157  *)
19158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19159for as_dir in $PATH
19160do
19161  IFS=$as_save_IFS
19162  test -z "$as_dir" && as_dir=.
19163    for ac_exec_ext in '' $ac_executable_extensions; do
19164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19165    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19167    break 2
19168  fi
19169done
19170  done
19171IFS=$as_save_IFS
19172
19173  ;;
19174esac
19175fi
19176DSYMUTIL=$ac_cv_path_DSYMUTIL
19177if test -n "$DSYMUTIL"; then
19178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19179$as_echo "$DSYMUTIL" >&6; }
19180else
19181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19182$as_echo "no" >&6; }
19183fi
19184
19185
19186        if test "x$DSYMUTIL" = x; then
19187          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19188        fi
19189      else
19190        # Otherwise we believe it is a complete path. Use it as it is.
19191        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19192$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19194$as_echo_n "checking for DSYMUTIL... " >&6; }
19195        if test ! -x "$tool_specified"; then
19196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19197$as_echo "not found" >&6; }
19198          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19199        fi
19200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19201$as_echo "$tool_specified" >&6; }
19202      fi
19203    fi
19204  fi
19205
19206
19207
19208  if test "x$DSYMUTIL" = x; then
19209    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19210  fi
19211
19212
19213
19214
19215
19216  # Publish this variable in the help.
19217
19218
19219  if test "x$XATTR" = x; then
19220    # The variable is not set by user, try to locate tool using the code snippet
19221    for ac_prog in xattr
19222do
19223  # Extract the first word of "$ac_prog", so it can be a program name with args.
19224set dummy $ac_prog; ac_word=$2
19225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19226$as_echo_n "checking for $ac_word... " >&6; }
19227if ${ac_cv_path_XATTR+:} false; then :
19228  $as_echo_n "(cached) " >&6
19229else
19230  case $XATTR in
19231  [\\/]* | ?:[\\/]*)
19232  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19233  ;;
19234  *)
19235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19236for as_dir in $PATH
19237do
19238  IFS=$as_save_IFS
19239  test -z "$as_dir" && as_dir=.
19240    for ac_exec_ext in '' $ac_executable_extensions; do
19241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19242    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19244    break 2
19245  fi
19246done
19247  done
19248IFS=$as_save_IFS
19249
19250  ;;
19251esac
19252fi
19253XATTR=$ac_cv_path_XATTR
19254if test -n "$XATTR"; then
19255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19256$as_echo "$XATTR" >&6; }
19257else
19258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19259$as_echo "no" >&6; }
19260fi
19261
19262
19263  test -n "$XATTR" && break
19264done
19265
19266  else
19267    # The variable is set, but is it from the command line or the environment?
19268
19269    # Try to remove the string !XATTR! from our list.
19270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19272      # If it failed, the variable was not from the command line. Ignore it,
19273      # but warn the user (except for BASH, which is always set by the calling BASH).
19274      if test "xXATTR" != xBASH; then
19275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19276$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19277      fi
19278      # Try to locate tool using the code snippet
19279      for ac_prog in xattr
19280do
19281  # Extract the first word of "$ac_prog", so it can be a program name with args.
19282set dummy $ac_prog; ac_word=$2
19283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19284$as_echo_n "checking for $ac_word... " >&6; }
19285if ${ac_cv_path_XATTR+:} false; then :
19286  $as_echo_n "(cached) " >&6
19287else
19288  case $XATTR in
19289  [\\/]* | ?:[\\/]*)
19290  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19291  ;;
19292  *)
19293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19294for as_dir in $PATH
19295do
19296  IFS=$as_save_IFS
19297  test -z "$as_dir" && as_dir=.
19298    for ac_exec_ext in '' $ac_executable_extensions; do
19299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19300    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19302    break 2
19303  fi
19304done
19305  done
19306IFS=$as_save_IFS
19307
19308  ;;
19309esac
19310fi
19311XATTR=$ac_cv_path_XATTR
19312if test -n "$XATTR"; then
19313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19314$as_echo "$XATTR" >&6; }
19315else
19316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19317$as_echo "no" >&6; }
19318fi
19319
19320
19321  test -n "$XATTR" && break
19322done
19323
19324    else
19325      # If it succeeded, then it was overridden by the user. We will use it
19326      # for the tool.
19327
19328      # First remove it from the list of overridden variables, so we can test
19329      # for unknown variables in the end.
19330      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19331
19332      # Check if the provided tool contains a complete path.
19333      tool_specified="$XATTR"
19334      tool_basename="${tool_specified##*/}"
19335      if test "x$tool_basename" = "x$tool_specified"; then
19336        # A command without a complete path is provided, search $PATH.
19337        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19338$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19339        # Extract the first word of "$tool_basename", so it can be a program name with args.
19340set dummy $tool_basename; ac_word=$2
19341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19342$as_echo_n "checking for $ac_word... " >&6; }
19343if ${ac_cv_path_XATTR+:} false; then :
19344  $as_echo_n "(cached) " >&6
19345else
19346  case $XATTR in
19347  [\\/]* | ?:[\\/]*)
19348  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19349  ;;
19350  *)
19351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19352for as_dir in $PATH
19353do
19354  IFS=$as_save_IFS
19355  test -z "$as_dir" && as_dir=.
19356    for ac_exec_ext in '' $ac_executable_extensions; do
19357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19358    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19360    break 2
19361  fi
19362done
19363  done
19364IFS=$as_save_IFS
19365
19366  ;;
19367esac
19368fi
19369XATTR=$ac_cv_path_XATTR
19370if test -n "$XATTR"; then
19371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19372$as_echo "$XATTR" >&6; }
19373else
19374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19375$as_echo "no" >&6; }
19376fi
19377
19378
19379        if test "x$XATTR" = x; then
19380          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19381        fi
19382      else
19383        # Otherwise we believe it is a complete path. Use it as it is.
19384        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19385$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19386        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19387$as_echo_n "checking for XATTR... " >&6; }
19388        if test ! -x "$tool_specified"; then
19389          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19390$as_echo "not found" >&6; }
19391          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19392        fi
19393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19394$as_echo "$tool_specified" >&6; }
19395      fi
19396    fi
19397  fi
19398
19399
19400
19401  if test "x$XATTR" = x; then
19402    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19403  fi
19404
19405
19406
19407
19408  # Publish this variable in the help.
19409
19410
19411  if test "x$CODESIGN" = x; then
19412    # The variable is not set by user, try to locate tool using the code snippet
19413    for ac_prog in codesign
19414do
19415  # Extract the first word of "$ac_prog", so it can be a program name with args.
19416set dummy $ac_prog; ac_word=$2
19417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19418$as_echo_n "checking for $ac_word... " >&6; }
19419if ${ac_cv_path_CODESIGN+:} false; then :
19420  $as_echo_n "(cached) " >&6
19421else
19422  case $CODESIGN in
19423  [\\/]* | ?:[\\/]*)
19424  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19425  ;;
19426  *)
19427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19428for as_dir in $PATH
19429do
19430  IFS=$as_save_IFS
19431  test -z "$as_dir" && as_dir=.
19432    for ac_exec_ext in '' $ac_executable_extensions; do
19433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19434    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19436    break 2
19437  fi
19438done
19439  done
19440IFS=$as_save_IFS
19441
19442  ;;
19443esac
19444fi
19445CODESIGN=$ac_cv_path_CODESIGN
19446if test -n "$CODESIGN"; then
19447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19448$as_echo "$CODESIGN" >&6; }
19449else
19450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19451$as_echo "no" >&6; }
19452fi
19453
19454
19455  test -n "$CODESIGN" && break
19456done
19457
19458  else
19459    # The variable is set, but is it from the command line or the environment?
19460
19461    # Try to remove the string !CODESIGN! from our list.
19462    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19463    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19464      # If it failed, the variable was not from the command line. Ignore it,
19465      # but warn the user (except for BASH, which is always set by the calling BASH).
19466      if test "xCODESIGN" != xBASH; then
19467        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19468$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19469      fi
19470      # Try to locate tool using the code snippet
19471      for ac_prog in codesign
19472do
19473  # Extract the first word of "$ac_prog", so it can be a program name with args.
19474set dummy $ac_prog; ac_word=$2
19475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19476$as_echo_n "checking for $ac_word... " >&6; }
19477if ${ac_cv_path_CODESIGN+:} false; then :
19478  $as_echo_n "(cached) " >&6
19479else
19480  case $CODESIGN in
19481  [\\/]* | ?:[\\/]*)
19482  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19483  ;;
19484  *)
19485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19486for as_dir in $PATH
19487do
19488  IFS=$as_save_IFS
19489  test -z "$as_dir" && as_dir=.
19490    for ac_exec_ext in '' $ac_executable_extensions; do
19491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19492    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19494    break 2
19495  fi
19496done
19497  done
19498IFS=$as_save_IFS
19499
19500  ;;
19501esac
19502fi
19503CODESIGN=$ac_cv_path_CODESIGN
19504if test -n "$CODESIGN"; then
19505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19506$as_echo "$CODESIGN" >&6; }
19507else
19508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19509$as_echo "no" >&6; }
19510fi
19511
19512
19513  test -n "$CODESIGN" && break
19514done
19515
19516    else
19517      # If it succeeded, then it was overridden by the user. We will use it
19518      # for the tool.
19519
19520      # First remove it from the list of overridden variables, so we can test
19521      # for unknown variables in the end.
19522      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19523
19524      # Check if the provided tool contains a complete path.
19525      tool_specified="$CODESIGN"
19526      tool_basename="${tool_specified##*/}"
19527      if test "x$tool_basename" = "x$tool_specified"; then
19528        # A command without a complete path is provided, search $PATH.
19529        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19530$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19531        # Extract the first word of "$tool_basename", so it can be a program name with args.
19532set dummy $tool_basename; ac_word=$2
19533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19534$as_echo_n "checking for $ac_word... " >&6; }
19535if ${ac_cv_path_CODESIGN+:} false; then :
19536  $as_echo_n "(cached) " >&6
19537else
19538  case $CODESIGN in
19539  [\\/]* | ?:[\\/]*)
19540  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19541  ;;
19542  *)
19543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19544for as_dir in $PATH
19545do
19546  IFS=$as_save_IFS
19547  test -z "$as_dir" && as_dir=.
19548    for ac_exec_ext in '' $ac_executable_extensions; do
19549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19550    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19552    break 2
19553  fi
19554done
19555  done
19556IFS=$as_save_IFS
19557
19558  ;;
19559esac
19560fi
19561CODESIGN=$ac_cv_path_CODESIGN
19562if test -n "$CODESIGN"; then
19563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19564$as_echo "$CODESIGN" >&6; }
19565else
19566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19567$as_echo "no" >&6; }
19568fi
19569
19570
19571        if test "x$CODESIGN" = x; then
19572          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19573        fi
19574      else
19575        # Otherwise we believe it is a complete path. Use it as it is.
19576        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19577$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19578        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19579$as_echo_n "checking for CODESIGN... " >&6; }
19580        if test ! -x "$tool_specified"; then
19581          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19582$as_echo "not found" >&6; }
19583          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19584        fi
19585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19586$as_echo "$tool_specified" >&6; }
19587      fi
19588    fi
19589  fi
19590
19591
19592    if test "x$CODESIGN" != "x"; then
19593      # Verify that the openjdk_codesign certificate is present
19594      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19595$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19596      rm -f codesign-testfile
19597      touch codesign-testfile
19598      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19599      rm -f codesign-testfile
19600      if test "x$CODESIGN" = x; then
19601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19602$as_echo "no" >&6; }
19603      else
19604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19605$as_echo "yes" >&6; }
19606      fi
19607    fi
19608  fi
19609
19610
19611# Check if pkg-config is available.
19612
19613
19614if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19615	if test -n "$ac_tool_prefix"; then
19616  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19617set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19619$as_echo_n "checking for $ac_word... " >&6; }
19620if ${ac_cv_path_PKG_CONFIG+:} false; then :
19621  $as_echo_n "(cached) " >&6
19622else
19623  case $PKG_CONFIG in
19624  [\\/]* | ?:[\\/]*)
19625  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19626  ;;
19627  *)
19628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19629for as_dir in $PATH
19630do
19631  IFS=$as_save_IFS
19632  test -z "$as_dir" && as_dir=.
19633    for ac_exec_ext in '' $ac_executable_extensions; do
19634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19635    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19637    break 2
19638  fi
19639done
19640  done
19641IFS=$as_save_IFS
19642
19643  ;;
19644esac
19645fi
19646PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19647if test -n "$PKG_CONFIG"; then
19648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19649$as_echo "$PKG_CONFIG" >&6; }
19650else
19651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19652$as_echo "no" >&6; }
19653fi
19654
19655
19656fi
19657if test -z "$ac_cv_path_PKG_CONFIG"; then
19658  ac_pt_PKG_CONFIG=$PKG_CONFIG
19659  # Extract the first word of "pkg-config", so it can be a program name with args.
19660set dummy pkg-config; ac_word=$2
19661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19662$as_echo_n "checking for $ac_word... " >&6; }
19663if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19664  $as_echo_n "(cached) " >&6
19665else
19666  case $ac_pt_PKG_CONFIG in
19667  [\\/]* | ?:[\\/]*)
19668  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19669  ;;
19670  *)
19671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19672for as_dir in $PATH
19673do
19674  IFS=$as_save_IFS
19675  test -z "$as_dir" && as_dir=.
19676    for ac_exec_ext in '' $ac_executable_extensions; do
19677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19678    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19680    break 2
19681  fi
19682done
19683  done
19684IFS=$as_save_IFS
19685
19686  ;;
19687esac
19688fi
19689ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19690if test -n "$ac_pt_PKG_CONFIG"; then
19691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19692$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19693else
19694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19695$as_echo "no" >&6; }
19696fi
19697
19698  if test "x$ac_pt_PKG_CONFIG" = x; then
19699    PKG_CONFIG=""
19700  else
19701    case $cross_compiling:$ac_tool_warned in
19702yes:)
19703{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19704$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19705ac_tool_warned=yes ;;
19706esac
19707    PKG_CONFIG=$ac_pt_PKG_CONFIG
19708  fi
19709else
19710  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19711fi
19712
19713fi
19714if test -n "$PKG_CONFIG"; then
19715	_pkg_min_version=0.9.0
19716	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19717$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19718	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19719		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19720$as_echo "yes" >&6; }
19721	else
19722		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19723$as_echo "no" >&6; }
19724		PKG_CONFIG=""
19725	fi
19726
19727fi
19728
19729# After basic tools have been setup, we can check build os specific details.
19730
19731  ###############################################################################
19732
19733  # Note that this is the build platform OS version!
19734
19735  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19736  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19737  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19738  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19739
19740
19741
19742
19743
19744# Setup builddeps, for automatic downloading of tools we need.
19745# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19746# boot-jdk setup, but we need to have basic tools setup first.
19747
19748
19749# Check whether --with-builddeps-conf was given.
19750if test "${with_builddeps_conf+set}" = set; then :
19751  withval=$with_builddeps_conf;
19752fi
19753
19754
19755
19756# Check whether --with-builddeps-server was given.
19757if test "${with_builddeps_server+set}" = set; then :
19758  withval=$with_builddeps_server;
19759fi
19760
19761
19762
19763# Check whether --with-builddeps-dir was given.
19764if test "${with_builddeps_dir+set}" = set; then :
19765  withval=$with_builddeps_dir;
19766else
19767  with_builddeps_dir=/localhome/builddeps
19768fi
19769
19770
19771
19772# Check whether --with-builddeps-group was given.
19773if test "${with_builddeps_group+set}" = set; then :
19774  withval=$with_builddeps_group;
19775fi
19776
19777
19778
19779
19780  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19781    if test "x$with_builddeps_conf" != x; then
19782      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19783$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19784      builddepsfile=$with_builddeps_conf
19785      if test -s $builddepsfile; then
19786        . $builddepsfile
19787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19788$as_echo "loaded!" >&6; }
19789      else
19790        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19791      fi
19792    else
19793      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19794$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19795      builddepsfile=`mktemp`
19796      touch $builddepsfile
19797      # Put all found confs into a single file.
19798      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19799      # Source the file to acquire the variables
19800      if test -s $builddepsfile; then
19801        . $builddepsfile
19802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19803$as_echo "found at least one!" >&6; }
19804      else
19805        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19806      fi
19807    fi
19808    # Create build and target names that use _ instead of "-" and ".".
19809    # This is necessary to use them in variable names.
19810    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19811    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19812    # Extract rewrite information for build and target
19813    eval rewritten_build=\${REWRITE_${build_var}}
19814    if test "x$rewritten_build" = x; then
19815      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19816      echo Build stays the same $rewritten_build
19817    else
19818      echo Rewriting build for builddeps into $rewritten_build
19819    fi
19820    eval rewritten_target=\${REWRITE_${target_var}}
19821    if test "x$rewritten_target" = x; then
19822      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19823      echo Target stays the same $rewritten_target
19824    else
19825      echo Rewriting target for builddeps into $rewritten_target
19826    fi
19827    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19828    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19829  fi
19830  for ac_prog in 7z unzip
19831do
19832  # Extract the first word of "$ac_prog", so it can be a program name with args.
19833set dummy $ac_prog; ac_word=$2
19834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19835$as_echo_n "checking for $ac_word... " >&6; }
19836if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19837  $as_echo_n "(cached) " >&6
19838else
19839  if test -n "$BDEPS_UNZIP"; then
19840  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19841else
19842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19843for as_dir in $PATH
19844do
19845  IFS=$as_save_IFS
19846  test -z "$as_dir" && as_dir=.
19847    for ac_exec_ext in '' $ac_executable_extensions; do
19848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19849    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19851    break 2
19852  fi
19853done
19854  done
19855IFS=$as_save_IFS
19856
19857fi
19858fi
19859BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19860if test -n "$BDEPS_UNZIP"; then
19861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19862$as_echo "$BDEPS_UNZIP" >&6; }
19863else
19864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19865$as_echo "no" >&6; }
19866fi
19867
19868
19869  test -n "$BDEPS_UNZIP" && break
19870done
19871
19872  if test "x$BDEPS_UNZIP" = x7z; then
19873    BDEPS_UNZIP="7z x"
19874  fi
19875
19876  for ac_prog in wget lftp ftp
19877do
19878  # Extract the first word of "$ac_prog", so it can be a program name with args.
19879set dummy $ac_prog; ac_word=$2
19880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19881$as_echo_n "checking for $ac_word... " >&6; }
19882if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19883  $as_echo_n "(cached) " >&6
19884else
19885  if test -n "$BDEPS_FTP"; then
19886  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19887else
19888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19889for as_dir in $PATH
19890do
19891  IFS=$as_save_IFS
19892  test -z "$as_dir" && as_dir=.
19893    for ac_exec_ext in '' $ac_executable_extensions; do
19894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19895    ac_cv_prog_BDEPS_FTP="$ac_prog"
19896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19897    break 2
19898  fi
19899done
19900  done
19901IFS=$as_save_IFS
19902
19903fi
19904fi
19905BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19906if test -n "$BDEPS_FTP"; then
19907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19908$as_echo "$BDEPS_FTP" >&6; }
19909else
19910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19911$as_echo "no" >&6; }
19912fi
19913
19914
19915  test -n "$BDEPS_FTP" && break
19916done
19917
19918
19919
19920###############################################################################
19921#
19922# Determine OpenJDK variants, options and version numbers.
19923#
19924###############################################################################
19925
19926# We need build & target for this.
19927
19928
19929  ###############################################################################
19930  #
19931  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19932  # We always build headless support.
19933  #
19934  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19935$as_echo_n "checking headful support... " >&6; }
19936  # Check whether --enable-headful was given.
19937if test "${enable_headful+set}" = set; then :
19938  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19939else
19940  SUPPORT_HEADFUL=yes
19941fi
19942
19943
19944  SUPPORT_HEADLESS=yes
19945  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19946
19947  if test "x$SUPPORT_HEADFUL" = xyes; then
19948    # We are building both headful and headless.
19949    headful_msg="include support for both headful and headless"
19950  fi
19951
19952  if test "x$SUPPORT_HEADFUL" = xno; then
19953    # Thus we are building headless only.
19954    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19955    headful_msg="headless only"
19956  fi
19957
19958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19959$as_echo "$headful_msg" >&6; }
19960
19961
19962
19963
19964
19965  # Control wether Hotspot runs Queens test after build.
19966  # Check whether --enable-hotspot-test-in-build was given.
19967if test "${enable_hotspot_test_in_build+set}" = set; then :
19968  enableval=$enable_hotspot_test_in_build;
19969else
19970  enable_hotspot_test_in_build=no
19971fi
19972
19973  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19974    TEST_IN_BUILD=true
19975  else
19976    TEST_IN_BUILD=false
19977  fi
19978
19979
19980  ###############################################################################
19981  #
19982  # Choose cacerts source file
19983  #
19984
19985# Check whether --with-cacerts-file was given.
19986if test "${with_cacerts_file+set}" = set; then :
19987  withval=$with_cacerts_file;
19988fi
19989
19990  if test "x$with_cacerts_file" != x; then
19991    CACERTS_FILE=$with_cacerts_file
19992  fi
19993
19994
19995  ###############################################################################
19996  #
19997  # Enable or disable unlimited crypto
19998  #
19999  # Check whether --enable-unlimited-crypto was given.
20000if test "${enable_unlimited_crypto+set}" = set; then :
20001  enableval=$enable_unlimited_crypto;
20002else
20003  enable_unlimited_crypto=no
20004fi
20005
20006  if test "x$enable_unlimited_crypto" = "xyes"; then
20007    UNLIMITED_CRYPTO=true
20008  else
20009    UNLIMITED_CRYPTO=false
20010  fi
20011
20012
20013  ###############################################################################
20014  #
20015  # Enable or disable the elliptic curve crypto implementation
20016  #
20017
20018
20019  ###############################################################################
20020  #
20021  # --enable-rmiconnector-iiop
20022  #
20023  # Check whether --enable-rmiconnector-iiop was given.
20024if test "${enable_rmiconnector_iiop+set}" = set; then :
20025  enableval=$enable_rmiconnector_iiop;
20026fi
20027
20028  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20029    RMICONNECTOR_IIOP=true
20030  else
20031    RMICONNECTOR_IIOP=false
20032  fi
20033
20034
20035  ###############################################################################
20036  #
20037  # Compress jars
20038  #
20039  COMPRESS_JARS=false
20040
20041
20042
20043
20044  # Source the version numbers
20045  . $AUTOCONF_DIR/version-numbers
20046
20047  # Get the settings from parameters
20048
20049# Check whether --with-milestone was given.
20050if test "${with_milestone+set}" = set; then :
20051  withval=$with_milestone;
20052fi
20053
20054  if test "x$with_milestone" = xyes; then
20055    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20056  elif test "x$with_milestone" != x; then
20057    MILESTONE="$with_milestone"
20058  fi
20059  if test "x$MILESTONE" = x; then
20060    MILESTONE=internal
20061  fi
20062
20063
20064# Check whether --with-update-version was given.
20065if test "${with_update_version+set}" = set; then :
20066  withval=$with_update_version;
20067fi
20068
20069  if test "x$with_update_version" = xyes; then
20070    as_fn_error $? "Update version must have a value" "$LINENO" 5
20071  elif test "x$with_update_version" != x; then
20072    JDK_UPDATE_VERSION="$with_update_version"
20073    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20074    # to a bug in expr (which reduces it to just X). To work around this, we
20075    # always add a 0 to one digit update versions.
20076    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20077      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20078    fi
20079  fi
20080
20081
20082# Check whether --with-user-release-suffix was given.
20083if test "${with_user_release_suffix+set}" = set; then :
20084  withval=$with_user_release_suffix;
20085fi
20086
20087  if test "x$with_user_release_suffix" = xyes; then
20088    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20089  elif test "x$with_user_release_suffix" != x; then
20090    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20091  fi
20092
20093
20094# Check whether --with-build-number was given.
20095if test "${with_build_number+set}" = set; then :
20096  withval=$with_build_number;
20097fi
20098
20099  if test "x$with_build_number" = xyes; then
20100    as_fn_error $? "Build number must have a value" "$LINENO" 5
20101  elif test "x$with_build_number" != x; then
20102    JDK_BUILD_NUMBER="$with_build_number"
20103  fi
20104  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20105  if test "x$JDK_BUILD_NUMBER" = x; then
20106    JDK_BUILD_NUMBER=b00
20107    if test "x$USER_RELEASE_SUFFIX" = x; then
20108      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20109      # Avoid [:alnum:] since it depends on the locale.
20110      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20111      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20112    fi
20113  fi
20114
20115  # Now set the JDK version, milestone, build number etc.
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131  COPYRIGHT_YEAR=`date +'%Y'`
20132
20133
20134  if test "x$JDK_UPDATE_VERSION" != x; then
20135    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20136  else
20137    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20138  fi
20139
20140
20141  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20142
20143
20144
20145###############################################################################
20146#
20147# Setup BootJDK, used to bootstrap the build.
20148#
20149###############################################################################
20150
20151
20152  BOOT_JDK_FOUND=no
20153
20154# Check whether --with-boot-jdk was given.
20155if test "${with_boot_jdk+set}" = set; then :
20156  withval=$with_boot_jdk;
20157fi
20158
20159
20160  # We look for the Boot JDK through various means, going from more certain to
20161  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20162  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20163  # must check if this is indeed valid; otherwise we'll continue looking.
20164
20165  # Test: Is bootjdk explicitely set by command line arguments?
20166
20167  if test "x$BOOT_JDK_FOUND" = xno; then
20168    # Now execute the test
20169
20170  if test "x$with_boot_jdk" != x; then
20171    BOOT_JDK=$with_boot_jdk
20172    BOOT_JDK_FOUND=maybe
20173    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20174$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20175  fi
20176
20177
20178    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20179    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20180      # Do we have a bin/java?
20181      if test ! -x "$BOOT_JDK/bin/java"; then
20182        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20184        BOOT_JDK_FOUND=no
20185      else
20186        # Do we have a bin/javac?
20187        if test ! -x "$BOOT_JDK/bin/javac"; then
20188          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20190          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20191$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20192          BOOT_JDK_FOUND=no
20193        else
20194          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20195          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20196            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20198            BOOT_JDK_FOUND=no
20199          else
20200            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20201            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20202
20203            # Extra M4 quote needed to protect [] in grep expression.
20204            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20205            if test "x$FOUND_CORRECT_VERSION" = x; then
20206              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20208              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20209$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20210              BOOT_JDK_FOUND=no
20211            else
20212              # We're done! :-)
20213              BOOT_JDK_FOUND=yes
20214
20215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20216
20217  # Input might be given as Windows format, start by converting to
20218  # unix format.
20219  path="$BOOT_JDK"
20220  new_path=`$CYGPATH -u "$path"`
20221
20222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20225  # "foo.exe" is OK but "foo" is an error.
20226  #
20227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20228  # It is also a way to make sure we got the proper file name for the real test later on.
20229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20230  if test "x$test_shortpath" = x; then
20231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20233    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20234  fi
20235
20236  # Call helper function which possibly converts this using DOS-style short mode.
20237  # If so, the updated path is stored in $new_path.
20238
20239  input_path="$new_path"
20240  # Check if we need to convert this using DOS-style short mode. If the path
20241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20242  # take no chances and rewrite it.
20243  # Note: m4 eats our [], so we need to use [ and ] instead.
20244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20245  if test "x$has_forbidden_chars" != x; then
20246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20250      # Going to short mode and back again did indeed matter. Since short mode is
20251      # case insensitive, let's make it lowercase to improve readability.
20252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20253      # Now convert it back to Unix-stile (cygpath)
20254      input_path=`$CYGPATH -u "$shortmode_path"`
20255      new_path="$input_path"
20256    fi
20257  fi
20258
20259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20260  if test "x$test_cygdrive_prefix" = x; then
20261    # As a simple fix, exclude /usr/bin since it's not a real path.
20262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20264      # a path prefixed by /cygdrive for fixpath to work.
20265      new_path="$CYGWIN_ROOT_PATH$input_path"
20266    fi
20267  fi
20268
20269
20270  if test "x$path" != "x$new_path"; then
20271    BOOT_JDK="$new_path"
20272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20273$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20274  fi
20275
20276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20277
20278  path="$BOOT_JDK"
20279  has_colon=`$ECHO $path | $GREP ^.:`
20280  new_path="$path"
20281  if test "x$has_colon" = x; then
20282    # Not in mixed or Windows style, start by that.
20283    new_path=`cmd //c echo $path`
20284  fi
20285
20286
20287  input_path="$new_path"
20288  # Check if we need to convert this using DOS-style short mode. If the path
20289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20290  # take no chances and rewrite it.
20291  # Note: m4 eats our [], so we need to use [ and ] instead.
20292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20293  if test "x$has_forbidden_chars" != x; then
20294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20296  fi
20297
20298
20299  windows_path="$new_path"
20300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20301    unix_path=`$CYGPATH -u "$windows_path"`
20302    new_path="$unix_path"
20303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20305    new_path="$unix_path"
20306  fi
20307
20308  if test "x$path" != "x$new_path"; then
20309    BOOT_JDK="$new_path"
20310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20311$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20312  fi
20313
20314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20316
20317  else
20318    # We're on a posix platform. Hooray! :)
20319    path="$BOOT_JDK"
20320    has_space=`$ECHO "$path" | $GREP " "`
20321    if test "x$has_space" != x; then
20322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20324      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20325    fi
20326
20327    # Use eval to expand a potential ~
20328    eval path="$path"
20329    if test ! -f "$path" && test ! -d "$path"; then
20330      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20331    fi
20332
20333    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20334  fi
20335
20336              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20337$as_echo_n "checking for Boot JDK... " >&6; }
20338              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20339$as_echo "$BOOT_JDK" >&6; }
20340              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20341$as_echo_n "checking Boot JDK version... " >&6; }
20342              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20343              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20344$as_echo "$BOOT_JDK_VERSION" >&6; }
20345            fi # end check jdk version
20346          fi # end check rt.jar
20347        fi # end check javac
20348      fi # end check java
20349    fi # end check boot jdk found
20350  fi
20351
20352  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20353    # Having specified an argument which is incorrect will produce an instant failure;
20354    # we should not go on looking
20355    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20356  fi
20357
20358  # Test: Is bootjdk available from builddeps?
20359
20360  if test "x$BOOT_JDK_FOUND" = xno; then
20361    # Now execute the test
20362
20363
20364
20365  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20366    # Source the builddeps file again, to make sure it uses the latest variables!
20367    . $builddepsfile
20368    # Look for a target and build machine specific resource!
20369    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20370    if test "x$resource" = x; then
20371      # Ok, lets instead look for a target specific resource
20372      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20373    fi
20374    if test "x$resource" = x; then
20375      # Ok, lets instead look for a build specific resource
20376      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20377    fi
20378    if test "x$resource" = x; then
20379      # Ok, lets instead look for a generic resource
20380      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20381      resource=${builddep_bootjdk}
20382    fi
20383    if test "x$resource" != x; then
20384      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20385$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20386      # If the resource in the builddeps.conf file is an existing directory,
20387      # for example /java/linux/cups
20388      if test -d ${resource}; then
20389        depdir=${resource}
20390      else
20391
20392  # bootjdk is for example mymodule
20393  # $resource is for example libs/general/libmymod_1_2_3.zip
20394  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20395  # $with_builddeps_dir is for example /localhome/builddeps
20396  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20397  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20398  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20399  filename=`basename $resource`
20400  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20401  filebase=${filename%%.*}
20402  extension=${filename#*.}
20403  installdir=$with_builddeps_dir/$filebase
20404  if test ! -f $installdir/$filename.unpacked; then
20405    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20406$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20407    if test ! -d $installdir; then
20408      mkdir -p $installdir
20409    fi
20410    if test ! -d $installdir; then
20411      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20412    fi
20413    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20414    touch $tmpfile
20415    if test ! -f $tmpfile; then
20416      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20417    fi
20418
20419  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20420  # $tmpfile is the local file name for the downloaded file.
20421  VALID_TOOL=no
20422  if test "x$BDEPS_FTP" = xwget; then
20423    VALID_TOOL=yes
20424    wget -O $tmpfile $with_builddeps_server/$resource
20425  fi
20426  if test "x$BDEPS_FTP" = xlftp; then
20427    VALID_TOOL=yes
20428    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20429  fi
20430  if test "x$BDEPS_FTP" = xftp; then
20431    VALID_TOOL=yes
20432    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20433    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20434    FTPUSERPWD=${FTPSERVER%%@*}
20435    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20436      FTPUSER=${userpwd%%:*}
20437      FTPPWD=${userpwd#*@}
20438      FTPSERVER=${FTPSERVER#*@}
20439    else
20440      FTPUSER=ftp
20441      FTPPWD=ftp
20442    fi
20443    # the "pass" command does not work on some
20444    # ftp clients (read ftp.exe) but if it works,
20445    # passive mode is better!
20446    ( \
20447        echo "user $FTPUSER $FTPPWD"        ; \
20448        echo "pass"                         ; \
20449        echo "bin"                          ; \
20450        echo "get $FTPPATH $tmpfile"              ; \
20451    ) | ftp -in $FTPSERVER
20452  fi
20453  if test "x$VALID_TOOL" != xyes; then
20454    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20455  fi
20456
20457    mv $tmpfile $installdir/$filename
20458    if test ! -s $installdir/$filename; then
20459      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20460    fi
20461    case "$extension" in
20462      zip)  echo "Unzipping $installdir/$filename..."
20463        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20464        ;;
20465      tar.gz) echo "Untaring $installdir/$filename..."
20466        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20467        ;;
20468      tgz) echo "Untaring $installdir/$filename..."
20469        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20470        ;;
20471      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20472        ;;
20473    esac
20474  fi
20475  if test -f $installdir/$filename.unpacked; then
20476    depdir=$installdir
20477  fi
20478
20479      fi
20480      # Source the builddeps file again, because in the previous command, the depdir
20481      # was updated to point at the current build dependency install directory.
20482      . $builddepsfile
20483      # Now extract variables from the builddeps.conf files.
20484      theroot=${builddep_bootjdk_ROOT}
20485      thecflags=${builddep_bootjdk_CFLAGS}
20486      thelibs=${builddep_bootjdk_LIBS}
20487      if test "x$depdir" = x; then
20488        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20489      fi
20490      BOOT_JDK=$depdir
20491      if test "x$theroot" != x; then
20492        BOOT_JDK="$theroot"
20493      fi
20494      if test "x$thecflags" != x; then
20495        BOOT_JDK_CFLAGS="$thecflags"
20496      fi
20497      if test "x$thelibs" != x; then
20498        BOOT_JDK_LIBS="$thelibs"
20499      fi
20500      BOOT_JDK_FOUND=maybe
20501      else BOOT_JDK_FOUND=no
20502
20503    fi
20504    else BOOT_JDK_FOUND=no
20505
20506  fi
20507
20508
20509
20510    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20511    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20512      # Do we have a bin/java?
20513      if test ! -x "$BOOT_JDK/bin/java"; then
20514        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20516        BOOT_JDK_FOUND=no
20517      else
20518        # Do we have a bin/javac?
20519        if test ! -x "$BOOT_JDK/bin/javac"; then
20520          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20522          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20523$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20524          BOOT_JDK_FOUND=no
20525        else
20526          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20527          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20528            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20530            BOOT_JDK_FOUND=no
20531          else
20532            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20533            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20534
20535            # Extra M4 quote needed to protect [] in grep expression.
20536            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20537            if test "x$FOUND_CORRECT_VERSION" = x; then
20538              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20540              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20541$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20542              BOOT_JDK_FOUND=no
20543            else
20544              # We're done! :-)
20545              BOOT_JDK_FOUND=yes
20546
20547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20548
20549  # Input might be given as Windows format, start by converting to
20550  # unix format.
20551  path="$BOOT_JDK"
20552  new_path=`$CYGPATH -u "$path"`
20553
20554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20557  # "foo.exe" is OK but "foo" is an error.
20558  #
20559  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20560  # It is also a way to make sure we got the proper file name for the real test later on.
20561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20562  if test "x$test_shortpath" = x; then
20563    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20564$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20565    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20566  fi
20567
20568  # Call helper function which possibly converts this using DOS-style short mode.
20569  # If so, the updated path is stored in $new_path.
20570
20571  input_path="$new_path"
20572  # Check if we need to convert this using DOS-style short mode. If the path
20573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20574  # take no chances and rewrite it.
20575  # Note: m4 eats our [], so we need to use [ and ] instead.
20576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20577  if test "x$has_forbidden_chars" != x; then
20578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20582      # Going to short mode and back again did indeed matter. Since short mode is
20583      # case insensitive, let's make it lowercase to improve readability.
20584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20585      # Now convert it back to Unix-stile (cygpath)
20586      input_path=`$CYGPATH -u "$shortmode_path"`
20587      new_path="$input_path"
20588    fi
20589  fi
20590
20591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20592  if test "x$test_cygdrive_prefix" = x; then
20593    # As a simple fix, exclude /usr/bin since it's not a real path.
20594    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20596      # a path prefixed by /cygdrive for fixpath to work.
20597      new_path="$CYGWIN_ROOT_PATH$input_path"
20598    fi
20599  fi
20600
20601
20602  if test "x$path" != "x$new_path"; then
20603    BOOT_JDK="$new_path"
20604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20605$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20606  fi
20607
20608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20609
20610  path="$BOOT_JDK"
20611  has_colon=`$ECHO $path | $GREP ^.:`
20612  new_path="$path"
20613  if test "x$has_colon" = x; then
20614    # Not in mixed or Windows style, start by that.
20615    new_path=`cmd //c echo $path`
20616  fi
20617
20618
20619  input_path="$new_path"
20620  # Check if we need to convert this using DOS-style short mode. If the path
20621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20622  # take no chances and rewrite it.
20623  # Note: m4 eats our [], so we need to use [ and ] instead.
20624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20625  if test "x$has_forbidden_chars" != x; then
20626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20628  fi
20629
20630
20631  windows_path="$new_path"
20632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20633    unix_path=`$CYGPATH -u "$windows_path"`
20634    new_path="$unix_path"
20635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20637    new_path="$unix_path"
20638  fi
20639
20640  if test "x$path" != "x$new_path"; then
20641    BOOT_JDK="$new_path"
20642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20643$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20644  fi
20645
20646  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20647  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20648
20649  else
20650    # We're on a posix platform. Hooray! :)
20651    path="$BOOT_JDK"
20652    has_space=`$ECHO "$path" | $GREP " "`
20653    if test "x$has_space" != x; then
20654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20655$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20656      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20657    fi
20658
20659    # Use eval to expand a potential ~
20660    eval path="$path"
20661    if test ! -f "$path" && test ! -d "$path"; then
20662      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20663    fi
20664
20665    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20666  fi
20667
20668              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20669$as_echo_n "checking for Boot JDK... " >&6; }
20670              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20671$as_echo "$BOOT_JDK" >&6; }
20672              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20673$as_echo_n "checking Boot JDK version... " >&6; }
20674              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20675              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20676$as_echo "$BOOT_JDK_VERSION" >&6; }
20677            fi # end check jdk version
20678          fi # end check rt.jar
20679        fi # end check javac
20680      fi # end check java
20681    fi # end check boot jdk found
20682  fi
20683
20684
20685  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20686
20687  if test "x$BOOT_JDK_FOUND" = xno; then
20688    # Now execute the test
20689
20690  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20691    # First check at user selected default
20692
20693  if test "x$BOOT_JDK_FOUND" = xno; then
20694    # Now execute the test
20695
20696  if test -x /usr/libexec/java_home; then
20697    BOOT_JDK=`/usr/libexec/java_home `
20698    BOOT_JDK_FOUND=maybe
20699    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20700$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20701  fi
20702
20703
20704    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20705    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20706      # Do we have a bin/java?
20707      if test ! -x "$BOOT_JDK/bin/java"; then
20708        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20710        BOOT_JDK_FOUND=no
20711      else
20712        # Do we have a bin/javac?
20713        if test ! -x "$BOOT_JDK/bin/javac"; then
20714          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20716          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20717$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20718          BOOT_JDK_FOUND=no
20719        else
20720          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20721          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20722            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20724            BOOT_JDK_FOUND=no
20725          else
20726            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20727            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20728
20729            # Extra M4 quote needed to protect [] in grep expression.
20730            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20731            if test "x$FOUND_CORRECT_VERSION" = x; then
20732              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20734              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20735$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20736              BOOT_JDK_FOUND=no
20737            else
20738              # We're done! :-)
20739              BOOT_JDK_FOUND=yes
20740
20741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20742
20743  # Input might be given as Windows format, start by converting to
20744  # unix format.
20745  path="$BOOT_JDK"
20746  new_path=`$CYGPATH -u "$path"`
20747
20748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20751  # "foo.exe" is OK but "foo" is an error.
20752  #
20753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20754  # It is also a way to make sure we got the proper file name for the real test later on.
20755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20756  if test "x$test_shortpath" = x; then
20757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20758$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20759    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20760  fi
20761
20762  # Call helper function which possibly converts this using DOS-style short mode.
20763  # If so, the updated path is stored in $new_path.
20764
20765  input_path="$new_path"
20766  # Check if we need to convert this using DOS-style short mode. If the path
20767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20768  # take no chances and rewrite it.
20769  # Note: m4 eats our [], so we need to use [ and ] instead.
20770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20771  if test "x$has_forbidden_chars" != x; then
20772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20776      # Going to short mode and back again did indeed matter. Since short mode is
20777      # case insensitive, let's make it lowercase to improve readability.
20778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20779      # Now convert it back to Unix-stile (cygpath)
20780      input_path=`$CYGPATH -u "$shortmode_path"`
20781      new_path="$input_path"
20782    fi
20783  fi
20784
20785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20786  if test "x$test_cygdrive_prefix" = x; then
20787    # As a simple fix, exclude /usr/bin since it's not a real path.
20788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20790      # a path prefixed by /cygdrive for fixpath to work.
20791      new_path="$CYGWIN_ROOT_PATH$input_path"
20792    fi
20793  fi
20794
20795
20796  if test "x$path" != "x$new_path"; then
20797    BOOT_JDK="$new_path"
20798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20799$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20800  fi
20801
20802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20803
20804  path="$BOOT_JDK"
20805  has_colon=`$ECHO $path | $GREP ^.:`
20806  new_path="$path"
20807  if test "x$has_colon" = x; then
20808    # Not in mixed or Windows style, start by that.
20809    new_path=`cmd //c echo $path`
20810  fi
20811
20812
20813  input_path="$new_path"
20814  # Check if we need to convert this using DOS-style short mode. If the path
20815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20816  # take no chances and rewrite it.
20817  # Note: m4 eats our [], so we need to use [ and ] instead.
20818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20819  if test "x$has_forbidden_chars" != x; then
20820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20822  fi
20823
20824
20825  windows_path="$new_path"
20826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20827    unix_path=`$CYGPATH -u "$windows_path"`
20828    new_path="$unix_path"
20829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20831    new_path="$unix_path"
20832  fi
20833
20834  if test "x$path" != "x$new_path"; then
20835    BOOT_JDK="$new_path"
20836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20837$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20838  fi
20839
20840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20842
20843  else
20844    # We're on a posix platform. Hooray! :)
20845    path="$BOOT_JDK"
20846    has_space=`$ECHO "$path" | $GREP " "`
20847    if test "x$has_space" != x; then
20848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20850      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20851    fi
20852
20853    # Use eval to expand a potential ~
20854    eval path="$path"
20855    if test ! -f "$path" && test ! -d "$path"; then
20856      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20857    fi
20858
20859    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20860  fi
20861
20862              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20863$as_echo_n "checking for Boot JDK... " >&6; }
20864              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20865$as_echo "$BOOT_JDK" >&6; }
20866              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20867$as_echo_n "checking Boot JDK version... " >&6; }
20868              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20869              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20870$as_echo "$BOOT_JDK_VERSION" >&6; }
20871            fi # end check jdk version
20872          fi # end check rt.jar
20873        fi # end check javac
20874      fi # end check java
20875    fi # end check boot jdk found
20876  fi
20877
20878    # If that did not work out (e.g. too old), try explicit versions instead
20879
20880  if test "x$BOOT_JDK_FOUND" = xno; then
20881    # Now execute the test
20882
20883  if test -x /usr/libexec/java_home; then
20884    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20885    BOOT_JDK_FOUND=maybe
20886    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20887$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20888  fi
20889
20890
20891    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20892    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20893      # Do we have a bin/java?
20894      if test ! -x "$BOOT_JDK/bin/java"; then
20895        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20896$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20897        BOOT_JDK_FOUND=no
20898      else
20899        # Do we have a bin/javac?
20900        if test ! -x "$BOOT_JDK/bin/javac"; then
20901          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20903          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20904$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20905          BOOT_JDK_FOUND=no
20906        else
20907          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20908          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20909            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20911            BOOT_JDK_FOUND=no
20912          else
20913            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20914            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20915
20916            # Extra M4 quote needed to protect [] in grep expression.
20917            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20918            if test "x$FOUND_CORRECT_VERSION" = x; then
20919              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20920$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20921              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20922$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20923              BOOT_JDK_FOUND=no
20924            else
20925              # We're done! :-)
20926              BOOT_JDK_FOUND=yes
20927
20928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20929
20930  # Input might be given as Windows format, start by converting to
20931  # unix format.
20932  path="$BOOT_JDK"
20933  new_path=`$CYGPATH -u "$path"`
20934
20935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20938  # "foo.exe" is OK but "foo" is an error.
20939  #
20940  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20941  # It is also a way to make sure we got the proper file name for the real test later on.
20942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20943  if test "x$test_shortpath" = x; then
20944    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20945$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20946    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20947  fi
20948
20949  # Call helper function which possibly converts this using DOS-style short mode.
20950  # If so, the updated path is stored in $new_path.
20951
20952  input_path="$new_path"
20953  # Check if we need to convert this using DOS-style short mode. If the path
20954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20955  # take no chances and rewrite it.
20956  # Note: m4 eats our [], so we need to use [ and ] instead.
20957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20958  if test "x$has_forbidden_chars" != x; then
20959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20963      # Going to short mode and back again did indeed matter. Since short mode is
20964      # case insensitive, let's make it lowercase to improve readability.
20965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20966      # Now convert it back to Unix-stile (cygpath)
20967      input_path=`$CYGPATH -u "$shortmode_path"`
20968      new_path="$input_path"
20969    fi
20970  fi
20971
20972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20973  if test "x$test_cygdrive_prefix" = x; then
20974    # As a simple fix, exclude /usr/bin since it's not a real path.
20975    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20977      # a path prefixed by /cygdrive for fixpath to work.
20978      new_path="$CYGWIN_ROOT_PATH$input_path"
20979    fi
20980  fi
20981
20982
20983  if test "x$path" != "x$new_path"; then
20984    BOOT_JDK="$new_path"
20985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20986$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20987  fi
20988
20989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20990
20991  path="$BOOT_JDK"
20992  has_colon=`$ECHO $path | $GREP ^.:`
20993  new_path="$path"
20994  if test "x$has_colon" = x; then
20995    # Not in mixed or Windows style, start by that.
20996    new_path=`cmd //c echo $path`
20997  fi
20998
20999
21000  input_path="$new_path"
21001  # Check if we need to convert this using DOS-style short mode. If the path
21002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21003  # take no chances and rewrite it.
21004  # Note: m4 eats our [], so we need to use [ and ] instead.
21005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21006  if test "x$has_forbidden_chars" != x; then
21007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21009  fi
21010
21011
21012  windows_path="$new_path"
21013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21014    unix_path=`$CYGPATH -u "$windows_path"`
21015    new_path="$unix_path"
21016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21018    new_path="$unix_path"
21019  fi
21020
21021  if test "x$path" != "x$new_path"; then
21022    BOOT_JDK="$new_path"
21023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21024$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21025  fi
21026
21027  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21028  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21029
21030  else
21031    # We're on a posix platform. Hooray! :)
21032    path="$BOOT_JDK"
21033    has_space=`$ECHO "$path" | $GREP " "`
21034    if test "x$has_space" != x; then
21035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21036$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21037      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21038    fi
21039
21040    # Use eval to expand a potential ~
21041    eval path="$path"
21042    if test ! -f "$path" && test ! -d "$path"; then
21043      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21044    fi
21045
21046    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21047  fi
21048
21049              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21050$as_echo_n "checking for Boot JDK... " >&6; }
21051              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21052$as_echo "$BOOT_JDK" >&6; }
21053              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21054$as_echo_n "checking Boot JDK version... " >&6; }
21055              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21056              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21057$as_echo "$BOOT_JDK_VERSION" >&6; }
21058            fi # end check jdk version
21059          fi # end check rt.jar
21060        fi # end check javac
21061      fi # end check java
21062    fi # end check boot jdk found
21063  fi
21064
21065
21066  if test "x$BOOT_JDK_FOUND" = xno; then
21067    # Now execute the test
21068
21069  if test -x /usr/libexec/java_home; then
21070    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21071    BOOT_JDK_FOUND=maybe
21072    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21073$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21074  fi
21075
21076
21077    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21078    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21079      # Do we have a bin/java?
21080      if test ! -x "$BOOT_JDK/bin/java"; then
21081        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21082$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21083        BOOT_JDK_FOUND=no
21084      else
21085        # Do we have a bin/javac?
21086        if test ! -x "$BOOT_JDK/bin/javac"; then
21087          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21088$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21089          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21090$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21091          BOOT_JDK_FOUND=no
21092        else
21093          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21094          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21095            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21097            BOOT_JDK_FOUND=no
21098          else
21099            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21100            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21101
21102            # Extra M4 quote needed to protect [] in grep expression.
21103            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21104            if test "x$FOUND_CORRECT_VERSION" = x; then
21105              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21107              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21108$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21109              BOOT_JDK_FOUND=no
21110            else
21111              # We're done! :-)
21112              BOOT_JDK_FOUND=yes
21113
21114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21115
21116  # Input might be given as Windows format, start by converting to
21117  # unix format.
21118  path="$BOOT_JDK"
21119  new_path=`$CYGPATH -u "$path"`
21120
21121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21124  # "foo.exe" is OK but "foo" is an error.
21125  #
21126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21127  # It is also a way to make sure we got the proper file name for the real test later on.
21128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21129  if test "x$test_shortpath" = x; then
21130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21131$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21132    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21133  fi
21134
21135  # Call helper function which possibly converts this using DOS-style short mode.
21136  # If so, the updated path is stored in $new_path.
21137
21138  input_path="$new_path"
21139  # Check if we need to convert this using DOS-style short mode. If the path
21140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21141  # take no chances and rewrite it.
21142  # Note: m4 eats our [], so we need to use [ and ] instead.
21143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21144  if test "x$has_forbidden_chars" != x; then
21145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21149      # Going to short mode and back again did indeed matter. Since short mode is
21150      # case insensitive, let's make it lowercase to improve readability.
21151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21152      # Now convert it back to Unix-stile (cygpath)
21153      input_path=`$CYGPATH -u "$shortmode_path"`
21154      new_path="$input_path"
21155    fi
21156  fi
21157
21158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21159  if test "x$test_cygdrive_prefix" = x; then
21160    # As a simple fix, exclude /usr/bin since it's not a real path.
21161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21163      # a path prefixed by /cygdrive for fixpath to work.
21164      new_path="$CYGWIN_ROOT_PATH$input_path"
21165    fi
21166  fi
21167
21168
21169  if test "x$path" != "x$new_path"; then
21170    BOOT_JDK="$new_path"
21171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21172$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21173  fi
21174
21175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21176
21177  path="$BOOT_JDK"
21178  has_colon=`$ECHO $path | $GREP ^.:`
21179  new_path="$path"
21180  if test "x$has_colon" = x; then
21181    # Not in mixed or Windows style, start by that.
21182    new_path=`cmd //c echo $path`
21183  fi
21184
21185
21186  input_path="$new_path"
21187  # Check if we need to convert this using DOS-style short mode. If the path
21188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21189  # take no chances and rewrite it.
21190  # Note: m4 eats our [], so we need to use [ and ] instead.
21191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21192  if test "x$has_forbidden_chars" != x; then
21193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21195  fi
21196
21197
21198  windows_path="$new_path"
21199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21200    unix_path=`$CYGPATH -u "$windows_path"`
21201    new_path="$unix_path"
21202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21204    new_path="$unix_path"
21205  fi
21206
21207  if test "x$path" != "x$new_path"; then
21208    BOOT_JDK="$new_path"
21209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21210$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21211  fi
21212
21213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21215
21216  else
21217    # We're on a posix platform. Hooray! :)
21218    path="$BOOT_JDK"
21219    has_space=`$ECHO "$path" | $GREP " "`
21220    if test "x$has_space" != x; then
21221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21222$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21223      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21224    fi
21225
21226    # Use eval to expand a potential ~
21227    eval path="$path"
21228    if test ! -f "$path" && test ! -d "$path"; then
21229      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21230    fi
21231
21232    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21233  fi
21234
21235              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21236$as_echo_n "checking for Boot JDK... " >&6; }
21237              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21238$as_echo "$BOOT_JDK" >&6; }
21239              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21240$as_echo_n "checking Boot JDK version... " >&6; }
21241              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21242              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21243$as_echo "$BOOT_JDK_VERSION" >&6; }
21244            fi # end check jdk version
21245          fi # end check rt.jar
21246        fi # end check javac
21247      fi # end check java
21248    fi # end check boot jdk found
21249  fi
21250
21251
21252  if test "x$BOOT_JDK_FOUND" = xno; then
21253    # Now execute the test
21254
21255  if test -x /usr/libexec/java_home; then
21256    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21257    BOOT_JDK_FOUND=maybe
21258    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21259$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21260  fi
21261
21262
21263    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21264    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21265      # Do we have a bin/java?
21266      if test ! -x "$BOOT_JDK/bin/java"; then
21267        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21268$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21269        BOOT_JDK_FOUND=no
21270      else
21271        # Do we have a bin/javac?
21272        if test ! -x "$BOOT_JDK/bin/javac"; then
21273          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21275          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21276$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21277          BOOT_JDK_FOUND=no
21278        else
21279          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21280          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21281            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21283            BOOT_JDK_FOUND=no
21284          else
21285            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21286            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21287
21288            # Extra M4 quote needed to protect [] in grep expression.
21289            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21290            if test "x$FOUND_CORRECT_VERSION" = x; then
21291              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21292$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21293              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21294$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21295              BOOT_JDK_FOUND=no
21296            else
21297              # We're done! :-)
21298              BOOT_JDK_FOUND=yes
21299
21300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21301
21302  # Input might be given as Windows format, start by converting to
21303  # unix format.
21304  path="$BOOT_JDK"
21305  new_path=`$CYGPATH -u "$path"`
21306
21307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21310  # "foo.exe" is OK but "foo" is an error.
21311  #
21312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21313  # It is also a way to make sure we got the proper file name for the real test later on.
21314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21315  if test "x$test_shortpath" = x; then
21316    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21317$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21318    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21319  fi
21320
21321  # Call helper function which possibly converts this using DOS-style short mode.
21322  # If so, the updated path is stored in $new_path.
21323
21324  input_path="$new_path"
21325  # Check if we need to convert this using DOS-style short mode. If the path
21326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21327  # take no chances and rewrite it.
21328  # Note: m4 eats our [], so we need to use [ and ] instead.
21329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21330  if test "x$has_forbidden_chars" != x; then
21331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21335      # Going to short mode and back again did indeed matter. Since short mode is
21336      # case insensitive, let's make it lowercase to improve readability.
21337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21338      # Now convert it back to Unix-stile (cygpath)
21339      input_path=`$CYGPATH -u "$shortmode_path"`
21340      new_path="$input_path"
21341    fi
21342  fi
21343
21344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21345  if test "x$test_cygdrive_prefix" = x; then
21346    # As a simple fix, exclude /usr/bin since it's not a real path.
21347    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21349      # a path prefixed by /cygdrive for fixpath to work.
21350      new_path="$CYGWIN_ROOT_PATH$input_path"
21351    fi
21352  fi
21353
21354
21355  if test "x$path" != "x$new_path"; then
21356    BOOT_JDK="$new_path"
21357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21358$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21359  fi
21360
21361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21362
21363  path="$BOOT_JDK"
21364  has_colon=`$ECHO $path | $GREP ^.:`
21365  new_path="$path"
21366  if test "x$has_colon" = x; then
21367    # Not in mixed or Windows style, start by that.
21368    new_path=`cmd //c echo $path`
21369  fi
21370
21371
21372  input_path="$new_path"
21373  # Check if we need to convert this using DOS-style short mode. If the path
21374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21375  # take no chances and rewrite it.
21376  # Note: m4 eats our [], so we need to use [ and ] instead.
21377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21378  if test "x$has_forbidden_chars" != x; then
21379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21381  fi
21382
21383
21384  windows_path="$new_path"
21385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21386    unix_path=`$CYGPATH -u "$windows_path"`
21387    new_path="$unix_path"
21388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21390    new_path="$unix_path"
21391  fi
21392
21393  if test "x$path" != "x$new_path"; then
21394    BOOT_JDK="$new_path"
21395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21397  fi
21398
21399  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21400  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21401
21402  else
21403    # We're on a posix platform. Hooray! :)
21404    path="$BOOT_JDK"
21405    has_space=`$ECHO "$path" | $GREP " "`
21406    if test "x$has_space" != x; then
21407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21409      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21410    fi
21411
21412    # Use eval to expand a potential ~
21413    eval path="$path"
21414    if test ! -f "$path" && test ! -d "$path"; then
21415      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21416    fi
21417
21418    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21419  fi
21420
21421              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21422$as_echo_n "checking for Boot JDK... " >&6; }
21423              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21424$as_echo "$BOOT_JDK" >&6; }
21425              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21426$as_echo_n "checking Boot JDK version... " >&6; }
21427              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21428              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21429$as_echo "$BOOT_JDK_VERSION" >&6; }
21430            fi # end check jdk version
21431          fi # end check rt.jar
21432        fi # end check javac
21433      fi # end check java
21434    fi # end check boot jdk found
21435  fi
21436
21437  fi
21438
21439
21440    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21441    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21442      # Do we have a bin/java?
21443      if test ! -x "$BOOT_JDK/bin/java"; then
21444        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21445$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21446        BOOT_JDK_FOUND=no
21447      else
21448        # Do we have a bin/javac?
21449        if test ! -x "$BOOT_JDK/bin/javac"; then
21450          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21452          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21453$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21454          BOOT_JDK_FOUND=no
21455        else
21456          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21457          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21458            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21459$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21460            BOOT_JDK_FOUND=no
21461          else
21462            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21463            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21464
21465            # Extra M4 quote needed to protect [] in grep expression.
21466            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21467            if test "x$FOUND_CORRECT_VERSION" = x; then
21468              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21469$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21470              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21471$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21472              BOOT_JDK_FOUND=no
21473            else
21474              # We're done! :-)
21475              BOOT_JDK_FOUND=yes
21476
21477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21478
21479  # Input might be given as Windows format, start by converting to
21480  # unix format.
21481  path="$BOOT_JDK"
21482  new_path=`$CYGPATH -u "$path"`
21483
21484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21487  # "foo.exe" is OK but "foo" is an error.
21488  #
21489  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21490  # It is also a way to make sure we got the proper file name for the real test later on.
21491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21492  if test "x$test_shortpath" = x; then
21493    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21494$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21495    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21496  fi
21497
21498  # Call helper function which possibly converts this using DOS-style short mode.
21499  # If so, the updated path is stored in $new_path.
21500
21501  input_path="$new_path"
21502  # Check if we need to convert this using DOS-style short mode. If the path
21503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21504  # take no chances and rewrite it.
21505  # Note: m4 eats our [], so we need to use [ and ] instead.
21506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21507  if test "x$has_forbidden_chars" != x; then
21508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21512      # Going to short mode and back again did indeed matter. Since short mode is
21513      # case insensitive, let's make it lowercase to improve readability.
21514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21515      # Now convert it back to Unix-stile (cygpath)
21516      input_path=`$CYGPATH -u "$shortmode_path"`
21517      new_path="$input_path"
21518    fi
21519  fi
21520
21521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21522  if test "x$test_cygdrive_prefix" = x; then
21523    # As a simple fix, exclude /usr/bin since it's not a real path.
21524    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21526      # a path prefixed by /cygdrive for fixpath to work.
21527      new_path="$CYGWIN_ROOT_PATH$input_path"
21528    fi
21529  fi
21530
21531
21532  if test "x$path" != "x$new_path"; then
21533    BOOT_JDK="$new_path"
21534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21535$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21536  fi
21537
21538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21539
21540  path="$BOOT_JDK"
21541  has_colon=`$ECHO $path | $GREP ^.:`
21542  new_path="$path"
21543  if test "x$has_colon" = x; then
21544    # Not in mixed or Windows style, start by that.
21545    new_path=`cmd //c echo $path`
21546  fi
21547
21548
21549  input_path="$new_path"
21550  # Check if we need to convert this using DOS-style short mode. If the path
21551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21552  # take no chances and rewrite it.
21553  # Note: m4 eats our [], so we need to use [ and ] instead.
21554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21555  if test "x$has_forbidden_chars" != x; then
21556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21558  fi
21559
21560
21561  windows_path="$new_path"
21562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21563    unix_path=`$CYGPATH -u "$windows_path"`
21564    new_path="$unix_path"
21565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21567    new_path="$unix_path"
21568  fi
21569
21570  if test "x$path" != "x$new_path"; then
21571    BOOT_JDK="$new_path"
21572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21573$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21574  fi
21575
21576  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21577  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21578
21579  else
21580    # We're on a posix platform. Hooray! :)
21581    path="$BOOT_JDK"
21582    has_space=`$ECHO "$path" | $GREP " "`
21583    if test "x$has_space" != x; then
21584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21585$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21586      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21587    fi
21588
21589    # Use eval to expand a potential ~
21590    eval path="$path"
21591    if test ! -f "$path" && test ! -d "$path"; then
21592      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21593    fi
21594
21595    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21596  fi
21597
21598              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21599$as_echo_n "checking for Boot JDK... " >&6; }
21600              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21601$as_echo "$BOOT_JDK" >&6; }
21602              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21603$as_echo_n "checking Boot JDK version... " >&6; }
21604              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21605              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21606$as_echo "$BOOT_JDK_VERSION" >&6; }
21607            fi # end check jdk version
21608          fi # end check rt.jar
21609        fi # end check javac
21610      fi # end check java
21611    fi # end check boot jdk found
21612  fi
21613
21614
21615  # Test: Is $JAVA_HOME set?
21616
21617  if test "x$BOOT_JDK_FOUND" = xno; then
21618    # Now execute the test
21619
21620  if test "x$JAVA_HOME" != x; then
21621    JAVA_HOME_PROCESSED="$JAVA_HOME"
21622
21623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21624
21625  # Input might be given as Windows format, start by converting to
21626  # unix format.
21627  path="$JAVA_HOME_PROCESSED"
21628  new_path=`$CYGPATH -u "$path"`
21629
21630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21633  # "foo.exe" is OK but "foo" is an error.
21634  #
21635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21636  # It is also a way to make sure we got the proper file name for the real test later on.
21637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21638  if test "x$test_shortpath" = x; then
21639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21640$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21641    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21642  fi
21643
21644  # Call helper function which possibly converts this using DOS-style short mode.
21645  # If so, the updated path is stored in $new_path.
21646
21647  input_path="$new_path"
21648  # Check if we need to convert this using DOS-style short mode. If the path
21649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21650  # take no chances and rewrite it.
21651  # Note: m4 eats our [], so we need to use [ and ] instead.
21652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21653  if test "x$has_forbidden_chars" != x; then
21654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21658      # Going to short mode and back again did indeed matter. Since short mode is
21659      # case insensitive, let's make it lowercase to improve readability.
21660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21661      # Now convert it back to Unix-stile (cygpath)
21662      input_path=`$CYGPATH -u "$shortmode_path"`
21663      new_path="$input_path"
21664    fi
21665  fi
21666
21667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21668  if test "x$test_cygdrive_prefix" = x; then
21669    # As a simple fix, exclude /usr/bin since it's not a real path.
21670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21672      # a path prefixed by /cygdrive for fixpath to work.
21673      new_path="$CYGWIN_ROOT_PATH$input_path"
21674    fi
21675  fi
21676
21677
21678  if test "x$path" != "x$new_path"; then
21679    JAVA_HOME_PROCESSED="$new_path"
21680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21681$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21682  fi
21683
21684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21685
21686  path="$JAVA_HOME_PROCESSED"
21687  has_colon=`$ECHO $path | $GREP ^.:`
21688  new_path="$path"
21689  if test "x$has_colon" = x; then
21690    # Not in mixed or Windows style, start by that.
21691    new_path=`cmd //c echo $path`
21692  fi
21693
21694
21695  input_path="$new_path"
21696  # Check if we need to convert this using DOS-style short mode. If the path
21697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21698  # take no chances and rewrite it.
21699  # Note: m4 eats our [], so we need to use [ and ] instead.
21700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21701  if test "x$has_forbidden_chars" != x; then
21702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21704  fi
21705
21706
21707  windows_path="$new_path"
21708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21709    unix_path=`$CYGPATH -u "$windows_path"`
21710    new_path="$unix_path"
21711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21713    new_path="$unix_path"
21714  fi
21715
21716  if test "x$path" != "x$new_path"; then
21717    JAVA_HOME_PROCESSED="$new_path"
21718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21719$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21720  fi
21721
21722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21724
21725  else
21726    # We're on a posix platform. Hooray! :)
21727    path="$JAVA_HOME_PROCESSED"
21728    has_space=`$ECHO "$path" | $GREP " "`
21729    if test "x$has_space" != x; then
21730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21731$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21732      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21733    fi
21734
21735    # Use eval to expand a potential ~
21736    eval path="$path"
21737    if test ! -f "$path" && test ! -d "$path"; then
21738      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21739    fi
21740
21741    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21742  fi
21743
21744    if test ! -d "$JAVA_HOME_PROCESSED"; then
21745      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21746$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21747    else
21748      # Aha, the user has set a JAVA_HOME
21749      # let us use that as the Boot JDK.
21750      BOOT_JDK="$JAVA_HOME_PROCESSED"
21751      BOOT_JDK_FOUND=maybe
21752      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21753$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21754    fi
21755  fi
21756
21757
21758    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21759    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21760      # Do we have a bin/java?
21761      if test ! -x "$BOOT_JDK/bin/java"; then
21762        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21763$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21764        BOOT_JDK_FOUND=no
21765      else
21766        # Do we have a bin/javac?
21767        if test ! -x "$BOOT_JDK/bin/javac"; then
21768          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21770          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21771$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21772          BOOT_JDK_FOUND=no
21773        else
21774          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21775          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21776            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21778            BOOT_JDK_FOUND=no
21779          else
21780            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21781            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21782
21783            # Extra M4 quote needed to protect [] in grep expression.
21784            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21785            if test "x$FOUND_CORRECT_VERSION" = x; then
21786              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21788              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21789$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21790              BOOT_JDK_FOUND=no
21791            else
21792              # We're done! :-)
21793              BOOT_JDK_FOUND=yes
21794
21795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21796
21797  # Input might be given as Windows format, start by converting to
21798  # unix format.
21799  path="$BOOT_JDK"
21800  new_path=`$CYGPATH -u "$path"`
21801
21802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21805  # "foo.exe" is OK but "foo" is an error.
21806  #
21807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21808  # It is also a way to make sure we got the proper file name for the real test later on.
21809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21810  if test "x$test_shortpath" = x; then
21811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21812$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21813    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21814  fi
21815
21816  # Call helper function which possibly converts this using DOS-style short mode.
21817  # If so, the updated path is stored in $new_path.
21818
21819  input_path="$new_path"
21820  # Check if we need to convert this using DOS-style short mode. If the path
21821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21822  # take no chances and rewrite it.
21823  # Note: m4 eats our [], so we need to use [ and ] instead.
21824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21825  if test "x$has_forbidden_chars" != x; then
21826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21830      # Going to short mode and back again did indeed matter. Since short mode is
21831      # case insensitive, let's make it lowercase to improve readability.
21832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21833      # Now convert it back to Unix-stile (cygpath)
21834      input_path=`$CYGPATH -u "$shortmode_path"`
21835      new_path="$input_path"
21836    fi
21837  fi
21838
21839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21840  if test "x$test_cygdrive_prefix" = x; then
21841    # As a simple fix, exclude /usr/bin since it's not a real path.
21842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21844      # a path prefixed by /cygdrive for fixpath to work.
21845      new_path="$CYGWIN_ROOT_PATH$input_path"
21846    fi
21847  fi
21848
21849
21850  if test "x$path" != "x$new_path"; then
21851    BOOT_JDK="$new_path"
21852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21853$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21854  fi
21855
21856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21857
21858  path="$BOOT_JDK"
21859  has_colon=`$ECHO $path | $GREP ^.:`
21860  new_path="$path"
21861  if test "x$has_colon" = x; then
21862    # Not in mixed or Windows style, start by that.
21863    new_path=`cmd //c echo $path`
21864  fi
21865
21866
21867  input_path="$new_path"
21868  # Check if we need to convert this using DOS-style short mode. If the path
21869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21870  # take no chances and rewrite it.
21871  # Note: m4 eats our [], so we need to use [ and ] instead.
21872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21873  if test "x$has_forbidden_chars" != x; then
21874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21876  fi
21877
21878
21879  windows_path="$new_path"
21880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21881    unix_path=`$CYGPATH -u "$windows_path"`
21882    new_path="$unix_path"
21883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21885    new_path="$unix_path"
21886  fi
21887
21888  if test "x$path" != "x$new_path"; then
21889    BOOT_JDK="$new_path"
21890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21891$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21892  fi
21893
21894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21896
21897  else
21898    # We're on a posix platform. Hooray! :)
21899    path="$BOOT_JDK"
21900    has_space=`$ECHO "$path" | $GREP " "`
21901    if test "x$has_space" != x; then
21902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21903$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21904      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21905    fi
21906
21907    # Use eval to expand a potential ~
21908    eval path="$path"
21909    if test ! -f "$path" && test ! -d "$path"; then
21910      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21911    fi
21912
21913    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21914  fi
21915
21916              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21917$as_echo_n "checking for Boot JDK... " >&6; }
21918              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21919$as_echo "$BOOT_JDK" >&6; }
21920              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21921$as_echo_n "checking Boot JDK version... " >&6; }
21922              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21923              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21924$as_echo "$BOOT_JDK_VERSION" >&6; }
21925            fi # end check jdk version
21926          fi # end check rt.jar
21927        fi # end check javac
21928      fi # end check java
21929    fi # end check boot jdk found
21930  fi
21931
21932
21933  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21934
21935  if test "x$BOOT_JDK_FOUND" = xno; then
21936    # Now execute the test
21937
21938  # Extract the first word of "javac", so it can be a program name with args.
21939set dummy javac; ac_word=$2
21940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21941$as_echo_n "checking for $ac_word... " >&6; }
21942if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21943  $as_echo_n "(cached) " >&6
21944else
21945  case $JAVAC_CHECK in
21946  [\\/]* | ?:[\\/]*)
21947  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21948  ;;
21949  *)
21950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21951for as_dir in $PATH
21952do
21953  IFS=$as_save_IFS
21954  test -z "$as_dir" && as_dir=.
21955    for ac_exec_ext in '' $ac_executable_extensions; do
21956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21957    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21959    break 2
21960  fi
21961done
21962  done
21963IFS=$as_save_IFS
21964
21965  ;;
21966esac
21967fi
21968JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21969if test -n "$JAVAC_CHECK"; then
21970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21971$as_echo "$JAVAC_CHECK" >&6; }
21972else
21973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21974$as_echo "no" >&6; }
21975fi
21976
21977
21978  # Extract the first word of "java", so it can be a program name with args.
21979set dummy java; ac_word=$2
21980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21981$as_echo_n "checking for $ac_word... " >&6; }
21982if ${ac_cv_path_JAVA_CHECK+:} false; then :
21983  $as_echo_n "(cached) " >&6
21984else
21985  case $JAVA_CHECK in
21986  [\\/]* | ?:[\\/]*)
21987  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21988  ;;
21989  *)
21990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21991for as_dir in $PATH
21992do
21993  IFS=$as_save_IFS
21994  test -z "$as_dir" && as_dir=.
21995    for ac_exec_ext in '' $ac_executable_extensions; do
21996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21997    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21999    break 2
22000  fi
22001done
22002  done
22003IFS=$as_save_IFS
22004
22005  ;;
22006esac
22007fi
22008JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22009if test -n "$JAVA_CHECK"; then
22010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22011$as_echo "$JAVA_CHECK" >&6; }
22012else
22013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22014$as_echo "no" >&6; }
22015fi
22016
22017
22018  BINARY="$JAVAC_CHECK"
22019  if test "x$JAVAC_CHECK" = x; then
22020    BINARY="$JAVA_CHECK"
22021  fi
22022  if test "x$BINARY" != x; then
22023    # So there is a java(c) binary, it might be part of a JDK.
22024    # Lets find the JDK/JRE directory by following symbolic links.
22025    # Linux/GNU systems often have links from /usr/bin/java to
22026    # /etc/alternatives/java to the real JDK binary.
22027
22028  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22029    # Follow a chain of symbolic links. Use readlink
22030    # where it exists, else fall back to horribly
22031    # complicated shell code.
22032    if test "x$READLINK_TESTED" != yes; then
22033      # On MacOSX there is a readlink tool with a different
22034      # purpose than the GNU readlink tool. Check the found readlink.
22035      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22036      if test "x$ISGNU" = x; then
22037        # A readlink that we do not know how to use.
22038        # Are there other non-GNU readlinks out there?
22039        READLINK_TESTED=yes
22040        READLINK=
22041      fi
22042    fi
22043
22044    if test "x$READLINK" != x; then
22045      BINARY=`$READLINK -f $BINARY`
22046    else
22047      # Save the current directory for restoring afterwards
22048      STARTDIR=$PWD
22049      COUNTER=0
22050      sym_link_dir=`$DIRNAME $BINARY`
22051      sym_link_file=`$BASENAME $BINARY`
22052      cd $sym_link_dir
22053      # Use -P flag to resolve symlinks in directories.
22054      cd `$THEPWDCMD -P`
22055      sym_link_dir=`$THEPWDCMD -P`
22056      # Resolve file symlinks
22057      while test $COUNTER -lt 20; do
22058        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22059        if test "x$ISLINK" == x; then
22060          # This is not a symbolic link! We are done!
22061          break
22062        fi
22063        # Again resolve directory symlinks since the target of the just found
22064        # link could be in a different directory
22065        cd `$DIRNAME $ISLINK`
22066        sym_link_dir=`$THEPWDCMD -P`
22067        sym_link_file=`$BASENAME $ISLINK`
22068        let COUNTER=COUNTER+1
22069      done
22070      cd $STARTDIR
22071      BINARY=$sym_link_dir/$sym_link_file
22072    fi
22073  fi
22074
22075    BOOT_JDK=`dirname "$BINARY"`
22076    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22077    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22078      # Looks like we found ourselves an JDK
22079      BOOT_JDK_FOUND=maybe
22080      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22081$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22082    fi
22083  fi
22084
22085
22086    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22087    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22088      # Do we have a bin/java?
22089      if test ! -x "$BOOT_JDK/bin/java"; then
22090        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22091$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22092        BOOT_JDK_FOUND=no
22093      else
22094        # Do we have a bin/javac?
22095        if test ! -x "$BOOT_JDK/bin/javac"; then
22096          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22097$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22098          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22099$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22100          BOOT_JDK_FOUND=no
22101        else
22102          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22103          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22104            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22106            BOOT_JDK_FOUND=no
22107          else
22108            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22109            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22110
22111            # Extra M4 quote needed to protect [] in grep expression.
22112            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22113            if test "x$FOUND_CORRECT_VERSION" = x; then
22114              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22116              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22117$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22118              BOOT_JDK_FOUND=no
22119            else
22120              # We're done! :-)
22121              BOOT_JDK_FOUND=yes
22122
22123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22124
22125  # Input might be given as Windows format, start by converting to
22126  # unix format.
22127  path="$BOOT_JDK"
22128  new_path=`$CYGPATH -u "$path"`
22129
22130  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22131  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22132  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22133  # "foo.exe" is OK but "foo" is an error.
22134  #
22135  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22136  # It is also a way to make sure we got the proper file name for the real test later on.
22137  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22138  if test "x$test_shortpath" = x; then
22139    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22140$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22141    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22142  fi
22143
22144  # Call helper function which possibly converts this using DOS-style short mode.
22145  # If so, the updated path is stored in $new_path.
22146
22147  input_path="$new_path"
22148  # Check if we need to convert this using DOS-style short mode. If the path
22149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22150  # take no chances and rewrite it.
22151  # Note: m4 eats our [], so we need to use [ and ] instead.
22152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22153  if test "x$has_forbidden_chars" != x; then
22154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22158      # Going to short mode and back again did indeed matter. Since short mode is
22159      # case insensitive, let's make it lowercase to improve readability.
22160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22161      # Now convert it back to Unix-stile (cygpath)
22162      input_path=`$CYGPATH -u "$shortmode_path"`
22163      new_path="$input_path"
22164    fi
22165  fi
22166
22167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22168  if test "x$test_cygdrive_prefix" = x; then
22169    # As a simple fix, exclude /usr/bin since it's not a real path.
22170    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22172      # a path prefixed by /cygdrive for fixpath to work.
22173      new_path="$CYGWIN_ROOT_PATH$input_path"
22174    fi
22175  fi
22176
22177
22178  if test "x$path" != "x$new_path"; then
22179    BOOT_JDK="$new_path"
22180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22181$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22182  fi
22183
22184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22185
22186  path="$BOOT_JDK"
22187  has_colon=`$ECHO $path | $GREP ^.:`
22188  new_path="$path"
22189  if test "x$has_colon" = x; then
22190    # Not in mixed or Windows style, start by that.
22191    new_path=`cmd //c echo $path`
22192  fi
22193
22194
22195  input_path="$new_path"
22196  # Check if we need to convert this using DOS-style short mode. If the path
22197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22198  # take no chances and rewrite it.
22199  # Note: m4 eats our [], so we need to use [ and ] instead.
22200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22201  if test "x$has_forbidden_chars" != x; then
22202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22203    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22204  fi
22205
22206
22207  windows_path="$new_path"
22208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22209    unix_path=`$CYGPATH -u "$windows_path"`
22210    new_path="$unix_path"
22211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22213    new_path="$unix_path"
22214  fi
22215
22216  if test "x$path" != "x$new_path"; then
22217    BOOT_JDK="$new_path"
22218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22219$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22220  fi
22221
22222  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22223  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22224
22225  else
22226    # We're on a posix platform. Hooray! :)
22227    path="$BOOT_JDK"
22228    has_space=`$ECHO "$path" | $GREP " "`
22229    if test "x$has_space" != x; then
22230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22232      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22233    fi
22234
22235    # Use eval to expand a potential ~
22236    eval path="$path"
22237    if test ! -f "$path" && test ! -d "$path"; then
22238      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22239    fi
22240
22241    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22242  fi
22243
22244              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22245$as_echo_n "checking for Boot JDK... " >&6; }
22246              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22247$as_echo "$BOOT_JDK" >&6; }
22248              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22249$as_echo_n "checking Boot JDK version... " >&6; }
22250              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22251              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22252$as_echo "$BOOT_JDK_VERSION" >&6; }
22253            fi # end check jdk version
22254          fi # end check rt.jar
22255        fi # end check javac
22256      fi # end check java
22257    fi # end check boot jdk found
22258  fi
22259
22260
22261  # Test: Is there a JDK installed in default, well-known locations?
22262
22263  if test "x$BOOT_JDK_FOUND" = xno; then
22264    # Now execute the test
22265
22266  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22267
22268  if test "x$BOOT_JDK_FOUND" = xno; then
22269    # Now execute the test
22270
22271  if test "x$ProgramW6432" != x; then
22272    VIRTUAL_DIR="$ProgramW6432/Java"
22273
22274  windows_path="$VIRTUAL_DIR"
22275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22276    unix_path=`$CYGPATH -u "$windows_path"`
22277    VIRTUAL_DIR="$unix_path"
22278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22280    VIRTUAL_DIR="$unix_path"
22281  fi
22282
22283
22284  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22285  BOOT_JDK_SUFFIX=""
22286  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22287  if test "x$ALL_JDKS_FOUND" != x; then
22288    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22289
22290  if test "x$BOOT_JDK_FOUND" = xno; then
22291    # Now execute the test
22292
22293        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22294        if test -d "$BOOT_JDK"; then
22295          BOOT_JDK_FOUND=maybe
22296          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22297$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22298        fi
22299
22300
22301    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22302    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22303      # Do we have a bin/java?
22304      if test ! -x "$BOOT_JDK/bin/java"; then
22305        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22306$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22307        BOOT_JDK_FOUND=no
22308      else
22309        # Do we have a bin/javac?
22310        if test ! -x "$BOOT_JDK/bin/javac"; then
22311          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22312$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22313          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22314$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22315          BOOT_JDK_FOUND=no
22316        else
22317          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22318          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22319            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22321            BOOT_JDK_FOUND=no
22322          else
22323            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22324            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22325
22326            # Extra M4 quote needed to protect [] in grep expression.
22327            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22328            if test "x$FOUND_CORRECT_VERSION" = x; then
22329              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22331              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22332$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22333              BOOT_JDK_FOUND=no
22334            else
22335              # We're done! :-)
22336              BOOT_JDK_FOUND=yes
22337
22338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22339
22340  # Input might be given as Windows format, start by converting to
22341  # unix format.
22342  path="$BOOT_JDK"
22343  new_path=`$CYGPATH -u "$path"`
22344
22345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22348  # "foo.exe" is OK but "foo" is an error.
22349  #
22350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22351  # It is also a way to make sure we got the proper file name for the real test later on.
22352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22353  if test "x$test_shortpath" = x; then
22354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22355$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22356    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22357  fi
22358
22359  # Call helper function which possibly converts this using DOS-style short mode.
22360  # If so, the updated path is stored in $new_path.
22361
22362  input_path="$new_path"
22363  # Check if we need to convert this using DOS-style short mode. If the path
22364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22365  # take no chances and rewrite it.
22366  # Note: m4 eats our [], so we need to use [ and ] instead.
22367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22368  if test "x$has_forbidden_chars" != x; then
22369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22373      # Going to short mode and back again did indeed matter. Since short mode is
22374      # case insensitive, let's make it lowercase to improve readability.
22375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22376      # Now convert it back to Unix-stile (cygpath)
22377      input_path=`$CYGPATH -u "$shortmode_path"`
22378      new_path="$input_path"
22379    fi
22380  fi
22381
22382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22383  if test "x$test_cygdrive_prefix" = x; then
22384    # As a simple fix, exclude /usr/bin since it's not a real path.
22385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22387      # a path prefixed by /cygdrive for fixpath to work.
22388      new_path="$CYGWIN_ROOT_PATH$input_path"
22389    fi
22390  fi
22391
22392
22393  if test "x$path" != "x$new_path"; then
22394    BOOT_JDK="$new_path"
22395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22397  fi
22398
22399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22400
22401  path="$BOOT_JDK"
22402  has_colon=`$ECHO $path | $GREP ^.:`
22403  new_path="$path"
22404  if test "x$has_colon" = x; then
22405    # Not in mixed or Windows style, start by that.
22406    new_path=`cmd //c echo $path`
22407  fi
22408
22409
22410  input_path="$new_path"
22411  # Check if we need to convert this using DOS-style short mode. If the path
22412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22413  # take no chances and rewrite it.
22414  # Note: m4 eats our [], so we need to use [ and ] instead.
22415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22416  if test "x$has_forbidden_chars" != x; then
22417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22419  fi
22420
22421
22422  windows_path="$new_path"
22423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22424    unix_path=`$CYGPATH -u "$windows_path"`
22425    new_path="$unix_path"
22426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22428    new_path="$unix_path"
22429  fi
22430
22431  if test "x$path" != "x$new_path"; then
22432    BOOT_JDK="$new_path"
22433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22434$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22435  fi
22436
22437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22439
22440  else
22441    # We're on a posix platform. Hooray! :)
22442    path="$BOOT_JDK"
22443    has_space=`$ECHO "$path" | $GREP " "`
22444    if test "x$has_space" != x; then
22445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22446$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22447      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22448    fi
22449
22450    # Use eval to expand a potential ~
22451    eval path="$path"
22452    if test ! -f "$path" && test ! -d "$path"; then
22453      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22454    fi
22455
22456    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22457  fi
22458
22459              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22460$as_echo_n "checking for Boot JDK... " >&6; }
22461              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22462$as_echo "$BOOT_JDK" >&6; }
22463              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22464$as_echo_n "checking Boot JDK version... " >&6; }
22465              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22466              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22467$as_echo "$BOOT_JDK_VERSION" >&6; }
22468            fi # end check jdk version
22469          fi # end check rt.jar
22470        fi # end check javac
22471      fi # end check java
22472    fi # end check boot jdk found
22473  fi
22474
22475    done
22476  fi
22477
22478  fi
22479
22480
22481    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22482    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22483      # Do we have a bin/java?
22484      if test ! -x "$BOOT_JDK/bin/java"; then
22485        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22487        BOOT_JDK_FOUND=no
22488      else
22489        # Do we have a bin/javac?
22490        if test ! -x "$BOOT_JDK/bin/javac"; then
22491          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22493          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22494$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22495          BOOT_JDK_FOUND=no
22496        else
22497          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22498          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22499            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22500$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22501            BOOT_JDK_FOUND=no
22502          else
22503            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22504            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22505
22506            # Extra M4 quote needed to protect [] in grep expression.
22507            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22508            if test "x$FOUND_CORRECT_VERSION" = x; then
22509              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22511              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22512$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22513              BOOT_JDK_FOUND=no
22514            else
22515              # We're done! :-)
22516              BOOT_JDK_FOUND=yes
22517
22518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22519
22520  # Input might be given as Windows format, start by converting to
22521  # unix format.
22522  path="$BOOT_JDK"
22523  new_path=`$CYGPATH -u "$path"`
22524
22525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22528  # "foo.exe" is OK but "foo" is an error.
22529  #
22530  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22531  # It is also a way to make sure we got the proper file name for the real test later on.
22532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22533  if test "x$test_shortpath" = x; then
22534    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22535$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22536    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22537  fi
22538
22539  # Call helper function which possibly converts this using DOS-style short mode.
22540  # If so, the updated path is stored in $new_path.
22541
22542  input_path="$new_path"
22543  # Check if we need to convert this using DOS-style short mode. If the path
22544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22545  # take no chances and rewrite it.
22546  # Note: m4 eats our [], so we need to use [ and ] instead.
22547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22548  if test "x$has_forbidden_chars" != x; then
22549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22553      # Going to short mode and back again did indeed matter. Since short mode is
22554      # case insensitive, let's make it lowercase to improve readability.
22555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22556      # Now convert it back to Unix-stile (cygpath)
22557      input_path=`$CYGPATH -u "$shortmode_path"`
22558      new_path="$input_path"
22559    fi
22560  fi
22561
22562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22563  if test "x$test_cygdrive_prefix" = x; then
22564    # As a simple fix, exclude /usr/bin since it's not a real path.
22565    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22567      # a path prefixed by /cygdrive for fixpath to work.
22568      new_path="$CYGWIN_ROOT_PATH$input_path"
22569    fi
22570  fi
22571
22572
22573  if test "x$path" != "x$new_path"; then
22574    BOOT_JDK="$new_path"
22575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22576$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22577  fi
22578
22579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22580
22581  path="$BOOT_JDK"
22582  has_colon=`$ECHO $path | $GREP ^.:`
22583  new_path="$path"
22584  if test "x$has_colon" = x; then
22585    # Not in mixed or Windows style, start by that.
22586    new_path=`cmd //c echo $path`
22587  fi
22588
22589
22590  input_path="$new_path"
22591  # Check if we need to convert this using DOS-style short mode. If the path
22592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22593  # take no chances and rewrite it.
22594  # Note: m4 eats our [], so we need to use [ and ] instead.
22595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22596  if test "x$has_forbidden_chars" != x; then
22597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22599  fi
22600
22601
22602  windows_path="$new_path"
22603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22604    unix_path=`$CYGPATH -u "$windows_path"`
22605    new_path="$unix_path"
22606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22608    new_path="$unix_path"
22609  fi
22610
22611  if test "x$path" != "x$new_path"; then
22612    BOOT_JDK="$new_path"
22613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22614$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22615  fi
22616
22617  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22618  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22619
22620  else
22621    # We're on a posix platform. Hooray! :)
22622    path="$BOOT_JDK"
22623    has_space=`$ECHO "$path" | $GREP " "`
22624    if test "x$has_space" != x; then
22625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22626$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22627      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22628    fi
22629
22630    # Use eval to expand a potential ~
22631    eval path="$path"
22632    if test ! -f "$path" && test ! -d "$path"; then
22633      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22634    fi
22635
22636    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22637  fi
22638
22639              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22640$as_echo_n "checking for Boot JDK... " >&6; }
22641              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22642$as_echo "$BOOT_JDK" >&6; }
22643              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22644$as_echo_n "checking Boot JDK version... " >&6; }
22645              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22646              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22647$as_echo "$BOOT_JDK_VERSION" >&6; }
22648            fi # end check jdk version
22649          fi # end check rt.jar
22650        fi # end check javac
22651      fi # end check java
22652    fi # end check boot jdk found
22653  fi
22654
22655
22656  if test "x$BOOT_JDK_FOUND" = xno; then
22657    # Now execute the test
22658
22659  if test "x$PROGRAMW6432" != x; then
22660    VIRTUAL_DIR="$PROGRAMW6432/Java"
22661
22662  windows_path="$VIRTUAL_DIR"
22663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22664    unix_path=`$CYGPATH -u "$windows_path"`
22665    VIRTUAL_DIR="$unix_path"
22666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22668    VIRTUAL_DIR="$unix_path"
22669  fi
22670
22671
22672  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22673  BOOT_JDK_SUFFIX=""
22674  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22675  if test "x$ALL_JDKS_FOUND" != x; then
22676    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22677
22678  if test "x$BOOT_JDK_FOUND" = xno; then
22679    # Now execute the test
22680
22681        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22682        if test -d "$BOOT_JDK"; then
22683          BOOT_JDK_FOUND=maybe
22684          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22685$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22686        fi
22687
22688
22689    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22690    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22691      # Do we have a bin/java?
22692      if test ! -x "$BOOT_JDK/bin/java"; then
22693        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22695        BOOT_JDK_FOUND=no
22696      else
22697        # Do we have a bin/javac?
22698        if test ! -x "$BOOT_JDK/bin/javac"; then
22699          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22700$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22701          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22702$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22703          BOOT_JDK_FOUND=no
22704        else
22705          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22706          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22707            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22709            BOOT_JDK_FOUND=no
22710          else
22711            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22712            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22713
22714            # Extra M4 quote needed to protect [] in grep expression.
22715            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22716            if test "x$FOUND_CORRECT_VERSION" = x; then
22717              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22719              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22720$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22721              BOOT_JDK_FOUND=no
22722            else
22723              # We're done! :-)
22724              BOOT_JDK_FOUND=yes
22725
22726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22727
22728  # Input might be given as Windows format, start by converting to
22729  # unix format.
22730  path="$BOOT_JDK"
22731  new_path=`$CYGPATH -u "$path"`
22732
22733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22736  # "foo.exe" is OK but "foo" is an error.
22737  #
22738  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22739  # It is also a way to make sure we got the proper file name for the real test later on.
22740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22741  if test "x$test_shortpath" = x; then
22742    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22743$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22744    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22745  fi
22746
22747  # Call helper function which possibly converts this using DOS-style short mode.
22748  # If so, the updated path is stored in $new_path.
22749
22750  input_path="$new_path"
22751  # Check if we need to convert this using DOS-style short mode. If the path
22752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22753  # take no chances and rewrite it.
22754  # Note: m4 eats our [], so we need to use [ and ] instead.
22755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22756  if test "x$has_forbidden_chars" != x; then
22757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22761      # Going to short mode and back again did indeed matter. Since short mode is
22762      # case insensitive, let's make it lowercase to improve readability.
22763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22764      # Now convert it back to Unix-stile (cygpath)
22765      input_path=`$CYGPATH -u "$shortmode_path"`
22766      new_path="$input_path"
22767    fi
22768  fi
22769
22770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22771  if test "x$test_cygdrive_prefix" = x; then
22772    # As a simple fix, exclude /usr/bin since it's not a real path.
22773    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22775      # a path prefixed by /cygdrive for fixpath to work.
22776      new_path="$CYGWIN_ROOT_PATH$input_path"
22777    fi
22778  fi
22779
22780
22781  if test "x$path" != "x$new_path"; then
22782    BOOT_JDK="$new_path"
22783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22784$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22785  fi
22786
22787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22788
22789  path="$BOOT_JDK"
22790  has_colon=`$ECHO $path | $GREP ^.:`
22791  new_path="$path"
22792  if test "x$has_colon" = x; then
22793    # Not in mixed or Windows style, start by that.
22794    new_path=`cmd //c echo $path`
22795  fi
22796
22797
22798  input_path="$new_path"
22799  # Check if we need to convert this using DOS-style short mode. If the path
22800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22801  # take no chances and rewrite it.
22802  # Note: m4 eats our [], so we need to use [ and ] instead.
22803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22804  if test "x$has_forbidden_chars" != x; then
22805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22807  fi
22808
22809
22810  windows_path="$new_path"
22811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22812    unix_path=`$CYGPATH -u "$windows_path"`
22813    new_path="$unix_path"
22814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22816    new_path="$unix_path"
22817  fi
22818
22819  if test "x$path" != "x$new_path"; then
22820    BOOT_JDK="$new_path"
22821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22822$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22823  fi
22824
22825  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22826  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22827
22828  else
22829    # We're on a posix platform. Hooray! :)
22830    path="$BOOT_JDK"
22831    has_space=`$ECHO "$path" | $GREP " "`
22832    if test "x$has_space" != x; then
22833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22834$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22835      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22836    fi
22837
22838    # Use eval to expand a potential ~
22839    eval path="$path"
22840    if test ! -f "$path" && test ! -d "$path"; then
22841      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22842    fi
22843
22844    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22845  fi
22846
22847              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22848$as_echo_n "checking for Boot JDK... " >&6; }
22849              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22850$as_echo "$BOOT_JDK" >&6; }
22851              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22852$as_echo_n "checking Boot JDK version... " >&6; }
22853              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22854              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22855$as_echo "$BOOT_JDK_VERSION" >&6; }
22856            fi # end check jdk version
22857          fi # end check rt.jar
22858        fi # end check javac
22859      fi # end check java
22860    fi # end check boot jdk found
22861  fi
22862
22863    done
22864  fi
22865
22866  fi
22867
22868
22869    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22870    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22871      # Do we have a bin/java?
22872      if test ! -x "$BOOT_JDK/bin/java"; then
22873        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22875        BOOT_JDK_FOUND=no
22876      else
22877        # Do we have a bin/javac?
22878        if test ! -x "$BOOT_JDK/bin/javac"; then
22879          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22881          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22882$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22883          BOOT_JDK_FOUND=no
22884        else
22885          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22886          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22887            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22888$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22889            BOOT_JDK_FOUND=no
22890          else
22891            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22892            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22893
22894            # Extra M4 quote needed to protect [] in grep expression.
22895            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22896            if test "x$FOUND_CORRECT_VERSION" = x; then
22897              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22899              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22900$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22901              BOOT_JDK_FOUND=no
22902            else
22903              # We're done! :-)
22904              BOOT_JDK_FOUND=yes
22905
22906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22907
22908  # Input might be given as Windows format, start by converting to
22909  # unix format.
22910  path="$BOOT_JDK"
22911  new_path=`$CYGPATH -u "$path"`
22912
22913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22916  # "foo.exe" is OK but "foo" is an error.
22917  #
22918  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22919  # It is also a way to make sure we got the proper file name for the real test later on.
22920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22921  if test "x$test_shortpath" = x; then
22922    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22923$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22924    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22925  fi
22926
22927  # Call helper function which possibly converts this using DOS-style short mode.
22928  # If so, the updated path is stored in $new_path.
22929
22930  input_path="$new_path"
22931  # Check if we need to convert this using DOS-style short mode. If the path
22932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22933  # take no chances and rewrite it.
22934  # Note: m4 eats our [], so we need to use [ and ] instead.
22935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22936  if test "x$has_forbidden_chars" != x; then
22937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22941      # Going to short mode and back again did indeed matter. Since short mode is
22942      # case insensitive, let's make it lowercase to improve readability.
22943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22944      # Now convert it back to Unix-stile (cygpath)
22945      input_path=`$CYGPATH -u "$shortmode_path"`
22946      new_path="$input_path"
22947    fi
22948  fi
22949
22950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22951  if test "x$test_cygdrive_prefix" = x; then
22952    # As a simple fix, exclude /usr/bin since it's not a real path.
22953    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22955      # a path prefixed by /cygdrive for fixpath to work.
22956      new_path="$CYGWIN_ROOT_PATH$input_path"
22957    fi
22958  fi
22959
22960
22961  if test "x$path" != "x$new_path"; then
22962    BOOT_JDK="$new_path"
22963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22964$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22965  fi
22966
22967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22968
22969  path="$BOOT_JDK"
22970  has_colon=`$ECHO $path | $GREP ^.:`
22971  new_path="$path"
22972  if test "x$has_colon" = x; then
22973    # Not in mixed or Windows style, start by that.
22974    new_path=`cmd //c echo $path`
22975  fi
22976
22977
22978  input_path="$new_path"
22979  # Check if we need to convert this using DOS-style short mode. If the path
22980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22981  # take no chances and rewrite it.
22982  # Note: m4 eats our [], so we need to use [ and ] instead.
22983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22984  if test "x$has_forbidden_chars" != x; then
22985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22987  fi
22988
22989
22990  windows_path="$new_path"
22991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22992    unix_path=`$CYGPATH -u "$windows_path"`
22993    new_path="$unix_path"
22994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22996    new_path="$unix_path"
22997  fi
22998
22999  if test "x$path" != "x$new_path"; then
23000    BOOT_JDK="$new_path"
23001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23002$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23003  fi
23004
23005  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23006  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23007
23008  else
23009    # We're on a posix platform. Hooray! :)
23010    path="$BOOT_JDK"
23011    has_space=`$ECHO "$path" | $GREP " "`
23012    if test "x$has_space" != x; then
23013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23014$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23015      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23016    fi
23017
23018    # Use eval to expand a potential ~
23019    eval path="$path"
23020    if test ! -f "$path" && test ! -d "$path"; then
23021      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23022    fi
23023
23024    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23025  fi
23026
23027              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23028$as_echo_n "checking for Boot JDK... " >&6; }
23029              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23030$as_echo "$BOOT_JDK" >&6; }
23031              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23032$as_echo_n "checking Boot JDK version... " >&6; }
23033              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23034              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23035$as_echo "$BOOT_JDK_VERSION" >&6; }
23036            fi # end check jdk version
23037          fi # end check rt.jar
23038        fi # end check javac
23039      fi # end check java
23040    fi # end check boot jdk found
23041  fi
23042
23043
23044  if test "x$BOOT_JDK_FOUND" = xno; then
23045    # Now execute the test
23046
23047  if test "x$PROGRAMFILES" != x; then
23048    VIRTUAL_DIR="$PROGRAMFILES/Java"
23049
23050  windows_path="$VIRTUAL_DIR"
23051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23052    unix_path=`$CYGPATH -u "$windows_path"`
23053    VIRTUAL_DIR="$unix_path"
23054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23056    VIRTUAL_DIR="$unix_path"
23057  fi
23058
23059
23060  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23061  BOOT_JDK_SUFFIX=""
23062  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23063  if test "x$ALL_JDKS_FOUND" != x; then
23064    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23065
23066  if test "x$BOOT_JDK_FOUND" = xno; then
23067    # Now execute the test
23068
23069        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23070        if test -d "$BOOT_JDK"; then
23071          BOOT_JDK_FOUND=maybe
23072          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23073$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23074        fi
23075
23076
23077    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23078    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23079      # Do we have a bin/java?
23080      if test ! -x "$BOOT_JDK/bin/java"; then
23081        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23082$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23083        BOOT_JDK_FOUND=no
23084      else
23085        # Do we have a bin/javac?
23086        if test ! -x "$BOOT_JDK/bin/javac"; then
23087          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23088$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23089          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23090$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23091          BOOT_JDK_FOUND=no
23092        else
23093          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23094          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23095            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23097            BOOT_JDK_FOUND=no
23098          else
23099            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23100            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23101
23102            # Extra M4 quote needed to protect [] in grep expression.
23103            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23104            if test "x$FOUND_CORRECT_VERSION" = x; then
23105              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23107              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23108$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23109              BOOT_JDK_FOUND=no
23110            else
23111              # We're done! :-)
23112              BOOT_JDK_FOUND=yes
23113
23114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23115
23116  # Input might be given as Windows format, start by converting to
23117  # unix format.
23118  path="$BOOT_JDK"
23119  new_path=`$CYGPATH -u "$path"`
23120
23121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23124  # "foo.exe" is OK but "foo" is an error.
23125  #
23126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23127  # It is also a way to make sure we got the proper file name for the real test later on.
23128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23129  if test "x$test_shortpath" = x; then
23130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23131$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23132    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23133  fi
23134
23135  # Call helper function which possibly converts this using DOS-style short mode.
23136  # If so, the updated path is stored in $new_path.
23137
23138  input_path="$new_path"
23139  # Check if we need to convert this using DOS-style short mode. If the path
23140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23141  # take no chances and rewrite it.
23142  # Note: m4 eats our [], so we need to use [ and ] instead.
23143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23144  if test "x$has_forbidden_chars" != x; then
23145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23149      # Going to short mode and back again did indeed matter. Since short mode is
23150      # case insensitive, let's make it lowercase to improve readability.
23151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23152      # Now convert it back to Unix-stile (cygpath)
23153      input_path=`$CYGPATH -u "$shortmode_path"`
23154      new_path="$input_path"
23155    fi
23156  fi
23157
23158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23159  if test "x$test_cygdrive_prefix" = x; then
23160    # As a simple fix, exclude /usr/bin since it's not a real path.
23161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23163      # a path prefixed by /cygdrive for fixpath to work.
23164      new_path="$CYGWIN_ROOT_PATH$input_path"
23165    fi
23166  fi
23167
23168
23169  if test "x$path" != "x$new_path"; then
23170    BOOT_JDK="$new_path"
23171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23172$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23173  fi
23174
23175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23176
23177  path="$BOOT_JDK"
23178  has_colon=`$ECHO $path | $GREP ^.:`
23179  new_path="$path"
23180  if test "x$has_colon" = x; then
23181    # Not in mixed or Windows style, start by that.
23182    new_path=`cmd //c echo $path`
23183  fi
23184
23185
23186  input_path="$new_path"
23187  # Check if we need to convert this using DOS-style short mode. If the path
23188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23189  # take no chances and rewrite it.
23190  # Note: m4 eats our [], so we need to use [ and ] instead.
23191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23192  if test "x$has_forbidden_chars" != x; then
23193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23195  fi
23196
23197
23198  windows_path="$new_path"
23199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23200    unix_path=`$CYGPATH -u "$windows_path"`
23201    new_path="$unix_path"
23202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23204    new_path="$unix_path"
23205  fi
23206
23207  if test "x$path" != "x$new_path"; then
23208    BOOT_JDK="$new_path"
23209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23210$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23211  fi
23212
23213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23215
23216  else
23217    # We're on a posix platform. Hooray! :)
23218    path="$BOOT_JDK"
23219    has_space=`$ECHO "$path" | $GREP " "`
23220    if test "x$has_space" != x; then
23221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23222$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23223      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23224    fi
23225
23226    # Use eval to expand a potential ~
23227    eval path="$path"
23228    if test ! -f "$path" && test ! -d "$path"; then
23229      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23230    fi
23231
23232    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23233  fi
23234
23235              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23236$as_echo_n "checking for Boot JDK... " >&6; }
23237              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23238$as_echo "$BOOT_JDK" >&6; }
23239              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23240$as_echo_n "checking Boot JDK version... " >&6; }
23241              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23242              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23243$as_echo "$BOOT_JDK_VERSION" >&6; }
23244            fi # end check jdk version
23245          fi # end check rt.jar
23246        fi # end check javac
23247      fi # end check java
23248    fi # end check boot jdk found
23249  fi
23250
23251    done
23252  fi
23253
23254  fi
23255
23256
23257    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23258    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23259      # Do we have a bin/java?
23260      if test ! -x "$BOOT_JDK/bin/java"; then
23261        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23263        BOOT_JDK_FOUND=no
23264      else
23265        # Do we have a bin/javac?
23266        if test ! -x "$BOOT_JDK/bin/javac"; then
23267          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23268$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23269          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23270$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23271          BOOT_JDK_FOUND=no
23272        else
23273          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23274          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23275            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23277            BOOT_JDK_FOUND=no
23278          else
23279            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23280            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23281
23282            # Extra M4 quote needed to protect [] in grep expression.
23283            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23284            if test "x$FOUND_CORRECT_VERSION" = x; then
23285              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23286$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23287              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23288$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23289              BOOT_JDK_FOUND=no
23290            else
23291              # We're done! :-)
23292              BOOT_JDK_FOUND=yes
23293
23294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23295
23296  # Input might be given as Windows format, start by converting to
23297  # unix format.
23298  path="$BOOT_JDK"
23299  new_path=`$CYGPATH -u "$path"`
23300
23301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23304  # "foo.exe" is OK but "foo" is an error.
23305  #
23306  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23307  # It is also a way to make sure we got the proper file name for the real test later on.
23308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23309  if test "x$test_shortpath" = x; then
23310    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23311$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23312    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23313  fi
23314
23315  # Call helper function which possibly converts this using DOS-style short mode.
23316  # If so, the updated path is stored in $new_path.
23317
23318  input_path="$new_path"
23319  # Check if we need to convert this using DOS-style short mode. If the path
23320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23321  # take no chances and rewrite it.
23322  # Note: m4 eats our [], so we need to use [ and ] instead.
23323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23324  if test "x$has_forbidden_chars" != x; then
23325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23329      # Going to short mode and back again did indeed matter. Since short mode is
23330      # case insensitive, let's make it lowercase to improve readability.
23331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23332      # Now convert it back to Unix-stile (cygpath)
23333      input_path=`$CYGPATH -u "$shortmode_path"`
23334      new_path="$input_path"
23335    fi
23336  fi
23337
23338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23339  if test "x$test_cygdrive_prefix" = x; then
23340    # As a simple fix, exclude /usr/bin since it's not a real path.
23341    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23343      # a path prefixed by /cygdrive for fixpath to work.
23344      new_path="$CYGWIN_ROOT_PATH$input_path"
23345    fi
23346  fi
23347
23348
23349  if test "x$path" != "x$new_path"; then
23350    BOOT_JDK="$new_path"
23351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23352$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23353  fi
23354
23355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23356
23357  path="$BOOT_JDK"
23358  has_colon=`$ECHO $path | $GREP ^.:`
23359  new_path="$path"
23360  if test "x$has_colon" = x; then
23361    # Not in mixed or Windows style, start by that.
23362    new_path=`cmd //c echo $path`
23363  fi
23364
23365
23366  input_path="$new_path"
23367  # Check if we need to convert this using DOS-style short mode. If the path
23368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23369  # take no chances and rewrite it.
23370  # Note: m4 eats our [], so we need to use [ and ] instead.
23371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23372  if test "x$has_forbidden_chars" != x; then
23373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23374    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23375  fi
23376
23377
23378  windows_path="$new_path"
23379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23380    unix_path=`$CYGPATH -u "$windows_path"`
23381    new_path="$unix_path"
23382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23384    new_path="$unix_path"
23385  fi
23386
23387  if test "x$path" != "x$new_path"; then
23388    BOOT_JDK="$new_path"
23389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23390$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23391  fi
23392
23393  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23394  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23395
23396  else
23397    # We're on a posix platform. Hooray! :)
23398    path="$BOOT_JDK"
23399    has_space=`$ECHO "$path" | $GREP " "`
23400    if test "x$has_space" != x; then
23401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23402$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23403      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23404    fi
23405
23406    # Use eval to expand a potential ~
23407    eval path="$path"
23408    if test ! -f "$path" && test ! -d "$path"; then
23409      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23410    fi
23411
23412    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23413  fi
23414
23415              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23416$as_echo_n "checking for Boot JDK... " >&6; }
23417              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23418$as_echo "$BOOT_JDK" >&6; }
23419              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23420$as_echo_n "checking Boot JDK version... " >&6; }
23421              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23422              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23423$as_echo "$BOOT_JDK_VERSION" >&6; }
23424            fi # end check jdk version
23425          fi # end check rt.jar
23426        fi # end check javac
23427      fi # end check java
23428    fi # end check boot jdk found
23429  fi
23430
23431
23432  if test "x$BOOT_JDK_FOUND" = xno; then
23433    # Now execute the test
23434
23435  if test "x$ProgramFiles" != x; then
23436    VIRTUAL_DIR="$ProgramFiles/Java"
23437
23438  windows_path="$VIRTUAL_DIR"
23439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23440    unix_path=`$CYGPATH -u "$windows_path"`
23441    VIRTUAL_DIR="$unix_path"
23442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23444    VIRTUAL_DIR="$unix_path"
23445  fi
23446
23447
23448  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23449  BOOT_JDK_SUFFIX=""
23450  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23451  if test "x$ALL_JDKS_FOUND" != x; then
23452    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23453
23454  if test "x$BOOT_JDK_FOUND" = xno; then
23455    # Now execute the test
23456
23457        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23458        if test -d "$BOOT_JDK"; then
23459          BOOT_JDK_FOUND=maybe
23460          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23461$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23462        fi
23463
23464
23465    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23466    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23467      # Do we have a bin/java?
23468      if test ! -x "$BOOT_JDK/bin/java"; then
23469        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23470$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23471        BOOT_JDK_FOUND=no
23472      else
23473        # Do we have a bin/javac?
23474        if test ! -x "$BOOT_JDK/bin/javac"; then
23475          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23476$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23477          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23478$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23479          BOOT_JDK_FOUND=no
23480        else
23481          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23482          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23483            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23485            BOOT_JDK_FOUND=no
23486          else
23487            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23488            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23489
23490            # Extra M4 quote needed to protect [] in grep expression.
23491            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23492            if test "x$FOUND_CORRECT_VERSION" = x; then
23493              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23495              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23496$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23497              BOOT_JDK_FOUND=no
23498            else
23499              # We're done! :-)
23500              BOOT_JDK_FOUND=yes
23501
23502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23503
23504  # Input might be given as Windows format, start by converting to
23505  # unix format.
23506  path="$BOOT_JDK"
23507  new_path=`$CYGPATH -u "$path"`
23508
23509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23512  # "foo.exe" is OK but "foo" is an error.
23513  #
23514  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23515  # It is also a way to make sure we got the proper file name for the real test later on.
23516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23517  if test "x$test_shortpath" = x; then
23518    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23519$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23520    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23521  fi
23522
23523  # Call helper function which possibly converts this using DOS-style short mode.
23524  # If so, the updated path is stored in $new_path.
23525
23526  input_path="$new_path"
23527  # Check if we need to convert this using DOS-style short mode. If the path
23528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23529  # take no chances and rewrite it.
23530  # Note: m4 eats our [], so we need to use [ and ] instead.
23531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23532  if test "x$has_forbidden_chars" != x; then
23533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23534    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23535    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23536    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23537      # Going to short mode and back again did indeed matter. Since short mode is
23538      # case insensitive, let's make it lowercase to improve readability.
23539      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23540      # Now convert it back to Unix-stile (cygpath)
23541      input_path=`$CYGPATH -u "$shortmode_path"`
23542      new_path="$input_path"
23543    fi
23544  fi
23545
23546  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23547  if test "x$test_cygdrive_prefix" = x; then
23548    # As a simple fix, exclude /usr/bin since it's not a real path.
23549    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23550      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23551      # a path prefixed by /cygdrive for fixpath to work.
23552      new_path="$CYGWIN_ROOT_PATH$input_path"
23553    fi
23554  fi
23555
23556
23557  if test "x$path" != "x$new_path"; then
23558    BOOT_JDK="$new_path"
23559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23560$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23561  fi
23562
23563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23564
23565  path="$BOOT_JDK"
23566  has_colon=`$ECHO $path | $GREP ^.:`
23567  new_path="$path"
23568  if test "x$has_colon" = x; then
23569    # Not in mixed or Windows style, start by that.
23570    new_path=`cmd //c echo $path`
23571  fi
23572
23573
23574  input_path="$new_path"
23575  # Check if we need to convert this using DOS-style short mode. If the path
23576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23577  # take no chances and rewrite it.
23578  # Note: m4 eats our [], so we need to use [ and ] instead.
23579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23580  if test "x$has_forbidden_chars" != x; then
23581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23583  fi
23584
23585
23586  windows_path="$new_path"
23587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23588    unix_path=`$CYGPATH -u "$windows_path"`
23589    new_path="$unix_path"
23590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23592    new_path="$unix_path"
23593  fi
23594
23595  if test "x$path" != "x$new_path"; then
23596    BOOT_JDK="$new_path"
23597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23598$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23599  fi
23600
23601  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23602  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23603
23604  else
23605    # We're on a posix platform. Hooray! :)
23606    path="$BOOT_JDK"
23607    has_space=`$ECHO "$path" | $GREP " "`
23608    if test "x$has_space" != x; then
23609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23610$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23611      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23612    fi
23613
23614    # Use eval to expand a potential ~
23615    eval path="$path"
23616    if test ! -f "$path" && test ! -d "$path"; then
23617      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23618    fi
23619
23620    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23621  fi
23622
23623              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23624$as_echo_n "checking for Boot JDK... " >&6; }
23625              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23626$as_echo "$BOOT_JDK" >&6; }
23627              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23628$as_echo_n "checking Boot JDK version... " >&6; }
23629              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23630              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23631$as_echo "$BOOT_JDK_VERSION" >&6; }
23632            fi # end check jdk version
23633          fi # end check rt.jar
23634        fi # end check javac
23635      fi # end check java
23636    fi # end check boot jdk found
23637  fi
23638
23639    done
23640  fi
23641
23642  fi
23643
23644
23645    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23646    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23647      # Do we have a bin/java?
23648      if test ! -x "$BOOT_JDK/bin/java"; then
23649        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23651        BOOT_JDK_FOUND=no
23652      else
23653        # Do we have a bin/javac?
23654        if test ! -x "$BOOT_JDK/bin/javac"; then
23655          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23657          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23658$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23659          BOOT_JDK_FOUND=no
23660        else
23661          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23662          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23663            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23664$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23665            BOOT_JDK_FOUND=no
23666          else
23667            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23668            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23669
23670            # Extra M4 quote needed to protect [] in grep expression.
23671            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23672            if test "x$FOUND_CORRECT_VERSION" = x; then
23673              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23675              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23676$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23677              BOOT_JDK_FOUND=no
23678            else
23679              # We're done! :-)
23680              BOOT_JDK_FOUND=yes
23681
23682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23683
23684  # Input might be given as Windows format, start by converting to
23685  # unix format.
23686  path="$BOOT_JDK"
23687  new_path=`$CYGPATH -u "$path"`
23688
23689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23692  # "foo.exe" is OK but "foo" is an error.
23693  #
23694  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23695  # It is also a way to make sure we got the proper file name for the real test later on.
23696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23697  if test "x$test_shortpath" = x; then
23698    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23699$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23700    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23701  fi
23702
23703  # Call helper function which possibly converts this using DOS-style short mode.
23704  # If so, the updated path is stored in $new_path.
23705
23706  input_path="$new_path"
23707  # Check if we need to convert this using DOS-style short mode. If the path
23708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23709  # take no chances and rewrite it.
23710  # Note: m4 eats our [], so we need to use [ and ] instead.
23711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23712  if test "x$has_forbidden_chars" != x; then
23713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23717      # Going to short mode and back again did indeed matter. Since short mode is
23718      # case insensitive, let's make it lowercase to improve readability.
23719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23720      # Now convert it back to Unix-stile (cygpath)
23721      input_path=`$CYGPATH -u "$shortmode_path"`
23722      new_path="$input_path"
23723    fi
23724  fi
23725
23726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23727  if test "x$test_cygdrive_prefix" = x; then
23728    # As a simple fix, exclude /usr/bin since it's not a real path.
23729    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23731      # a path prefixed by /cygdrive for fixpath to work.
23732      new_path="$CYGWIN_ROOT_PATH$input_path"
23733    fi
23734  fi
23735
23736
23737  if test "x$path" != "x$new_path"; then
23738    BOOT_JDK="$new_path"
23739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23740$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23741  fi
23742
23743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23744
23745  path="$BOOT_JDK"
23746  has_colon=`$ECHO $path | $GREP ^.:`
23747  new_path="$path"
23748  if test "x$has_colon" = x; then
23749    # Not in mixed or Windows style, start by that.
23750    new_path=`cmd //c echo $path`
23751  fi
23752
23753
23754  input_path="$new_path"
23755  # Check if we need to convert this using DOS-style short mode. If the path
23756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23757  # take no chances and rewrite it.
23758  # Note: m4 eats our [], so we need to use [ and ] instead.
23759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23760  if test "x$has_forbidden_chars" != x; then
23761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23763  fi
23764
23765
23766  windows_path="$new_path"
23767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23768    unix_path=`$CYGPATH -u "$windows_path"`
23769    new_path="$unix_path"
23770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23772    new_path="$unix_path"
23773  fi
23774
23775  if test "x$path" != "x$new_path"; then
23776    BOOT_JDK="$new_path"
23777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23778$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23779  fi
23780
23781  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23782  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23783
23784  else
23785    # We're on a posix platform. Hooray! :)
23786    path="$BOOT_JDK"
23787    has_space=`$ECHO "$path" | $GREP " "`
23788    if test "x$has_space" != x; then
23789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23790$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23791      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23792    fi
23793
23794    # Use eval to expand a potential ~
23795    eval path="$path"
23796    if test ! -f "$path" && test ! -d "$path"; then
23797      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23798    fi
23799
23800    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23801  fi
23802
23803              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23804$as_echo_n "checking for Boot JDK... " >&6; }
23805              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23806$as_echo "$BOOT_JDK" >&6; }
23807              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23808$as_echo_n "checking Boot JDK version... " >&6; }
23809              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23810              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23811$as_echo "$BOOT_JDK_VERSION" >&6; }
23812            fi # end check jdk version
23813          fi # end check rt.jar
23814        fi # end check javac
23815      fi # end check java
23816    fi # end check boot jdk found
23817  fi
23818
23819
23820  if test "x$BOOT_JDK_FOUND" = xno; then
23821    # Now execute the test
23822
23823  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23824  BOOT_JDK_SUFFIX=""
23825  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23826  if test "x$ALL_JDKS_FOUND" != x; then
23827    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23828
23829  if test "x$BOOT_JDK_FOUND" = xno; then
23830    # Now execute the test
23831
23832        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23833        if test -d "$BOOT_JDK"; then
23834          BOOT_JDK_FOUND=maybe
23835          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23836$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23837        fi
23838
23839
23840    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23841    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23842      # Do we have a bin/java?
23843      if test ! -x "$BOOT_JDK/bin/java"; then
23844        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23845$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23846        BOOT_JDK_FOUND=no
23847      else
23848        # Do we have a bin/javac?
23849        if test ! -x "$BOOT_JDK/bin/javac"; then
23850          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23852          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23853$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23854          BOOT_JDK_FOUND=no
23855        else
23856          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23857          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23858            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23859$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23860            BOOT_JDK_FOUND=no
23861          else
23862            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23863            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23864
23865            # Extra M4 quote needed to protect [] in grep expression.
23866            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23867            if test "x$FOUND_CORRECT_VERSION" = x; then
23868              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23870              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23871$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23872              BOOT_JDK_FOUND=no
23873            else
23874              # We're done! :-)
23875              BOOT_JDK_FOUND=yes
23876
23877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23878
23879  # Input might be given as Windows format, start by converting to
23880  # unix format.
23881  path="$BOOT_JDK"
23882  new_path=`$CYGPATH -u "$path"`
23883
23884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23887  # "foo.exe" is OK but "foo" is an error.
23888  #
23889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23890  # It is also a way to make sure we got the proper file name for the real test later on.
23891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23892  if test "x$test_shortpath" = x; then
23893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23894$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23895    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23896  fi
23897
23898  # Call helper function which possibly converts this using DOS-style short mode.
23899  # If so, the updated path is stored in $new_path.
23900
23901  input_path="$new_path"
23902  # Check if we need to convert this using DOS-style short mode. If the path
23903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23904  # take no chances and rewrite it.
23905  # Note: m4 eats our [], so we need to use [ and ] instead.
23906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23907  if test "x$has_forbidden_chars" != x; then
23908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23912      # Going to short mode and back again did indeed matter. Since short mode is
23913      # case insensitive, let's make it lowercase to improve readability.
23914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23915      # Now convert it back to Unix-stile (cygpath)
23916      input_path=`$CYGPATH -u "$shortmode_path"`
23917      new_path="$input_path"
23918    fi
23919  fi
23920
23921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23922  if test "x$test_cygdrive_prefix" = x; then
23923    # As a simple fix, exclude /usr/bin since it's not a real path.
23924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23926      # a path prefixed by /cygdrive for fixpath to work.
23927      new_path="$CYGWIN_ROOT_PATH$input_path"
23928    fi
23929  fi
23930
23931
23932  if test "x$path" != "x$new_path"; then
23933    BOOT_JDK="$new_path"
23934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23935$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23936  fi
23937
23938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23939
23940  path="$BOOT_JDK"
23941  has_colon=`$ECHO $path | $GREP ^.:`
23942  new_path="$path"
23943  if test "x$has_colon" = x; then
23944    # Not in mixed or Windows style, start by that.
23945    new_path=`cmd //c echo $path`
23946  fi
23947
23948
23949  input_path="$new_path"
23950  # Check if we need to convert this using DOS-style short mode. If the path
23951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23952  # take no chances and rewrite it.
23953  # Note: m4 eats our [], so we need to use [ and ] instead.
23954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23955  if test "x$has_forbidden_chars" != x; then
23956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23958  fi
23959
23960
23961  windows_path="$new_path"
23962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23963    unix_path=`$CYGPATH -u "$windows_path"`
23964    new_path="$unix_path"
23965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23967    new_path="$unix_path"
23968  fi
23969
23970  if test "x$path" != "x$new_path"; then
23971    BOOT_JDK="$new_path"
23972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23973$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23974  fi
23975
23976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23978
23979  else
23980    # We're on a posix platform. Hooray! :)
23981    path="$BOOT_JDK"
23982    has_space=`$ECHO "$path" | $GREP " "`
23983    if test "x$has_space" != x; then
23984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23985$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23986      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23987    fi
23988
23989    # Use eval to expand a potential ~
23990    eval path="$path"
23991    if test ! -f "$path" && test ! -d "$path"; then
23992      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23993    fi
23994
23995    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23996  fi
23997
23998              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23999$as_echo_n "checking for Boot JDK... " >&6; }
24000              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24001$as_echo "$BOOT_JDK" >&6; }
24002              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24003$as_echo_n "checking Boot JDK version... " >&6; }
24004              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24005              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24006$as_echo "$BOOT_JDK_VERSION" >&6; }
24007            fi # end check jdk version
24008          fi # end check rt.jar
24009        fi # end check javac
24010      fi # end check java
24011    fi # end check boot jdk found
24012  fi
24013
24014    done
24015  fi
24016
24017
24018    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24019    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24020      # Do we have a bin/java?
24021      if test ! -x "$BOOT_JDK/bin/java"; then
24022        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24024        BOOT_JDK_FOUND=no
24025      else
24026        # Do we have a bin/javac?
24027        if test ! -x "$BOOT_JDK/bin/javac"; then
24028          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24030          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24031$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24032          BOOT_JDK_FOUND=no
24033        else
24034          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24035          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24036            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24037$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24038            BOOT_JDK_FOUND=no
24039          else
24040            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24041            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24042
24043            # Extra M4 quote needed to protect [] in grep expression.
24044            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24045            if test "x$FOUND_CORRECT_VERSION" = x; then
24046              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24048              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24049$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24050              BOOT_JDK_FOUND=no
24051            else
24052              # We're done! :-)
24053              BOOT_JDK_FOUND=yes
24054
24055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24056
24057  # Input might be given as Windows format, start by converting to
24058  # unix format.
24059  path="$BOOT_JDK"
24060  new_path=`$CYGPATH -u "$path"`
24061
24062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24065  # "foo.exe" is OK but "foo" is an error.
24066  #
24067  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24068  # It is also a way to make sure we got the proper file name for the real test later on.
24069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24070  if test "x$test_shortpath" = x; then
24071    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24072$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24073    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24074  fi
24075
24076  # Call helper function which possibly converts this using DOS-style short mode.
24077  # If so, the updated path is stored in $new_path.
24078
24079  input_path="$new_path"
24080  # Check if we need to convert this using DOS-style short mode. If the path
24081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24082  # take no chances and rewrite it.
24083  # Note: m4 eats our [], so we need to use [ and ] instead.
24084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24085  if test "x$has_forbidden_chars" != x; then
24086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24090      # Going to short mode and back again did indeed matter. Since short mode is
24091      # case insensitive, let's make it lowercase to improve readability.
24092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24093      # Now convert it back to Unix-stile (cygpath)
24094      input_path=`$CYGPATH -u "$shortmode_path"`
24095      new_path="$input_path"
24096    fi
24097  fi
24098
24099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24100  if test "x$test_cygdrive_prefix" = x; then
24101    # As a simple fix, exclude /usr/bin since it's not a real path.
24102    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24104      # a path prefixed by /cygdrive for fixpath to work.
24105      new_path="$CYGWIN_ROOT_PATH$input_path"
24106    fi
24107  fi
24108
24109
24110  if test "x$path" != "x$new_path"; then
24111    BOOT_JDK="$new_path"
24112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24113$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24114  fi
24115
24116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24117
24118  path="$BOOT_JDK"
24119  has_colon=`$ECHO $path | $GREP ^.:`
24120  new_path="$path"
24121  if test "x$has_colon" = x; then
24122    # Not in mixed or Windows style, start by that.
24123    new_path=`cmd //c echo $path`
24124  fi
24125
24126
24127  input_path="$new_path"
24128  # Check if we need to convert this using DOS-style short mode. If the path
24129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24130  # take no chances and rewrite it.
24131  # Note: m4 eats our [], so we need to use [ and ] instead.
24132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24133  if test "x$has_forbidden_chars" != x; then
24134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24136  fi
24137
24138
24139  windows_path="$new_path"
24140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24141    unix_path=`$CYGPATH -u "$windows_path"`
24142    new_path="$unix_path"
24143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24145    new_path="$unix_path"
24146  fi
24147
24148  if test "x$path" != "x$new_path"; then
24149    BOOT_JDK="$new_path"
24150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24151$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24152  fi
24153
24154  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24155  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24156
24157  else
24158    # We're on a posix platform. Hooray! :)
24159    path="$BOOT_JDK"
24160    has_space=`$ECHO "$path" | $GREP " "`
24161    if test "x$has_space" != x; then
24162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24163$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24164      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24165    fi
24166
24167    # Use eval to expand a potential ~
24168    eval path="$path"
24169    if test ! -f "$path" && test ! -d "$path"; then
24170      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24171    fi
24172
24173    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24174  fi
24175
24176              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24177$as_echo_n "checking for Boot JDK... " >&6; }
24178              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24179$as_echo "$BOOT_JDK" >&6; }
24180              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24181$as_echo_n "checking Boot JDK version... " >&6; }
24182              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24183              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24184$as_echo "$BOOT_JDK_VERSION" >&6; }
24185            fi # end check jdk version
24186          fi # end check rt.jar
24187        fi # end check javac
24188      fi # end check java
24189    fi # end check boot jdk found
24190  fi
24191
24192  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24193
24194  if test "x$BOOT_JDK_FOUND" = xno; then
24195    # Now execute the test
24196
24197  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24198  BOOT_JDK_SUFFIX="/Contents/Home"
24199  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24200  if test "x$ALL_JDKS_FOUND" != x; then
24201    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24202
24203  if test "x$BOOT_JDK_FOUND" = xno; then
24204    # Now execute the test
24205
24206        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24207        if test -d "$BOOT_JDK"; then
24208          BOOT_JDK_FOUND=maybe
24209          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24210$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24211        fi
24212
24213
24214    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24215    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24216      # Do we have a bin/java?
24217      if test ! -x "$BOOT_JDK/bin/java"; then
24218        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24219$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24220        BOOT_JDK_FOUND=no
24221      else
24222        # Do we have a bin/javac?
24223        if test ! -x "$BOOT_JDK/bin/javac"; then
24224          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24225$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24226          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24227$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24228          BOOT_JDK_FOUND=no
24229        else
24230          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24231          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24232            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24233$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24234            BOOT_JDK_FOUND=no
24235          else
24236            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24237            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24238
24239            # Extra M4 quote needed to protect [] in grep expression.
24240            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24241            if test "x$FOUND_CORRECT_VERSION" = x; then
24242              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24243$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24244              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24245$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24246              BOOT_JDK_FOUND=no
24247            else
24248              # We're done! :-)
24249              BOOT_JDK_FOUND=yes
24250
24251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24252
24253  # Input might be given as Windows format, start by converting to
24254  # unix format.
24255  path="$BOOT_JDK"
24256  new_path=`$CYGPATH -u "$path"`
24257
24258  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24259  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24260  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24261  # "foo.exe" is OK but "foo" is an error.
24262  #
24263  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24264  # It is also a way to make sure we got the proper file name for the real test later on.
24265  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24266  if test "x$test_shortpath" = x; then
24267    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24268$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24269    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24270  fi
24271
24272  # Call helper function which possibly converts this using DOS-style short mode.
24273  # If so, the updated path is stored in $new_path.
24274
24275  input_path="$new_path"
24276  # Check if we need to convert this using DOS-style short mode. If the path
24277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24278  # take no chances and rewrite it.
24279  # Note: m4 eats our [], so we need to use [ and ] instead.
24280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24281  if test "x$has_forbidden_chars" != x; then
24282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24283    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24284    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24285    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24286      # Going to short mode and back again did indeed matter. Since short mode is
24287      # case insensitive, let's make it lowercase to improve readability.
24288      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24289      # Now convert it back to Unix-stile (cygpath)
24290      input_path=`$CYGPATH -u "$shortmode_path"`
24291      new_path="$input_path"
24292    fi
24293  fi
24294
24295  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24296  if test "x$test_cygdrive_prefix" = x; then
24297    # As a simple fix, exclude /usr/bin since it's not a real path.
24298    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24299      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24300      # a path prefixed by /cygdrive for fixpath to work.
24301      new_path="$CYGWIN_ROOT_PATH$input_path"
24302    fi
24303  fi
24304
24305
24306  if test "x$path" != "x$new_path"; then
24307    BOOT_JDK="$new_path"
24308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24309$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24310  fi
24311
24312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24313
24314  path="$BOOT_JDK"
24315  has_colon=`$ECHO $path | $GREP ^.:`
24316  new_path="$path"
24317  if test "x$has_colon" = x; then
24318    # Not in mixed or Windows style, start by that.
24319    new_path=`cmd //c echo $path`
24320  fi
24321
24322
24323  input_path="$new_path"
24324  # Check if we need to convert this using DOS-style short mode. If the path
24325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24326  # take no chances and rewrite it.
24327  # Note: m4 eats our [], so we need to use [ and ] instead.
24328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24329  if test "x$has_forbidden_chars" != x; then
24330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24331    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24332  fi
24333
24334
24335  windows_path="$new_path"
24336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24337    unix_path=`$CYGPATH -u "$windows_path"`
24338    new_path="$unix_path"
24339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24341    new_path="$unix_path"
24342  fi
24343
24344  if test "x$path" != "x$new_path"; then
24345    BOOT_JDK="$new_path"
24346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24347$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24348  fi
24349
24350  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24351  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24352
24353  else
24354    # We're on a posix platform. Hooray! :)
24355    path="$BOOT_JDK"
24356    has_space=`$ECHO "$path" | $GREP " "`
24357    if test "x$has_space" != x; then
24358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24359$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24360      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24361    fi
24362
24363    # Use eval to expand a potential ~
24364    eval path="$path"
24365    if test ! -f "$path" && test ! -d "$path"; then
24366      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24367    fi
24368
24369    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24370  fi
24371
24372              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24373$as_echo_n "checking for Boot JDK... " >&6; }
24374              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24375$as_echo "$BOOT_JDK" >&6; }
24376              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24377$as_echo_n "checking Boot JDK version... " >&6; }
24378              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24379              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24380$as_echo "$BOOT_JDK_VERSION" >&6; }
24381            fi # end check jdk version
24382          fi # end check rt.jar
24383        fi # end check javac
24384      fi # end check java
24385    fi # end check boot jdk found
24386  fi
24387
24388    done
24389  fi
24390
24391
24392    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24393    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24394      # Do we have a bin/java?
24395      if test ! -x "$BOOT_JDK/bin/java"; then
24396        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24398        BOOT_JDK_FOUND=no
24399      else
24400        # Do we have a bin/javac?
24401        if test ! -x "$BOOT_JDK/bin/javac"; then
24402          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24404          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24405$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24406          BOOT_JDK_FOUND=no
24407        else
24408          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24409          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24410            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24412            BOOT_JDK_FOUND=no
24413          else
24414            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24415            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24416
24417            # Extra M4 quote needed to protect [] in grep expression.
24418            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24419            if test "x$FOUND_CORRECT_VERSION" = x; then
24420              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24422              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24423$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24424              BOOT_JDK_FOUND=no
24425            else
24426              # We're done! :-)
24427              BOOT_JDK_FOUND=yes
24428
24429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24430
24431  # Input might be given as Windows format, start by converting to
24432  # unix format.
24433  path="$BOOT_JDK"
24434  new_path=`$CYGPATH -u "$path"`
24435
24436  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24437  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24438  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24439  # "foo.exe" is OK but "foo" is an error.
24440  #
24441  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24442  # It is also a way to make sure we got the proper file name for the real test later on.
24443  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24444  if test "x$test_shortpath" = x; then
24445    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24446$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24447    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24448  fi
24449
24450  # Call helper function which possibly converts this using DOS-style short mode.
24451  # If so, the updated path is stored in $new_path.
24452
24453  input_path="$new_path"
24454  # Check if we need to convert this using DOS-style short mode. If the path
24455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24456  # take no chances and rewrite it.
24457  # Note: m4 eats our [], so we need to use [ and ] instead.
24458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24459  if test "x$has_forbidden_chars" != x; then
24460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24461    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24462    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24463    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24464      # Going to short mode and back again did indeed matter. Since short mode is
24465      # case insensitive, let's make it lowercase to improve readability.
24466      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24467      # Now convert it back to Unix-stile (cygpath)
24468      input_path=`$CYGPATH -u "$shortmode_path"`
24469      new_path="$input_path"
24470    fi
24471  fi
24472
24473  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24474  if test "x$test_cygdrive_prefix" = x; then
24475    # As a simple fix, exclude /usr/bin since it's not a real path.
24476    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24477      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24478      # a path prefixed by /cygdrive for fixpath to work.
24479      new_path="$CYGWIN_ROOT_PATH$input_path"
24480    fi
24481  fi
24482
24483
24484  if test "x$path" != "x$new_path"; then
24485    BOOT_JDK="$new_path"
24486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24487$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24488  fi
24489
24490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24491
24492  path="$BOOT_JDK"
24493  has_colon=`$ECHO $path | $GREP ^.:`
24494  new_path="$path"
24495  if test "x$has_colon" = x; then
24496    # Not in mixed or Windows style, start by that.
24497    new_path=`cmd //c echo $path`
24498  fi
24499
24500
24501  input_path="$new_path"
24502  # Check if we need to convert this using DOS-style short mode. If the path
24503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24504  # take no chances and rewrite it.
24505  # Note: m4 eats our [], so we need to use [ and ] instead.
24506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24507  if test "x$has_forbidden_chars" != x; then
24508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24510  fi
24511
24512
24513  windows_path="$new_path"
24514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24515    unix_path=`$CYGPATH -u "$windows_path"`
24516    new_path="$unix_path"
24517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24519    new_path="$unix_path"
24520  fi
24521
24522  if test "x$path" != "x$new_path"; then
24523    BOOT_JDK="$new_path"
24524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24525$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24526  fi
24527
24528  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24529  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24530
24531  else
24532    # We're on a posix platform. Hooray! :)
24533    path="$BOOT_JDK"
24534    has_space=`$ECHO "$path" | $GREP " "`
24535    if test "x$has_space" != x; then
24536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24537$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24538      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24539    fi
24540
24541    # Use eval to expand a potential ~
24542    eval path="$path"
24543    if test ! -f "$path" && test ! -d "$path"; then
24544      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24545    fi
24546
24547    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24548  fi
24549
24550              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24551$as_echo_n "checking for Boot JDK... " >&6; }
24552              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24553$as_echo "$BOOT_JDK" >&6; }
24554              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24555$as_echo_n "checking Boot JDK version... " >&6; }
24556              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24557              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24558$as_echo "$BOOT_JDK_VERSION" >&6; }
24559            fi # end check jdk version
24560          fi # end check rt.jar
24561        fi # end check javac
24562      fi # end check java
24563    fi # end check boot jdk found
24564  fi
24565
24566
24567  if test "x$BOOT_JDK_FOUND" = xno; then
24568    # Now execute the test
24569
24570  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24571  BOOT_JDK_SUFFIX="/Contents/Home"
24572  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24573  if test "x$ALL_JDKS_FOUND" != x; then
24574    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24575
24576  if test "x$BOOT_JDK_FOUND" = xno; then
24577    # Now execute the test
24578
24579        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24580        if test -d "$BOOT_JDK"; then
24581          BOOT_JDK_FOUND=maybe
24582          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24583$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24584        fi
24585
24586
24587    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24588    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24589      # Do we have a bin/java?
24590      if test ! -x "$BOOT_JDK/bin/java"; then
24591        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24593        BOOT_JDK_FOUND=no
24594      else
24595        # Do we have a bin/javac?
24596        if test ! -x "$BOOT_JDK/bin/javac"; then
24597          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24599          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24600$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24601          BOOT_JDK_FOUND=no
24602        else
24603          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24604          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24605            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24607            BOOT_JDK_FOUND=no
24608          else
24609            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24610            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24611
24612            # Extra M4 quote needed to protect [] in grep expression.
24613            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24614            if test "x$FOUND_CORRECT_VERSION" = x; then
24615              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24617              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24618$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24619              BOOT_JDK_FOUND=no
24620            else
24621              # We're done! :-)
24622              BOOT_JDK_FOUND=yes
24623
24624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24625
24626  # Input might be given as Windows format, start by converting to
24627  # unix format.
24628  path="$BOOT_JDK"
24629  new_path=`$CYGPATH -u "$path"`
24630
24631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24634  # "foo.exe" is OK but "foo" is an error.
24635  #
24636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24637  # It is also a way to make sure we got the proper file name for the real test later on.
24638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24639  if test "x$test_shortpath" = x; then
24640    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24641$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24642    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24643  fi
24644
24645  # Call helper function which possibly converts this using DOS-style short mode.
24646  # If so, the updated path is stored in $new_path.
24647
24648  input_path="$new_path"
24649  # Check if we need to convert this using DOS-style short mode. If the path
24650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24651  # take no chances and rewrite it.
24652  # Note: m4 eats our [], so we need to use [ and ] instead.
24653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24654  if test "x$has_forbidden_chars" != x; then
24655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24659      # Going to short mode and back again did indeed matter. Since short mode is
24660      # case insensitive, let's make it lowercase to improve readability.
24661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24662      # Now convert it back to Unix-stile (cygpath)
24663      input_path=`$CYGPATH -u "$shortmode_path"`
24664      new_path="$input_path"
24665    fi
24666  fi
24667
24668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24669  if test "x$test_cygdrive_prefix" = x; then
24670    # As a simple fix, exclude /usr/bin since it's not a real path.
24671    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24673      # a path prefixed by /cygdrive for fixpath to work.
24674      new_path="$CYGWIN_ROOT_PATH$input_path"
24675    fi
24676  fi
24677
24678
24679  if test "x$path" != "x$new_path"; then
24680    BOOT_JDK="$new_path"
24681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24682$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24683  fi
24684
24685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24686
24687  path="$BOOT_JDK"
24688  has_colon=`$ECHO $path | $GREP ^.:`
24689  new_path="$path"
24690  if test "x$has_colon" = x; then
24691    # Not in mixed or Windows style, start by that.
24692    new_path=`cmd //c echo $path`
24693  fi
24694
24695
24696  input_path="$new_path"
24697  # Check if we need to convert this using DOS-style short mode. If the path
24698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24699  # take no chances and rewrite it.
24700  # Note: m4 eats our [], so we need to use [ and ] instead.
24701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24702  if test "x$has_forbidden_chars" != x; then
24703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24705  fi
24706
24707
24708  windows_path="$new_path"
24709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24710    unix_path=`$CYGPATH -u "$windows_path"`
24711    new_path="$unix_path"
24712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24714    new_path="$unix_path"
24715  fi
24716
24717  if test "x$path" != "x$new_path"; then
24718    BOOT_JDK="$new_path"
24719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24720$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24721  fi
24722
24723  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24724  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24725
24726  else
24727    # We're on a posix platform. Hooray! :)
24728    path="$BOOT_JDK"
24729    has_space=`$ECHO "$path" | $GREP " "`
24730    if test "x$has_space" != x; then
24731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24732$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24733      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24734    fi
24735
24736    # Use eval to expand a potential ~
24737    eval path="$path"
24738    if test ! -f "$path" && test ! -d "$path"; then
24739      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24740    fi
24741
24742    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24743  fi
24744
24745              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24746$as_echo_n "checking for Boot JDK... " >&6; }
24747              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24748$as_echo "$BOOT_JDK" >&6; }
24749              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24750$as_echo_n "checking Boot JDK version... " >&6; }
24751              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24752              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24753$as_echo "$BOOT_JDK_VERSION" >&6; }
24754            fi # end check jdk version
24755          fi # end check rt.jar
24756        fi # end check javac
24757      fi # end check java
24758    fi # end check boot jdk found
24759  fi
24760
24761    done
24762  fi
24763
24764
24765    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24766    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24767      # Do we have a bin/java?
24768      if test ! -x "$BOOT_JDK/bin/java"; then
24769        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24771        BOOT_JDK_FOUND=no
24772      else
24773        # Do we have a bin/javac?
24774        if test ! -x "$BOOT_JDK/bin/javac"; then
24775          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24777          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24778$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24779          BOOT_JDK_FOUND=no
24780        else
24781          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24782          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24783            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24785            BOOT_JDK_FOUND=no
24786          else
24787            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24788            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24789
24790            # Extra M4 quote needed to protect [] in grep expression.
24791            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24792            if test "x$FOUND_CORRECT_VERSION" = x; then
24793              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24795              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24796$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24797              BOOT_JDK_FOUND=no
24798            else
24799              # We're done! :-)
24800              BOOT_JDK_FOUND=yes
24801
24802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24803
24804  # Input might be given as Windows format, start by converting to
24805  # unix format.
24806  path="$BOOT_JDK"
24807  new_path=`$CYGPATH -u "$path"`
24808
24809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24812  # "foo.exe" is OK but "foo" is an error.
24813  #
24814  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24815  # It is also a way to make sure we got the proper file name for the real test later on.
24816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24817  if test "x$test_shortpath" = x; then
24818    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24819$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24820    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24821  fi
24822
24823  # Call helper function which possibly converts this using DOS-style short mode.
24824  # If so, the updated path is stored in $new_path.
24825
24826  input_path="$new_path"
24827  # Check if we need to convert this using DOS-style short mode. If the path
24828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24829  # take no chances and rewrite it.
24830  # Note: m4 eats our [], so we need to use [ and ] instead.
24831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24832  if test "x$has_forbidden_chars" != x; then
24833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24837      # Going to short mode and back again did indeed matter. Since short mode is
24838      # case insensitive, let's make it lowercase to improve readability.
24839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24840      # Now convert it back to Unix-stile (cygpath)
24841      input_path=`$CYGPATH -u "$shortmode_path"`
24842      new_path="$input_path"
24843    fi
24844  fi
24845
24846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24847  if test "x$test_cygdrive_prefix" = x; then
24848    # As a simple fix, exclude /usr/bin since it's not a real path.
24849    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24851      # a path prefixed by /cygdrive for fixpath to work.
24852      new_path="$CYGWIN_ROOT_PATH$input_path"
24853    fi
24854  fi
24855
24856
24857  if test "x$path" != "x$new_path"; then
24858    BOOT_JDK="$new_path"
24859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24860$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24861  fi
24862
24863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24864
24865  path="$BOOT_JDK"
24866  has_colon=`$ECHO $path | $GREP ^.:`
24867  new_path="$path"
24868  if test "x$has_colon" = x; then
24869    # Not in mixed or Windows style, start by that.
24870    new_path=`cmd //c echo $path`
24871  fi
24872
24873
24874  input_path="$new_path"
24875  # Check if we need to convert this using DOS-style short mode. If the path
24876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24877  # take no chances and rewrite it.
24878  # Note: m4 eats our [], so we need to use [ and ] instead.
24879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24880  if test "x$has_forbidden_chars" != x; then
24881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24883  fi
24884
24885
24886  windows_path="$new_path"
24887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24888    unix_path=`$CYGPATH -u "$windows_path"`
24889    new_path="$unix_path"
24890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24892    new_path="$unix_path"
24893  fi
24894
24895  if test "x$path" != "x$new_path"; then
24896    BOOT_JDK="$new_path"
24897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24898$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24899  fi
24900
24901  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24902  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24903
24904  else
24905    # We're on a posix platform. Hooray! :)
24906    path="$BOOT_JDK"
24907    has_space=`$ECHO "$path" | $GREP " "`
24908    if test "x$has_space" != x; then
24909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24910$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24911      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24912    fi
24913
24914    # Use eval to expand a potential ~
24915    eval path="$path"
24916    if test ! -f "$path" && test ! -d "$path"; then
24917      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24918    fi
24919
24920    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24921  fi
24922
24923              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24924$as_echo_n "checking for Boot JDK... " >&6; }
24925              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24926$as_echo "$BOOT_JDK" >&6; }
24927              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24928$as_echo_n "checking Boot JDK version... " >&6; }
24929              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24930              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24931$as_echo "$BOOT_JDK_VERSION" >&6; }
24932            fi # end check jdk version
24933          fi # end check rt.jar
24934        fi # end check javac
24935      fi # end check java
24936    fi # end check boot jdk found
24937  fi
24938
24939  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24940
24941  if test "x$BOOT_JDK_FOUND" = xno; then
24942    # Now execute the test
24943
24944  BOOT_JDK_PREFIX="/usr/lib/jvm"
24945  BOOT_JDK_SUFFIX=""
24946  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24947  if test "x$ALL_JDKS_FOUND" != x; then
24948    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24949
24950  if test "x$BOOT_JDK_FOUND" = xno; then
24951    # Now execute the test
24952
24953        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24954        if test -d "$BOOT_JDK"; then
24955          BOOT_JDK_FOUND=maybe
24956          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24957$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24958        fi
24959
24960
24961    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24962    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24963      # Do we have a bin/java?
24964      if test ! -x "$BOOT_JDK/bin/java"; then
24965        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24966$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24967        BOOT_JDK_FOUND=no
24968      else
24969        # Do we have a bin/javac?
24970        if test ! -x "$BOOT_JDK/bin/javac"; then
24971          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24973          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24974$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24975          BOOT_JDK_FOUND=no
24976        else
24977          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24978          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24979            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24981            BOOT_JDK_FOUND=no
24982          else
24983            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24984            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24985
24986            # Extra M4 quote needed to protect [] in grep expression.
24987            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24988            if test "x$FOUND_CORRECT_VERSION" = x; then
24989              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24991              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24992$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24993              BOOT_JDK_FOUND=no
24994            else
24995              # We're done! :-)
24996              BOOT_JDK_FOUND=yes
24997
24998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24999
25000  # Input might be given as Windows format, start by converting to
25001  # unix format.
25002  path="$BOOT_JDK"
25003  new_path=`$CYGPATH -u "$path"`
25004
25005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25008  # "foo.exe" is OK but "foo" is an error.
25009  #
25010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25011  # It is also a way to make sure we got the proper file name for the real test later on.
25012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25013  if test "x$test_shortpath" = x; then
25014    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25015$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25016    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25017  fi
25018
25019  # Call helper function which possibly converts this using DOS-style short mode.
25020  # If so, the updated path is stored in $new_path.
25021
25022  input_path="$new_path"
25023  # Check if we need to convert this using DOS-style short mode. If the path
25024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25025  # take no chances and rewrite it.
25026  # Note: m4 eats our [], so we need to use [ and ] instead.
25027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25028  if test "x$has_forbidden_chars" != x; then
25029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25033      # Going to short mode and back again did indeed matter. Since short mode is
25034      # case insensitive, let's make it lowercase to improve readability.
25035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25036      # Now convert it back to Unix-stile (cygpath)
25037      input_path=`$CYGPATH -u "$shortmode_path"`
25038      new_path="$input_path"
25039    fi
25040  fi
25041
25042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25043  if test "x$test_cygdrive_prefix" = x; then
25044    # As a simple fix, exclude /usr/bin since it's not a real path.
25045    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25047      # a path prefixed by /cygdrive for fixpath to work.
25048      new_path="$CYGWIN_ROOT_PATH$input_path"
25049    fi
25050  fi
25051
25052
25053  if test "x$path" != "x$new_path"; then
25054    BOOT_JDK="$new_path"
25055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25056$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25057  fi
25058
25059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25060
25061  path="$BOOT_JDK"
25062  has_colon=`$ECHO $path | $GREP ^.:`
25063  new_path="$path"
25064  if test "x$has_colon" = x; then
25065    # Not in mixed or Windows style, start by that.
25066    new_path=`cmd //c echo $path`
25067  fi
25068
25069
25070  input_path="$new_path"
25071  # Check if we need to convert this using DOS-style short mode. If the path
25072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25073  # take no chances and rewrite it.
25074  # Note: m4 eats our [], so we need to use [ and ] instead.
25075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25076  if test "x$has_forbidden_chars" != x; then
25077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25079  fi
25080
25081
25082  windows_path="$new_path"
25083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25084    unix_path=`$CYGPATH -u "$windows_path"`
25085    new_path="$unix_path"
25086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25088    new_path="$unix_path"
25089  fi
25090
25091  if test "x$path" != "x$new_path"; then
25092    BOOT_JDK="$new_path"
25093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25094$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25095  fi
25096
25097  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25098  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25099
25100  else
25101    # We're on a posix platform. Hooray! :)
25102    path="$BOOT_JDK"
25103    has_space=`$ECHO "$path" | $GREP " "`
25104    if test "x$has_space" != x; then
25105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25106$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25107      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25108    fi
25109
25110    # Use eval to expand a potential ~
25111    eval path="$path"
25112    if test ! -f "$path" && test ! -d "$path"; then
25113      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25114    fi
25115
25116    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25117  fi
25118
25119              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25120$as_echo_n "checking for Boot JDK... " >&6; }
25121              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25122$as_echo "$BOOT_JDK" >&6; }
25123              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25124$as_echo_n "checking Boot JDK version... " >&6; }
25125              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25126              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25127$as_echo "$BOOT_JDK_VERSION" >&6; }
25128            fi # end check jdk version
25129          fi # end check rt.jar
25130        fi # end check javac
25131      fi # end check java
25132    fi # end check boot jdk found
25133  fi
25134
25135    done
25136  fi
25137
25138
25139    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25140    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25141      # Do we have a bin/java?
25142      if test ! -x "$BOOT_JDK/bin/java"; then
25143        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25145        BOOT_JDK_FOUND=no
25146      else
25147        # Do we have a bin/javac?
25148        if test ! -x "$BOOT_JDK/bin/javac"; then
25149          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25151          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25152$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25153          BOOT_JDK_FOUND=no
25154        else
25155          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25156          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25157            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25159            BOOT_JDK_FOUND=no
25160          else
25161            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25162            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25163
25164            # Extra M4 quote needed to protect [] in grep expression.
25165            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25166            if test "x$FOUND_CORRECT_VERSION" = x; then
25167              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25168$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25169              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25170$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25171              BOOT_JDK_FOUND=no
25172            else
25173              # We're done! :-)
25174              BOOT_JDK_FOUND=yes
25175
25176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25177
25178  # Input might be given as Windows format, start by converting to
25179  # unix format.
25180  path="$BOOT_JDK"
25181  new_path=`$CYGPATH -u "$path"`
25182
25183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25186  # "foo.exe" is OK but "foo" is an error.
25187  #
25188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25189  # It is also a way to make sure we got the proper file name for the real test later on.
25190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25191  if test "x$test_shortpath" = x; then
25192    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25193$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25194    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25195  fi
25196
25197  # Call helper function which possibly converts this using DOS-style short mode.
25198  # If so, the updated path is stored in $new_path.
25199
25200  input_path="$new_path"
25201  # Check if we need to convert this using DOS-style short mode. If the path
25202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25203  # take no chances and rewrite it.
25204  # Note: m4 eats our [], so we need to use [ and ] instead.
25205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25206  if test "x$has_forbidden_chars" != x; then
25207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25211      # Going to short mode and back again did indeed matter. Since short mode is
25212      # case insensitive, let's make it lowercase to improve readability.
25213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25214      # Now convert it back to Unix-stile (cygpath)
25215      input_path=`$CYGPATH -u "$shortmode_path"`
25216      new_path="$input_path"
25217    fi
25218  fi
25219
25220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25221  if test "x$test_cygdrive_prefix" = x; then
25222    # As a simple fix, exclude /usr/bin since it's not a real path.
25223    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25225      # a path prefixed by /cygdrive for fixpath to work.
25226      new_path="$CYGWIN_ROOT_PATH$input_path"
25227    fi
25228  fi
25229
25230
25231  if test "x$path" != "x$new_path"; then
25232    BOOT_JDK="$new_path"
25233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25234$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25235  fi
25236
25237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25238
25239  path="$BOOT_JDK"
25240  has_colon=`$ECHO $path | $GREP ^.:`
25241  new_path="$path"
25242  if test "x$has_colon" = x; then
25243    # Not in mixed or Windows style, start by that.
25244    new_path=`cmd //c echo $path`
25245  fi
25246
25247
25248  input_path="$new_path"
25249  # Check if we need to convert this using DOS-style short mode. If the path
25250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25251  # take no chances and rewrite it.
25252  # Note: m4 eats our [], so we need to use [ and ] instead.
25253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25254  if test "x$has_forbidden_chars" != x; then
25255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25257  fi
25258
25259
25260  windows_path="$new_path"
25261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25262    unix_path=`$CYGPATH -u "$windows_path"`
25263    new_path="$unix_path"
25264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25266    new_path="$unix_path"
25267  fi
25268
25269  if test "x$path" != "x$new_path"; then
25270    BOOT_JDK="$new_path"
25271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25273  fi
25274
25275  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25276  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25277
25278  else
25279    # We're on a posix platform. Hooray! :)
25280    path="$BOOT_JDK"
25281    has_space=`$ECHO "$path" | $GREP " "`
25282    if test "x$has_space" != x; then
25283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25284$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25285      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25286    fi
25287
25288    # Use eval to expand a potential ~
25289    eval path="$path"
25290    if test ! -f "$path" && test ! -d "$path"; then
25291      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25292    fi
25293
25294    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25295  fi
25296
25297              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25298$as_echo_n "checking for Boot JDK... " >&6; }
25299              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25300$as_echo "$BOOT_JDK" >&6; }
25301              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25302$as_echo_n "checking Boot JDK version... " >&6; }
25303              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25304              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25305$as_echo "$BOOT_JDK_VERSION" >&6; }
25306            fi # end check jdk version
25307          fi # end check rt.jar
25308        fi # end check javac
25309      fi # end check java
25310    fi # end check boot jdk found
25311  fi
25312
25313  fi
25314
25315
25316    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25317    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25318      # Do we have a bin/java?
25319      if test ! -x "$BOOT_JDK/bin/java"; then
25320        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25322        BOOT_JDK_FOUND=no
25323      else
25324        # Do we have a bin/javac?
25325        if test ! -x "$BOOT_JDK/bin/javac"; then
25326          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25327$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25328          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25329$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25330          BOOT_JDK_FOUND=no
25331        else
25332          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25333          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25334            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25336            BOOT_JDK_FOUND=no
25337          else
25338            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25339            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25340
25341            # Extra M4 quote needed to protect [] in grep expression.
25342            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25343            if test "x$FOUND_CORRECT_VERSION" = x; then
25344              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25345$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25346              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25347$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25348              BOOT_JDK_FOUND=no
25349            else
25350              # We're done! :-)
25351              BOOT_JDK_FOUND=yes
25352
25353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25354
25355  # Input might be given as Windows format, start by converting to
25356  # unix format.
25357  path="$BOOT_JDK"
25358  new_path=`$CYGPATH -u "$path"`
25359
25360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25363  # "foo.exe" is OK but "foo" is an error.
25364  #
25365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25366  # It is also a way to make sure we got the proper file name for the real test later on.
25367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25368  if test "x$test_shortpath" = x; then
25369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25370$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25371    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25372  fi
25373
25374  # Call helper function which possibly converts this using DOS-style short mode.
25375  # If so, the updated path is stored in $new_path.
25376
25377  input_path="$new_path"
25378  # Check if we need to convert this using DOS-style short mode. If the path
25379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25380  # take no chances and rewrite it.
25381  # Note: m4 eats our [], so we need to use [ and ] instead.
25382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25383  if test "x$has_forbidden_chars" != x; then
25384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25388      # Going to short mode and back again did indeed matter. Since short mode is
25389      # case insensitive, let's make it lowercase to improve readability.
25390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25391      # Now convert it back to Unix-stile (cygpath)
25392      input_path=`$CYGPATH -u "$shortmode_path"`
25393      new_path="$input_path"
25394    fi
25395  fi
25396
25397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25398  if test "x$test_cygdrive_prefix" = x; then
25399    # As a simple fix, exclude /usr/bin since it's not a real path.
25400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25402      # a path prefixed by /cygdrive for fixpath to work.
25403      new_path="$CYGWIN_ROOT_PATH$input_path"
25404    fi
25405  fi
25406
25407
25408  if test "x$path" != "x$new_path"; then
25409    BOOT_JDK="$new_path"
25410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25411$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25412  fi
25413
25414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25415
25416  path="$BOOT_JDK"
25417  has_colon=`$ECHO $path | $GREP ^.:`
25418  new_path="$path"
25419  if test "x$has_colon" = x; then
25420    # Not in mixed or Windows style, start by that.
25421    new_path=`cmd //c echo $path`
25422  fi
25423
25424
25425  input_path="$new_path"
25426  # Check if we need to convert this using DOS-style short mode. If the path
25427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25428  # take no chances and rewrite it.
25429  # Note: m4 eats our [], so we need to use [ and ] instead.
25430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25431  if test "x$has_forbidden_chars" != x; then
25432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25434  fi
25435
25436
25437  windows_path="$new_path"
25438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25439    unix_path=`$CYGPATH -u "$windows_path"`
25440    new_path="$unix_path"
25441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25443    new_path="$unix_path"
25444  fi
25445
25446  if test "x$path" != "x$new_path"; then
25447    BOOT_JDK="$new_path"
25448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25450  fi
25451
25452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25454
25455  else
25456    # We're on a posix platform. Hooray! :)
25457    path="$BOOT_JDK"
25458    has_space=`$ECHO "$path" | $GREP " "`
25459    if test "x$has_space" != x; then
25460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25461$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25462      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25463    fi
25464
25465    # Use eval to expand a potential ~
25466    eval path="$path"
25467    if test ! -f "$path" && test ! -d "$path"; then
25468      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25469    fi
25470
25471    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25472  fi
25473
25474              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25475$as_echo_n "checking for Boot JDK... " >&6; }
25476              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25477$as_echo "$BOOT_JDK" >&6; }
25478              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25479$as_echo_n "checking Boot JDK version... " >&6; }
25480              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25481              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25482$as_echo "$BOOT_JDK_VERSION" >&6; }
25483            fi # end check jdk version
25484          fi # end check rt.jar
25485        fi # end check javac
25486      fi # end check java
25487    fi # end check boot jdk found
25488  fi
25489
25490
25491  # If we haven't found anything yet, we've truly lost. Give up.
25492  if test "x$BOOT_JDK_FOUND" = xno; then
25493
25494  # Print a helpful message on how to acquire the necessary build dependency.
25495  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25496  MISSING_DEPENDENCY=openjdk
25497
25498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25499    cygwin_help $MISSING_DEPENDENCY
25500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25501    msys_help $MISSING_DEPENDENCY
25502  else
25503    PKGHANDLER_COMMAND=
25504
25505    case $PKGHANDLER in
25506      apt-get)
25507        apt_help     $MISSING_DEPENDENCY ;;
25508      yum)
25509        yum_help     $MISSING_DEPENDENCY ;;
25510      port)
25511        port_help    $MISSING_DEPENDENCY ;;
25512      pkgutil)
25513        pkgutil_help $MISSING_DEPENDENCY ;;
25514      pkgadd)
25515        pkgadd_help  $MISSING_DEPENDENCY ;;
25516    esac
25517
25518    if test "x$PKGHANDLER_COMMAND" != x; then
25519      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25520    fi
25521  fi
25522
25523    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25524$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25525    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25526$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25527    as_fn_error $? "Cannot continue" "$LINENO" 5
25528  fi
25529
25530  # Setup proper paths for what we found
25531  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25532  if test ! -f "$BOOT_RTJAR"; then
25533    # On MacOSX it is called classes.jar
25534    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25535    if test -f "$BOOT_RTJAR"; then
25536      # Remove the ..
25537      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25538    fi
25539  fi
25540  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25541  BOOT_JDK="$BOOT_JDK"
25542
25543
25544
25545
25546  # Setup tools from the Boot JDK.
25547
25548  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25549
25550  # Publish this variable in the help.
25551
25552
25553  if test "x$JAVA" = x; then
25554    # The variable is not set by user, try to locate tool using the code snippet
25555
25556      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25557$as_echo_n "checking for java in Boot JDK... " >&6; }
25558      JAVA=$BOOT_JDK/bin/java
25559      if test ! -x $JAVA; then
25560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25561$as_echo "not found" >&6; }
25562        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25563$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25564        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25565      fi
25566      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25567$as_echo "ok" >&6; }
25568
25569
25570  else
25571    # The variable is set, but is it from the command line or the environment?
25572
25573    # Try to remove the string !JAVA! from our list.
25574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25576      # If it failed, the variable was not from the command line. Ignore it,
25577      # but warn the user (except for BASH, which is always set by the calling BASH).
25578      if test "xJAVA" != xBASH; then
25579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25580$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25581      fi
25582      # Try to locate tool using the code snippet
25583
25584      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25585$as_echo_n "checking for java in Boot JDK... " >&6; }
25586      JAVA=$BOOT_JDK/bin/java
25587      if test ! -x $JAVA; then
25588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25589$as_echo "not found" >&6; }
25590        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25591$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25592        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25593      fi
25594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25595$as_echo "ok" >&6; }
25596
25597
25598    else
25599      # If it succeeded, then it was overridden by the user. We will use it
25600      # for the tool.
25601
25602      # First remove it from the list of overridden variables, so we can test
25603      # for unknown variables in the end.
25604      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25605
25606      # Check if the provided tool contains a complete path.
25607      tool_specified="$JAVA"
25608      tool_basename="${tool_specified##*/}"
25609      if test "x$tool_basename" = "x$tool_specified"; then
25610        # A command without a complete path is provided, search $PATH.
25611        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25612$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25613        # Extract the first word of "$tool_basename", so it can be a program name with args.
25614set dummy $tool_basename; ac_word=$2
25615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25616$as_echo_n "checking for $ac_word... " >&6; }
25617if ${ac_cv_path_JAVA+:} false; then :
25618  $as_echo_n "(cached) " >&6
25619else
25620  case $JAVA in
25621  [\\/]* | ?:[\\/]*)
25622  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25623  ;;
25624  *)
25625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25626for as_dir in $PATH
25627do
25628  IFS=$as_save_IFS
25629  test -z "$as_dir" && as_dir=.
25630    for ac_exec_ext in '' $ac_executable_extensions; do
25631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25632    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25634    break 2
25635  fi
25636done
25637  done
25638IFS=$as_save_IFS
25639
25640  ;;
25641esac
25642fi
25643JAVA=$ac_cv_path_JAVA
25644if test -n "$JAVA"; then
25645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25646$as_echo "$JAVA" >&6; }
25647else
25648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25649$as_echo "no" >&6; }
25650fi
25651
25652
25653        if test "x$JAVA" = x; then
25654          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25655        fi
25656      else
25657        # Otherwise we believe it is a complete path. Use it as it is.
25658        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25659$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25660        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25661$as_echo_n "checking for JAVA... " >&6; }
25662        if test ! -x "$tool_specified"; then
25663          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25664$as_echo "not found" >&6; }
25665          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25666        fi
25667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25668$as_echo "$tool_specified" >&6; }
25669      fi
25670    fi
25671  fi
25672
25673
25674
25675  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25676
25677  # Publish this variable in the help.
25678
25679
25680  if test "x$JAVAC" = x; then
25681    # The variable is not set by user, try to locate tool using the code snippet
25682
25683      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25684$as_echo_n "checking for javac in Boot JDK... " >&6; }
25685      JAVAC=$BOOT_JDK/bin/javac
25686      if test ! -x $JAVAC; then
25687        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25688$as_echo "not found" >&6; }
25689        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25690$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25691        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25692      fi
25693      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25694$as_echo "ok" >&6; }
25695
25696
25697  else
25698    # The variable is set, but is it from the command line or the environment?
25699
25700    # Try to remove the string !JAVAC! from our list.
25701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25703      # If it failed, the variable was not from the command line. Ignore it,
25704      # but warn the user (except for BASH, which is always set by the calling BASH).
25705      if test "xJAVAC" != xBASH; then
25706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25707$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25708      fi
25709      # Try to locate tool using the code snippet
25710
25711      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25712$as_echo_n "checking for javac in Boot JDK... " >&6; }
25713      JAVAC=$BOOT_JDK/bin/javac
25714      if test ! -x $JAVAC; then
25715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25716$as_echo "not found" >&6; }
25717        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25718$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25719        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25720      fi
25721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25722$as_echo "ok" >&6; }
25723
25724
25725    else
25726      # If it succeeded, then it was overridden by the user. We will use it
25727      # for the tool.
25728
25729      # First remove it from the list of overridden variables, so we can test
25730      # for unknown variables in the end.
25731      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25732
25733      # Check if the provided tool contains a complete path.
25734      tool_specified="$JAVAC"
25735      tool_basename="${tool_specified##*/}"
25736      if test "x$tool_basename" = "x$tool_specified"; then
25737        # A command without a complete path is provided, search $PATH.
25738        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25739$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25740        # Extract the first word of "$tool_basename", so it can be a program name with args.
25741set dummy $tool_basename; ac_word=$2
25742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25743$as_echo_n "checking for $ac_word... " >&6; }
25744if ${ac_cv_path_JAVAC+:} false; then :
25745  $as_echo_n "(cached) " >&6
25746else
25747  case $JAVAC in
25748  [\\/]* | ?:[\\/]*)
25749  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25750  ;;
25751  *)
25752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25753for as_dir in $PATH
25754do
25755  IFS=$as_save_IFS
25756  test -z "$as_dir" && as_dir=.
25757    for ac_exec_ext in '' $ac_executable_extensions; do
25758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25759    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25761    break 2
25762  fi
25763done
25764  done
25765IFS=$as_save_IFS
25766
25767  ;;
25768esac
25769fi
25770JAVAC=$ac_cv_path_JAVAC
25771if test -n "$JAVAC"; then
25772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25773$as_echo "$JAVAC" >&6; }
25774else
25775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25776$as_echo "no" >&6; }
25777fi
25778
25779
25780        if test "x$JAVAC" = x; then
25781          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25782        fi
25783      else
25784        # Otherwise we believe it is a complete path. Use it as it is.
25785        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25786$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25787        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25788$as_echo_n "checking for JAVAC... " >&6; }
25789        if test ! -x "$tool_specified"; then
25790          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25791$as_echo "not found" >&6; }
25792          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25793        fi
25794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25795$as_echo "$tool_specified" >&6; }
25796      fi
25797    fi
25798  fi
25799
25800
25801
25802  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25803
25804  # Publish this variable in the help.
25805
25806
25807  if test "x$JAVAH" = x; then
25808    # The variable is not set by user, try to locate tool using the code snippet
25809
25810      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25811$as_echo_n "checking for javah in Boot JDK... " >&6; }
25812      JAVAH=$BOOT_JDK/bin/javah
25813      if test ! -x $JAVAH; then
25814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25815$as_echo "not found" >&6; }
25816        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25817$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25818        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25819      fi
25820      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25821$as_echo "ok" >&6; }
25822
25823
25824  else
25825    # The variable is set, but is it from the command line or the environment?
25826
25827    # Try to remove the string !JAVAH! from our list.
25828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25830      # If it failed, the variable was not from the command line. Ignore it,
25831      # but warn the user (except for BASH, which is always set by the calling BASH).
25832      if test "xJAVAH" != xBASH; then
25833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25834$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25835      fi
25836      # Try to locate tool using the code snippet
25837
25838      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25839$as_echo_n "checking for javah in Boot JDK... " >&6; }
25840      JAVAH=$BOOT_JDK/bin/javah
25841      if test ! -x $JAVAH; then
25842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25843$as_echo "not found" >&6; }
25844        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25845$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25846        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25847      fi
25848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25849$as_echo "ok" >&6; }
25850
25851
25852    else
25853      # If it succeeded, then it was overridden by the user. We will use it
25854      # for the tool.
25855
25856      # First remove it from the list of overridden variables, so we can test
25857      # for unknown variables in the end.
25858      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25859
25860      # Check if the provided tool contains a complete path.
25861      tool_specified="$JAVAH"
25862      tool_basename="${tool_specified##*/}"
25863      if test "x$tool_basename" = "x$tool_specified"; then
25864        # A command without a complete path is provided, search $PATH.
25865        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25866$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25867        # Extract the first word of "$tool_basename", so it can be a program name with args.
25868set dummy $tool_basename; ac_word=$2
25869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25870$as_echo_n "checking for $ac_word... " >&6; }
25871if ${ac_cv_path_JAVAH+:} false; then :
25872  $as_echo_n "(cached) " >&6
25873else
25874  case $JAVAH in
25875  [\\/]* | ?:[\\/]*)
25876  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25877  ;;
25878  *)
25879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25880for as_dir in $PATH
25881do
25882  IFS=$as_save_IFS
25883  test -z "$as_dir" && as_dir=.
25884    for ac_exec_ext in '' $ac_executable_extensions; do
25885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25886    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25888    break 2
25889  fi
25890done
25891  done
25892IFS=$as_save_IFS
25893
25894  ;;
25895esac
25896fi
25897JAVAH=$ac_cv_path_JAVAH
25898if test -n "$JAVAH"; then
25899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25900$as_echo "$JAVAH" >&6; }
25901else
25902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25903$as_echo "no" >&6; }
25904fi
25905
25906
25907        if test "x$JAVAH" = x; then
25908          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25909        fi
25910      else
25911        # Otherwise we believe it is a complete path. Use it as it is.
25912        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25913$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25914        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25915$as_echo_n "checking for JAVAH... " >&6; }
25916        if test ! -x "$tool_specified"; then
25917          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25918$as_echo "not found" >&6; }
25919          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25920        fi
25921        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25922$as_echo "$tool_specified" >&6; }
25923      fi
25924    fi
25925  fi
25926
25927
25928
25929  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25930
25931  # Publish this variable in the help.
25932
25933
25934  if test "x$JAR" = x; then
25935    # The variable is not set by user, try to locate tool using the code snippet
25936
25937      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25938$as_echo_n "checking for jar in Boot JDK... " >&6; }
25939      JAR=$BOOT_JDK/bin/jar
25940      if test ! -x $JAR; then
25941        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25942$as_echo "not found" >&6; }
25943        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25944$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25945        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25946      fi
25947      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25948$as_echo "ok" >&6; }
25949
25950
25951  else
25952    # The variable is set, but is it from the command line or the environment?
25953
25954    # Try to remove the string !JAR! from our list.
25955    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25956    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25957      # If it failed, the variable was not from the command line. Ignore it,
25958      # but warn the user (except for BASH, which is always set by the calling BASH).
25959      if test "xJAR" != xBASH; then
25960        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25961$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25962      fi
25963      # Try to locate tool using the code snippet
25964
25965      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25966$as_echo_n "checking for jar in Boot JDK... " >&6; }
25967      JAR=$BOOT_JDK/bin/jar
25968      if test ! -x $JAR; then
25969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25970$as_echo "not found" >&6; }
25971        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25972$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25973        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25974      fi
25975      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25976$as_echo "ok" >&6; }
25977
25978
25979    else
25980      # If it succeeded, then it was overridden by the user. We will use it
25981      # for the tool.
25982
25983      # First remove it from the list of overridden variables, so we can test
25984      # for unknown variables in the end.
25985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25986
25987      # Check if the provided tool contains a complete path.
25988      tool_specified="$JAR"
25989      tool_basename="${tool_specified##*/}"
25990      if test "x$tool_basename" = "x$tool_specified"; then
25991        # A command without a complete path is provided, search $PATH.
25992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25993$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25994        # Extract the first word of "$tool_basename", so it can be a program name with args.
25995set dummy $tool_basename; ac_word=$2
25996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25997$as_echo_n "checking for $ac_word... " >&6; }
25998if ${ac_cv_path_JAR+:} false; then :
25999  $as_echo_n "(cached) " >&6
26000else
26001  case $JAR in
26002  [\\/]* | ?:[\\/]*)
26003  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26004  ;;
26005  *)
26006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26007for as_dir in $PATH
26008do
26009  IFS=$as_save_IFS
26010  test -z "$as_dir" && as_dir=.
26011    for ac_exec_ext in '' $ac_executable_extensions; do
26012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26013    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26015    break 2
26016  fi
26017done
26018  done
26019IFS=$as_save_IFS
26020
26021  ;;
26022esac
26023fi
26024JAR=$ac_cv_path_JAR
26025if test -n "$JAR"; then
26026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26027$as_echo "$JAR" >&6; }
26028else
26029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26030$as_echo "no" >&6; }
26031fi
26032
26033
26034        if test "x$JAR" = x; then
26035          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26036        fi
26037      else
26038        # Otherwise we believe it is a complete path. Use it as it is.
26039        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26040$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26042$as_echo_n "checking for JAR... " >&6; }
26043        if test ! -x "$tool_specified"; then
26044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26045$as_echo "not found" >&6; }
26046          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26047        fi
26048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26049$as_echo "$tool_specified" >&6; }
26050      fi
26051    fi
26052  fi
26053
26054
26055
26056  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26057
26058  # Publish this variable in the help.
26059
26060
26061  if test "x$NATIVE2ASCII" = x; then
26062    # The variable is not set by user, try to locate tool using the code snippet
26063
26064      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26065$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26066      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26067      if test ! -x $NATIVE2ASCII; then
26068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26069$as_echo "not found" >&6; }
26070        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26071$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26072        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26073      fi
26074      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26075$as_echo "ok" >&6; }
26076
26077
26078  else
26079    # The variable is set, but is it from the command line or the environment?
26080
26081    # Try to remove the string !NATIVE2ASCII! from our list.
26082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
26083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26084      # If it failed, the variable was not from the command line. Ignore it,
26085      # but warn the user (except for BASH, which is always set by the calling BASH).
26086      if test "xNATIVE2ASCII" != xBASH; then
26087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
26088$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
26089      fi
26090      # Try to locate tool using the code snippet
26091
26092      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26093$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26094      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26095      if test ! -x $NATIVE2ASCII; then
26096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26097$as_echo "not found" >&6; }
26098        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26099$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26100        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26101      fi
26102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26103$as_echo "ok" >&6; }
26104
26105
26106    else
26107      # If it succeeded, then it was overridden by the user. We will use it
26108      # for the tool.
26109
26110      # First remove it from the list of overridden variables, so we can test
26111      # for unknown variables in the end.
26112      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26113
26114      # Check if the provided tool contains a complete path.
26115      tool_specified="$NATIVE2ASCII"
26116      tool_basename="${tool_specified##*/}"
26117      if test "x$tool_basename" = "x$tool_specified"; then
26118        # A command without a complete path is provided, search $PATH.
26119        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
26120$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
26121        # Extract the first word of "$tool_basename", so it can be a program name with args.
26122set dummy $tool_basename; ac_word=$2
26123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26124$as_echo_n "checking for $ac_word... " >&6; }
26125if ${ac_cv_path_NATIVE2ASCII+:} false; then :
26126  $as_echo_n "(cached) " >&6
26127else
26128  case $NATIVE2ASCII in
26129  [\\/]* | ?:[\\/]*)
26130  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
26131  ;;
26132  *)
26133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26134for as_dir in $PATH
26135do
26136  IFS=$as_save_IFS
26137  test -z "$as_dir" && as_dir=.
26138    for ac_exec_ext in '' $ac_executable_extensions; do
26139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26140    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
26141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26142    break 2
26143  fi
26144done
26145  done
26146IFS=$as_save_IFS
26147
26148  ;;
26149esac
26150fi
26151NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26152if test -n "$NATIVE2ASCII"; then
26153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26154$as_echo "$NATIVE2ASCII" >&6; }
26155else
26156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26157$as_echo "no" >&6; }
26158fi
26159
26160
26161        if test "x$NATIVE2ASCII" = x; then
26162          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26163        fi
26164      else
26165        # Otherwise we believe it is a complete path. Use it as it is.
26166        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26167$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26168        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26169$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26170        if test ! -x "$tool_specified"; then
26171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26172$as_echo "not found" >&6; }
26173          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26174        fi
26175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26176$as_echo "$tool_specified" >&6; }
26177      fi
26178    fi
26179  fi
26180
26181
26182
26183  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26184
26185  # Publish this variable in the help.
26186
26187
26188  if test "x$JARSIGNER" = x; then
26189    # The variable is not set by user, try to locate tool using the code snippet
26190
26191      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26192$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26193      JARSIGNER=$BOOT_JDK/bin/jarsigner
26194      if test ! -x $JARSIGNER; then
26195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26196$as_echo "not found" >&6; }
26197        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26198$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26199        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26200      fi
26201      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26202$as_echo "ok" >&6; }
26203
26204
26205  else
26206    # The variable is set, but is it from the command line or the environment?
26207
26208    # Try to remove the string !JARSIGNER! from our list.
26209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26211      # If it failed, the variable was not from the command line. Ignore it,
26212      # but warn the user (except for BASH, which is always set by the calling BASH).
26213      if test "xJARSIGNER" != xBASH; then
26214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26215$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26216      fi
26217      # Try to locate tool using the code snippet
26218
26219      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26220$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26221      JARSIGNER=$BOOT_JDK/bin/jarsigner
26222      if test ! -x $JARSIGNER; then
26223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26224$as_echo "not found" >&6; }
26225        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26226$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26227        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26228      fi
26229      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26230$as_echo "ok" >&6; }
26231
26232
26233    else
26234      # If it succeeded, then it was overridden by the user. We will use it
26235      # for the tool.
26236
26237      # First remove it from the list of overridden variables, so we can test
26238      # for unknown variables in the end.
26239      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26240
26241      # Check if the provided tool contains a complete path.
26242      tool_specified="$JARSIGNER"
26243      tool_basename="${tool_specified##*/}"
26244      if test "x$tool_basename" = "x$tool_specified"; then
26245        # A command without a complete path is provided, search $PATH.
26246        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26247$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26248        # Extract the first word of "$tool_basename", so it can be a program name with args.
26249set dummy $tool_basename; ac_word=$2
26250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26251$as_echo_n "checking for $ac_word... " >&6; }
26252if ${ac_cv_path_JARSIGNER+:} false; then :
26253  $as_echo_n "(cached) " >&6
26254else
26255  case $JARSIGNER in
26256  [\\/]* | ?:[\\/]*)
26257  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26258  ;;
26259  *)
26260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26261for as_dir in $PATH
26262do
26263  IFS=$as_save_IFS
26264  test -z "$as_dir" && as_dir=.
26265    for ac_exec_ext in '' $ac_executable_extensions; do
26266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26267    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26269    break 2
26270  fi
26271done
26272  done
26273IFS=$as_save_IFS
26274
26275  ;;
26276esac
26277fi
26278JARSIGNER=$ac_cv_path_JARSIGNER
26279if test -n "$JARSIGNER"; then
26280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26281$as_echo "$JARSIGNER" >&6; }
26282else
26283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26284$as_echo "no" >&6; }
26285fi
26286
26287
26288        if test "x$JARSIGNER" = x; then
26289          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26290        fi
26291      else
26292        # Otherwise we believe it is a complete path. Use it as it is.
26293        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26294$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26296$as_echo_n "checking for JARSIGNER... " >&6; }
26297        if test ! -x "$tool_specified"; then
26298          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26299$as_echo "not found" >&6; }
26300          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26301        fi
26302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26303$as_echo "$tool_specified" >&6; }
26304      fi
26305    fi
26306  fi
26307
26308
26309
26310  # Finally, set some other options...
26311
26312  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26313  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26314
26315
26316
26317
26318  ##############################################################################
26319  #
26320  # Specify jvm options for anything that is run with the Boot JDK.
26321  # Not all JVM:s accept the same arguments on the command line.
26322  #
26323
26324# Check whether --with-boot-jdk-jvmargs was given.
26325if test "${with_boot_jdk_jvmargs+set}" = set; then :
26326  withval=$with_boot_jdk_jvmargs;
26327fi
26328
26329
26330  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
26331$as_echo_n "checking flags for boot jdk java command ... " >&6; }
26332
26333  # Disable special log output when a debug build is used as Boot JDK...
26334
26335  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
26336  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
26337  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
26338  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26339  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26340  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26341    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
26342    JVM_ARG_OK=true
26343  else
26344    $ECHO "Arg failed:" >&5
26345    $ECHO "$OUTPUT" >&5
26346    JVM_ARG_OK=false
26347  fi
26348
26349
26350  # Apply user provided options.
26351
26352  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
26353  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
26354  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
26355  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26356  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26357  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26358    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
26359    JVM_ARG_OK=true
26360  else
26361    $ECHO "Arg failed:" >&5
26362    $ECHO "$OUTPUT" >&5
26363    JVM_ARG_OK=false
26364  fi
26365
26366
26367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
26368$as_echo "$boot_jdk_jvmargs" >&6; }
26369
26370  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
26371  JAVA_FLAGS=$boot_jdk_jvmargs
26372
26373
26374
26375  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
26376$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
26377
26378  # Starting amount of heap memory.
26379
26380  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
26381  $ECHO "Command: $JAVA -Xms64M -version" >&5
26382  OUTPUT=`$JAVA -Xms64M -version 2>&1`
26383  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26384  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26385  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26386    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
26387    JVM_ARG_OK=true
26388  else
26389    $ECHO "Arg failed:" >&5
26390    $ECHO "$OUTPUT" >&5
26391    JVM_ARG_OK=false
26392  fi
26393
26394
26395  # Maximum amount of heap memory.
26396  # Maximum stack size.
26397  if test "x$BUILD_NUM_BITS" = x32; then
26398    JVM_MAX_HEAP=1100M
26399    STACK_SIZE=768
26400  else
26401    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
26402    # pointers are used. Apparently, we need to increase the heap and stack
26403    # space for the jvm. More specifically, when running javac to build huge
26404    # jdk batch
26405    JVM_MAX_HEAP=1600M
26406    STACK_SIZE=1536
26407  fi
26408
26409  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
26410  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
26411  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
26412  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26413  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26414  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26415    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
26416    JVM_ARG_OK=true
26417  else
26418    $ECHO "Arg failed:" >&5
26419    $ECHO "$OUTPUT" >&5
26420    JVM_ARG_OK=false
26421  fi
26422
26423
26424  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
26425  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
26426  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
26427  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26428  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26429  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26430    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
26431    JVM_ARG_OK=true
26432  else
26433    $ECHO "Arg failed:" >&5
26434    $ECHO "$OUTPUT" >&5
26435    JVM_ARG_OK=false
26436  fi
26437
26438
26439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
26440$as_echo "$boot_jdk_jvmargs_big" >&6; }
26441
26442  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
26443
26444
26445
26446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
26447$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
26448
26449  # Use serial gc for small short lived tools if possible
26450
26451  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
26452  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
26453  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
26454  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26455  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26456  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26457    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
26458    JVM_ARG_OK=true
26459  else
26460    $ECHO "Arg failed:" >&5
26461    $ECHO "$OUTPUT" >&5
26462    JVM_ARG_OK=false
26463  fi
26464
26465
26466  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
26467  $ECHO "Command: $JAVA -Xms32M -version" >&5
26468  OUTPUT=`$JAVA -Xms32M -version 2>&1`
26469  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26470  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26471  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26472    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
26473    JVM_ARG_OK=true
26474  else
26475    $ECHO "Arg failed:" >&5
26476    $ECHO "$OUTPUT" >&5
26477    JVM_ARG_OK=false
26478  fi
26479
26480
26481  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
26482  $ECHO "Command: $JAVA -Xmx512M -version" >&5
26483  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
26484  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26485  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26486  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26487    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
26488    JVM_ARG_OK=true
26489  else
26490    $ECHO "Arg failed:" >&5
26491    $ECHO "$OUTPUT" >&5
26492    JVM_ARG_OK=false
26493  fi
26494
26495
26496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
26497$as_echo "$boot_jdk_jvmargs_small" >&6; }
26498
26499  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
26500
26501
26502  JAVA_TOOL_FLAGS_SMALL=""
26503  for f in $JAVA_FLAGS_SMALL; do
26504    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
26505  done
26506
26507
26508
26509###############################################################################
26510#
26511# Configure the sources to use. We can add or override individual directories.
26512#
26513###############################################################################
26514
26515
26516  # Where are the sources. Any of these can be overridden
26517  # using --with-override-corba and the likes.
26518  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26519  CORBA_TOPDIR="$SRC_ROOT/corba"
26520  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26521  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26522  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26523  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26524  JDK_TOPDIR="$SRC_ROOT/jdk"
26525
26526
26527
26528
26529
26530
26531
26532
26533
26534
26535  ###############################################################################
26536  #
26537  # Pickup additional source for a component from outside of the source root
26538  # or override source for a component.
26539  #
26540
26541# Check whether --with-add-source-root was given.
26542if test "${with_add_source_root+set}" = set; then :
26543  withval=$with_add_source_root;
26544fi
26545
26546
26547
26548# Check whether --with-override-source-root was given.
26549if test "${with_override_source_root+set}" = set; then :
26550  withval=$with_override_source_root;
26551fi
26552
26553
26554
26555# Check whether --with-adds-and-overrides was given.
26556if test "${with_adds_and_overrides+set}" = set; then :
26557  withval=$with_adds_and_overrides;
26558fi
26559
26560
26561  if test "x$with_adds_and_overrides" != x; then
26562    with_add_source_root="$with_adds_and_overrides/adds"
26563    with_override_source_root="$with_adds_and_overrides/overrides"
26564  fi
26565
26566  if test "x$with_add_source_root" != x; then
26567    if ! test -d $with_add_source_root; then
26568      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26569    fi
26570    CURDIR="$PWD"
26571    cd "$with_add_source_root"
26572    ADD_SRC_ROOT="`pwd`"
26573    cd "$CURDIR"
26574    # Verify that the addon source root does not have any root makefiles.
26575    # If it does, then it is usually an error, prevent this.
26576    if test -f $with_add_source_root/langtools/make/Makefile; then
26577      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
26578    fi
26579    if test -f $with_add_source_root/corba/make/Makefile; then
26580      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
26581    fi
26582    if test -f $with_add_source_root/jaxp/make/Makefile; then
26583      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
26584    fi
26585    if test -f $with_add_source_root/jaxws/make/Makefile; then
26586      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
26587    fi
26588    if test -f $with_add_source_root/hotspot/make/Makefile; then
26589      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
26590    fi
26591    if test -f $with_add_source_root/nashorn/make/Makefile; then
26592      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
26593    fi
26594    if test -f $with_add_source_root/jdk/make/Makefile; then
26595      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
26596    fi
26597  fi
26598
26599
26600  if test "x$with_override_source_root" != x; then
26601    if ! test -d $with_override_source_root; then
26602      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26603    fi
26604    CURDIR="$PWD"
26605    cd "$with_override_source_root"
26606    OVERRIDE_SRC_ROOT="`pwd`"
26607    cd "$CURDIR"
26608    if test -f $with_override_source_root/langtools/make/Makefile; then
26609      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
26610    fi
26611    if test -f $with_override_source_root/corba/make/Makefile; then
26612      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
26613    fi
26614    if test -f $with_override_source_root/jaxp/make/Makefile; then
26615      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
26616    fi
26617    if test -f $with_override_source_root/jaxws/make/Makefile; then
26618      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
26619    fi
26620    if test -f $with_override_source_root/hotspot/make/Makefile; then
26621      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
26622    fi
26623    if test -f $with_override_source_root/nashorn/make/Makefile; then
26624      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
26625    fi
26626    if test -f $with_override_source_root/jdk/make/Makefile; then
26627      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
26628    fi
26629  fi
26630
26631
26632  ###############################################################################
26633  #
26634  # Override a repo completely, this is used for example when you have 3 small
26635  # development sandboxes of the langtools sources and want to avoid having 3 full
26636  # OpenJDK sources checked out on disk.
26637  #
26638  # Assuming that the 3 langtools sandboxes are located here:
26639  # /home/fredrik/sandbox1/langtools
26640  # /home/fredrik/sandbox2/langtools
26641  # /home/fredrik/sandbox3/langtools
26642  #
26643  # From the source root you create build subdirs manually:
26644  #     mkdir -p build1 build2 build3
26645  # in each build directory run:
26646  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26647  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26648  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26649  #
26650
26651
26652# Check whether --with-override-langtools was given.
26653if test "${with_override_langtools+set}" = set; then :
26654  withval=$with_override_langtools;
26655fi
26656
26657
26658
26659# Check whether --with-override-corba was given.
26660if test "${with_override_corba+set}" = set; then :
26661  withval=$with_override_corba;
26662fi
26663
26664
26665
26666# Check whether --with-override-jaxp was given.
26667if test "${with_override_jaxp+set}" = set; then :
26668  withval=$with_override_jaxp;
26669fi
26670
26671
26672
26673# Check whether --with-override-jaxws was given.
26674if test "${with_override_jaxws+set}" = set; then :
26675  withval=$with_override_jaxws;
26676fi
26677
26678
26679
26680# Check whether --with-override-hotspot was given.
26681if test "${with_override_hotspot+set}" = set; then :
26682  withval=$with_override_hotspot;
26683fi
26684
26685
26686
26687# Check whether --with-override-nashorn was given.
26688if test "${with_override_nashorn+set}" = set; then :
26689  withval=$with_override_nashorn;
26690fi
26691
26692
26693
26694# Check whether --with-override-jdk was given.
26695if test "${with_override_jdk+set}" = set; then :
26696  withval=$with_override_jdk;
26697fi
26698
26699
26700  if test "x$with_override_langtools" != x; then
26701    CURDIR="$PWD"
26702    cd "$with_override_langtools"
26703    LANGTOOLS_TOPDIR="`pwd`"
26704    cd "$CURDIR"
26705    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26706      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26707    fi
26708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26709$as_echo_n "checking if langtools should be overridden... " >&6; }
26710    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26711$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26712  fi
26713  if test "x$with_override_corba" != x; then
26714    CURDIR="$PWD"
26715    cd "$with_override_corba"
26716    CORBA_TOPDIR="`pwd`"
26717    cd "$CURDIR"
26718    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26719      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26720    fi
26721    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26722$as_echo_n "checking if corba should be overridden... " >&6; }
26723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26724$as_echo "yes with $CORBA_TOPDIR" >&6; }
26725  fi
26726  if test "x$with_override_jaxp" != x; then
26727    CURDIR="$PWD"
26728    cd "$with_override_jaxp"
26729    JAXP_TOPDIR="`pwd`"
26730    cd "$CURDIR"
26731    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26732      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26733    fi
26734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26735$as_echo_n "checking if jaxp should be overridden... " >&6; }
26736    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26737$as_echo "yes with $JAXP_TOPDIR" >&6; }
26738  fi
26739  if test "x$with_override_jaxws" != x; then
26740    CURDIR="$PWD"
26741    cd "$with_override_jaxws"
26742    JAXWS_TOPDIR="`pwd`"
26743    cd "$CURDIR"
26744    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26745      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26746    fi
26747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26748$as_echo_n "checking if jaxws should be overridden... " >&6; }
26749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26750$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26751  fi
26752  if test "x$with_override_hotspot" != x; then
26753    CURDIR="$PWD"
26754    cd "$with_override_hotspot"
26755    HOTSPOT_TOPDIR="`pwd`"
26756    cd "$CURDIR"
26757    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26758      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26759    fi
26760    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26761$as_echo_n "checking if hotspot should be overridden... " >&6; }
26762    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26763$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26764  fi
26765  if test "x$with_override_nashorn" != x; then
26766    CURDIR="$PWD"
26767    cd "$with_override_nashorn"
26768    NASHORN_TOPDIR="`pwd`"
26769    cd "$CURDIR"
26770    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26771      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26772    fi
26773    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26774$as_echo_n "checking if nashorn should be overridden... " >&6; }
26775    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26776$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26777  fi
26778  if test "x$with_override_jdk" != x; then
26779    CURDIR="$PWD"
26780    cd "$with_override_jdk"
26781    JDK_TOPDIR="`pwd`"
26782    cd "$CURDIR"
26783    if ! test -f $JDK_TOPDIR/make/Makefile; then
26784      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26785    fi
26786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26787$as_echo_n "checking if JDK should be overridden... " >&6; }
26788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26789$as_echo "yes with $JDK_TOPDIR" >&6; }
26790  fi
26791
26792
26793  BUILD_OUTPUT="$OUTPUT_ROOT"
26794
26795
26796  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26797  BUILD_HOTSPOT=true
26798
26799
26800
26801# Check whether --with-import-hotspot was given.
26802if test "${with_import_hotspot+set}" = set; then :
26803  withval=$with_import_hotspot;
26804fi
26805
26806  if test "x$with_import_hotspot" != x; then
26807    CURDIR="$PWD"
26808    cd "$with_import_hotspot"
26809    HOTSPOT_DIST="`pwd`"
26810    cd "$CURDIR"
26811    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26812      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26813    fi
26814    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26815$as_echo_n "checking if hotspot should be imported... " >&6; }
26816    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26817$as_echo "yes from $HOTSPOT_DIST" >&6; }
26818    BUILD_HOTSPOT=false
26819  fi
26820
26821  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26822
26823
26824###############################################################################
26825#
26826# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26827# native code.
26828#
26829###############################################################################
26830
26831# First determine the toolchain type (compiler family)
26832
26833
26834# Check whether --with-toolchain-type was given.
26835if test "${with_toolchain_type+set}" = set; then :
26836  withval=$with_toolchain_type;
26837fi
26838
26839
26840  # Use indirect variable referencing
26841  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26842  VALID_TOOLCHAINS=${!toolchain_var_name}
26843
26844  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26845    if test -n "$XCODEBUILD"; then
26846      # On Mac OS X, default toolchain to clang after Xcode 5
26847      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26848      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26849      if test $? -ne 0; then
26850        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26851      fi
26852      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26853          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26854          $CUT -f 1 -d .`
26855      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26856$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26857      if test $XCODE_MAJOR_VERSION -ge 5; then
26858          DEFAULT_TOOLCHAIN="clang"
26859      else
26860          DEFAULT_TOOLCHAIN="gcc"
26861      fi
26862    else
26863      # If Xcode is not installed, but the command line tools are
26864      # then we can't run xcodebuild. On these systems we should
26865      # default to clang
26866      DEFAULT_TOOLCHAIN="clang"
26867    fi
26868  else
26869    # First toolchain type in the list is the default
26870    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26871  fi
26872
26873  if test "x$with_toolchain_type" = xlist; then
26874    # List all toolchains
26875    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26876$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26877    for toolchain in $VALID_TOOLCHAINS; do
26878      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26879      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26880      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26881    done
26882
26883    exit 0
26884  elif test "x$with_toolchain_type" != x; then
26885    # User override; check that it is valid
26886    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26887      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26888$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26889      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26890$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26891      as_fn_error $? "Cannot continue." "$LINENO" 5
26892    fi
26893    TOOLCHAIN_TYPE=$with_toolchain_type
26894  else
26895    # No flag given, use default
26896    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26897  fi
26898
26899
26900  TOOLCHAIN_CC_BINARY_clang="clang"
26901  TOOLCHAIN_CC_BINARY_gcc="gcc"
26902  TOOLCHAIN_CC_BINARY_microsoft="cl"
26903  TOOLCHAIN_CC_BINARY_solstudio="cc"
26904  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26905
26906  TOOLCHAIN_CXX_BINARY_clang="clang++"
26907  TOOLCHAIN_CXX_BINARY_gcc="g++"
26908  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26909  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26910  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26911
26912  # Use indirect variable referencing
26913  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26914  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26915  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26916  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26917  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26918  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26919
26920
26921  # Define filename patterns
26922  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26923    LIBRARY_PREFIX=
26924    SHARED_LIBRARY_SUFFIX='.dll'
26925    STATIC_LIBRARY_SUFFIX='.lib'
26926    SHARED_LIBRARY='$1.dll'
26927    STATIC_LIBRARY='$1.lib'
26928    OBJ_SUFFIX='.obj'
26929    EXE_SUFFIX='.exe'
26930  else
26931    LIBRARY_PREFIX=lib
26932    SHARED_LIBRARY_SUFFIX='.so'
26933    STATIC_LIBRARY_SUFFIX='.a'
26934    SHARED_LIBRARY='lib$1.so'
26935    STATIC_LIBRARY='lib$1.a'
26936    OBJ_SUFFIX='.o'
26937    EXE_SUFFIX=''
26938    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26939      SHARED_LIBRARY='lib$1.dylib'
26940      SHARED_LIBRARY_SUFFIX='.dylib'
26941    fi
26942  fi
26943
26944
26945
26946
26947
26948
26949
26950
26951
26952
26953  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26954    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26955$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26956  else
26957    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26958$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26959  fi
26960
26961
26962# Then detect the actual binaries needed
26963
26964  # FIXME: Is this needed?
26965  ac_ext=cpp
26966ac_cpp='$CXXCPP $CPPFLAGS'
26967ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26968ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26969ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26970
26971
26972  # Store the CFLAGS etc passed to the configure script.
26973  ORG_CFLAGS="$CFLAGS"
26974  ORG_CXXFLAGS="$CXXFLAGS"
26975  ORG_OBJCFLAGS="$OBJCFLAGS"
26976
26977  # On Windows, we need to detect the visual studio installation first.
26978  # This will change the PATH, but we need to keep that new PATH even
26979  # after toolchain detection is done, since the compiler (on x86) uses
26980  # it for DLL resolution in runtime.
26981  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26982
26983  # Store path to cygwin link.exe to help excluding it when searching for
26984  # VS linker. This must be done before changing the PATH when looking for VS.
26985  # Extract the first word of "link", so it can be a program name with args.
26986set dummy link; ac_word=$2
26987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26988$as_echo_n "checking for $ac_word... " >&6; }
26989if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26990  $as_echo_n "(cached) " >&6
26991else
26992  case $CYGWIN_LINK in
26993  [\\/]* | ?:[\\/]*)
26994  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26995  ;;
26996  *)
26997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26998for as_dir in $PATH
26999do
27000  IFS=$as_save_IFS
27001  test -z "$as_dir" && as_dir=.
27002    for ac_exec_ext in '' $ac_executable_extensions; do
27003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27004    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
27005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27006    break 2
27007  fi
27008done
27009  done
27010IFS=$as_save_IFS
27011
27012  ;;
27013esac
27014fi
27015CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
27016if test -n "$CYGWIN_LINK"; then
27017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
27018$as_echo "$CYGWIN_LINK" >&6; }
27019else
27020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27021$as_echo "no" >&6; }
27022fi
27023
27024
27025  if test "x$CYGWIN_LINK" != x; then
27026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
27027$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
27028    "$CYGWIN_LINK" --version > /dev/null
27029    if test $? -eq 0 ; then
27030      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27031$as_echo "yes" >&6; }
27032    else
27033      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27034$as_echo "no" >&6; }
27035      # This might be the VS linker. Don't exclude it later on.
27036      CYGWIN_LINK=""
27037    fi
27038  fi
27039
27040  # First-hand choice is to locate and run the vsvars bat file.
27041
27042  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27043    VCVARSFILE="vc/bin/vcvars32.bat"
27044  else
27045    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27046  fi
27047
27048  VS_ENV_CMD=""
27049  VS_ENV_ARGS=""
27050  if test "x$with_toolsdir" != x; then
27051
27052  if test "x$VS_ENV_CMD" = x; then
27053    VS100BASE="$with_toolsdir/../.."
27054    METHOD="--with-tools-dir"
27055
27056  windows_path="$VS100BASE"
27057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27058    unix_path=`$CYGPATH -u "$windows_path"`
27059    VS100BASE="$unix_path"
27060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27062    VS100BASE="$unix_path"
27063  fi
27064
27065    if test -d "$VS100BASE"; then
27066      if test -f "$VS100BASE/$VCVARSFILE"; then
27067        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27068$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27069        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27070      else
27071        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27072$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27073        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27074$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27075      fi
27076    fi
27077  fi
27078
27079  fi
27080
27081  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
27082    # Having specified an argument which is incorrect will produce an instant failure;
27083    # we should not go on looking
27084    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
27085$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
27086    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
27087$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
27088    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27089  fi
27090
27091  if test "x$VS100COMNTOOLS" != x; then
27092
27093  if test "x$VS_ENV_CMD" = x; then
27094    VS100BASE="$VS100COMNTOOLS/../.."
27095    METHOD="VS100COMNTOOLS variable"
27096
27097  windows_path="$VS100BASE"
27098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27099    unix_path=`$CYGPATH -u "$windows_path"`
27100    VS100BASE="$unix_path"
27101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27103    VS100BASE="$unix_path"
27104  fi
27105
27106    if test -d "$VS100BASE"; then
27107      if test -f "$VS100BASE/$VCVARSFILE"; then
27108        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27109$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27110        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27111      else
27112        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27113$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27114        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27115$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27116      fi
27117    fi
27118  fi
27119
27120  fi
27121  if test "x$PROGRAMFILES" != x; then
27122
27123  if test "x$VS_ENV_CMD" = x; then
27124    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
27125    METHOD="well-known name"
27126
27127  windows_path="$VS100BASE"
27128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27129    unix_path=`$CYGPATH -u "$windows_path"`
27130    VS100BASE="$unix_path"
27131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27133    VS100BASE="$unix_path"
27134  fi
27135
27136    if test -d "$VS100BASE"; then
27137      if test -f "$VS100BASE/$VCVARSFILE"; then
27138        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27139$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27140        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27141      else
27142        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27143$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27144        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27145$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27146      fi
27147    fi
27148  fi
27149
27150  fi
27151
27152  if test "x$VS_ENV_CMD" = x; then
27153    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
27154    METHOD="well-known name"
27155
27156  windows_path="$VS100BASE"
27157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27158    unix_path=`$CYGPATH -u "$windows_path"`
27159    VS100BASE="$unix_path"
27160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27162    VS100BASE="$unix_path"
27163  fi
27164
27165    if test -d "$VS100BASE"; then
27166      if test -f "$VS100BASE/$VCVARSFILE"; then
27167        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27168$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27169        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27170      else
27171        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27172$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27173        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27174$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27175      fi
27176    fi
27177  fi
27178
27179
27180  if test "x$VS_ENV_CMD" = x; then
27181    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
27182    METHOD="well-known name"
27183
27184  windows_path="$VS100BASE"
27185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27186    unix_path=`$CYGPATH -u "$windows_path"`
27187    VS100BASE="$unix_path"
27188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27190    VS100BASE="$unix_path"
27191  fi
27192
27193    if test -d "$VS100BASE"; then
27194      if test -f "$VS100BASE/$VCVARSFILE"; then
27195        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27196$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27197        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27198      else
27199        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27200$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27201        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27202$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27203      fi
27204    fi
27205  fi
27206
27207
27208  if test "x$ProgramW6432" != x; then
27209
27210  if test "x$VS_ENV_CMD" = x; then
27211    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
27212    METHOD="well-known name"
27213
27214  windows_path="$WIN_SDK_BASE"
27215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27216    unix_path=`$CYGPATH -u "$windows_path"`
27217    WIN_SDK_BASE="$unix_path"
27218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27220    WIN_SDK_BASE="$unix_path"
27221  fi
27222
27223    if test -d "$WIN_SDK_BASE"; then
27224      # There have been cases of partial or broken SDK installations. A missing
27225      # lib dir is not going to work.
27226      if test ! -d "$WIN_SDK_BASE/../lib"; then
27227        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27228$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27229        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27230$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27231      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27232        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27233$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27234        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27235        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27236          VS_ENV_ARGS="/x86"
27237        else
27238          VS_ENV_ARGS="/x64"
27239        fi
27240      else
27241        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27242$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27243        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27244$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27245      fi
27246    fi
27247  fi
27248
27249  fi
27250  if test "x$PROGRAMW6432" != x; then
27251
27252  if test "x$VS_ENV_CMD" = x; then
27253    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
27254    METHOD="well-known name"
27255
27256  windows_path="$WIN_SDK_BASE"
27257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27258    unix_path=`$CYGPATH -u "$windows_path"`
27259    WIN_SDK_BASE="$unix_path"
27260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27262    WIN_SDK_BASE="$unix_path"
27263  fi
27264
27265    if test -d "$WIN_SDK_BASE"; then
27266      # There have been cases of partial or broken SDK installations. A missing
27267      # lib dir is not going to work.
27268      if test ! -d "$WIN_SDK_BASE/../lib"; then
27269        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27270$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27271        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27272$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27273      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27274        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27275$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27276        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27277        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27278          VS_ENV_ARGS="/x86"
27279        else
27280          VS_ENV_ARGS="/x64"
27281        fi
27282      else
27283        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27284$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27285        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27286$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27287      fi
27288    fi
27289  fi
27290
27291  fi
27292  if test "x$PROGRAMFILES" != x; then
27293
27294  if test "x$VS_ENV_CMD" = x; then
27295    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
27296    METHOD="well-known name"
27297
27298  windows_path="$WIN_SDK_BASE"
27299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27300    unix_path=`$CYGPATH -u "$windows_path"`
27301    WIN_SDK_BASE="$unix_path"
27302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27304    WIN_SDK_BASE="$unix_path"
27305  fi
27306
27307    if test -d "$WIN_SDK_BASE"; then
27308      # There have been cases of partial or broken SDK installations. A missing
27309      # lib dir is not going to work.
27310      if test ! -d "$WIN_SDK_BASE/../lib"; then
27311        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27312$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27313        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27314$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27315      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27316        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27317$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27318        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27319        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27320          VS_ENV_ARGS="/x86"
27321        else
27322          VS_ENV_ARGS="/x64"
27323        fi
27324      else
27325        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27326$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27327        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27328$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27329      fi
27330    fi
27331  fi
27332
27333  fi
27334
27335  if test "x$VS_ENV_CMD" = x; then
27336    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27337    METHOD="well-known name"
27338
27339  windows_path="$WIN_SDK_BASE"
27340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27341    unix_path=`$CYGPATH -u "$windows_path"`
27342    WIN_SDK_BASE="$unix_path"
27343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27345    WIN_SDK_BASE="$unix_path"
27346  fi
27347
27348    if test -d "$WIN_SDK_BASE"; then
27349      # There have been cases of partial or broken SDK installations. A missing
27350      # lib dir is not going to work.
27351      if test ! -d "$WIN_SDK_BASE/../lib"; then
27352        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27353$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27354        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27355$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27356      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27357        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27358$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27359        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27360        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27361          VS_ENV_ARGS="/x86"
27362        else
27363          VS_ENV_ARGS="/x64"
27364        fi
27365      else
27366        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27367$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27368        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27369$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27370      fi
27371    fi
27372  fi
27373
27374
27375  if test "x$VS_ENV_CMD" = x; then
27376    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27377    METHOD="well-known name"
27378
27379  windows_path="$WIN_SDK_BASE"
27380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27381    unix_path=`$CYGPATH -u "$windows_path"`
27382    WIN_SDK_BASE="$unix_path"
27383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27385    WIN_SDK_BASE="$unix_path"
27386  fi
27387
27388    if test -d "$WIN_SDK_BASE"; then
27389      # There have been cases of partial or broken SDK installations. A missing
27390      # lib dir is not going to work.
27391      if test ! -d "$WIN_SDK_BASE/../lib"; then
27392        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27393$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27394        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27395$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27396      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27397        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27398$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27399        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27400        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27401          VS_ENV_ARGS="/x86"
27402        else
27403          VS_ENV_ARGS="/x64"
27404        fi
27405      else
27406        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27407$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27408        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27409$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27410      fi
27411    fi
27412  fi
27413
27414
27415  if test "x$VS_ENV_CMD" != x; then
27416    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27417
27418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27419
27420  # First separate the path from the arguments. This will split at the first
27421  # space.
27422  complete="$VS_ENV_CMD"
27423  path="${complete%% *}"
27424  tmp="$complete EOL"
27425  arguments="${tmp#* }"
27426
27427  # Input might be given as Windows format, start by converting to
27428  # unix format.
27429  new_path=`$CYGPATH -u "$path"`
27430
27431  # Now try to locate executable using which
27432  new_path=`$WHICH "$new_path" 2> /dev/null`
27433  # bat and cmd files are not always considered executable in cygwin causing which
27434  # to not find them
27435  if test "x$new_path" = x \
27436      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27437      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27438    new_path=`$CYGPATH -u "$path"`
27439  fi
27440  if test "x$new_path" = x; then
27441    # Oops. Which didn't find the executable.
27442    # The splitting of arguments from the executable at a space might have been incorrect,
27443    # since paths with space are more likely in Windows. Give it another try with the whole
27444    # argument.
27445    path="$complete"
27446    arguments="EOL"
27447    new_path=`$CYGPATH -u "$path"`
27448    new_path=`$WHICH "$new_path" 2> /dev/null`
27449    # bat and cmd files are not always considered executable in cygwin causing which
27450    # to not find them
27451    if test "x$new_path" = x \
27452        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27453        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27454      new_path=`$CYGPATH -u "$path"`
27455    fi
27456    if test "x$new_path" = x; then
27457      # It's still not found. Now this is an unrecoverable error.
27458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27459$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27460      has_space=`$ECHO "$complete" | $GREP " "`
27461      if test "x$has_space" != x; then
27462        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27463$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27464      fi
27465      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27466    fi
27467  fi
27468
27469  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27470  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27471  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27472  # "foo.exe" is OK but "foo" is an error.
27473  #
27474  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27475  # It is also a way to make sure we got the proper file name for the real test later on.
27476  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27477  if test "x$test_shortpath" = x; then
27478    # Short path failed, file does not exist as specified.
27479    # Try adding .exe or .cmd
27480    if test -f "${new_path}.exe"; then
27481      input_to_shortpath="${new_path}.exe"
27482    elif test -f "${new_path}.cmd"; then
27483      input_to_shortpath="${new_path}.cmd"
27484    else
27485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27486$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27487      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27488$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27489      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27490    fi
27491  else
27492    input_to_shortpath="$new_path"
27493  fi
27494
27495  # Call helper function which possibly converts this using DOS-style short mode.
27496  # If so, the updated path is stored in $new_path.
27497  new_path="$input_to_shortpath"
27498
27499  input_path="$input_to_shortpath"
27500  # Check if we need to convert this using DOS-style short mode. If the path
27501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27502  # take no chances and rewrite it.
27503  # Note: m4 eats our [], so we need to use [ and ] instead.
27504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27505  if test "x$has_forbidden_chars" != x; then
27506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27507    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27508    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27509    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27510      # Going to short mode and back again did indeed matter. Since short mode is
27511      # case insensitive, let's make it lowercase to improve readability.
27512      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27513      # Now convert it back to Unix-stile (cygpath)
27514      input_path=`$CYGPATH -u "$shortmode_path"`
27515      new_path="$input_path"
27516    fi
27517  fi
27518
27519  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27520  if test "x$test_cygdrive_prefix" = x; then
27521    # As a simple fix, exclude /usr/bin since it's not a real path.
27522    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27523      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27524      # a path prefixed by /cygdrive for fixpath to work.
27525      new_path="$CYGWIN_ROOT_PATH$input_path"
27526    fi
27527  fi
27528
27529  # remove trailing .exe if any
27530  new_path="${new_path/%.exe/}"
27531
27532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27533
27534  # First separate the path from the arguments. This will split at the first
27535  # space.
27536  complete="$VS_ENV_CMD"
27537  path="${complete%% *}"
27538  tmp="$complete EOL"
27539  arguments="${tmp#* }"
27540
27541  # Input might be given as Windows format, start by converting to
27542  # unix format.
27543  new_path="$path"
27544
27545  windows_path="$new_path"
27546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27547    unix_path=`$CYGPATH -u "$windows_path"`
27548    new_path="$unix_path"
27549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27551    new_path="$unix_path"
27552  fi
27553
27554
27555  # Now try to locate executable using which
27556  new_path=`$WHICH "$new_path" 2> /dev/null`
27557
27558  if test "x$new_path" = x; then
27559    # Oops. Which didn't find the executable.
27560    # The splitting of arguments from the executable at a space might have been incorrect,
27561    # since paths with space are more likely in Windows. Give it another try with the whole
27562    # argument.
27563    path="$complete"
27564    arguments="EOL"
27565    new_path="$path"
27566
27567  windows_path="$new_path"
27568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27569    unix_path=`$CYGPATH -u "$windows_path"`
27570    new_path="$unix_path"
27571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27573    new_path="$unix_path"
27574  fi
27575
27576
27577    new_path=`$WHICH "$new_path" 2> /dev/null`
27578    # bat and cmd files are not always considered executable in MSYS causing which
27579    # to not find them
27580    if test "x$new_path" = x \
27581        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27582        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27583      new_path="$path"
27584
27585  windows_path="$new_path"
27586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27587    unix_path=`$CYGPATH -u "$windows_path"`
27588    new_path="$unix_path"
27589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27591    new_path="$unix_path"
27592  fi
27593
27594    fi
27595
27596    if test "x$new_path" = x; then
27597      # It's still not found. Now this is an unrecoverable error.
27598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27599$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27600      has_space=`$ECHO "$complete" | $GREP " "`
27601      if test "x$has_space" != x; then
27602        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27603$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27604      fi
27605      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27606    fi
27607  fi
27608
27609  # Now new_path has a complete unix path to the binary
27610  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27611    # Keep paths in /bin as-is, but remove trailing .exe if any
27612    new_path="${new_path/%.exe/}"
27613    # Do not save /bin paths to all_fixpath_prefixes!
27614  else
27615    # Not in mixed or Windows style, start by that.
27616    new_path=`cmd //c echo $new_path`
27617
27618  input_path="$new_path"
27619  # Check if we need to convert this using DOS-style short mode. If the path
27620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27621  # take no chances and rewrite it.
27622  # Note: m4 eats our [], so we need to use [ and ] instead.
27623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27624  if test "x$has_forbidden_chars" != x; then
27625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27627  fi
27628
27629    # Output is in $new_path
27630
27631  windows_path="$new_path"
27632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27633    unix_path=`$CYGPATH -u "$windows_path"`
27634    new_path="$unix_path"
27635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27637    new_path="$unix_path"
27638  fi
27639
27640    # remove trailing .exe if any
27641    new_path="${new_path/%.exe/}"
27642
27643    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27644    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27645  fi
27646
27647  else
27648    # We're on a posix platform. Hooray! :)
27649    # First separate the path from the arguments. This will split at the first
27650    # space.
27651    complete="$VS_ENV_CMD"
27652    path="${complete%% *}"
27653    tmp="$complete EOL"
27654    arguments="${tmp#* }"
27655
27656    # Cannot rely on the command "which" here since it doesn't always work.
27657    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27658    if test -z "$is_absolute_path"; then
27659      # Path to executable is not absolute. Find it.
27660      IFS_save="$IFS"
27661      IFS=:
27662      for p in $PATH; do
27663        if test -f "$p/$path" && test -x "$p/$path"; then
27664          new_path="$p/$path"
27665          break
27666        fi
27667      done
27668      IFS="$IFS_save"
27669    else
27670      # This is an absolute path, we can use it without further modifications.
27671      new_path="$path"
27672    fi
27673
27674    if test "x$new_path" = x; then
27675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27676$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27677      has_space=`$ECHO "$complete" | $GREP " "`
27678      if test "x$has_space" != x; then
27679        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27680$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27681      fi
27682      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27683    fi
27684  fi
27685
27686  # Now join together the path and the arguments once again
27687  if test "x$arguments" != xEOL; then
27688    new_complete="$new_path ${arguments% *}"
27689  else
27690    new_complete="$new_path"
27691  fi
27692
27693  if test "x$complete" != "x$new_complete"; then
27694    VS_ENV_CMD="$new_complete"
27695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27696$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27697  fi
27698
27699
27700    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27701    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27702$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27703
27704    # We need to create a couple of temporary files.
27705    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27706    $MKDIR -p $VS_ENV_TMP_DIR
27707
27708    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27709    # Instead create a shell script which will set the relevant variables when run.
27710    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27711
27712  unix_path="$WINPATH_VS_ENV_CMD"
27713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27714    windows_path=`$CYGPATH -m "$unix_path"`
27715    WINPATH_VS_ENV_CMD="$windows_path"
27716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27717    windows_path=`cmd //c echo $unix_path`
27718    WINPATH_VS_ENV_CMD="$windows_path"
27719  fi
27720
27721    WINPATH_BASH="$BASH"
27722
27723  unix_path="$WINPATH_BASH"
27724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27725    windows_path=`$CYGPATH -m "$unix_path"`
27726    WINPATH_BASH="$windows_path"
27727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27728    windows_path=`cmd //c echo $unix_path`
27729    WINPATH_BASH="$windows_path"
27730  fi
27731
27732
27733    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27734    # script (executable by bash) that will setup the important variables.
27735    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27736    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27737    # This will end up something like:
27738    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27739    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27740    # These will end up something like:
27741    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27742    # The trailing space for everyone except PATH is no typo, but is needed due
27743    # to trailing \ in the Windows paths. These will be stripped later.
27744    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27745    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27746    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27747    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27748    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27749    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27750
27751    # Now execute the newly created bat file.
27752    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27753    # Change directory so we don't need to mess with Windows paths in redirects.
27754    cd $VS_ENV_TMP_DIR
27755    cmd /c extract-vs-env.bat | $CAT
27756    cd $CURDIR
27757
27758    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27759      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27760$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27761      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27762$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27763      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27764$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27765      as_fn_error $? "Cannot continue" "$LINENO" 5
27766    fi
27767
27768    # Now set all paths and other env variables. This will allow the rest of
27769    # the configure script to find and run the compiler in the proper way.
27770    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27771$as_echo "$as_me: Setting extracted environment variables" >&6;}
27772    . $VS_ENV_TMP_DIR/set-vs-env.sh
27773    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27774    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27775  else
27776    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27777    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27778$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27779  fi
27780
27781  # At this point, we should have correct variables in the environment, or we can't continue.
27782  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27783$as_echo_n "checking for Visual Studio variables... " >&6; }
27784
27785  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27786    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27788$as_echo "present but broken" >&6; }
27789      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27790    else
27791      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27792$as_echo "ok" >&6; }
27793      # Remove any trailing "\" and " " from the variables.
27794      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27795      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27796      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27797      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27798      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27799      # Remove any paths containing # (typically F#) as that messes up make. This
27800      # is needed if visual studio was installed with F# support.
27801      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27802
27803
27804
27805
27806    fi
27807  else
27808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27809$as_echo "not found" >&6; }
27810
27811    if test "x$VS_ENV_CMD" = x; then
27812      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27813$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27814      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27815$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27816    else
27817      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27818$as_echo "$as_me: Running the extraction script failed." >&6;}
27819    fi
27820    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27821$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27822    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27823$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27824    as_fn_error $? "Cannot continue" "$LINENO" 5
27825  fi
27826
27827    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27828    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27829    PATH="$VS_PATH"
27830    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27831    export INCLUDE="$VS_INCLUDE"
27832    export LIB="$VS_LIB"
27833  fi
27834
27835  # autoconf magic only relies on PATH, so update it if tools dir is specified
27836  OLD_PATH="$PATH"
27837
27838  # For solaris we really need solaris tools, and not the GNU equivalent.
27839  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27840  # so add that to path before starting to probe.
27841  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27842  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27843    PATH="/usr/ccs/bin:$PATH"
27844  fi
27845
27846  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27847  # override all other locations.
27848  if test "x$TOOLCHAIN_PATH" != x; then
27849    PATH=$TOOLCHAIN_PATH:$PATH
27850  fi
27851
27852
27853  #
27854  # Setup the compilers (CC and CXX)
27855  #
27856
27857  COMPILER_NAME=C
27858  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27859
27860  if test "x$CC" != x; then
27861    # User has supplied compiler name already, always let that override.
27862    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27863$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27864    if test "x`basename $CC`" = "x$CC"; then
27865      # A command without a complete path is provided, search $PATH.
27866
27867      for ac_prog in $CC
27868do
27869  # Extract the first word of "$ac_prog", so it can be a program name with args.
27870set dummy $ac_prog; ac_word=$2
27871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27872$as_echo_n "checking for $ac_word... " >&6; }
27873if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27874  $as_echo_n "(cached) " >&6
27875else
27876  case $POTENTIAL_CC in
27877  [\\/]* | ?:[\\/]*)
27878  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27879  ;;
27880  *)
27881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27882for as_dir in $PATH
27883do
27884  IFS=$as_save_IFS
27885  test -z "$as_dir" && as_dir=.
27886    for ac_exec_ext in '' $ac_executable_extensions; do
27887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27888    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27890    break 2
27891  fi
27892done
27893  done
27894IFS=$as_save_IFS
27895
27896  ;;
27897esac
27898fi
27899POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27900if test -n "$POTENTIAL_CC"; then
27901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27902$as_echo "$POTENTIAL_CC" >&6; }
27903else
27904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27905$as_echo "no" >&6; }
27906fi
27907
27908
27909  test -n "$POTENTIAL_CC" && break
27910done
27911
27912      if test "x$POTENTIAL_CC" != x; then
27913        CC=$POTENTIAL_CC
27914      else
27915        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27916      fi
27917    else
27918      # Otherwise it might already be a complete path
27919      if test ! -x "$CC"; then
27920        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27921      fi
27922    fi
27923  else
27924    # No user supplied value. Locate compiler ourselves.
27925
27926    # If we are cross compiling, assume cross compilation tools follows the
27927    # cross compilation standard where they are prefixed with the autoconf
27928    # standard name for the target. For example the binary
27929    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27930    # If we are not cross compiling, then the default compiler name will be
27931    # used.
27932
27933    CC=
27934    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27935    # before checking the rest of the PATH.
27936    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27937    # step, this should not be necessary.
27938    if test -n "$TOOLCHAIN_PATH"; then
27939      PATH_save="$PATH"
27940      PATH="$TOOLCHAIN_PATH"
27941      for ac_prog in $SEARCH_LIST
27942do
27943  # Extract the first word of "$ac_prog", so it can be a program name with args.
27944set dummy $ac_prog; ac_word=$2
27945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27946$as_echo_n "checking for $ac_word... " >&6; }
27947if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27948  $as_echo_n "(cached) " >&6
27949else
27950  case $TOOLCHAIN_PATH_CC in
27951  [\\/]* | ?:[\\/]*)
27952  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27953  ;;
27954  *)
27955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27956for as_dir in $PATH
27957do
27958  IFS=$as_save_IFS
27959  test -z "$as_dir" && as_dir=.
27960    for ac_exec_ext in '' $ac_executable_extensions; do
27961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27962    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27964    break 2
27965  fi
27966done
27967  done
27968IFS=$as_save_IFS
27969
27970  ;;
27971esac
27972fi
27973TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27974if test -n "$TOOLCHAIN_PATH_CC"; then
27975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27976$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27977else
27978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27979$as_echo "no" >&6; }
27980fi
27981
27982
27983  test -n "$TOOLCHAIN_PATH_CC" && break
27984done
27985
27986      CC=$TOOLCHAIN_PATH_CC
27987      PATH="$PATH_save"
27988    fi
27989
27990    # AC_PATH_PROGS can't be run multiple times with the same variable,
27991    # so create a new name for this run.
27992    if test "x$CC" = x; then
27993      for ac_prog in $SEARCH_LIST
27994do
27995  # Extract the first word of "$ac_prog", so it can be a program name with args.
27996set dummy $ac_prog; ac_word=$2
27997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27998$as_echo_n "checking for $ac_word... " >&6; }
27999if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28000  $as_echo_n "(cached) " >&6
28001else
28002  case $POTENTIAL_CC in
28003  [\\/]* | ?:[\\/]*)
28004  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28005  ;;
28006  *)
28007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28008for as_dir in $PATH
28009do
28010  IFS=$as_save_IFS
28011  test -z "$as_dir" && as_dir=.
28012    for ac_exec_ext in '' $ac_executable_extensions; do
28013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28014    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28016    break 2
28017  fi
28018done
28019  done
28020IFS=$as_save_IFS
28021
28022  ;;
28023esac
28024fi
28025POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28026if test -n "$POTENTIAL_CC"; then
28027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28028$as_echo "$POTENTIAL_CC" >&6; }
28029else
28030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28031$as_echo "no" >&6; }
28032fi
28033
28034
28035  test -n "$POTENTIAL_CC" && break
28036done
28037
28038      CC=$POTENTIAL_CC
28039    fi
28040
28041    if test "x$CC" = x; then
28042
28043  # Print a helpful message on how to acquire the necessary build dependency.
28044  # devkit is the help tag: freetype, cups, pulse, alsa etc
28045  MISSING_DEPENDENCY=devkit
28046
28047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28048    cygwin_help $MISSING_DEPENDENCY
28049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28050    msys_help $MISSING_DEPENDENCY
28051  else
28052    PKGHANDLER_COMMAND=
28053
28054    case $PKGHANDLER in
28055      apt-get)
28056        apt_help     $MISSING_DEPENDENCY ;;
28057      yum)
28058        yum_help     $MISSING_DEPENDENCY ;;
28059      port)
28060        port_help    $MISSING_DEPENDENCY ;;
28061      pkgutil)
28062        pkgutil_help $MISSING_DEPENDENCY ;;
28063      pkgadd)
28064        pkgadd_help  $MISSING_DEPENDENCY ;;
28065    esac
28066
28067    if test "x$PKGHANDLER_COMMAND" != x; then
28068      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28069    fi
28070  fi
28071
28072      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28073    fi
28074  fi
28075
28076  # Now we have a compiler binary in CC. Make sure it's okay.
28077
28078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28079
28080  # First separate the path from the arguments. This will split at the first
28081  # space.
28082  complete="$CC"
28083  path="${complete%% *}"
28084  tmp="$complete EOL"
28085  arguments="${tmp#* }"
28086
28087  # Input might be given as Windows format, start by converting to
28088  # unix format.
28089  new_path=`$CYGPATH -u "$path"`
28090
28091  # Now try to locate executable using which
28092  new_path=`$WHICH "$new_path" 2> /dev/null`
28093  # bat and cmd files are not always considered executable in cygwin causing which
28094  # to not find them
28095  if test "x$new_path" = x \
28096      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28097      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28098    new_path=`$CYGPATH -u "$path"`
28099  fi
28100  if test "x$new_path" = x; then
28101    # Oops. Which didn't find the executable.
28102    # The splitting of arguments from the executable at a space might have been incorrect,
28103    # since paths with space are more likely in Windows. Give it another try with the whole
28104    # argument.
28105    path="$complete"
28106    arguments="EOL"
28107    new_path=`$CYGPATH -u "$path"`
28108    new_path=`$WHICH "$new_path" 2> /dev/null`
28109    # bat and cmd files are not always considered executable in cygwin causing which
28110    # to not find them
28111    if test "x$new_path" = x \
28112        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28113        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28114      new_path=`$CYGPATH -u "$path"`
28115    fi
28116    if test "x$new_path" = x; then
28117      # It's still not found. Now this is an unrecoverable error.
28118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28119$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28120      has_space=`$ECHO "$complete" | $GREP " "`
28121      if test "x$has_space" != x; then
28122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28124      fi
28125      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28126    fi
28127  fi
28128
28129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28132  # "foo.exe" is OK but "foo" is an error.
28133  #
28134  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28135  # It is also a way to make sure we got the proper file name for the real test later on.
28136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28137  if test "x$test_shortpath" = x; then
28138    # Short path failed, file does not exist as specified.
28139    # Try adding .exe or .cmd
28140    if test -f "${new_path}.exe"; then
28141      input_to_shortpath="${new_path}.exe"
28142    elif test -f "${new_path}.cmd"; then
28143      input_to_shortpath="${new_path}.cmd"
28144    else
28145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28146$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28147      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28148$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28149      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28150    fi
28151  else
28152    input_to_shortpath="$new_path"
28153  fi
28154
28155  # Call helper function which possibly converts this using DOS-style short mode.
28156  # If so, the updated path is stored in $new_path.
28157  new_path="$input_to_shortpath"
28158
28159  input_path="$input_to_shortpath"
28160  # Check if we need to convert this using DOS-style short mode. If the path
28161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28162  # take no chances and rewrite it.
28163  # Note: m4 eats our [], so we need to use [ and ] instead.
28164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28165  if test "x$has_forbidden_chars" != x; then
28166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28170      # Going to short mode and back again did indeed matter. Since short mode is
28171      # case insensitive, let's make it lowercase to improve readability.
28172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28173      # Now convert it back to Unix-stile (cygpath)
28174      input_path=`$CYGPATH -u "$shortmode_path"`
28175      new_path="$input_path"
28176    fi
28177  fi
28178
28179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28180  if test "x$test_cygdrive_prefix" = x; then
28181    # As a simple fix, exclude /usr/bin since it's not a real path.
28182    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28184      # a path prefixed by /cygdrive for fixpath to work.
28185      new_path="$CYGWIN_ROOT_PATH$input_path"
28186    fi
28187  fi
28188
28189  # remove trailing .exe if any
28190  new_path="${new_path/%.exe/}"
28191
28192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28193
28194  # First separate the path from the arguments. This will split at the first
28195  # space.
28196  complete="$CC"
28197  path="${complete%% *}"
28198  tmp="$complete EOL"
28199  arguments="${tmp#* }"
28200
28201  # Input might be given as Windows format, start by converting to
28202  # unix format.
28203  new_path="$path"
28204
28205  windows_path="$new_path"
28206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28207    unix_path=`$CYGPATH -u "$windows_path"`
28208    new_path="$unix_path"
28209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28211    new_path="$unix_path"
28212  fi
28213
28214
28215  # Now try to locate executable using which
28216  new_path=`$WHICH "$new_path" 2> /dev/null`
28217
28218  if test "x$new_path" = x; then
28219    # Oops. Which didn't find the executable.
28220    # The splitting of arguments from the executable at a space might have been incorrect,
28221    # since paths with space are more likely in Windows. Give it another try with the whole
28222    # argument.
28223    path="$complete"
28224    arguments="EOL"
28225    new_path="$path"
28226
28227  windows_path="$new_path"
28228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28229    unix_path=`$CYGPATH -u "$windows_path"`
28230    new_path="$unix_path"
28231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28233    new_path="$unix_path"
28234  fi
28235
28236
28237    new_path=`$WHICH "$new_path" 2> /dev/null`
28238    # bat and cmd files are not always considered executable in MSYS causing which
28239    # to not find them
28240    if test "x$new_path" = x \
28241        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28242        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28243      new_path="$path"
28244
28245  windows_path="$new_path"
28246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28247    unix_path=`$CYGPATH -u "$windows_path"`
28248    new_path="$unix_path"
28249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28251    new_path="$unix_path"
28252  fi
28253
28254    fi
28255
28256    if test "x$new_path" = x; then
28257      # It's still not found. Now this is an unrecoverable error.
28258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28259$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28260      has_space=`$ECHO "$complete" | $GREP " "`
28261      if test "x$has_space" != x; then
28262        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28263$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28264      fi
28265      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28266    fi
28267  fi
28268
28269  # Now new_path has a complete unix path to the binary
28270  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28271    # Keep paths in /bin as-is, but remove trailing .exe if any
28272    new_path="${new_path/%.exe/}"
28273    # Do not save /bin paths to all_fixpath_prefixes!
28274  else
28275    # Not in mixed or Windows style, start by that.
28276    new_path=`cmd //c echo $new_path`
28277
28278  input_path="$new_path"
28279  # Check if we need to convert this using DOS-style short mode. If the path
28280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28281  # take no chances and rewrite it.
28282  # Note: m4 eats our [], so we need to use [ and ] instead.
28283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28284  if test "x$has_forbidden_chars" != x; then
28285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28287  fi
28288
28289    # Output is in $new_path
28290
28291  windows_path="$new_path"
28292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28293    unix_path=`$CYGPATH -u "$windows_path"`
28294    new_path="$unix_path"
28295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28297    new_path="$unix_path"
28298  fi
28299
28300    # remove trailing .exe if any
28301    new_path="${new_path/%.exe/}"
28302
28303    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28304    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28305  fi
28306
28307  else
28308    # We're on a posix platform. Hooray! :)
28309    # First separate the path from the arguments. This will split at the first
28310    # space.
28311    complete="$CC"
28312    path="${complete%% *}"
28313    tmp="$complete EOL"
28314    arguments="${tmp#* }"
28315
28316    # Cannot rely on the command "which" here since it doesn't always work.
28317    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28318    if test -z "$is_absolute_path"; then
28319      # Path to executable is not absolute. Find it.
28320      IFS_save="$IFS"
28321      IFS=:
28322      for p in $PATH; do
28323        if test -f "$p/$path" && test -x "$p/$path"; then
28324          new_path="$p/$path"
28325          break
28326        fi
28327      done
28328      IFS="$IFS_save"
28329    else
28330      # This is an absolute path, we can use it without further modifications.
28331      new_path="$path"
28332    fi
28333
28334    if test "x$new_path" = x; then
28335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28336$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28337      has_space=`$ECHO "$complete" | $GREP " "`
28338      if test "x$has_space" != x; then
28339        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28340$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28341      fi
28342      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28343    fi
28344  fi
28345
28346  # Now join together the path and the arguments once again
28347  if test "x$arguments" != xEOL; then
28348    new_complete="$new_path ${arguments% *}"
28349  else
28350    new_complete="$new_path"
28351  fi
28352
28353  if test "x$complete" != "x$new_complete"; then
28354    CC="$new_complete"
28355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28356$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28357  fi
28358
28359  TEST_COMPILER="$CC"
28360  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28361  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28362  if test "x$OPENJDK_BUILD_OS" != xaix; then
28363    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28365$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28366
28367  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28368    # Follow a chain of symbolic links. Use readlink
28369    # where it exists, else fall back to horribly
28370    # complicated shell code.
28371    if test "x$READLINK_TESTED" != yes; then
28372      # On MacOSX there is a readlink tool with a different
28373      # purpose than the GNU readlink tool. Check the found readlink.
28374      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28375      if test "x$ISGNU" = x; then
28376        # A readlink that we do not know how to use.
28377        # Are there other non-GNU readlinks out there?
28378        READLINK_TESTED=yes
28379        READLINK=
28380      fi
28381    fi
28382
28383    if test "x$READLINK" != x; then
28384      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28385    else
28386      # Save the current directory for restoring afterwards
28387      STARTDIR=$PWD
28388      COUNTER=0
28389      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28390      sym_link_file=`$BASENAME $TEST_COMPILER`
28391      cd $sym_link_dir
28392      # Use -P flag to resolve symlinks in directories.
28393      cd `$THEPWDCMD -P`
28394      sym_link_dir=`$THEPWDCMD -P`
28395      # Resolve file symlinks
28396      while test $COUNTER -lt 20; do
28397        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28398        if test "x$ISLINK" == x; then
28399          # This is not a symbolic link! We are done!
28400          break
28401        fi
28402        # Again resolve directory symlinks since the target of the just found
28403        # link could be in a different directory
28404        cd `$DIRNAME $ISLINK`
28405        sym_link_dir=`$THEPWDCMD -P`
28406        sym_link_file=`$BASENAME $ISLINK`
28407        let COUNTER=COUNTER+1
28408      done
28409      cd $STARTDIR
28410      TEST_COMPILER=$sym_link_dir/$sym_link_file
28411    fi
28412  fi
28413
28414    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28415$as_echo "$TEST_COMPILER" >&6; }
28416  fi
28417  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28418$as_echo_n "checking if CC is disguised ccache... " >&6; }
28419
28420  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28421  if test "x$COMPILER_BASENAME" = "xccache"; then
28422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28423$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28424    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28425    # We want to control ccache invocation ourselves, so ignore this cc and try
28426    # searching again.
28427
28428    # Remove the path to the fake ccache cc from the PATH
28429    RETRY_COMPILER_SAVED_PATH="$PATH"
28430    COMPILER_DIRNAME=`$DIRNAME $CC`
28431    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28432
28433    # Try again looking for our compiler
28434    if test -n "$ac_tool_prefix"; then
28435  for ac_prog in $TOOLCHAIN_CC_BINARY
28436  do
28437    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28438set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28440$as_echo_n "checking for $ac_word... " >&6; }
28441if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28442  $as_echo_n "(cached) " >&6
28443else
28444  if test -n "$PROPER_COMPILER_CC"; then
28445  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28446else
28447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28448for as_dir in $PATH
28449do
28450  IFS=$as_save_IFS
28451  test -z "$as_dir" && as_dir=.
28452    for ac_exec_ext in '' $ac_executable_extensions; do
28453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28454    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28456    break 2
28457  fi
28458done
28459  done
28460IFS=$as_save_IFS
28461
28462fi
28463fi
28464PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28465if test -n "$PROPER_COMPILER_CC"; then
28466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28467$as_echo "$PROPER_COMPILER_CC" >&6; }
28468else
28469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28470$as_echo "no" >&6; }
28471fi
28472
28473
28474    test -n "$PROPER_COMPILER_CC" && break
28475  done
28476fi
28477if test -z "$PROPER_COMPILER_CC"; then
28478  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28479  for ac_prog in $TOOLCHAIN_CC_BINARY
28480do
28481  # Extract the first word of "$ac_prog", so it can be a program name with args.
28482set dummy $ac_prog; ac_word=$2
28483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28484$as_echo_n "checking for $ac_word... " >&6; }
28485if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28486  $as_echo_n "(cached) " >&6
28487else
28488  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28489  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28490else
28491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28492for as_dir in $PATH
28493do
28494  IFS=$as_save_IFS
28495  test -z "$as_dir" && as_dir=.
28496    for ac_exec_ext in '' $ac_executable_extensions; do
28497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28498    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28500    break 2
28501  fi
28502done
28503  done
28504IFS=$as_save_IFS
28505
28506fi
28507fi
28508ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28509if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28511$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28512else
28513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28514$as_echo "no" >&6; }
28515fi
28516
28517
28518  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28519done
28520
28521  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28522    PROPER_COMPILER_CC=""
28523  else
28524    case $cross_compiling:$ac_tool_warned in
28525yes:)
28526{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28527$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28528ac_tool_warned=yes ;;
28529esac
28530    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28531  fi
28532fi
28533
28534
28535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28536
28537  # First separate the path from the arguments. This will split at the first
28538  # space.
28539  complete="$PROPER_COMPILER_CC"
28540  path="${complete%% *}"
28541  tmp="$complete EOL"
28542  arguments="${tmp#* }"
28543
28544  # Input might be given as Windows format, start by converting to
28545  # unix format.
28546  new_path=`$CYGPATH -u "$path"`
28547
28548  # Now try to locate executable using which
28549  new_path=`$WHICH "$new_path" 2> /dev/null`
28550  # bat and cmd files are not always considered executable in cygwin causing which
28551  # to not find them
28552  if test "x$new_path" = x \
28553      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28554      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28555    new_path=`$CYGPATH -u "$path"`
28556  fi
28557  if test "x$new_path" = x; then
28558    # Oops. Which didn't find the executable.
28559    # The splitting of arguments from the executable at a space might have been incorrect,
28560    # since paths with space are more likely in Windows. Give it another try with the whole
28561    # argument.
28562    path="$complete"
28563    arguments="EOL"
28564    new_path=`$CYGPATH -u "$path"`
28565    new_path=`$WHICH "$new_path" 2> /dev/null`
28566    # bat and cmd files are not always considered executable in cygwin causing which
28567    # to not find them
28568    if test "x$new_path" = x \
28569        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28570        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28571      new_path=`$CYGPATH -u "$path"`
28572    fi
28573    if test "x$new_path" = x; then
28574      # It's still not found. Now this is an unrecoverable error.
28575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28576$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28577      has_space=`$ECHO "$complete" | $GREP " "`
28578      if test "x$has_space" != x; then
28579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28581      fi
28582      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28583    fi
28584  fi
28585
28586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28589  # "foo.exe" is OK but "foo" is an error.
28590  #
28591  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28592  # It is also a way to make sure we got the proper file name for the real test later on.
28593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28594  if test "x$test_shortpath" = x; then
28595    # Short path failed, file does not exist as specified.
28596    # Try adding .exe or .cmd
28597    if test -f "${new_path}.exe"; then
28598      input_to_shortpath="${new_path}.exe"
28599    elif test -f "${new_path}.cmd"; then
28600      input_to_shortpath="${new_path}.cmd"
28601    else
28602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28603$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28604      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28605$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28606      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28607    fi
28608  else
28609    input_to_shortpath="$new_path"
28610  fi
28611
28612  # Call helper function which possibly converts this using DOS-style short mode.
28613  # If so, the updated path is stored in $new_path.
28614  new_path="$input_to_shortpath"
28615
28616  input_path="$input_to_shortpath"
28617  # Check if we need to convert this using DOS-style short mode. If the path
28618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28619  # take no chances and rewrite it.
28620  # Note: m4 eats our [], so we need to use [ and ] instead.
28621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28622  if test "x$has_forbidden_chars" != x; then
28623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28627      # Going to short mode and back again did indeed matter. Since short mode is
28628      # case insensitive, let's make it lowercase to improve readability.
28629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28630      # Now convert it back to Unix-stile (cygpath)
28631      input_path=`$CYGPATH -u "$shortmode_path"`
28632      new_path="$input_path"
28633    fi
28634  fi
28635
28636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28637  if test "x$test_cygdrive_prefix" = x; then
28638    # As a simple fix, exclude /usr/bin since it's not a real path.
28639    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28641      # a path prefixed by /cygdrive for fixpath to work.
28642      new_path="$CYGWIN_ROOT_PATH$input_path"
28643    fi
28644  fi
28645
28646  # remove trailing .exe if any
28647  new_path="${new_path/%.exe/}"
28648
28649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28650
28651  # First separate the path from the arguments. This will split at the first
28652  # space.
28653  complete="$PROPER_COMPILER_CC"
28654  path="${complete%% *}"
28655  tmp="$complete EOL"
28656  arguments="${tmp#* }"
28657
28658  # Input might be given as Windows format, start by converting to
28659  # unix format.
28660  new_path="$path"
28661
28662  windows_path="$new_path"
28663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28664    unix_path=`$CYGPATH -u "$windows_path"`
28665    new_path="$unix_path"
28666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28668    new_path="$unix_path"
28669  fi
28670
28671
28672  # Now try to locate executable using which
28673  new_path=`$WHICH "$new_path" 2> /dev/null`
28674
28675  if test "x$new_path" = x; then
28676    # Oops. Which didn't find the executable.
28677    # The splitting of arguments from the executable at a space might have been incorrect,
28678    # since paths with space are more likely in Windows. Give it another try with the whole
28679    # argument.
28680    path="$complete"
28681    arguments="EOL"
28682    new_path="$path"
28683
28684  windows_path="$new_path"
28685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28686    unix_path=`$CYGPATH -u "$windows_path"`
28687    new_path="$unix_path"
28688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28690    new_path="$unix_path"
28691  fi
28692
28693
28694    new_path=`$WHICH "$new_path" 2> /dev/null`
28695    # bat and cmd files are not always considered executable in MSYS causing which
28696    # to not find them
28697    if test "x$new_path" = x \
28698        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28699        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28700      new_path="$path"
28701
28702  windows_path="$new_path"
28703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28704    unix_path=`$CYGPATH -u "$windows_path"`
28705    new_path="$unix_path"
28706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28708    new_path="$unix_path"
28709  fi
28710
28711    fi
28712
28713    if test "x$new_path" = x; then
28714      # It's still not found. Now this is an unrecoverable error.
28715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28716$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28717      has_space=`$ECHO "$complete" | $GREP " "`
28718      if test "x$has_space" != x; then
28719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28721      fi
28722      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28723    fi
28724  fi
28725
28726  # Now new_path has a complete unix path to the binary
28727  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28728    # Keep paths in /bin as-is, but remove trailing .exe if any
28729    new_path="${new_path/%.exe/}"
28730    # Do not save /bin paths to all_fixpath_prefixes!
28731  else
28732    # Not in mixed or Windows style, start by that.
28733    new_path=`cmd //c echo $new_path`
28734
28735  input_path="$new_path"
28736  # Check if we need to convert this using DOS-style short mode. If the path
28737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28738  # take no chances and rewrite it.
28739  # Note: m4 eats our [], so we need to use [ and ] instead.
28740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28741  if test "x$has_forbidden_chars" != x; then
28742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28744  fi
28745
28746    # Output is in $new_path
28747
28748  windows_path="$new_path"
28749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28750    unix_path=`$CYGPATH -u "$windows_path"`
28751    new_path="$unix_path"
28752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28754    new_path="$unix_path"
28755  fi
28756
28757    # remove trailing .exe if any
28758    new_path="${new_path/%.exe/}"
28759
28760    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28761    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28762  fi
28763
28764  else
28765    # We're on a posix platform. Hooray! :)
28766    # First separate the path from the arguments. This will split at the first
28767    # space.
28768    complete="$PROPER_COMPILER_CC"
28769    path="${complete%% *}"
28770    tmp="$complete EOL"
28771    arguments="${tmp#* }"
28772
28773    # Cannot rely on the command "which" here since it doesn't always work.
28774    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28775    if test -z "$is_absolute_path"; then
28776      # Path to executable is not absolute. Find it.
28777      IFS_save="$IFS"
28778      IFS=:
28779      for p in $PATH; do
28780        if test -f "$p/$path" && test -x "$p/$path"; then
28781          new_path="$p/$path"
28782          break
28783        fi
28784      done
28785      IFS="$IFS_save"
28786    else
28787      # This is an absolute path, we can use it without further modifications.
28788      new_path="$path"
28789    fi
28790
28791    if test "x$new_path" = x; then
28792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28793$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28794      has_space=`$ECHO "$complete" | $GREP " "`
28795      if test "x$has_space" != x; then
28796        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28797$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28798      fi
28799      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28800    fi
28801  fi
28802
28803  # Now join together the path and the arguments once again
28804  if test "x$arguments" != xEOL; then
28805    new_complete="$new_path ${arguments% *}"
28806  else
28807    new_complete="$new_path"
28808  fi
28809
28810  if test "x$complete" != "x$new_complete"; then
28811    PROPER_COMPILER_CC="$new_complete"
28812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28813$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28814  fi
28815
28816    PATH="$RETRY_COMPILER_SAVED_PATH"
28817
28818    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28819$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28820
28821  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28822    # Follow a chain of symbolic links. Use readlink
28823    # where it exists, else fall back to horribly
28824    # complicated shell code.
28825    if test "x$READLINK_TESTED" != yes; then
28826      # On MacOSX there is a readlink tool with a different
28827      # purpose than the GNU readlink tool. Check the found readlink.
28828      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28829      if test "x$ISGNU" = x; then
28830        # A readlink that we do not know how to use.
28831        # Are there other non-GNU readlinks out there?
28832        READLINK_TESTED=yes
28833        READLINK=
28834      fi
28835    fi
28836
28837    if test "x$READLINK" != x; then
28838      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28839    else
28840      # Save the current directory for restoring afterwards
28841      STARTDIR=$PWD
28842      COUNTER=0
28843      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28844      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28845      cd $sym_link_dir
28846      # Use -P flag to resolve symlinks in directories.
28847      cd `$THEPWDCMD -P`
28848      sym_link_dir=`$THEPWDCMD -P`
28849      # Resolve file symlinks
28850      while test $COUNTER -lt 20; do
28851        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28852        if test "x$ISLINK" == x; then
28853          # This is not a symbolic link! We are done!
28854          break
28855        fi
28856        # Again resolve directory symlinks since the target of the just found
28857        # link could be in a different directory
28858        cd `$DIRNAME $ISLINK`
28859        sym_link_dir=`$THEPWDCMD -P`
28860        sym_link_file=`$BASENAME $ISLINK`
28861        let COUNTER=COUNTER+1
28862      done
28863      cd $STARTDIR
28864      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28865    fi
28866  fi
28867
28868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28869$as_echo "$PROPER_COMPILER_CC" >&6; }
28870    CC="$PROPER_COMPILER_CC"
28871  else
28872    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28873$as_echo "no, keeping CC" >&6; }
28874  fi
28875
28876
28877  COMPILER=$CC
28878  COMPILER_NAME=$COMPILER_NAME
28879
28880  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28881    # cc -V output typically looks like
28882    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28883    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28884    # Check that this is likely to be the Solaris Studio cc.
28885    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28886    if test $? -ne 0; then
28887      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28888      { $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
28889$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28890      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28891$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28892      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28893$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28894      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28895    fi
28896    # Remove usage instructions (if present), and
28897    # collapse compiler output into a single line
28898    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28899        $SED -e 's/ *[Uu]sage:.*//'`
28900    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28901        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28902  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28903    # xlc -qversion output typically looks like
28904    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28905    #     Version: 11.01.0000.0015
28906    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28907    # Check that this is likely to be the IBM XL C compiler.
28908    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28909    if test $? -ne 0; then
28910      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28911      { $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
28912$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28913      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28914$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28915      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28916$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28917      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28918    fi
28919    # Collapse compiler output into a single line
28920    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28921    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28922        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28923  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28924    # There is no specific version flag, but all output starts with a version string.
28925    # First line typically looks something like:
28926    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28927    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28928    # Check that this is likely to be Microsoft CL.EXE.
28929    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28930    if test $? -ne 0; then
28931      { $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
28932$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28933      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28934$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28935      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28936    fi
28937    # Collapse compiler output into a single line
28938    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28939    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28940        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28941  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28942    # gcc --version output typically looks like
28943    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28944    #     Copyright (C) 2013 Free Software Foundation, Inc.
28945    #     This is free software; see the source for copying conditions.  There is NO
28946    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28947    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28948    # Check that this is likely to be GCC.
28949    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28950    if test $? -ne 0; then
28951      { $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
28952$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28953      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28954$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28955      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28956    fi
28957    # Remove Copyright and legalese from version string, and
28958    # collapse into a single line
28959    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28960        $SED -e 's/ *Copyright .*//'`
28961    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28962        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28963  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28964    # clang --version output typically looks like
28965    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28966    #    clang version 3.3 (tags/RELEASE_33/final)
28967    # or
28968    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28969    #    Target: x86_64-pc-linux-gnu
28970    #    Thread model: posix
28971    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28972    # Check that this is likely to be clang
28973    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28974    if test $? -ne 0; then
28975      { $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
28976$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28977      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28978$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28979      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28980    fi
28981    # Collapse compiler output into a single line
28982    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28983    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28984        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28985  else
28986      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28987  fi
28988  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28989  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28990  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28991  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28992
28993  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28994$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28995
28996
28997  # Now that we have resolved CC ourself, let autoconf have its go at it
28998  ac_ext=c
28999ac_cpp='$CPP $CPPFLAGS'
29000ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29001ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29002ac_compiler_gnu=$ac_cv_c_compiler_gnu
29003if test -n "$ac_tool_prefix"; then
29004  for ac_prog in $CC
29005  do
29006    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29007set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29009$as_echo_n "checking for $ac_word... " >&6; }
29010if ${ac_cv_prog_CC+:} false; then :
29011  $as_echo_n "(cached) " >&6
29012else
29013  if test -n "$CC"; then
29014  ac_cv_prog_CC="$CC" # Let the user override the test.
29015else
29016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29017for as_dir in $PATH
29018do
29019  IFS=$as_save_IFS
29020  test -z "$as_dir" && as_dir=.
29021    for ac_exec_ext in '' $ac_executable_extensions; do
29022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29023    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29025    break 2
29026  fi
29027done
29028  done
29029IFS=$as_save_IFS
29030
29031fi
29032fi
29033CC=$ac_cv_prog_CC
29034if test -n "$CC"; then
29035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29036$as_echo "$CC" >&6; }
29037else
29038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29039$as_echo "no" >&6; }
29040fi
29041
29042
29043    test -n "$CC" && break
29044  done
29045fi
29046if test -z "$CC"; then
29047  ac_ct_CC=$CC
29048  for ac_prog in $CC
29049do
29050  # Extract the first word of "$ac_prog", so it can be a program name with args.
29051set dummy $ac_prog; ac_word=$2
29052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29053$as_echo_n "checking for $ac_word... " >&6; }
29054if ${ac_cv_prog_ac_ct_CC+:} false; then :
29055  $as_echo_n "(cached) " >&6
29056else
29057  if test -n "$ac_ct_CC"; then
29058  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29059else
29060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29061for as_dir in $PATH
29062do
29063  IFS=$as_save_IFS
29064  test -z "$as_dir" && as_dir=.
29065    for ac_exec_ext in '' $ac_executable_extensions; do
29066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29067    ac_cv_prog_ac_ct_CC="$ac_prog"
29068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29069    break 2
29070  fi
29071done
29072  done
29073IFS=$as_save_IFS
29074
29075fi
29076fi
29077ac_ct_CC=$ac_cv_prog_ac_ct_CC
29078if test -n "$ac_ct_CC"; then
29079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29080$as_echo "$ac_ct_CC" >&6; }
29081else
29082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29083$as_echo "no" >&6; }
29084fi
29085
29086
29087  test -n "$ac_ct_CC" && break
29088done
29089
29090  if test "x$ac_ct_CC" = x; then
29091    CC=""
29092  else
29093    case $cross_compiling:$ac_tool_warned in
29094yes:)
29095{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29096$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29097ac_tool_warned=yes ;;
29098esac
29099    CC=$ac_ct_CC
29100  fi
29101fi
29102
29103
29104test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29106as_fn_error $? "no acceptable C compiler found in \$PATH
29107See \`config.log' for more details" "$LINENO" 5; }
29108
29109# Provide some information about the compiler.
29110$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29111set X $ac_compile
29112ac_compiler=$2
29113for ac_option in --version -v -V -qversion; do
29114  { { ac_try="$ac_compiler $ac_option >&5"
29115case "(($ac_try" in
29116  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29117  *) ac_try_echo=$ac_try;;
29118esac
29119eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29120$as_echo "$ac_try_echo"; } >&5
29121  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29122  ac_status=$?
29123  if test -s conftest.err; then
29124    sed '10a\
29125... rest of stderr output deleted ...
29126         10q' conftest.err >conftest.er1
29127    cat conftest.er1 >&5
29128  fi
29129  rm -f conftest.er1 conftest.err
29130  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29131  test $ac_status = 0; }
29132done
29133
29134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29135/* end confdefs.h.  */
29136
29137int
29138main ()
29139{
29140
29141  ;
29142  return 0;
29143}
29144_ACEOF
29145ac_clean_files_save=$ac_clean_files
29146ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29147# Try to create an executable without -o first, disregard a.out.
29148# It will help us diagnose broken compilers, and finding out an intuition
29149# of exeext.
29150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29151$as_echo_n "checking whether the C compiler works... " >&6; }
29152ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29153
29154# The possible output files:
29155ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29156
29157ac_rmfiles=
29158for ac_file in $ac_files
29159do
29160  case $ac_file in
29161    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29162    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29163  esac
29164done
29165rm -f $ac_rmfiles
29166
29167if { { ac_try="$ac_link_default"
29168case "(($ac_try" in
29169  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29170  *) ac_try_echo=$ac_try;;
29171esac
29172eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29173$as_echo "$ac_try_echo"; } >&5
29174  (eval "$ac_link_default") 2>&5
29175  ac_status=$?
29176  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29177  test $ac_status = 0; }; then :
29178  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29179# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29180# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29181# so that the user can short-circuit this test for compilers unknown to
29182# Autoconf.
29183for ac_file in $ac_files ''
29184do
29185  test -f "$ac_file" || continue
29186  case $ac_file in
29187    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29188	;;
29189    [ab].out )
29190	# We found the default executable, but exeext='' is most
29191	# certainly right.
29192	break;;
29193    *.* )
29194	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29195	then :; else
29196	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29197	fi
29198	# We set ac_cv_exeext here because the later test for it is not
29199	# safe: cross compilers may not add the suffix if given an `-o'
29200	# argument, so we may need to know it at that point already.
29201	# Even if this section looks crufty: it has the advantage of
29202	# actually working.
29203	break;;
29204    * )
29205	break;;
29206  esac
29207done
29208test "$ac_cv_exeext" = no && ac_cv_exeext=
29209
29210else
29211  ac_file=''
29212fi
29213if test -z "$ac_file"; then :
29214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29215$as_echo "no" >&6; }
29216$as_echo "$as_me: failed program was:" >&5
29217sed 's/^/| /' conftest.$ac_ext >&5
29218
29219{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29220$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29221as_fn_error 77 "C compiler cannot create executables
29222See \`config.log' for more details" "$LINENO" 5; }
29223else
29224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29225$as_echo "yes" >&6; }
29226fi
29227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29228$as_echo_n "checking for C compiler default output file name... " >&6; }
29229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29230$as_echo "$ac_file" >&6; }
29231ac_exeext=$ac_cv_exeext
29232
29233rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29234ac_clean_files=$ac_clean_files_save
29235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29236$as_echo_n "checking for suffix of executables... " >&6; }
29237if { { ac_try="$ac_link"
29238case "(($ac_try" in
29239  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29240  *) ac_try_echo=$ac_try;;
29241esac
29242eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29243$as_echo "$ac_try_echo"; } >&5
29244  (eval "$ac_link") 2>&5
29245  ac_status=$?
29246  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29247  test $ac_status = 0; }; then :
29248  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29249# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29250# work properly (i.e., refer to `conftest.exe'), while it won't with
29251# `rm'.
29252for ac_file in conftest.exe conftest conftest.*; do
29253  test -f "$ac_file" || continue
29254  case $ac_file in
29255    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29256    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29257	  break;;
29258    * ) break;;
29259  esac
29260done
29261else
29262  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29263$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29264as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29265See \`config.log' for more details" "$LINENO" 5; }
29266fi
29267rm -f conftest conftest$ac_cv_exeext
29268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29269$as_echo "$ac_cv_exeext" >&6; }
29270
29271rm -f conftest.$ac_ext
29272EXEEXT=$ac_cv_exeext
29273ac_exeext=$EXEEXT
29274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29275/* end confdefs.h.  */
29276#include <stdio.h>
29277int
29278main ()
29279{
29280FILE *f = fopen ("conftest.out", "w");
29281 return ferror (f) || fclose (f) != 0;
29282
29283  ;
29284  return 0;
29285}
29286_ACEOF
29287ac_clean_files="$ac_clean_files conftest.out"
29288# Check that the compiler produces executables we can run.  If not, either
29289# the compiler is broken, or we cross compile.
29290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29291$as_echo_n "checking whether we are cross compiling... " >&6; }
29292if test "$cross_compiling" != yes; then
29293  { { ac_try="$ac_link"
29294case "(($ac_try" in
29295  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29296  *) ac_try_echo=$ac_try;;
29297esac
29298eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29299$as_echo "$ac_try_echo"; } >&5
29300  (eval "$ac_link") 2>&5
29301  ac_status=$?
29302  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29303  test $ac_status = 0; }
29304  if { ac_try='./conftest$ac_cv_exeext'
29305  { { case "(($ac_try" in
29306  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29307  *) ac_try_echo=$ac_try;;
29308esac
29309eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29310$as_echo "$ac_try_echo"; } >&5
29311  (eval "$ac_try") 2>&5
29312  ac_status=$?
29313  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29314  test $ac_status = 0; }; }; then
29315    cross_compiling=no
29316  else
29317    if test "$cross_compiling" = maybe; then
29318	cross_compiling=yes
29319    else
29320	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29321$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29322as_fn_error $? "cannot run C compiled programs.
29323If you meant to cross compile, use \`--host'.
29324See \`config.log' for more details" "$LINENO" 5; }
29325    fi
29326  fi
29327fi
29328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29329$as_echo "$cross_compiling" >&6; }
29330
29331rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29332ac_clean_files=$ac_clean_files_save
29333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29334$as_echo_n "checking for suffix of object files... " >&6; }
29335if ${ac_cv_objext+:} false; then :
29336  $as_echo_n "(cached) " >&6
29337else
29338  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29339/* end confdefs.h.  */
29340
29341int
29342main ()
29343{
29344
29345  ;
29346  return 0;
29347}
29348_ACEOF
29349rm -f conftest.o conftest.obj
29350if { { ac_try="$ac_compile"
29351case "(($ac_try" in
29352  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29353  *) ac_try_echo=$ac_try;;
29354esac
29355eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29356$as_echo "$ac_try_echo"; } >&5
29357  (eval "$ac_compile") 2>&5
29358  ac_status=$?
29359  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29360  test $ac_status = 0; }; then :
29361  for ac_file in conftest.o conftest.obj conftest.*; do
29362  test -f "$ac_file" || continue;
29363  case $ac_file in
29364    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29365    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29366       break;;
29367  esac
29368done
29369else
29370  $as_echo "$as_me: failed program was:" >&5
29371sed 's/^/| /' conftest.$ac_ext >&5
29372
29373{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29374$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29375as_fn_error $? "cannot compute suffix of object files: cannot compile
29376See \`config.log' for more details" "$LINENO" 5; }
29377fi
29378rm -f conftest.$ac_cv_objext conftest.$ac_ext
29379fi
29380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29381$as_echo "$ac_cv_objext" >&6; }
29382OBJEXT=$ac_cv_objext
29383ac_objext=$OBJEXT
29384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29385$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29386if ${ac_cv_c_compiler_gnu+:} false; then :
29387  $as_echo_n "(cached) " >&6
29388else
29389  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29390/* end confdefs.h.  */
29391
29392int
29393main ()
29394{
29395#ifndef __GNUC__
29396       choke me
29397#endif
29398
29399  ;
29400  return 0;
29401}
29402_ACEOF
29403if ac_fn_c_try_compile "$LINENO"; then :
29404  ac_compiler_gnu=yes
29405else
29406  ac_compiler_gnu=no
29407fi
29408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29409ac_cv_c_compiler_gnu=$ac_compiler_gnu
29410
29411fi
29412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29413$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29414if test $ac_compiler_gnu = yes; then
29415  GCC=yes
29416else
29417  GCC=
29418fi
29419ac_test_CFLAGS=${CFLAGS+set}
29420ac_save_CFLAGS=$CFLAGS
29421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29422$as_echo_n "checking whether $CC accepts -g... " >&6; }
29423if ${ac_cv_prog_cc_g+:} false; then :
29424  $as_echo_n "(cached) " >&6
29425else
29426  ac_save_c_werror_flag=$ac_c_werror_flag
29427   ac_c_werror_flag=yes
29428   ac_cv_prog_cc_g=no
29429   CFLAGS="-g"
29430   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29431/* end confdefs.h.  */
29432
29433int
29434main ()
29435{
29436
29437  ;
29438  return 0;
29439}
29440_ACEOF
29441if ac_fn_c_try_compile "$LINENO"; then :
29442  ac_cv_prog_cc_g=yes
29443else
29444  CFLAGS=""
29445      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29446/* end confdefs.h.  */
29447
29448int
29449main ()
29450{
29451
29452  ;
29453  return 0;
29454}
29455_ACEOF
29456if ac_fn_c_try_compile "$LINENO"; then :
29457
29458else
29459  ac_c_werror_flag=$ac_save_c_werror_flag
29460	 CFLAGS="-g"
29461	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29462/* end confdefs.h.  */
29463
29464int
29465main ()
29466{
29467
29468  ;
29469  return 0;
29470}
29471_ACEOF
29472if ac_fn_c_try_compile "$LINENO"; then :
29473  ac_cv_prog_cc_g=yes
29474fi
29475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29476fi
29477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29478fi
29479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29480   ac_c_werror_flag=$ac_save_c_werror_flag
29481fi
29482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29483$as_echo "$ac_cv_prog_cc_g" >&6; }
29484if test "$ac_test_CFLAGS" = set; then
29485  CFLAGS=$ac_save_CFLAGS
29486elif test $ac_cv_prog_cc_g = yes; then
29487  if test "$GCC" = yes; then
29488    CFLAGS="-g -O2"
29489  else
29490    CFLAGS="-g"
29491  fi
29492else
29493  if test "$GCC" = yes; then
29494    CFLAGS="-O2"
29495  else
29496    CFLAGS=
29497  fi
29498fi
29499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29500$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29501if ${ac_cv_prog_cc_c89+:} false; then :
29502  $as_echo_n "(cached) " >&6
29503else
29504  ac_cv_prog_cc_c89=no
29505ac_save_CC=$CC
29506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29507/* end confdefs.h.  */
29508#include <stdarg.h>
29509#include <stdio.h>
29510struct stat;
29511/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29512struct buf { int x; };
29513FILE * (*rcsopen) (struct buf *, struct stat *, int);
29514static char *e (p, i)
29515     char **p;
29516     int i;
29517{
29518  return p[i];
29519}
29520static char *f (char * (*g) (char **, int), char **p, ...)
29521{
29522  char *s;
29523  va_list v;
29524  va_start (v,p);
29525  s = g (p, va_arg (v,int));
29526  va_end (v);
29527  return s;
29528}
29529
29530/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29531   function prototypes and stuff, but not '\xHH' hex character constants.
29532   These don't provoke an error unfortunately, instead are silently treated
29533   as 'x'.  The following induces an error, until -std is added to get
29534   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29535   array size at least.  It's necessary to write '\x00'==0 to get something
29536   that's true only with -std.  */
29537int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29538
29539/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29540   inside strings and character constants.  */
29541#define FOO(x) 'x'
29542int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29543
29544int test (int i, double x);
29545struct s1 {int (*f) (int a);};
29546struct s2 {int (*f) (double a);};
29547int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29548int argc;
29549char **argv;
29550int
29551main ()
29552{
29553return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29554  ;
29555  return 0;
29556}
29557_ACEOF
29558for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29559	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29560do
29561  CC="$ac_save_CC $ac_arg"
29562  if ac_fn_c_try_compile "$LINENO"; then :
29563  ac_cv_prog_cc_c89=$ac_arg
29564fi
29565rm -f core conftest.err conftest.$ac_objext
29566  test "x$ac_cv_prog_cc_c89" != "xno" && break
29567done
29568rm -f conftest.$ac_ext
29569CC=$ac_save_CC
29570
29571fi
29572# AC_CACHE_VAL
29573case "x$ac_cv_prog_cc_c89" in
29574  x)
29575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29576$as_echo "none needed" >&6; } ;;
29577  xno)
29578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29579$as_echo "unsupported" >&6; } ;;
29580  *)
29581    CC="$CC $ac_cv_prog_cc_c89"
29582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29583$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29584esac
29585if test "x$ac_cv_prog_cc_c89" != xno; then :
29586
29587fi
29588
29589ac_ext=cpp
29590ac_cpp='$CXXCPP $CPPFLAGS'
29591ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29592ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29593ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29594
29595
29596
29597  COMPILER_NAME=C++
29598  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29599
29600  if test "x$CXX" != x; then
29601    # User has supplied compiler name already, always let that override.
29602    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29603$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29604    if test "x`basename $CXX`" = "x$CXX"; then
29605      # A command without a complete path is provided, search $PATH.
29606
29607      for ac_prog in $CXX
29608do
29609  # Extract the first word of "$ac_prog", so it can be a program name with args.
29610set dummy $ac_prog; ac_word=$2
29611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29612$as_echo_n "checking for $ac_word... " >&6; }
29613if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29614  $as_echo_n "(cached) " >&6
29615else
29616  case $POTENTIAL_CXX in
29617  [\\/]* | ?:[\\/]*)
29618  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29619  ;;
29620  *)
29621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29622for as_dir in $PATH
29623do
29624  IFS=$as_save_IFS
29625  test -z "$as_dir" && as_dir=.
29626    for ac_exec_ext in '' $ac_executable_extensions; do
29627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29628    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29630    break 2
29631  fi
29632done
29633  done
29634IFS=$as_save_IFS
29635
29636  ;;
29637esac
29638fi
29639POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29640if test -n "$POTENTIAL_CXX"; then
29641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29642$as_echo "$POTENTIAL_CXX" >&6; }
29643else
29644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29645$as_echo "no" >&6; }
29646fi
29647
29648
29649  test -n "$POTENTIAL_CXX" && break
29650done
29651
29652      if test "x$POTENTIAL_CXX" != x; then
29653        CXX=$POTENTIAL_CXX
29654      else
29655        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29656      fi
29657    else
29658      # Otherwise it might already be a complete path
29659      if test ! -x "$CXX"; then
29660        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29661      fi
29662    fi
29663  else
29664    # No user supplied value. Locate compiler ourselves.
29665
29666    # If we are cross compiling, assume cross compilation tools follows the
29667    # cross compilation standard where they are prefixed with the autoconf
29668    # standard name for the target. For example the binary
29669    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29670    # If we are not cross compiling, then the default compiler name will be
29671    # used.
29672
29673    CXX=
29674    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29675    # before checking the rest of the PATH.
29676    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29677    # step, this should not be necessary.
29678    if test -n "$TOOLCHAIN_PATH"; then
29679      PATH_save="$PATH"
29680      PATH="$TOOLCHAIN_PATH"
29681      for ac_prog in $SEARCH_LIST
29682do
29683  # Extract the first word of "$ac_prog", so it can be a program name with args.
29684set dummy $ac_prog; ac_word=$2
29685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29686$as_echo_n "checking for $ac_word... " >&6; }
29687if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29688  $as_echo_n "(cached) " >&6
29689else
29690  case $TOOLCHAIN_PATH_CXX in
29691  [\\/]* | ?:[\\/]*)
29692  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29693  ;;
29694  *)
29695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29696for as_dir in $PATH
29697do
29698  IFS=$as_save_IFS
29699  test -z "$as_dir" && as_dir=.
29700    for ac_exec_ext in '' $ac_executable_extensions; do
29701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29702    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29704    break 2
29705  fi
29706done
29707  done
29708IFS=$as_save_IFS
29709
29710  ;;
29711esac
29712fi
29713TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29714if test -n "$TOOLCHAIN_PATH_CXX"; then
29715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29716$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29717else
29718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29719$as_echo "no" >&6; }
29720fi
29721
29722
29723  test -n "$TOOLCHAIN_PATH_CXX" && break
29724done
29725
29726      CXX=$TOOLCHAIN_PATH_CXX
29727      PATH="$PATH_save"
29728    fi
29729
29730    # AC_PATH_PROGS can't be run multiple times with the same variable,
29731    # so create a new name for this run.
29732    if test "x$CXX" = x; then
29733      for ac_prog in $SEARCH_LIST
29734do
29735  # Extract the first word of "$ac_prog", so it can be a program name with args.
29736set dummy $ac_prog; ac_word=$2
29737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29738$as_echo_n "checking for $ac_word... " >&6; }
29739if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29740  $as_echo_n "(cached) " >&6
29741else
29742  case $POTENTIAL_CXX in
29743  [\\/]* | ?:[\\/]*)
29744  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29745  ;;
29746  *)
29747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29748for as_dir in $PATH
29749do
29750  IFS=$as_save_IFS
29751  test -z "$as_dir" && as_dir=.
29752    for ac_exec_ext in '' $ac_executable_extensions; do
29753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29754    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29756    break 2
29757  fi
29758done
29759  done
29760IFS=$as_save_IFS
29761
29762  ;;
29763esac
29764fi
29765POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29766if test -n "$POTENTIAL_CXX"; then
29767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29768$as_echo "$POTENTIAL_CXX" >&6; }
29769else
29770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29771$as_echo "no" >&6; }
29772fi
29773
29774
29775  test -n "$POTENTIAL_CXX" && break
29776done
29777
29778      CXX=$POTENTIAL_CXX
29779    fi
29780
29781    if test "x$CXX" = x; then
29782
29783  # Print a helpful message on how to acquire the necessary build dependency.
29784  # devkit is the help tag: freetype, cups, pulse, alsa etc
29785  MISSING_DEPENDENCY=devkit
29786
29787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29788    cygwin_help $MISSING_DEPENDENCY
29789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29790    msys_help $MISSING_DEPENDENCY
29791  else
29792    PKGHANDLER_COMMAND=
29793
29794    case $PKGHANDLER in
29795      apt-get)
29796        apt_help     $MISSING_DEPENDENCY ;;
29797      yum)
29798        yum_help     $MISSING_DEPENDENCY ;;
29799      port)
29800        port_help    $MISSING_DEPENDENCY ;;
29801      pkgutil)
29802        pkgutil_help $MISSING_DEPENDENCY ;;
29803      pkgadd)
29804        pkgadd_help  $MISSING_DEPENDENCY ;;
29805    esac
29806
29807    if test "x$PKGHANDLER_COMMAND" != x; then
29808      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29809    fi
29810  fi
29811
29812      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29813    fi
29814  fi
29815
29816  # Now we have a compiler binary in CXX. Make sure it's okay.
29817
29818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29819
29820  # First separate the path from the arguments. This will split at the first
29821  # space.
29822  complete="$CXX"
29823  path="${complete%% *}"
29824  tmp="$complete EOL"
29825  arguments="${tmp#* }"
29826
29827  # Input might be given as Windows format, start by converting to
29828  # unix format.
29829  new_path=`$CYGPATH -u "$path"`
29830
29831  # Now try to locate executable using which
29832  new_path=`$WHICH "$new_path" 2> /dev/null`
29833  # bat and cmd files are not always considered executable in cygwin causing which
29834  # to not find them
29835  if test "x$new_path" = x \
29836      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29837      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29838    new_path=`$CYGPATH -u "$path"`
29839  fi
29840  if test "x$new_path" = x; then
29841    # Oops. Which didn't find the executable.
29842    # The splitting of arguments from the executable at a space might have been incorrect,
29843    # since paths with space are more likely in Windows. Give it another try with the whole
29844    # argument.
29845    path="$complete"
29846    arguments="EOL"
29847    new_path=`$CYGPATH -u "$path"`
29848    new_path=`$WHICH "$new_path" 2> /dev/null`
29849    # bat and cmd files are not always considered executable in cygwin causing which
29850    # to not find them
29851    if test "x$new_path" = x \
29852        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29853        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29854      new_path=`$CYGPATH -u "$path"`
29855    fi
29856    if test "x$new_path" = x; then
29857      # It's still not found. Now this is an unrecoverable error.
29858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29859$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29860      has_space=`$ECHO "$complete" | $GREP " "`
29861      if test "x$has_space" != x; then
29862        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29863$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29864      fi
29865      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29866    fi
29867  fi
29868
29869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29872  # "foo.exe" is OK but "foo" is an error.
29873  #
29874  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29875  # It is also a way to make sure we got the proper file name for the real test later on.
29876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29877  if test "x$test_shortpath" = x; then
29878    # Short path failed, file does not exist as specified.
29879    # Try adding .exe or .cmd
29880    if test -f "${new_path}.exe"; then
29881      input_to_shortpath="${new_path}.exe"
29882    elif test -f "${new_path}.cmd"; then
29883      input_to_shortpath="${new_path}.cmd"
29884    else
29885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29886$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29887      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29888$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29889      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29890    fi
29891  else
29892    input_to_shortpath="$new_path"
29893  fi
29894
29895  # Call helper function which possibly converts this using DOS-style short mode.
29896  # If so, the updated path is stored in $new_path.
29897  new_path="$input_to_shortpath"
29898
29899  input_path="$input_to_shortpath"
29900  # Check if we need to convert this using DOS-style short mode. If the path
29901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29902  # take no chances and rewrite it.
29903  # Note: m4 eats our [], so we need to use [ and ] instead.
29904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29905  if test "x$has_forbidden_chars" != x; then
29906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29907    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29908    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29909    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29910      # Going to short mode and back again did indeed matter. Since short mode is
29911      # case insensitive, let's make it lowercase to improve readability.
29912      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29913      # Now convert it back to Unix-stile (cygpath)
29914      input_path=`$CYGPATH -u "$shortmode_path"`
29915      new_path="$input_path"
29916    fi
29917  fi
29918
29919  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29920  if test "x$test_cygdrive_prefix" = x; then
29921    # As a simple fix, exclude /usr/bin since it's not a real path.
29922    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29923      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29924      # a path prefixed by /cygdrive for fixpath to work.
29925      new_path="$CYGWIN_ROOT_PATH$input_path"
29926    fi
29927  fi
29928
29929  # remove trailing .exe if any
29930  new_path="${new_path/%.exe/}"
29931
29932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29933
29934  # First separate the path from the arguments. This will split at the first
29935  # space.
29936  complete="$CXX"
29937  path="${complete%% *}"
29938  tmp="$complete EOL"
29939  arguments="${tmp#* }"
29940
29941  # Input might be given as Windows format, start by converting to
29942  # unix format.
29943  new_path="$path"
29944
29945  windows_path="$new_path"
29946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29947    unix_path=`$CYGPATH -u "$windows_path"`
29948    new_path="$unix_path"
29949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29951    new_path="$unix_path"
29952  fi
29953
29954
29955  # Now try to locate executable using which
29956  new_path=`$WHICH "$new_path" 2> /dev/null`
29957
29958  if test "x$new_path" = x; then
29959    # Oops. Which didn't find the executable.
29960    # The splitting of arguments from the executable at a space might have been incorrect,
29961    # since paths with space are more likely in Windows. Give it another try with the whole
29962    # argument.
29963    path="$complete"
29964    arguments="EOL"
29965    new_path="$path"
29966
29967  windows_path="$new_path"
29968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29969    unix_path=`$CYGPATH -u "$windows_path"`
29970    new_path="$unix_path"
29971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29973    new_path="$unix_path"
29974  fi
29975
29976
29977    new_path=`$WHICH "$new_path" 2> /dev/null`
29978    # bat and cmd files are not always considered executable in MSYS causing which
29979    # to not find them
29980    if test "x$new_path" = x \
29981        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29982        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29983      new_path="$path"
29984
29985  windows_path="$new_path"
29986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29987    unix_path=`$CYGPATH -u "$windows_path"`
29988    new_path="$unix_path"
29989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29991    new_path="$unix_path"
29992  fi
29993
29994    fi
29995
29996    if test "x$new_path" = x; then
29997      # It's still not found. Now this is an unrecoverable error.
29998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29999$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30000      has_space=`$ECHO "$complete" | $GREP " "`
30001      if test "x$has_space" != x; then
30002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30004      fi
30005      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30006    fi
30007  fi
30008
30009  # Now new_path has a complete unix path to the binary
30010  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30011    # Keep paths in /bin as-is, but remove trailing .exe if any
30012    new_path="${new_path/%.exe/}"
30013    # Do not save /bin paths to all_fixpath_prefixes!
30014  else
30015    # Not in mixed or Windows style, start by that.
30016    new_path=`cmd //c echo $new_path`
30017
30018  input_path="$new_path"
30019  # Check if we need to convert this using DOS-style short mode. If the path
30020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30021  # take no chances and rewrite it.
30022  # Note: m4 eats our [], so we need to use [ and ] instead.
30023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30024  if test "x$has_forbidden_chars" != x; then
30025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30027  fi
30028
30029    # Output is in $new_path
30030
30031  windows_path="$new_path"
30032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30033    unix_path=`$CYGPATH -u "$windows_path"`
30034    new_path="$unix_path"
30035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30037    new_path="$unix_path"
30038  fi
30039
30040    # remove trailing .exe if any
30041    new_path="${new_path/%.exe/}"
30042
30043    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30044    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30045  fi
30046
30047  else
30048    # We're on a posix platform. Hooray! :)
30049    # First separate the path from the arguments. This will split at the first
30050    # space.
30051    complete="$CXX"
30052    path="${complete%% *}"
30053    tmp="$complete EOL"
30054    arguments="${tmp#* }"
30055
30056    # Cannot rely on the command "which" here since it doesn't always work.
30057    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30058    if test -z "$is_absolute_path"; then
30059      # Path to executable is not absolute. Find it.
30060      IFS_save="$IFS"
30061      IFS=:
30062      for p in $PATH; do
30063        if test -f "$p/$path" && test -x "$p/$path"; then
30064          new_path="$p/$path"
30065          break
30066        fi
30067      done
30068      IFS="$IFS_save"
30069    else
30070      # This is an absolute path, we can use it without further modifications.
30071      new_path="$path"
30072    fi
30073
30074    if test "x$new_path" = x; then
30075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30076$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30077      has_space=`$ECHO "$complete" | $GREP " "`
30078      if test "x$has_space" != x; then
30079        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30080$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30081      fi
30082      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30083    fi
30084  fi
30085
30086  # Now join together the path and the arguments once again
30087  if test "x$arguments" != xEOL; then
30088    new_complete="$new_path ${arguments% *}"
30089  else
30090    new_complete="$new_path"
30091  fi
30092
30093  if test "x$complete" != "x$new_complete"; then
30094    CXX="$new_complete"
30095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30096$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30097  fi
30098
30099  TEST_COMPILER="$CXX"
30100  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30101  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30102  if test "x$OPENJDK_BUILD_OS" != xaix; then
30103    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30104    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30105$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30106
30107  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30108    # Follow a chain of symbolic links. Use readlink
30109    # where it exists, else fall back to horribly
30110    # complicated shell code.
30111    if test "x$READLINK_TESTED" != yes; then
30112      # On MacOSX there is a readlink tool with a different
30113      # purpose than the GNU readlink tool. Check the found readlink.
30114      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30115      if test "x$ISGNU" = x; then
30116        # A readlink that we do not know how to use.
30117        # Are there other non-GNU readlinks out there?
30118        READLINK_TESTED=yes
30119        READLINK=
30120      fi
30121    fi
30122
30123    if test "x$READLINK" != x; then
30124      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30125    else
30126      # Save the current directory for restoring afterwards
30127      STARTDIR=$PWD
30128      COUNTER=0
30129      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30130      sym_link_file=`$BASENAME $TEST_COMPILER`
30131      cd $sym_link_dir
30132      # Use -P flag to resolve symlinks in directories.
30133      cd `$THEPWDCMD -P`
30134      sym_link_dir=`$THEPWDCMD -P`
30135      # Resolve file symlinks
30136      while test $COUNTER -lt 20; do
30137        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30138        if test "x$ISLINK" == x; then
30139          # This is not a symbolic link! We are done!
30140          break
30141        fi
30142        # Again resolve directory symlinks since the target of the just found
30143        # link could be in a different directory
30144        cd `$DIRNAME $ISLINK`
30145        sym_link_dir=`$THEPWDCMD -P`
30146        sym_link_file=`$BASENAME $ISLINK`
30147        let COUNTER=COUNTER+1
30148      done
30149      cd $STARTDIR
30150      TEST_COMPILER=$sym_link_dir/$sym_link_file
30151    fi
30152  fi
30153
30154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30155$as_echo "$TEST_COMPILER" >&6; }
30156  fi
30157  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30158$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30159
30160  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30161  if test "x$COMPILER_BASENAME" = "xccache"; then
30162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30163$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30164    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30165    # We want to control ccache invocation ourselves, so ignore this cc and try
30166    # searching again.
30167
30168    # Remove the path to the fake ccache cc from the PATH
30169    RETRY_COMPILER_SAVED_PATH="$PATH"
30170    COMPILER_DIRNAME=`$DIRNAME $CXX`
30171    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30172
30173    # Try again looking for our compiler
30174    if test -n "$ac_tool_prefix"; then
30175  for ac_prog in $TOOLCHAIN_CXX_BINARY
30176  do
30177    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30178set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30180$as_echo_n "checking for $ac_word... " >&6; }
30181if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30182  $as_echo_n "(cached) " >&6
30183else
30184  if test -n "$PROPER_COMPILER_CXX"; then
30185  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30186else
30187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30188for as_dir in $PATH
30189do
30190  IFS=$as_save_IFS
30191  test -z "$as_dir" && as_dir=.
30192    for ac_exec_ext in '' $ac_executable_extensions; do
30193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30194    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30196    break 2
30197  fi
30198done
30199  done
30200IFS=$as_save_IFS
30201
30202fi
30203fi
30204PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30205if test -n "$PROPER_COMPILER_CXX"; then
30206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30207$as_echo "$PROPER_COMPILER_CXX" >&6; }
30208else
30209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30210$as_echo "no" >&6; }
30211fi
30212
30213
30214    test -n "$PROPER_COMPILER_CXX" && break
30215  done
30216fi
30217if test -z "$PROPER_COMPILER_CXX"; then
30218  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30219  for ac_prog in $TOOLCHAIN_CXX_BINARY
30220do
30221  # Extract the first word of "$ac_prog", so it can be a program name with args.
30222set dummy $ac_prog; ac_word=$2
30223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30224$as_echo_n "checking for $ac_word... " >&6; }
30225if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30226  $as_echo_n "(cached) " >&6
30227else
30228  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30229  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30230else
30231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30232for as_dir in $PATH
30233do
30234  IFS=$as_save_IFS
30235  test -z "$as_dir" && as_dir=.
30236    for ac_exec_ext in '' $ac_executable_extensions; do
30237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30238    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30240    break 2
30241  fi
30242done
30243  done
30244IFS=$as_save_IFS
30245
30246fi
30247fi
30248ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30249if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30251$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30252else
30253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30254$as_echo "no" >&6; }
30255fi
30256
30257
30258  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30259done
30260
30261  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30262    PROPER_COMPILER_CXX=""
30263  else
30264    case $cross_compiling:$ac_tool_warned in
30265yes:)
30266{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30267$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30268ac_tool_warned=yes ;;
30269esac
30270    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30271  fi
30272fi
30273
30274
30275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30276
30277  # First separate the path from the arguments. This will split at the first
30278  # space.
30279  complete="$PROPER_COMPILER_CXX"
30280  path="${complete%% *}"
30281  tmp="$complete EOL"
30282  arguments="${tmp#* }"
30283
30284  # Input might be given as Windows format, start by converting to
30285  # unix format.
30286  new_path=`$CYGPATH -u "$path"`
30287
30288  # Now try to locate executable using which
30289  new_path=`$WHICH "$new_path" 2> /dev/null`
30290  # bat and cmd files are not always considered executable in cygwin causing which
30291  # to not find them
30292  if test "x$new_path" = x \
30293      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30294      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30295    new_path=`$CYGPATH -u "$path"`
30296  fi
30297  if test "x$new_path" = x; then
30298    # Oops. Which didn't find the executable.
30299    # The splitting of arguments from the executable at a space might have been incorrect,
30300    # since paths with space are more likely in Windows. Give it another try with the whole
30301    # argument.
30302    path="$complete"
30303    arguments="EOL"
30304    new_path=`$CYGPATH -u "$path"`
30305    new_path=`$WHICH "$new_path" 2> /dev/null`
30306    # bat and cmd files are not always considered executable in cygwin causing which
30307    # to not find them
30308    if test "x$new_path" = x \
30309        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30310        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30311      new_path=`$CYGPATH -u "$path"`
30312    fi
30313    if test "x$new_path" = x; then
30314      # It's still not found. Now this is an unrecoverable error.
30315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30316$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30317      has_space=`$ECHO "$complete" | $GREP " "`
30318      if test "x$has_space" != x; then
30319        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30321      fi
30322      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30323    fi
30324  fi
30325
30326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30329  # "foo.exe" is OK but "foo" is an error.
30330  #
30331  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30332  # It is also a way to make sure we got the proper file name for the real test later on.
30333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30334  if test "x$test_shortpath" = x; then
30335    # Short path failed, file does not exist as specified.
30336    # Try adding .exe or .cmd
30337    if test -f "${new_path}.exe"; then
30338      input_to_shortpath="${new_path}.exe"
30339    elif test -f "${new_path}.cmd"; then
30340      input_to_shortpath="${new_path}.cmd"
30341    else
30342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30343$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30344      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30345$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30346      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30347    fi
30348  else
30349    input_to_shortpath="$new_path"
30350  fi
30351
30352  # Call helper function which possibly converts this using DOS-style short mode.
30353  # If so, the updated path is stored in $new_path.
30354  new_path="$input_to_shortpath"
30355
30356  input_path="$input_to_shortpath"
30357  # Check if we need to convert this using DOS-style short mode. If the path
30358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30359  # take no chances and rewrite it.
30360  # Note: m4 eats our [], so we need to use [ and ] instead.
30361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30362  if test "x$has_forbidden_chars" != x; then
30363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30367      # Going to short mode and back again did indeed matter. Since short mode is
30368      # case insensitive, let's make it lowercase to improve readability.
30369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30370      # Now convert it back to Unix-stile (cygpath)
30371      input_path=`$CYGPATH -u "$shortmode_path"`
30372      new_path="$input_path"
30373    fi
30374  fi
30375
30376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30377  if test "x$test_cygdrive_prefix" = x; then
30378    # As a simple fix, exclude /usr/bin since it's not a real path.
30379    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30381      # a path prefixed by /cygdrive for fixpath to work.
30382      new_path="$CYGWIN_ROOT_PATH$input_path"
30383    fi
30384  fi
30385
30386  # remove trailing .exe if any
30387  new_path="${new_path/%.exe/}"
30388
30389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30390
30391  # First separate the path from the arguments. This will split at the first
30392  # space.
30393  complete="$PROPER_COMPILER_CXX"
30394  path="${complete%% *}"
30395  tmp="$complete EOL"
30396  arguments="${tmp#* }"
30397
30398  # Input might be given as Windows format, start by converting to
30399  # unix format.
30400  new_path="$path"
30401
30402  windows_path="$new_path"
30403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30404    unix_path=`$CYGPATH -u "$windows_path"`
30405    new_path="$unix_path"
30406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30408    new_path="$unix_path"
30409  fi
30410
30411
30412  # Now try to locate executable using which
30413  new_path=`$WHICH "$new_path" 2> /dev/null`
30414
30415  if test "x$new_path" = x; then
30416    # Oops. Which didn't find the executable.
30417    # The splitting of arguments from the executable at a space might have been incorrect,
30418    # since paths with space are more likely in Windows. Give it another try with the whole
30419    # argument.
30420    path="$complete"
30421    arguments="EOL"
30422    new_path="$path"
30423
30424  windows_path="$new_path"
30425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30426    unix_path=`$CYGPATH -u "$windows_path"`
30427    new_path="$unix_path"
30428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30430    new_path="$unix_path"
30431  fi
30432
30433
30434    new_path=`$WHICH "$new_path" 2> /dev/null`
30435    # bat and cmd files are not always considered executable in MSYS causing which
30436    # to not find them
30437    if test "x$new_path" = x \
30438        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30439        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30440      new_path="$path"
30441
30442  windows_path="$new_path"
30443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30444    unix_path=`$CYGPATH -u "$windows_path"`
30445    new_path="$unix_path"
30446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30448    new_path="$unix_path"
30449  fi
30450
30451    fi
30452
30453    if test "x$new_path" = x; then
30454      # It's still not found. Now this is an unrecoverable error.
30455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30456$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30457      has_space=`$ECHO "$complete" | $GREP " "`
30458      if test "x$has_space" != x; then
30459        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30460$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30461      fi
30462      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30463    fi
30464  fi
30465
30466  # Now new_path has a complete unix path to the binary
30467  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30468    # Keep paths in /bin as-is, but remove trailing .exe if any
30469    new_path="${new_path/%.exe/}"
30470    # Do not save /bin paths to all_fixpath_prefixes!
30471  else
30472    # Not in mixed or Windows style, start by that.
30473    new_path=`cmd //c echo $new_path`
30474
30475  input_path="$new_path"
30476  # Check if we need to convert this using DOS-style short mode. If the path
30477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30478  # take no chances and rewrite it.
30479  # Note: m4 eats our [], so we need to use [ and ] instead.
30480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30481  if test "x$has_forbidden_chars" != x; then
30482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30484  fi
30485
30486    # Output is in $new_path
30487
30488  windows_path="$new_path"
30489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30490    unix_path=`$CYGPATH -u "$windows_path"`
30491    new_path="$unix_path"
30492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30494    new_path="$unix_path"
30495  fi
30496
30497    # remove trailing .exe if any
30498    new_path="${new_path/%.exe/}"
30499
30500    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30501    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30502  fi
30503
30504  else
30505    # We're on a posix platform. Hooray! :)
30506    # First separate the path from the arguments. This will split at the first
30507    # space.
30508    complete="$PROPER_COMPILER_CXX"
30509    path="${complete%% *}"
30510    tmp="$complete EOL"
30511    arguments="${tmp#* }"
30512
30513    # Cannot rely on the command "which" here since it doesn't always work.
30514    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30515    if test -z "$is_absolute_path"; then
30516      # Path to executable is not absolute. Find it.
30517      IFS_save="$IFS"
30518      IFS=:
30519      for p in $PATH; do
30520        if test -f "$p/$path" && test -x "$p/$path"; then
30521          new_path="$p/$path"
30522          break
30523        fi
30524      done
30525      IFS="$IFS_save"
30526    else
30527      # This is an absolute path, we can use it without further modifications.
30528      new_path="$path"
30529    fi
30530
30531    if test "x$new_path" = x; then
30532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30533$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30534      has_space=`$ECHO "$complete" | $GREP " "`
30535      if test "x$has_space" != x; then
30536        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30537$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30538      fi
30539      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30540    fi
30541  fi
30542
30543  # Now join together the path and the arguments once again
30544  if test "x$arguments" != xEOL; then
30545    new_complete="$new_path ${arguments% *}"
30546  else
30547    new_complete="$new_path"
30548  fi
30549
30550  if test "x$complete" != "x$new_complete"; then
30551    PROPER_COMPILER_CXX="$new_complete"
30552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30553$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30554  fi
30555
30556    PATH="$RETRY_COMPILER_SAVED_PATH"
30557
30558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30559$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30560
30561  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30562    # Follow a chain of symbolic links. Use readlink
30563    # where it exists, else fall back to horribly
30564    # complicated shell code.
30565    if test "x$READLINK_TESTED" != yes; then
30566      # On MacOSX there is a readlink tool with a different
30567      # purpose than the GNU readlink tool. Check the found readlink.
30568      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30569      if test "x$ISGNU" = x; then
30570        # A readlink that we do not know how to use.
30571        # Are there other non-GNU readlinks out there?
30572        READLINK_TESTED=yes
30573        READLINK=
30574      fi
30575    fi
30576
30577    if test "x$READLINK" != x; then
30578      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30579    else
30580      # Save the current directory for restoring afterwards
30581      STARTDIR=$PWD
30582      COUNTER=0
30583      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30584      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30585      cd $sym_link_dir
30586      # Use -P flag to resolve symlinks in directories.
30587      cd `$THEPWDCMD -P`
30588      sym_link_dir=`$THEPWDCMD -P`
30589      # Resolve file symlinks
30590      while test $COUNTER -lt 20; do
30591        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30592        if test "x$ISLINK" == x; then
30593          # This is not a symbolic link! We are done!
30594          break
30595        fi
30596        # Again resolve directory symlinks since the target of the just found
30597        # link could be in a different directory
30598        cd `$DIRNAME $ISLINK`
30599        sym_link_dir=`$THEPWDCMD -P`
30600        sym_link_file=`$BASENAME $ISLINK`
30601        let COUNTER=COUNTER+1
30602      done
30603      cd $STARTDIR
30604      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30605    fi
30606  fi
30607
30608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30609$as_echo "$PROPER_COMPILER_CXX" >&6; }
30610    CXX="$PROPER_COMPILER_CXX"
30611  else
30612    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30613$as_echo "no, keeping CXX" >&6; }
30614  fi
30615
30616
30617  COMPILER=$CXX
30618  COMPILER_NAME=$COMPILER_NAME
30619
30620  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30621    # cc -V output typically looks like
30622    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30623    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30624    # Check that this is likely to be the Solaris Studio cc.
30625    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30626    if test $? -ne 0; then
30627      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30628      { $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
30629$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30630      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30631$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30632      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30633$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30634      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30635    fi
30636    # Remove usage instructions (if present), and
30637    # collapse compiler output into a single line
30638    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30639        $SED -e 's/ *[Uu]sage:.*//'`
30640    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30641        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30642  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30643    # xlc -qversion output typically looks like
30644    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30645    #     Version: 11.01.0000.0015
30646    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30647    # Check that this is likely to be the IBM XL C compiler.
30648    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30649    if test $? -ne 0; then
30650      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30651      { $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
30652$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30653      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30654$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30655      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30656$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30657      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30658    fi
30659    # Collapse compiler output into a single line
30660    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30661    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30662        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30663  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30664    # There is no specific version flag, but all output starts with a version string.
30665    # First line typically looks something like:
30666    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30667    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30668    # Check that this is likely to be Microsoft CL.EXE.
30669    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30670    if test $? -ne 0; then
30671      { $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
30672$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30673      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30674$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30675      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30676    fi
30677    # Collapse compiler output into a single line
30678    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30679    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30680        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30681  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30682    # gcc --version output typically looks like
30683    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30684    #     Copyright (C) 2013 Free Software Foundation, Inc.
30685    #     This is free software; see the source for copying conditions.  There is NO
30686    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30687    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30688    # Check that this is likely to be GCC.
30689    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30690    if test $? -ne 0; then
30691      { $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
30692$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30693      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30694$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30695      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30696    fi
30697    # Remove Copyright and legalese from version string, and
30698    # collapse into a single line
30699    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30700        $SED -e 's/ *Copyright .*//'`
30701    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30702        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30703  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30704    # clang --version output typically looks like
30705    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30706    #    clang version 3.3 (tags/RELEASE_33/final)
30707    # or
30708    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30709    #    Target: x86_64-pc-linux-gnu
30710    #    Thread model: posix
30711    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30712    # Check that this is likely to be clang
30713    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30714    if test $? -ne 0; then
30715      { $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
30716$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30717      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30718$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30719      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30720    fi
30721    # Collapse compiler output into a single line
30722    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30723    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30724        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30725  else
30726      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30727  fi
30728  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30729  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30730  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30731  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30732
30733  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30734$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30735
30736
30737  # Now that we have resolved CXX ourself, let autoconf have its go at it
30738  ac_ext=cpp
30739ac_cpp='$CXXCPP $CPPFLAGS'
30740ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30741ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30742ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30743if test -z "$CXX"; then
30744  if test -n "$CCC"; then
30745    CXX=$CCC
30746  else
30747    if test -n "$ac_tool_prefix"; then
30748  for ac_prog in $CXX
30749  do
30750    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30751set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30753$as_echo_n "checking for $ac_word... " >&6; }
30754if ${ac_cv_prog_CXX+:} false; then :
30755  $as_echo_n "(cached) " >&6
30756else
30757  if test -n "$CXX"; then
30758  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30759else
30760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30761for as_dir in $PATH
30762do
30763  IFS=$as_save_IFS
30764  test -z "$as_dir" && as_dir=.
30765    for ac_exec_ext in '' $ac_executable_extensions; do
30766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30767    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30769    break 2
30770  fi
30771done
30772  done
30773IFS=$as_save_IFS
30774
30775fi
30776fi
30777CXX=$ac_cv_prog_CXX
30778if test -n "$CXX"; then
30779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30780$as_echo "$CXX" >&6; }
30781else
30782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30783$as_echo "no" >&6; }
30784fi
30785
30786
30787    test -n "$CXX" && break
30788  done
30789fi
30790if test -z "$CXX"; then
30791  ac_ct_CXX=$CXX
30792  for ac_prog in $CXX
30793do
30794  # Extract the first word of "$ac_prog", so it can be a program name with args.
30795set dummy $ac_prog; ac_word=$2
30796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30797$as_echo_n "checking for $ac_word... " >&6; }
30798if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30799  $as_echo_n "(cached) " >&6
30800else
30801  if test -n "$ac_ct_CXX"; then
30802  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30803else
30804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30805for as_dir in $PATH
30806do
30807  IFS=$as_save_IFS
30808  test -z "$as_dir" && as_dir=.
30809    for ac_exec_ext in '' $ac_executable_extensions; do
30810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30811    ac_cv_prog_ac_ct_CXX="$ac_prog"
30812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30813    break 2
30814  fi
30815done
30816  done
30817IFS=$as_save_IFS
30818
30819fi
30820fi
30821ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30822if test -n "$ac_ct_CXX"; then
30823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30824$as_echo "$ac_ct_CXX" >&6; }
30825else
30826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30827$as_echo "no" >&6; }
30828fi
30829
30830
30831  test -n "$ac_ct_CXX" && break
30832done
30833
30834  if test "x$ac_ct_CXX" = x; then
30835    CXX="g++"
30836  else
30837    case $cross_compiling:$ac_tool_warned in
30838yes:)
30839{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30840$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30841ac_tool_warned=yes ;;
30842esac
30843    CXX=$ac_ct_CXX
30844  fi
30845fi
30846
30847  fi
30848fi
30849# Provide some information about the compiler.
30850$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30851set X $ac_compile
30852ac_compiler=$2
30853for ac_option in --version -v -V -qversion; do
30854  { { ac_try="$ac_compiler $ac_option >&5"
30855case "(($ac_try" in
30856  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30857  *) ac_try_echo=$ac_try;;
30858esac
30859eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30860$as_echo "$ac_try_echo"; } >&5
30861  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30862  ac_status=$?
30863  if test -s conftest.err; then
30864    sed '10a\
30865... rest of stderr output deleted ...
30866         10q' conftest.err >conftest.er1
30867    cat conftest.er1 >&5
30868  fi
30869  rm -f conftest.er1 conftest.err
30870  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30871  test $ac_status = 0; }
30872done
30873
30874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30875$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30876if ${ac_cv_cxx_compiler_gnu+:} false; then :
30877  $as_echo_n "(cached) " >&6
30878else
30879  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30880/* end confdefs.h.  */
30881
30882int
30883main ()
30884{
30885#ifndef __GNUC__
30886       choke me
30887#endif
30888
30889  ;
30890  return 0;
30891}
30892_ACEOF
30893if ac_fn_cxx_try_compile "$LINENO"; then :
30894  ac_compiler_gnu=yes
30895else
30896  ac_compiler_gnu=no
30897fi
30898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30899ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30900
30901fi
30902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30903$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30904if test $ac_compiler_gnu = yes; then
30905  GXX=yes
30906else
30907  GXX=
30908fi
30909ac_test_CXXFLAGS=${CXXFLAGS+set}
30910ac_save_CXXFLAGS=$CXXFLAGS
30911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30912$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30913if ${ac_cv_prog_cxx_g+:} false; then :
30914  $as_echo_n "(cached) " >&6
30915else
30916  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30917   ac_cxx_werror_flag=yes
30918   ac_cv_prog_cxx_g=no
30919   CXXFLAGS="-g"
30920   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30921/* end confdefs.h.  */
30922
30923int
30924main ()
30925{
30926
30927  ;
30928  return 0;
30929}
30930_ACEOF
30931if ac_fn_cxx_try_compile "$LINENO"; then :
30932  ac_cv_prog_cxx_g=yes
30933else
30934  CXXFLAGS=""
30935      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30936/* end confdefs.h.  */
30937
30938int
30939main ()
30940{
30941
30942  ;
30943  return 0;
30944}
30945_ACEOF
30946if ac_fn_cxx_try_compile "$LINENO"; then :
30947
30948else
30949  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30950	 CXXFLAGS="-g"
30951	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30952/* end confdefs.h.  */
30953
30954int
30955main ()
30956{
30957
30958  ;
30959  return 0;
30960}
30961_ACEOF
30962if ac_fn_cxx_try_compile "$LINENO"; then :
30963  ac_cv_prog_cxx_g=yes
30964fi
30965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30966fi
30967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30968fi
30969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30970   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30971fi
30972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30973$as_echo "$ac_cv_prog_cxx_g" >&6; }
30974if test "$ac_test_CXXFLAGS" = set; then
30975  CXXFLAGS=$ac_save_CXXFLAGS
30976elif test $ac_cv_prog_cxx_g = yes; then
30977  if test "$GXX" = yes; then
30978    CXXFLAGS="-g -O2"
30979  else
30980    CXXFLAGS="-g"
30981  fi
30982else
30983  if test "$GXX" = yes; then
30984    CXXFLAGS="-O2"
30985  else
30986    CXXFLAGS=
30987  fi
30988fi
30989ac_ext=cpp
30990ac_cpp='$CXXCPP $CPPFLAGS'
30991ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30992ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30993ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30994
30995
30996  #
30997  # Setup the preprocessor (CPP and CXXCPP)
30998  #
30999  ac_ext=c
31000ac_cpp='$CPP $CPPFLAGS'
31001ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31002ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31003ac_compiler_gnu=$ac_cv_c_compiler_gnu
31004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31005$as_echo_n "checking how to run the C preprocessor... " >&6; }
31006# On Suns, sometimes $CPP names a directory.
31007if test -n "$CPP" && test -d "$CPP"; then
31008  CPP=
31009fi
31010if test -z "$CPP"; then
31011  if ${ac_cv_prog_CPP+:} false; then :
31012  $as_echo_n "(cached) " >&6
31013else
31014      # Double quotes because CPP needs to be expanded
31015    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31016    do
31017      ac_preproc_ok=false
31018for ac_c_preproc_warn_flag in '' yes
31019do
31020  # Use a header file that comes with gcc, so configuring glibc
31021  # with a fresh cross-compiler works.
31022  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31023  # <limits.h> exists even on freestanding compilers.
31024  # On the NeXT, cc -E runs the code through the compiler's parser,
31025  # not just through cpp. "Syntax error" is here to catch this case.
31026  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31027/* end confdefs.h.  */
31028#ifdef __STDC__
31029# include <limits.h>
31030#else
31031# include <assert.h>
31032#endif
31033		     Syntax error
31034_ACEOF
31035if ac_fn_c_try_cpp "$LINENO"; then :
31036
31037else
31038  # Broken: fails on valid input.
31039continue
31040fi
31041rm -f conftest.err conftest.i conftest.$ac_ext
31042
31043  # OK, works on sane cases.  Now check whether nonexistent headers
31044  # can be detected and how.
31045  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31046/* end confdefs.h.  */
31047#include <ac_nonexistent.h>
31048_ACEOF
31049if ac_fn_c_try_cpp "$LINENO"; then :
31050  # Broken: success on invalid input.
31051continue
31052else
31053  # Passes both tests.
31054ac_preproc_ok=:
31055break
31056fi
31057rm -f conftest.err conftest.i conftest.$ac_ext
31058
31059done
31060# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31061rm -f conftest.i conftest.err conftest.$ac_ext
31062if $ac_preproc_ok; then :
31063  break
31064fi
31065
31066    done
31067    ac_cv_prog_CPP=$CPP
31068
31069fi
31070  CPP=$ac_cv_prog_CPP
31071else
31072  ac_cv_prog_CPP=$CPP
31073fi
31074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31075$as_echo "$CPP" >&6; }
31076ac_preproc_ok=false
31077for ac_c_preproc_warn_flag in '' yes
31078do
31079  # Use a header file that comes with gcc, so configuring glibc
31080  # with a fresh cross-compiler works.
31081  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31082  # <limits.h> exists even on freestanding compilers.
31083  # On the NeXT, cc -E runs the code through the compiler's parser,
31084  # not just through cpp. "Syntax error" is here to catch this case.
31085  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31086/* end confdefs.h.  */
31087#ifdef __STDC__
31088# include <limits.h>
31089#else
31090# include <assert.h>
31091#endif
31092		     Syntax error
31093_ACEOF
31094if ac_fn_c_try_cpp "$LINENO"; then :
31095
31096else
31097  # Broken: fails on valid input.
31098continue
31099fi
31100rm -f conftest.err conftest.i conftest.$ac_ext
31101
31102  # OK, works on sane cases.  Now check whether nonexistent headers
31103  # can be detected and how.
31104  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31105/* end confdefs.h.  */
31106#include <ac_nonexistent.h>
31107_ACEOF
31108if ac_fn_c_try_cpp "$LINENO"; then :
31109  # Broken: success on invalid input.
31110continue
31111else
31112  # Passes both tests.
31113ac_preproc_ok=:
31114break
31115fi
31116rm -f conftest.err conftest.i conftest.$ac_ext
31117
31118done
31119# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31120rm -f conftest.i conftest.err conftest.$ac_ext
31121if $ac_preproc_ok; then :
31122
31123else
31124  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31125$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31126as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31127See \`config.log' for more details" "$LINENO" 5; }
31128fi
31129
31130ac_ext=cpp
31131ac_cpp='$CXXCPP $CPPFLAGS'
31132ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31133ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31134ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31135
31136
31137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31138
31139  # First separate the path from the arguments. This will split at the first
31140  # space.
31141  complete="$CPP"
31142  path="${complete%% *}"
31143  tmp="$complete EOL"
31144  arguments="${tmp#* }"
31145
31146  # Input might be given as Windows format, start by converting to
31147  # unix format.
31148  new_path=`$CYGPATH -u "$path"`
31149
31150  # Now try to locate executable using which
31151  new_path=`$WHICH "$new_path" 2> /dev/null`
31152  # bat and cmd files are not always considered executable in cygwin causing which
31153  # to not find them
31154  if test "x$new_path" = x \
31155      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31156      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31157    new_path=`$CYGPATH -u "$path"`
31158  fi
31159  if test "x$new_path" = x; then
31160    # Oops. Which didn't find the executable.
31161    # The splitting of arguments from the executable at a space might have been incorrect,
31162    # since paths with space are more likely in Windows. Give it another try with the whole
31163    # argument.
31164    path="$complete"
31165    arguments="EOL"
31166    new_path=`$CYGPATH -u "$path"`
31167    new_path=`$WHICH "$new_path" 2> /dev/null`
31168    # bat and cmd files are not always considered executable in cygwin causing which
31169    # to not find them
31170    if test "x$new_path" = x \
31171        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31172        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31173      new_path=`$CYGPATH -u "$path"`
31174    fi
31175    if test "x$new_path" = x; then
31176      # It's still not found. Now this is an unrecoverable error.
31177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31178$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31179      has_space=`$ECHO "$complete" | $GREP " "`
31180      if test "x$has_space" != x; then
31181        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31182$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31183      fi
31184      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31185    fi
31186  fi
31187
31188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31191  # "foo.exe" is OK but "foo" is an error.
31192  #
31193  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31194  # It is also a way to make sure we got the proper file name for the real test later on.
31195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31196  if test "x$test_shortpath" = x; then
31197    # Short path failed, file does not exist as specified.
31198    # Try adding .exe or .cmd
31199    if test -f "${new_path}.exe"; then
31200      input_to_shortpath="${new_path}.exe"
31201    elif test -f "${new_path}.cmd"; then
31202      input_to_shortpath="${new_path}.cmd"
31203    else
31204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31205$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31206      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31207$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31208      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31209    fi
31210  else
31211    input_to_shortpath="$new_path"
31212  fi
31213
31214  # Call helper function which possibly converts this using DOS-style short mode.
31215  # If so, the updated path is stored in $new_path.
31216  new_path="$input_to_shortpath"
31217
31218  input_path="$input_to_shortpath"
31219  # Check if we need to convert this using DOS-style short mode. If the path
31220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31221  # take no chances and rewrite it.
31222  # Note: m4 eats our [], so we need to use [ and ] instead.
31223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31224  if test "x$has_forbidden_chars" != x; then
31225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31229      # Going to short mode and back again did indeed matter. Since short mode is
31230      # case insensitive, let's make it lowercase to improve readability.
31231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31232      # Now convert it back to Unix-stile (cygpath)
31233      input_path=`$CYGPATH -u "$shortmode_path"`
31234      new_path="$input_path"
31235    fi
31236  fi
31237
31238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31239  if test "x$test_cygdrive_prefix" = x; then
31240    # As a simple fix, exclude /usr/bin since it's not a real path.
31241    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31243      # a path prefixed by /cygdrive for fixpath to work.
31244      new_path="$CYGWIN_ROOT_PATH$input_path"
31245    fi
31246  fi
31247
31248  # remove trailing .exe if any
31249  new_path="${new_path/%.exe/}"
31250
31251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31252
31253  # First separate the path from the arguments. This will split at the first
31254  # space.
31255  complete="$CPP"
31256  path="${complete%% *}"
31257  tmp="$complete EOL"
31258  arguments="${tmp#* }"
31259
31260  # Input might be given as Windows format, start by converting to
31261  # unix format.
31262  new_path="$path"
31263
31264  windows_path="$new_path"
31265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31266    unix_path=`$CYGPATH -u "$windows_path"`
31267    new_path="$unix_path"
31268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31270    new_path="$unix_path"
31271  fi
31272
31273
31274  # Now try to locate executable using which
31275  new_path=`$WHICH "$new_path" 2> /dev/null`
31276
31277  if test "x$new_path" = x; then
31278    # Oops. Which didn't find the executable.
31279    # The splitting of arguments from the executable at a space might have been incorrect,
31280    # since paths with space are more likely in Windows. Give it another try with the whole
31281    # argument.
31282    path="$complete"
31283    arguments="EOL"
31284    new_path="$path"
31285
31286  windows_path="$new_path"
31287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31288    unix_path=`$CYGPATH -u "$windows_path"`
31289    new_path="$unix_path"
31290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31292    new_path="$unix_path"
31293  fi
31294
31295
31296    new_path=`$WHICH "$new_path" 2> /dev/null`
31297    # bat and cmd files are not always considered executable in MSYS causing which
31298    # to not find them
31299    if test "x$new_path" = x \
31300        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31301        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31302      new_path="$path"
31303
31304  windows_path="$new_path"
31305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31306    unix_path=`$CYGPATH -u "$windows_path"`
31307    new_path="$unix_path"
31308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31310    new_path="$unix_path"
31311  fi
31312
31313    fi
31314
31315    if test "x$new_path" = x; then
31316      # It's still not found. Now this is an unrecoverable error.
31317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31318$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31319      has_space=`$ECHO "$complete" | $GREP " "`
31320      if test "x$has_space" != x; then
31321        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31322$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31323      fi
31324      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31325    fi
31326  fi
31327
31328  # Now new_path has a complete unix path to the binary
31329  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31330    # Keep paths in /bin as-is, but remove trailing .exe if any
31331    new_path="${new_path/%.exe/}"
31332    # Do not save /bin paths to all_fixpath_prefixes!
31333  else
31334    # Not in mixed or Windows style, start by that.
31335    new_path=`cmd //c echo $new_path`
31336
31337  input_path="$new_path"
31338  # Check if we need to convert this using DOS-style short mode. If the path
31339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31340  # take no chances and rewrite it.
31341  # Note: m4 eats our [], so we need to use [ and ] instead.
31342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31343  if test "x$has_forbidden_chars" != x; then
31344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31346  fi
31347
31348    # Output is in $new_path
31349
31350  windows_path="$new_path"
31351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31352    unix_path=`$CYGPATH -u "$windows_path"`
31353    new_path="$unix_path"
31354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31356    new_path="$unix_path"
31357  fi
31358
31359    # remove trailing .exe if any
31360    new_path="${new_path/%.exe/}"
31361
31362    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31363    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31364  fi
31365
31366  else
31367    # We're on a posix platform. Hooray! :)
31368    # First separate the path from the arguments. This will split at the first
31369    # space.
31370    complete="$CPP"
31371    path="${complete%% *}"
31372    tmp="$complete EOL"
31373    arguments="${tmp#* }"
31374
31375    # Cannot rely on the command "which" here since it doesn't always work.
31376    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31377    if test -z "$is_absolute_path"; then
31378      # Path to executable is not absolute. Find it.
31379      IFS_save="$IFS"
31380      IFS=:
31381      for p in $PATH; do
31382        if test -f "$p/$path" && test -x "$p/$path"; then
31383          new_path="$p/$path"
31384          break
31385        fi
31386      done
31387      IFS="$IFS_save"
31388    else
31389      # This is an absolute path, we can use it without further modifications.
31390      new_path="$path"
31391    fi
31392
31393    if test "x$new_path" = x; then
31394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31395$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31396      has_space=`$ECHO "$complete" | $GREP " "`
31397      if test "x$has_space" != x; then
31398        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31399$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31400      fi
31401      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31402    fi
31403  fi
31404
31405  # Now join together the path and the arguments once again
31406  if test "x$arguments" != xEOL; then
31407    new_complete="$new_path ${arguments% *}"
31408  else
31409    new_complete="$new_path"
31410  fi
31411
31412  if test "x$complete" != "x$new_complete"; then
31413    CPP="$new_complete"
31414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31415$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31416  fi
31417
31418  ac_ext=cpp
31419ac_cpp='$CXXCPP $CPPFLAGS'
31420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31424$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31425if test -z "$CXXCPP"; then
31426  if ${ac_cv_prog_CXXCPP+:} false; then :
31427  $as_echo_n "(cached) " >&6
31428else
31429      # Double quotes because CXXCPP needs to be expanded
31430    for CXXCPP in "$CXX -E" "/lib/cpp"
31431    do
31432      ac_preproc_ok=false
31433for ac_cxx_preproc_warn_flag in '' yes
31434do
31435  # Use a header file that comes with gcc, so configuring glibc
31436  # with a fresh cross-compiler works.
31437  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31438  # <limits.h> exists even on freestanding compilers.
31439  # On the NeXT, cc -E runs the code through the compiler's parser,
31440  # not just through cpp. "Syntax error" is here to catch this case.
31441  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31442/* end confdefs.h.  */
31443#ifdef __STDC__
31444# include <limits.h>
31445#else
31446# include <assert.h>
31447#endif
31448		     Syntax error
31449_ACEOF
31450if ac_fn_cxx_try_cpp "$LINENO"; then :
31451
31452else
31453  # Broken: fails on valid input.
31454continue
31455fi
31456rm -f conftest.err conftest.i conftest.$ac_ext
31457
31458  # OK, works on sane cases.  Now check whether nonexistent headers
31459  # can be detected and how.
31460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31461/* end confdefs.h.  */
31462#include <ac_nonexistent.h>
31463_ACEOF
31464if ac_fn_cxx_try_cpp "$LINENO"; then :
31465  # Broken: success on invalid input.
31466continue
31467else
31468  # Passes both tests.
31469ac_preproc_ok=:
31470break
31471fi
31472rm -f conftest.err conftest.i conftest.$ac_ext
31473
31474done
31475# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31476rm -f conftest.i conftest.err conftest.$ac_ext
31477if $ac_preproc_ok; then :
31478  break
31479fi
31480
31481    done
31482    ac_cv_prog_CXXCPP=$CXXCPP
31483
31484fi
31485  CXXCPP=$ac_cv_prog_CXXCPP
31486else
31487  ac_cv_prog_CXXCPP=$CXXCPP
31488fi
31489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31490$as_echo "$CXXCPP" >&6; }
31491ac_preproc_ok=false
31492for ac_cxx_preproc_warn_flag in '' yes
31493do
31494  # Use a header file that comes with gcc, so configuring glibc
31495  # with a fresh cross-compiler works.
31496  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31497  # <limits.h> exists even on freestanding compilers.
31498  # On the NeXT, cc -E runs the code through the compiler's parser,
31499  # not just through cpp. "Syntax error" is here to catch this case.
31500  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31501/* end confdefs.h.  */
31502#ifdef __STDC__
31503# include <limits.h>
31504#else
31505# include <assert.h>
31506#endif
31507		     Syntax error
31508_ACEOF
31509if ac_fn_cxx_try_cpp "$LINENO"; then :
31510
31511else
31512  # Broken: fails on valid input.
31513continue
31514fi
31515rm -f conftest.err conftest.i conftest.$ac_ext
31516
31517  # OK, works on sane cases.  Now check whether nonexistent headers
31518  # can be detected and how.
31519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31520/* end confdefs.h.  */
31521#include <ac_nonexistent.h>
31522_ACEOF
31523if ac_fn_cxx_try_cpp "$LINENO"; then :
31524  # Broken: success on invalid input.
31525continue
31526else
31527  # Passes both tests.
31528ac_preproc_ok=:
31529break
31530fi
31531rm -f conftest.err conftest.i conftest.$ac_ext
31532
31533done
31534# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31535rm -f conftest.i conftest.err conftest.$ac_ext
31536if $ac_preproc_ok; then :
31537
31538else
31539  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31540$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31541as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31542See \`config.log' for more details" "$LINENO" 5; }
31543fi
31544
31545ac_ext=cpp
31546ac_cpp='$CXXCPP $CPPFLAGS'
31547ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31548ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31549ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31550
31551
31552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31553
31554  # First separate the path from the arguments. This will split at the first
31555  # space.
31556  complete="$CXXCPP"
31557  path="${complete%% *}"
31558  tmp="$complete EOL"
31559  arguments="${tmp#* }"
31560
31561  # Input might be given as Windows format, start by converting to
31562  # unix format.
31563  new_path=`$CYGPATH -u "$path"`
31564
31565  # Now try to locate executable using which
31566  new_path=`$WHICH "$new_path" 2> /dev/null`
31567  # bat and cmd files are not always considered executable in cygwin causing which
31568  # to not find them
31569  if test "x$new_path" = x \
31570      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31571      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31572    new_path=`$CYGPATH -u "$path"`
31573  fi
31574  if test "x$new_path" = x; then
31575    # Oops. Which didn't find the executable.
31576    # The splitting of arguments from the executable at a space might have been incorrect,
31577    # since paths with space are more likely in Windows. Give it another try with the whole
31578    # argument.
31579    path="$complete"
31580    arguments="EOL"
31581    new_path=`$CYGPATH -u "$path"`
31582    new_path=`$WHICH "$new_path" 2> /dev/null`
31583    # bat and cmd files are not always considered executable in cygwin causing which
31584    # to not find them
31585    if test "x$new_path" = x \
31586        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31587        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31588      new_path=`$CYGPATH -u "$path"`
31589    fi
31590    if test "x$new_path" = x; then
31591      # It's still not found. Now this is an unrecoverable error.
31592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31593$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31594      has_space=`$ECHO "$complete" | $GREP " "`
31595      if test "x$has_space" != x; then
31596        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31597$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31598      fi
31599      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31600    fi
31601  fi
31602
31603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31606  # "foo.exe" is OK but "foo" is an error.
31607  #
31608  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31609  # It is also a way to make sure we got the proper file name for the real test later on.
31610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31611  if test "x$test_shortpath" = x; then
31612    # Short path failed, file does not exist as specified.
31613    # Try adding .exe or .cmd
31614    if test -f "${new_path}.exe"; then
31615      input_to_shortpath="${new_path}.exe"
31616    elif test -f "${new_path}.cmd"; then
31617      input_to_shortpath="${new_path}.cmd"
31618    else
31619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31620$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31621      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31622$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31623      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31624    fi
31625  else
31626    input_to_shortpath="$new_path"
31627  fi
31628
31629  # Call helper function which possibly converts this using DOS-style short mode.
31630  # If so, the updated path is stored in $new_path.
31631  new_path="$input_to_shortpath"
31632
31633  input_path="$input_to_shortpath"
31634  # Check if we need to convert this using DOS-style short mode. If the path
31635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31636  # take no chances and rewrite it.
31637  # Note: m4 eats our [], so we need to use [ and ] instead.
31638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31639  if test "x$has_forbidden_chars" != x; then
31640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31644      # Going to short mode and back again did indeed matter. Since short mode is
31645      # case insensitive, let's make it lowercase to improve readability.
31646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31647      # Now convert it back to Unix-stile (cygpath)
31648      input_path=`$CYGPATH -u "$shortmode_path"`
31649      new_path="$input_path"
31650    fi
31651  fi
31652
31653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31654  if test "x$test_cygdrive_prefix" = x; then
31655    # As a simple fix, exclude /usr/bin since it's not a real path.
31656    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31658      # a path prefixed by /cygdrive for fixpath to work.
31659      new_path="$CYGWIN_ROOT_PATH$input_path"
31660    fi
31661  fi
31662
31663  # remove trailing .exe if any
31664  new_path="${new_path/%.exe/}"
31665
31666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31667
31668  # First separate the path from the arguments. This will split at the first
31669  # space.
31670  complete="$CXXCPP"
31671  path="${complete%% *}"
31672  tmp="$complete EOL"
31673  arguments="${tmp#* }"
31674
31675  # Input might be given as Windows format, start by converting to
31676  # unix format.
31677  new_path="$path"
31678
31679  windows_path="$new_path"
31680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31681    unix_path=`$CYGPATH -u "$windows_path"`
31682    new_path="$unix_path"
31683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31685    new_path="$unix_path"
31686  fi
31687
31688
31689  # Now try to locate executable using which
31690  new_path=`$WHICH "$new_path" 2> /dev/null`
31691
31692  if test "x$new_path" = x; then
31693    # Oops. Which didn't find the executable.
31694    # The splitting of arguments from the executable at a space might have been incorrect,
31695    # since paths with space are more likely in Windows. Give it another try with the whole
31696    # argument.
31697    path="$complete"
31698    arguments="EOL"
31699    new_path="$path"
31700
31701  windows_path="$new_path"
31702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31703    unix_path=`$CYGPATH -u "$windows_path"`
31704    new_path="$unix_path"
31705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31707    new_path="$unix_path"
31708  fi
31709
31710
31711    new_path=`$WHICH "$new_path" 2> /dev/null`
31712    # bat and cmd files are not always considered executable in MSYS causing which
31713    # to not find them
31714    if test "x$new_path" = x \
31715        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31716        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31717      new_path="$path"
31718
31719  windows_path="$new_path"
31720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31721    unix_path=`$CYGPATH -u "$windows_path"`
31722    new_path="$unix_path"
31723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31725    new_path="$unix_path"
31726  fi
31727
31728    fi
31729
31730    if test "x$new_path" = x; then
31731      # It's still not found. Now this is an unrecoverable error.
31732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31733$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31734      has_space=`$ECHO "$complete" | $GREP " "`
31735      if test "x$has_space" != x; then
31736        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31737$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31738      fi
31739      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31740    fi
31741  fi
31742
31743  # Now new_path has a complete unix path to the binary
31744  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31745    # Keep paths in /bin as-is, but remove trailing .exe if any
31746    new_path="${new_path/%.exe/}"
31747    # Do not save /bin paths to all_fixpath_prefixes!
31748  else
31749    # Not in mixed or Windows style, start by that.
31750    new_path=`cmd //c echo $new_path`
31751
31752  input_path="$new_path"
31753  # Check if we need to convert this using DOS-style short mode. If the path
31754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31755  # take no chances and rewrite it.
31756  # Note: m4 eats our [], so we need to use [ and ] instead.
31757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31758  if test "x$has_forbidden_chars" != x; then
31759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31760    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31761  fi
31762
31763    # Output is in $new_path
31764
31765  windows_path="$new_path"
31766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31767    unix_path=`$CYGPATH -u "$windows_path"`
31768    new_path="$unix_path"
31769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31771    new_path="$unix_path"
31772  fi
31773
31774    # remove trailing .exe if any
31775    new_path="${new_path/%.exe/}"
31776
31777    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31778    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31779  fi
31780
31781  else
31782    # We're on a posix platform. Hooray! :)
31783    # First separate the path from the arguments. This will split at the first
31784    # space.
31785    complete="$CXXCPP"
31786    path="${complete%% *}"
31787    tmp="$complete EOL"
31788    arguments="${tmp#* }"
31789
31790    # Cannot rely on the command "which" here since it doesn't always work.
31791    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31792    if test -z "$is_absolute_path"; then
31793      # Path to executable is not absolute. Find it.
31794      IFS_save="$IFS"
31795      IFS=:
31796      for p in $PATH; do
31797        if test -f "$p/$path" && test -x "$p/$path"; then
31798          new_path="$p/$path"
31799          break
31800        fi
31801      done
31802      IFS="$IFS_save"
31803    else
31804      # This is an absolute path, we can use it without further modifications.
31805      new_path="$path"
31806    fi
31807
31808    if test "x$new_path" = x; then
31809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31810$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31811      has_space=`$ECHO "$complete" | $GREP " "`
31812      if test "x$has_space" != x; then
31813        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31814$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31815      fi
31816      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31817    fi
31818  fi
31819
31820  # Now join together the path and the arguments once again
31821  if test "x$arguments" != xEOL; then
31822    new_complete="$new_path ${arguments% *}"
31823  else
31824    new_complete="$new_path"
31825  fi
31826
31827  if test "x$complete" != "x$new_complete"; then
31828    CXXCPP="$new_complete"
31829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31830$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31831  fi
31832
31833
31834  #
31835  # Setup the linker (LD)
31836  #
31837  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31838    # In the Microsoft toolchain we have a separate LD command "link".
31839    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31840    # a cygwin program for something completely different.
31841    # Extract the first word of "link", so it can be a program name with args.
31842set dummy link; ac_word=$2
31843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31844$as_echo_n "checking for $ac_word... " >&6; }
31845if ${ac_cv_prog_LD+:} false; then :
31846  $as_echo_n "(cached) " >&6
31847else
31848  if test -n "$LD"; then
31849  ac_cv_prog_LD="$LD" # Let the user override the test.
31850else
31851  ac_prog_rejected=no
31852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31853for as_dir in $PATH
31854do
31855  IFS=$as_save_IFS
31856  test -z "$as_dir" && as_dir=.
31857    for ac_exec_ext in '' $ac_executable_extensions; do
31858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31859    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31860       ac_prog_rejected=yes
31861       continue
31862     fi
31863    ac_cv_prog_LD="link"
31864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31865    break 2
31866  fi
31867done
31868  done
31869IFS=$as_save_IFS
31870
31871if test $ac_prog_rejected = yes; then
31872  # We found a bogon in the path, so make sure we never use it.
31873  set dummy $ac_cv_prog_LD
31874  shift
31875  if test $# != 0; then
31876    # We chose a different compiler from the bogus one.
31877    # However, it has the same basename, so the bogon will be chosen
31878    # first if we set LD to just the basename; use the full file name.
31879    shift
31880    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31881  fi
31882fi
31883fi
31884fi
31885LD=$ac_cv_prog_LD
31886if test -n "$LD"; then
31887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31888$as_echo "$LD" >&6; }
31889else
31890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31891$as_echo "no" >&6; }
31892fi
31893
31894
31895
31896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31897
31898  # First separate the path from the arguments. This will split at the first
31899  # space.
31900  complete="$LD"
31901  path="${complete%% *}"
31902  tmp="$complete EOL"
31903  arguments="${tmp#* }"
31904
31905  # Input might be given as Windows format, start by converting to
31906  # unix format.
31907  new_path=`$CYGPATH -u "$path"`
31908
31909  # Now try to locate executable using which
31910  new_path=`$WHICH "$new_path" 2> /dev/null`
31911  # bat and cmd files are not always considered executable in cygwin causing which
31912  # to not find them
31913  if test "x$new_path" = x \
31914      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31915      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31916    new_path=`$CYGPATH -u "$path"`
31917  fi
31918  if test "x$new_path" = x; then
31919    # Oops. Which didn't find the executable.
31920    # The splitting of arguments from the executable at a space might have been incorrect,
31921    # since paths with space are more likely in Windows. Give it another try with the whole
31922    # argument.
31923    path="$complete"
31924    arguments="EOL"
31925    new_path=`$CYGPATH -u "$path"`
31926    new_path=`$WHICH "$new_path" 2> /dev/null`
31927    # bat and cmd files are not always considered executable in cygwin causing which
31928    # to not find them
31929    if test "x$new_path" = x \
31930        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31931        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31932      new_path=`$CYGPATH -u "$path"`
31933    fi
31934    if test "x$new_path" = x; then
31935      # It's still not found. Now this is an unrecoverable error.
31936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31937$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31938      has_space=`$ECHO "$complete" | $GREP " "`
31939      if test "x$has_space" != x; then
31940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31942      fi
31943      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31944    fi
31945  fi
31946
31947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31950  # "foo.exe" is OK but "foo" is an error.
31951  #
31952  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31953  # It is also a way to make sure we got the proper file name for the real test later on.
31954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31955  if test "x$test_shortpath" = x; then
31956    # Short path failed, file does not exist as specified.
31957    # Try adding .exe or .cmd
31958    if test -f "${new_path}.exe"; then
31959      input_to_shortpath="${new_path}.exe"
31960    elif test -f "${new_path}.cmd"; then
31961      input_to_shortpath="${new_path}.cmd"
31962    else
31963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31964$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31965      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31966$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31967      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31968    fi
31969  else
31970    input_to_shortpath="$new_path"
31971  fi
31972
31973  # Call helper function which possibly converts this using DOS-style short mode.
31974  # If so, the updated path is stored in $new_path.
31975  new_path="$input_to_shortpath"
31976
31977  input_path="$input_to_shortpath"
31978  # Check if we need to convert this using DOS-style short mode. If the path
31979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31980  # take no chances and rewrite it.
31981  # Note: m4 eats our [], so we need to use [ and ] instead.
31982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31983  if test "x$has_forbidden_chars" != x; then
31984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31988      # Going to short mode and back again did indeed matter. Since short mode is
31989      # case insensitive, let's make it lowercase to improve readability.
31990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31991      # Now convert it back to Unix-stile (cygpath)
31992      input_path=`$CYGPATH -u "$shortmode_path"`
31993      new_path="$input_path"
31994    fi
31995  fi
31996
31997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31998  if test "x$test_cygdrive_prefix" = x; then
31999    # As a simple fix, exclude /usr/bin since it's not a real path.
32000    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32002      # a path prefixed by /cygdrive for fixpath to work.
32003      new_path="$CYGWIN_ROOT_PATH$input_path"
32004    fi
32005  fi
32006
32007  # remove trailing .exe if any
32008  new_path="${new_path/%.exe/}"
32009
32010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32011
32012  # First separate the path from the arguments. This will split at the first
32013  # space.
32014  complete="$LD"
32015  path="${complete%% *}"
32016  tmp="$complete EOL"
32017  arguments="${tmp#* }"
32018
32019  # Input might be given as Windows format, start by converting to
32020  # unix format.
32021  new_path="$path"
32022
32023  windows_path="$new_path"
32024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32025    unix_path=`$CYGPATH -u "$windows_path"`
32026    new_path="$unix_path"
32027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32029    new_path="$unix_path"
32030  fi
32031
32032
32033  # Now try to locate executable using which
32034  new_path=`$WHICH "$new_path" 2> /dev/null`
32035
32036  if test "x$new_path" = x; then
32037    # Oops. Which didn't find the executable.
32038    # The splitting of arguments from the executable at a space might have been incorrect,
32039    # since paths with space are more likely in Windows. Give it another try with the whole
32040    # argument.
32041    path="$complete"
32042    arguments="EOL"
32043    new_path="$path"
32044
32045  windows_path="$new_path"
32046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32047    unix_path=`$CYGPATH -u "$windows_path"`
32048    new_path="$unix_path"
32049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32051    new_path="$unix_path"
32052  fi
32053
32054
32055    new_path=`$WHICH "$new_path" 2> /dev/null`
32056    # bat and cmd files are not always considered executable in MSYS causing which
32057    # to not find them
32058    if test "x$new_path" = x \
32059        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32060        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32061      new_path="$path"
32062
32063  windows_path="$new_path"
32064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32065    unix_path=`$CYGPATH -u "$windows_path"`
32066    new_path="$unix_path"
32067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32069    new_path="$unix_path"
32070  fi
32071
32072    fi
32073
32074    if test "x$new_path" = x; then
32075      # It's still not found. Now this is an unrecoverable error.
32076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32077$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32078      has_space=`$ECHO "$complete" | $GREP " "`
32079      if test "x$has_space" != x; then
32080        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32081$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32082      fi
32083      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32084    fi
32085  fi
32086
32087  # Now new_path has a complete unix path to the binary
32088  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32089    # Keep paths in /bin as-is, but remove trailing .exe if any
32090    new_path="${new_path/%.exe/}"
32091    # Do not save /bin paths to all_fixpath_prefixes!
32092  else
32093    # Not in mixed or Windows style, start by that.
32094    new_path=`cmd //c echo $new_path`
32095
32096  input_path="$new_path"
32097  # Check if we need to convert this using DOS-style short mode. If the path
32098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32099  # take no chances and rewrite it.
32100  # Note: m4 eats our [], so we need to use [ and ] instead.
32101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32102  if test "x$has_forbidden_chars" != x; then
32103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32105  fi
32106
32107    # Output is in $new_path
32108
32109  windows_path="$new_path"
32110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32111    unix_path=`$CYGPATH -u "$windows_path"`
32112    new_path="$unix_path"
32113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32115    new_path="$unix_path"
32116  fi
32117
32118    # remove trailing .exe if any
32119    new_path="${new_path/%.exe/}"
32120
32121    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32122    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32123  fi
32124
32125  else
32126    # We're on a posix platform. Hooray! :)
32127    # First separate the path from the arguments. This will split at the first
32128    # space.
32129    complete="$LD"
32130    path="${complete%% *}"
32131    tmp="$complete EOL"
32132    arguments="${tmp#* }"
32133
32134    # Cannot rely on the command "which" here since it doesn't always work.
32135    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32136    if test -z "$is_absolute_path"; then
32137      # Path to executable is not absolute. Find it.
32138      IFS_save="$IFS"
32139      IFS=:
32140      for p in $PATH; do
32141        if test -f "$p/$path" && test -x "$p/$path"; then
32142          new_path="$p/$path"
32143          break
32144        fi
32145      done
32146      IFS="$IFS_save"
32147    else
32148      # This is an absolute path, we can use it without further modifications.
32149      new_path="$path"
32150    fi
32151
32152    if test "x$new_path" = x; then
32153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32154$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32155      has_space=`$ECHO "$complete" | $GREP " "`
32156      if test "x$has_space" != x; then
32157        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32158$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32159      fi
32160      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32161    fi
32162  fi
32163
32164  # Now join together the path and the arguments once again
32165  if test "x$arguments" != xEOL; then
32166    new_complete="$new_path ${arguments% *}"
32167  else
32168    new_complete="$new_path"
32169  fi
32170
32171  if test "x$complete" != "x$new_complete"; then
32172    LD="$new_complete"
32173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32174$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32175  fi
32176
32177    # Verify that we indeed succeeded with this trick.
32178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32179$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32180    "$LD" --version > /dev/null
32181    if test $? -eq 0 ; then
32182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32183$as_echo "no" >&6; }
32184      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32185    else
32186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32187$as_echo "yes" >&6; }
32188    fi
32189    LDCXX="$LD"
32190  else
32191    # All other toolchains use the compiler to link.
32192    LD="$CC"
32193    LDCXX="$CXX"
32194  fi
32195
32196  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32197
32198
32199  #
32200  # Setup the assembler (AS)
32201  #
32202  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32203    # FIXME: should this really be solaris, or solstudio?
32204
32205
32206  # Publish this variable in the help.
32207
32208
32209  if test "x$AS" = x; then
32210    # The variable is not set by user, try to locate tool using the code snippet
32211    for ac_prog in as
32212do
32213  # Extract the first word of "$ac_prog", so it can be a program name with args.
32214set dummy $ac_prog; ac_word=$2
32215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32216$as_echo_n "checking for $ac_word... " >&6; }
32217if ${ac_cv_path_AS+:} false; then :
32218  $as_echo_n "(cached) " >&6
32219else
32220  case $AS in
32221  [\\/]* | ?:[\\/]*)
32222  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32223  ;;
32224  *)
32225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32226for as_dir in $PATH
32227do
32228  IFS=$as_save_IFS
32229  test -z "$as_dir" && as_dir=.
32230    for ac_exec_ext in '' $ac_executable_extensions; do
32231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32232    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32234    break 2
32235  fi
32236done
32237  done
32238IFS=$as_save_IFS
32239
32240  ;;
32241esac
32242fi
32243AS=$ac_cv_path_AS
32244if test -n "$AS"; then
32245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32246$as_echo "$AS" >&6; }
32247else
32248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32249$as_echo "no" >&6; }
32250fi
32251
32252
32253  test -n "$AS" && break
32254done
32255
32256  else
32257    # The variable is set, but is it from the command line or the environment?
32258
32259    # Try to remove the string !AS! from our list.
32260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32262      # If it failed, the variable was not from the command line. Ignore it,
32263      # but warn the user (except for BASH, which is always set by the calling BASH).
32264      if test "xAS" != xBASH; then
32265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32266$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32267      fi
32268      # Try to locate tool using the code snippet
32269      for ac_prog in as
32270do
32271  # Extract the first word of "$ac_prog", so it can be a program name with args.
32272set dummy $ac_prog; ac_word=$2
32273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32274$as_echo_n "checking for $ac_word... " >&6; }
32275if ${ac_cv_path_AS+:} false; then :
32276  $as_echo_n "(cached) " >&6
32277else
32278  case $AS in
32279  [\\/]* | ?:[\\/]*)
32280  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32281  ;;
32282  *)
32283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32284for as_dir in $PATH
32285do
32286  IFS=$as_save_IFS
32287  test -z "$as_dir" && as_dir=.
32288    for ac_exec_ext in '' $ac_executable_extensions; do
32289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32290    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32292    break 2
32293  fi
32294done
32295  done
32296IFS=$as_save_IFS
32297
32298  ;;
32299esac
32300fi
32301AS=$ac_cv_path_AS
32302if test -n "$AS"; then
32303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32304$as_echo "$AS" >&6; }
32305else
32306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32307$as_echo "no" >&6; }
32308fi
32309
32310
32311  test -n "$AS" && break
32312done
32313
32314    else
32315      # If it succeeded, then it was overridden by the user. We will use it
32316      # for the tool.
32317
32318      # First remove it from the list of overridden variables, so we can test
32319      # for unknown variables in the end.
32320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32321
32322      # Check if the provided tool contains a complete path.
32323      tool_specified="$AS"
32324      tool_basename="${tool_specified##*/}"
32325      if test "x$tool_basename" = "x$tool_specified"; then
32326        # A command without a complete path is provided, search $PATH.
32327        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32328$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32329        # Extract the first word of "$tool_basename", so it can be a program name with args.
32330set dummy $tool_basename; ac_word=$2
32331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32332$as_echo_n "checking for $ac_word... " >&6; }
32333if ${ac_cv_path_AS+:} false; then :
32334  $as_echo_n "(cached) " >&6
32335else
32336  case $AS in
32337  [\\/]* | ?:[\\/]*)
32338  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32339  ;;
32340  *)
32341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32342for as_dir in $PATH
32343do
32344  IFS=$as_save_IFS
32345  test -z "$as_dir" && as_dir=.
32346    for ac_exec_ext in '' $ac_executable_extensions; do
32347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32348    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32350    break 2
32351  fi
32352done
32353  done
32354IFS=$as_save_IFS
32355
32356  ;;
32357esac
32358fi
32359AS=$ac_cv_path_AS
32360if test -n "$AS"; then
32361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32362$as_echo "$AS" >&6; }
32363else
32364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32365$as_echo "no" >&6; }
32366fi
32367
32368
32369        if test "x$AS" = x; then
32370          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32371        fi
32372      else
32373        # Otherwise we believe it is a complete path. Use it as it is.
32374        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32375$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32377$as_echo_n "checking for AS... " >&6; }
32378        if test ! -x "$tool_specified"; then
32379          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32380$as_echo "not found" >&6; }
32381          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32382        fi
32383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32384$as_echo "$tool_specified" >&6; }
32385      fi
32386    fi
32387  fi
32388
32389
32390
32391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32392
32393  # First separate the path from the arguments. This will split at the first
32394  # space.
32395  complete="$AS"
32396  path="${complete%% *}"
32397  tmp="$complete EOL"
32398  arguments="${tmp#* }"
32399
32400  # Input might be given as Windows format, start by converting to
32401  # unix format.
32402  new_path=`$CYGPATH -u "$path"`
32403
32404  # Now try to locate executable using which
32405  new_path=`$WHICH "$new_path" 2> /dev/null`
32406  # bat and cmd files are not always considered executable in cygwin causing which
32407  # to not find them
32408  if test "x$new_path" = x \
32409      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32410      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32411    new_path=`$CYGPATH -u "$path"`
32412  fi
32413  if test "x$new_path" = x; then
32414    # Oops. Which didn't find the executable.
32415    # The splitting of arguments from the executable at a space might have been incorrect,
32416    # since paths with space are more likely in Windows. Give it another try with the whole
32417    # argument.
32418    path="$complete"
32419    arguments="EOL"
32420    new_path=`$CYGPATH -u "$path"`
32421    new_path=`$WHICH "$new_path" 2> /dev/null`
32422    # bat and cmd files are not always considered executable in cygwin causing which
32423    # to not find them
32424    if test "x$new_path" = x \
32425        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32426        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32427      new_path=`$CYGPATH -u "$path"`
32428    fi
32429    if test "x$new_path" = x; then
32430      # It's still not found. Now this is an unrecoverable error.
32431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32432$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32433      has_space=`$ECHO "$complete" | $GREP " "`
32434      if test "x$has_space" != x; then
32435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32437      fi
32438      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32439    fi
32440  fi
32441
32442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32445  # "foo.exe" is OK but "foo" is an error.
32446  #
32447  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32448  # It is also a way to make sure we got the proper file name for the real test later on.
32449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32450  if test "x$test_shortpath" = x; then
32451    # Short path failed, file does not exist as specified.
32452    # Try adding .exe or .cmd
32453    if test -f "${new_path}.exe"; then
32454      input_to_shortpath="${new_path}.exe"
32455    elif test -f "${new_path}.cmd"; then
32456      input_to_shortpath="${new_path}.cmd"
32457    else
32458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32459$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32460      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32461$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32462      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32463    fi
32464  else
32465    input_to_shortpath="$new_path"
32466  fi
32467
32468  # Call helper function which possibly converts this using DOS-style short mode.
32469  # If so, the updated path is stored in $new_path.
32470  new_path="$input_to_shortpath"
32471
32472  input_path="$input_to_shortpath"
32473  # Check if we need to convert this using DOS-style short mode. If the path
32474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32475  # take no chances and rewrite it.
32476  # Note: m4 eats our [], so we need to use [ and ] instead.
32477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32478  if test "x$has_forbidden_chars" != x; then
32479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32480    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32481    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32482    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32483      # Going to short mode and back again did indeed matter. Since short mode is
32484      # case insensitive, let's make it lowercase to improve readability.
32485      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32486      # Now convert it back to Unix-stile (cygpath)
32487      input_path=`$CYGPATH -u "$shortmode_path"`
32488      new_path="$input_path"
32489    fi
32490  fi
32491
32492  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32493  if test "x$test_cygdrive_prefix" = x; then
32494    # As a simple fix, exclude /usr/bin since it's not a real path.
32495    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32496      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32497      # a path prefixed by /cygdrive for fixpath to work.
32498      new_path="$CYGWIN_ROOT_PATH$input_path"
32499    fi
32500  fi
32501
32502  # remove trailing .exe if any
32503  new_path="${new_path/%.exe/}"
32504
32505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32506
32507  # First separate the path from the arguments. This will split at the first
32508  # space.
32509  complete="$AS"
32510  path="${complete%% *}"
32511  tmp="$complete EOL"
32512  arguments="${tmp#* }"
32513
32514  # Input might be given as Windows format, start by converting to
32515  # unix format.
32516  new_path="$path"
32517
32518  windows_path="$new_path"
32519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32520    unix_path=`$CYGPATH -u "$windows_path"`
32521    new_path="$unix_path"
32522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32524    new_path="$unix_path"
32525  fi
32526
32527
32528  # Now try to locate executable using which
32529  new_path=`$WHICH "$new_path" 2> /dev/null`
32530
32531  if test "x$new_path" = x; then
32532    # Oops. Which didn't find the executable.
32533    # The splitting of arguments from the executable at a space might have been incorrect,
32534    # since paths with space are more likely in Windows. Give it another try with the whole
32535    # argument.
32536    path="$complete"
32537    arguments="EOL"
32538    new_path="$path"
32539
32540  windows_path="$new_path"
32541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32542    unix_path=`$CYGPATH -u "$windows_path"`
32543    new_path="$unix_path"
32544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32546    new_path="$unix_path"
32547  fi
32548
32549
32550    new_path=`$WHICH "$new_path" 2> /dev/null`
32551    # bat and cmd files are not always considered executable in MSYS causing which
32552    # to not find them
32553    if test "x$new_path" = x \
32554        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32555        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32556      new_path="$path"
32557
32558  windows_path="$new_path"
32559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32560    unix_path=`$CYGPATH -u "$windows_path"`
32561    new_path="$unix_path"
32562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32564    new_path="$unix_path"
32565  fi
32566
32567    fi
32568
32569    if test "x$new_path" = x; then
32570      # It's still not found. Now this is an unrecoverable error.
32571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32572$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32573      has_space=`$ECHO "$complete" | $GREP " "`
32574      if test "x$has_space" != x; then
32575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32577      fi
32578      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32579    fi
32580  fi
32581
32582  # Now new_path has a complete unix path to the binary
32583  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32584    # Keep paths in /bin as-is, but remove trailing .exe if any
32585    new_path="${new_path/%.exe/}"
32586    # Do not save /bin paths to all_fixpath_prefixes!
32587  else
32588    # Not in mixed or Windows style, start by that.
32589    new_path=`cmd //c echo $new_path`
32590
32591  input_path="$new_path"
32592  # Check if we need to convert this using DOS-style short mode. If the path
32593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32594  # take no chances and rewrite it.
32595  # Note: m4 eats our [], so we need to use [ and ] instead.
32596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32597  if test "x$has_forbidden_chars" != x; then
32598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32600  fi
32601
32602    # Output is in $new_path
32603
32604  windows_path="$new_path"
32605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32606    unix_path=`$CYGPATH -u "$windows_path"`
32607    new_path="$unix_path"
32608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32610    new_path="$unix_path"
32611  fi
32612
32613    # remove trailing .exe if any
32614    new_path="${new_path/%.exe/}"
32615
32616    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32617    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32618  fi
32619
32620  else
32621    # We're on a posix platform. Hooray! :)
32622    # First separate the path from the arguments. This will split at the first
32623    # space.
32624    complete="$AS"
32625    path="${complete%% *}"
32626    tmp="$complete EOL"
32627    arguments="${tmp#* }"
32628
32629    # Cannot rely on the command "which" here since it doesn't always work.
32630    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32631    if test -z "$is_absolute_path"; then
32632      # Path to executable is not absolute. Find it.
32633      IFS_save="$IFS"
32634      IFS=:
32635      for p in $PATH; do
32636        if test -f "$p/$path" && test -x "$p/$path"; then
32637          new_path="$p/$path"
32638          break
32639        fi
32640      done
32641      IFS="$IFS_save"
32642    else
32643      # This is an absolute path, we can use it without further modifications.
32644      new_path="$path"
32645    fi
32646
32647    if test "x$new_path" = x; then
32648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32649$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32650      has_space=`$ECHO "$complete" | $GREP " "`
32651      if test "x$has_space" != x; then
32652        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32653$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32654      fi
32655      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32656    fi
32657  fi
32658
32659  # Now join together the path and the arguments once again
32660  if test "x$arguments" != xEOL; then
32661    new_complete="$new_path ${arguments% *}"
32662  else
32663    new_complete="$new_path"
32664  fi
32665
32666  if test "x$complete" != "x$new_complete"; then
32667    AS="$new_complete"
32668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32669$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32670  fi
32671
32672  else
32673    # FIXME: is this correct for microsoft?
32674    AS="$CC -c"
32675  fi
32676
32677
32678  #
32679  # Setup the archiver (AR)
32680  #
32681  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32682    # The corresponding ar tool is lib.exe (used to create static libraries)
32683    # Extract the first word of "lib", so it can be a program name with args.
32684set dummy lib; ac_word=$2
32685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32686$as_echo_n "checking for $ac_word... " >&6; }
32687if ${ac_cv_prog_AR+:} false; then :
32688  $as_echo_n "(cached) " >&6
32689else
32690  if test -n "$AR"; then
32691  ac_cv_prog_AR="$AR" # Let the user override the test.
32692else
32693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32694for as_dir in $PATH
32695do
32696  IFS=$as_save_IFS
32697  test -z "$as_dir" && as_dir=.
32698    for ac_exec_ext in '' $ac_executable_extensions; do
32699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32700    ac_cv_prog_AR="lib"
32701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32702    break 2
32703  fi
32704done
32705  done
32706IFS=$as_save_IFS
32707
32708fi
32709fi
32710AR=$ac_cv_prog_AR
32711if test -n "$AR"; then
32712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32713$as_echo "$AR" >&6; }
32714else
32715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32716$as_echo "no" >&6; }
32717fi
32718
32719
32720  else
32721
32722
32723  # Publish this variable in the help.
32724
32725
32726  if test "x$AR" = x; then
32727    # The variable is not set by user, try to locate tool using the code snippet
32728    if test -n "$ac_tool_prefix"; then
32729  for ac_prog in ar
32730  do
32731    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32732set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32734$as_echo_n "checking for $ac_word... " >&6; }
32735if ${ac_cv_prog_AR+:} false; then :
32736  $as_echo_n "(cached) " >&6
32737else
32738  if test -n "$AR"; then
32739  ac_cv_prog_AR="$AR" # Let the user override the test.
32740else
32741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32742for as_dir in $PATH
32743do
32744  IFS=$as_save_IFS
32745  test -z "$as_dir" && as_dir=.
32746    for ac_exec_ext in '' $ac_executable_extensions; do
32747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32748    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32750    break 2
32751  fi
32752done
32753  done
32754IFS=$as_save_IFS
32755
32756fi
32757fi
32758AR=$ac_cv_prog_AR
32759if test -n "$AR"; then
32760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32761$as_echo "$AR" >&6; }
32762else
32763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32764$as_echo "no" >&6; }
32765fi
32766
32767
32768    test -n "$AR" && break
32769  done
32770fi
32771if test -z "$AR"; then
32772  ac_ct_AR=$AR
32773  for ac_prog in ar
32774do
32775  # Extract the first word of "$ac_prog", so it can be a program name with args.
32776set dummy $ac_prog; ac_word=$2
32777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32778$as_echo_n "checking for $ac_word... " >&6; }
32779if ${ac_cv_prog_ac_ct_AR+:} false; then :
32780  $as_echo_n "(cached) " >&6
32781else
32782  if test -n "$ac_ct_AR"; then
32783  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32784else
32785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32786for as_dir in $PATH
32787do
32788  IFS=$as_save_IFS
32789  test -z "$as_dir" && as_dir=.
32790    for ac_exec_ext in '' $ac_executable_extensions; do
32791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32792    ac_cv_prog_ac_ct_AR="$ac_prog"
32793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32794    break 2
32795  fi
32796done
32797  done
32798IFS=$as_save_IFS
32799
32800fi
32801fi
32802ac_ct_AR=$ac_cv_prog_ac_ct_AR
32803if test -n "$ac_ct_AR"; then
32804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32805$as_echo "$ac_ct_AR" >&6; }
32806else
32807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32808$as_echo "no" >&6; }
32809fi
32810
32811
32812  test -n "$ac_ct_AR" && break
32813done
32814
32815  if test "x$ac_ct_AR" = x; then
32816    AR=""
32817  else
32818    case $cross_compiling:$ac_tool_warned in
32819yes:)
32820{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32821$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32822ac_tool_warned=yes ;;
32823esac
32824    AR=$ac_ct_AR
32825  fi
32826fi
32827
32828  else
32829    # The variable is set, but is it from the command line or the environment?
32830
32831    # Try to remove the string !AR! from our list.
32832    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32833    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32834      # If it failed, the variable was not from the command line. Ignore it,
32835      # but warn the user (except for BASH, which is always set by the calling BASH).
32836      if test "xAR" != xBASH; then
32837        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32838$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32839      fi
32840      # Try to locate tool using the code snippet
32841      if test -n "$ac_tool_prefix"; then
32842  for ac_prog in ar
32843  do
32844    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32845set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32847$as_echo_n "checking for $ac_word... " >&6; }
32848if ${ac_cv_prog_AR+:} false; then :
32849  $as_echo_n "(cached) " >&6
32850else
32851  if test -n "$AR"; then
32852  ac_cv_prog_AR="$AR" # Let the user override the test.
32853else
32854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32855for as_dir in $PATH
32856do
32857  IFS=$as_save_IFS
32858  test -z "$as_dir" && as_dir=.
32859    for ac_exec_ext in '' $ac_executable_extensions; do
32860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32861    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32863    break 2
32864  fi
32865done
32866  done
32867IFS=$as_save_IFS
32868
32869fi
32870fi
32871AR=$ac_cv_prog_AR
32872if test -n "$AR"; then
32873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32874$as_echo "$AR" >&6; }
32875else
32876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32877$as_echo "no" >&6; }
32878fi
32879
32880
32881    test -n "$AR" && break
32882  done
32883fi
32884if test -z "$AR"; then
32885  ac_ct_AR=$AR
32886  for ac_prog in ar
32887do
32888  # Extract the first word of "$ac_prog", so it can be a program name with args.
32889set dummy $ac_prog; ac_word=$2
32890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32891$as_echo_n "checking for $ac_word... " >&6; }
32892if ${ac_cv_prog_ac_ct_AR+:} false; then :
32893  $as_echo_n "(cached) " >&6
32894else
32895  if test -n "$ac_ct_AR"; then
32896  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32897else
32898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32899for as_dir in $PATH
32900do
32901  IFS=$as_save_IFS
32902  test -z "$as_dir" && as_dir=.
32903    for ac_exec_ext in '' $ac_executable_extensions; do
32904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32905    ac_cv_prog_ac_ct_AR="$ac_prog"
32906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32907    break 2
32908  fi
32909done
32910  done
32911IFS=$as_save_IFS
32912
32913fi
32914fi
32915ac_ct_AR=$ac_cv_prog_ac_ct_AR
32916if test -n "$ac_ct_AR"; then
32917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32918$as_echo "$ac_ct_AR" >&6; }
32919else
32920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32921$as_echo "no" >&6; }
32922fi
32923
32924
32925  test -n "$ac_ct_AR" && break
32926done
32927
32928  if test "x$ac_ct_AR" = x; then
32929    AR=""
32930  else
32931    case $cross_compiling:$ac_tool_warned in
32932yes:)
32933{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32934$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32935ac_tool_warned=yes ;;
32936esac
32937    AR=$ac_ct_AR
32938  fi
32939fi
32940
32941    else
32942      # If it succeeded, then it was overridden by the user. We will use it
32943      # for the tool.
32944
32945      # First remove it from the list of overridden variables, so we can test
32946      # for unknown variables in the end.
32947      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32948
32949      # Check if the provided tool contains a complete path.
32950      tool_specified="$AR"
32951      tool_basename="${tool_specified##*/}"
32952      if test "x$tool_basename" = "x$tool_specified"; then
32953        # A command without a complete path is provided, search $PATH.
32954        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32955$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32956        # Extract the first word of "$tool_basename", so it can be a program name with args.
32957set dummy $tool_basename; ac_word=$2
32958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32959$as_echo_n "checking for $ac_word... " >&6; }
32960if ${ac_cv_path_AR+:} false; then :
32961  $as_echo_n "(cached) " >&6
32962else
32963  case $AR in
32964  [\\/]* | ?:[\\/]*)
32965  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32966  ;;
32967  *)
32968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32969for as_dir in $PATH
32970do
32971  IFS=$as_save_IFS
32972  test -z "$as_dir" && as_dir=.
32973    for ac_exec_ext in '' $ac_executable_extensions; do
32974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32975    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32977    break 2
32978  fi
32979done
32980  done
32981IFS=$as_save_IFS
32982
32983  ;;
32984esac
32985fi
32986AR=$ac_cv_path_AR
32987if test -n "$AR"; then
32988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32989$as_echo "$AR" >&6; }
32990else
32991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32992$as_echo "no" >&6; }
32993fi
32994
32995
32996        if test "x$AR" = x; then
32997          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32998        fi
32999      else
33000        # Otherwise we believe it is a complete path. Use it as it is.
33001        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33002$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33003        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33004$as_echo_n "checking for AR... " >&6; }
33005        if test ! -x "$tool_specified"; then
33006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33007$as_echo "not found" >&6; }
33008          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33009        fi
33010        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33011$as_echo "$tool_specified" >&6; }
33012      fi
33013    fi
33014  fi
33015
33016
33017  fi
33018
33019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33020
33021  # First separate the path from the arguments. This will split at the first
33022  # space.
33023  complete="$AR"
33024  path="${complete%% *}"
33025  tmp="$complete EOL"
33026  arguments="${tmp#* }"
33027
33028  # Input might be given as Windows format, start by converting to
33029  # unix format.
33030  new_path=`$CYGPATH -u "$path"`
33031
33032  # Now try to locate executable using which
33033  new_path=`$WHICH "$new_path" 2> /dev/null`
33034  # bat and cmd files are not always considered executable in cygwin causing which
33035  # to not find them
33036  if test "x$new_path" = x \
33037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33039    new_path=`$CYGPATH -u "$path"`
33040  fi
33041  if test "x$new_path" = x; then
33042    # Oops. Which didn't find the executable.
33043    # The splitting of arguments from the executable at a space might have been incorrect,
33044    # since paths with space are more likely in Windows. Give it another try with the whole
33045    # argument.
33046    path="$complete"
33047    arguments="EOL"
33048    new_path=`$CYGPATH -u "$path"`
33049    new_path=`$WHICH "$new_path" 2> /dev/null`
33050    # bat and cmd files are not always considered executable in cygwin causing which
33051    # to not find them
33052    if test "x$new_path" = x \
33053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33055      new_path=`$CYGPATH -u "$path"`
33056    fi
33057    if test "x$new_path" = x; then
33058      # It's still not found. Now this is an unrecoverable error.
33059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33060$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33061      has_space=`$ECHO "$complete" | $GREP " "`
33062      if test "x$has_space" != x; then
33063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33065      fi
33066      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33067    fi
33068  fi
33069
33070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33073  # "foo.exe" is OK but "foo" is an error.
33074  #
33075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33076  # It is also a way to make sure we got the proper file name for the real test later on.
33077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33078  if test "x$test_shortpath" = x; then
33079    # Short path failed, file does not exist as specified.
33080    # Try adding .exe or .cmd
33081    if test -f "${new_path}.exe"; then
33082      input_to_shortpath="${new_path}.exe"
33083    elif test -f "${new_path}.cmd"; then
33084      input_to_shortpath="${new_path}.cmd"
33085    else
33086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33087$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33090      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33091    fi
33092  else
33093    input_to_shortpath="$new_path"
33094  fi
33095
33096  # Call helper function which possibly converts this using DOS-style short mode.
33097  # If so, the updated path is stored in $new_path.
33098  new_path="$input_to_shortpath"
33099
33100  input_path="$input_to_shortpath"
33101  # Check if we need to convert this using DOS-style short mode. If the path
33102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33103  # take no chances and rewrite it.
33104  # Note: m4 eats our [], so we need to use [ and ] instead.
33105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33106  if test "x$has_forbidden_chars" != x; then
33107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33111      # Going to short mode and back again did indeed matter. Since short mode is
33112      # case insensitive, let's make it lowercase to improve readability.
33113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33114      # Now convert it back to Unix-stile (cygpath)
33115      input_path=`$CYGPATH -u "$shortmode_path"`
33116      new_path="$input_path"
33117    fi
33118  fi
33119
33120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33121  if test "x$test_cygdrive_prefix" = x; then
33122    # As a simple fix, exclude /usr/bin since it's not a real path.
33123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33125      # a path prefixed by /cygdrive for fixpath to work.
33126      new_path="$CYGWIN_ROOT_PATH$input_path"
33127    fi
33128  fi
33129
33130  # remove trailing .exe if any
33131  new_path="${new_path/%.exe/}"
33132
33133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33134
33135  # First separate the path from the arguments. This will split at the first
33136  # space.
33137  complete="$AR"
33138  path="${complete%% *}"
33139  tmp="$complete EOL"
33140  arguments="${tmp#* }"
33141
33142  # Input might be given as Windows format, start by converting to
33143  # unix format.
33144  new_path="$path"
33145
33146  windows_path="$new_path"
33147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33148    unix_path=`$CYGPATH -u "$windows_path"`
33149    new_path="$unix_path"
33150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33152    new_path="$unix_path"
33153  fi
33154
33155
33156  # Now try to locate executable using which
33157  new_path=`$WHICH "$new_path" 2> /dev/null`
33158
33159  if test "x$new_path" = x; then
33160    # Oops. Which didn't find the executable.
33161    # The splitting of arguments from the executable at a space might have been incorrect,
33162    # since paths with space are more likely in Windows. Give it another try with the whole
33163    # argument.
33164    path="$complete"
33165    arguments="EOL"
33166    new_path="$path"
33167
33168  windows_path="$new_path"
33169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33170    unix_path=`$CYGPATH -u "$windows_path"`
33171    new_path="$unix_path"
33172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33174    new_path="$unix_path"
33175  fi
33176
33177
33178    new_path=`$WHICH "$new_path" 2> /dev/null`
33179    # bat and cmd files are not always considered executable in MSYS causing which
33180    # to not find them
33181    if test "x$new_path" = x \
33182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33184      new_path="$path"
33185
33186  windows_path="$new_path"
33187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33188    unix_path=`$CYGPATH -u "$windows_path"`
33189    new_path="$unix_path"
33190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33192    new_path="$unix_path"
33193  fi
33194
33195    fi
33196
33197    if test "x$new_path" = x; then
33198      # It's still not found. Now this is an unrecoverable error.
33199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33200$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33201      has_space=`$ECHO "$complete" | $GREP " "`
33202      if test "x$has_space" != x; then
33203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33205      fi
33206      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33207    fi
33208  fi
33209
33210  # Now new_path has a complete unix path to the binary
33211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33212    # Keep paths in /bin as-is, but remove trailing .exe if any
33213    new_path="${new_path/%.exe/}"
33214    # Do not save /bin paths to all_fixpath_prefixes!
33215  else
33216    # Not in mixed or Windows style, start by that.
33217    new_path=`cmd //c echo $new_path`
33218
33219  input_path="$new_path"
33220  # Check if we need to convert this using DOS-style short mode. If the path
33221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33222  # take no chances and rewrite it.
33223  # Note: m4 eats our [], so we need to use [ and ] instead.
33224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33225  if test "x$has_forbidden_chars" != x; then
33226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33228  fi
33229
33230    # Output is in $new_path
33231
33232  windows_path="$new_path"
33233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33234    unix_path=`$CYGPATH -u "$windows_path"`
33235    new_path="$unix_path"
33236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33238    new_path="$unix_path"
33239  fi
33240
33241    # remove trailing .exe if any
33242    new_path="${new_path/%.exe/}"
33243
33244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33246  fi
33247
33248  else
33249    # We're on a posix platform. Hooray! :)
33250    # First separate the path from the arguments. This will split at the first
33251    # space.
33252    complete="$AR"
33253    path="${complete%% *}"
33254    tmp="$complete EOL"
33255    arguments="${tmp#* }"
33256
33257    # Cannot rely on the command "which" here since it doesn't always work.
33258    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33259    if test -z "$is_absolute_path"; then
33260      # Path to executable is not absolute. Find it.
33261      IFS_save="$IFS"
33262      IFS=:
33263      for p in $PATH; do
33264        if test -f "$p/$path" && test -x "$p/$path"; then
33265          new_path="$p/$path"
33266          break
33267        fi
33268      done
33269      IFS="$IFS_save"
33270    else
33271      # This is an absolute path, we can use it without further modifications.
33272      new_path="$path"
33273    fi
33274
33275    if test "x$new_path" = x; then
33276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33277$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33278      has_space=`$ECHO "$complete" | $GREP " "`
33279      if test "x$has_space" != x; then
33280        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33282      fi
33283      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33284    fi
33285  fi
33286
33287  # Now join together the path and the arguments once again
33288  if test "x$arguments" != xEOL; then
33289    new_complete="$new_path ${arguments% *}"
33290  else
33291    new_complete="$new_path"
33292  fi
33293
33294  if test "x$complete" != "x$new_complete"; then
33295    AR="$new_complete"
33296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33297$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33298  fi
33299
33300
33301
33302  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33303    ac_ext=m
33304ac_cpp='$OBJCPP $CPPFLAGS'
33305ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33306ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33307ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33308if test -n "$ac_tool_prefix"; then
33309  for ac_prog in gcc objcc objc cc CC
33310  do
33311    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33312set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33314$as_echo_n "checking for $ac_word... " >&6; }
33315if ${ac_cv_prog_OBJC+:} false; then :
33316  $as_echo_n "(cached) " >&6
33317else
33318  if test -n "$OBJC"; then
33319  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33320else
33321as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33322for as_dir in $PATH
33323do
33324  IFS=$as_save_IFS
33325  test -z "$as_dir" && as_dir=.
33326    for ac_exec_ext in '' $ac_executable_extensions; do
33327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33328    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33330    break 2
33331  fi
33332done
33333  done
33334IFS=$as_save_IFS
33335
33336fi
33337fi
33338OBJC=$ac_cv_prog_OBJC
33339if test -n "$OBJC"; then
33340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33341$as_echo "$OBJC" >&6; }
33342else
33343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33344$as_echo "no" >&6; }
33345fi
33346
33347
33348    test -n "$OBJC" && break
33349  done
33350fi
33351if test -z "$OBJC"; then
33352  ac_ct_OBJC=$OBJC
33353  for ac_prog in gcc objcc objc cc CC
33354do
33355  # Extract the first word of "$ac_prog", so it can be a program name with args.
33356set dummy $ac_prog; ac_word=$2
33357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33358$as_echo_n "checking for $ac_word... " >&6; }
33359if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33360  $as_echo_n "(cached) " >&6
33361else
33362  if test -n "$ac_ct_OBJC"; then
33363  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33364else
33365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33366for as_dir in $PATH
33367do
33368  IFS=$as_save_IFS
33369  test -z "$as_dir" && as_dir=.
33370    for ac_exec_ext in '' $ac_executable_extensions; do
33371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33372    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33374    break 2
33375  fi
33376done
33377  done
33378IFS=$as_save_IFS
33379
33380fi
33381fi
33382ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33383if test -n "$ac_ct_OBJC"; then
33384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33385$as_echo "$ac_ct_OBJC" >&6; }
33386else
33387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33388$as_echo "no" >&6; }
33389fi
33390
33391
33392  test -n "$ac_ct_OBJC" && break
33393done
33394
33395  if test "x$ac_ct_OBJC" = x; then
33396    OBJC="gcc"
33397  else
33398    case $cross_compiling:$ac_tool_warned in
33399yes:)
33400{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33401$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33402ac_tool_warned=yes ;;
33403esac
33404    OBJC=$ac_ct_OBJC
33405  fi
33406fi
33407
33408# Provide some information about the compiler.
33409$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33410set X $ac_compile
33411ac_compiler=$2
33412for ac_option in --version -v -V -qversion; do
33413  { { ac_try="$ac_compiler $ac_option >&5"
33414case "(($ac_try" in
33415  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33416  *) ac_try_echo=$ac_try;;
33417esac
33418eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33419$as_echo "$ac_try_echo"; } >&5
33420  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33421  ac_status=$?
33422  if test -s conftest.err; then
33423    sed '10a\
33424... rest of stderr output deleted ...
33425         10q' conftest.err >conftest.er1
33426    cat conftest.er1 >&5
33427  fi
33428  rm -f conftest.er1 conftest.err
33429  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33430  test $ac_status = 0; }
33431done
33432
33433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33434$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33435if ${ac_cv_objc_compiler_gnu+:} false; then :
33436  $as_echo_n "(cached) " >&6
33437else
33438  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33439/* end confdefs.h.  */
33440
33441int
33442main ()
33443{
33444#ifndef __GNUC__
33445       choke me
33446#endif
33447
33448  ;
33449  return 0;
33450}
33451_ACEOF
33452if ac_fn_objc_try_compile "$LINENO"; then :
33453  ac_compiler_gnu=yes
33454else
33455  ac_compiler_gnu=no
33456fi
33457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33458ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33459
33460fi
33461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33462$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33463if test $ac_compiler_gnu = yes; then
33464  GOBJC=yes
33465else
33466  GOBJC=
33467fi
33468ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33469ac_save_OBJCFLAGS=$OBJCFLAGS
33470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33471$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33472if ${ac_cv_prog_objc_g+:} false; then :
33473  $as_echo_n "(cached) " >&6
33474else
33475  ac_save_objc_werror_flag=$ac_objc_werror_flag
33476   ac_objc_werror_flag=yes
33477   ac_cv_prog_objc_g=no
33478   OBJCFLAGS="-g"
33479   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33480/* end confdefs.h.  */
33481
33482int
33483main ()
33484{
33485
33486  ;
33487  return 0;
33488}
33489_ACEOF
33490if ac_fn_objc_try_compile "$LINENO"; then :
33491  ac_cv_prog_objc_g=yes
33492else
33493  OBJCFLAGS=""
33494      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33495/* end confdefs.h.  */
33496
33497int
33498main ()
33499{
33500
33501  ;
33502  return 0;
33503}
33504_ACEOF
33505if ac_fn_objc_try_compile "$LINENO"; then :
33506
33507else
33508  ac_objc_werror_flag=$ac_save_objc_werror_flag
33509	 OBJCFLAGS="-g"
33510	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33511/* end confdefs.h.  */
33512
33513int
33514main ()
33515{
33516
33517  ;
33518  return 0;
33519}
33520_ACEOF
33521if ac_fn_objc_try_compile "$LINENO"; then :
33522  ac_cv_prog_objc_g=yes
33523fi
33524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33525fi
33526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33527fi
33528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33529   ac_objc_werror_flag=$ac_save_objc_werror_flag
33530fi
33531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33532$as_echo "$ac_cv_prog_objc_g" >&6; }
33533if test "$ac_test_OBJCFLAGS" = set; then
33534  OBJCFLAGS=$ac_save_OBJCFLAGS
33535elif test $ac_cv_prog_objc_g = yes; then
33536  if test "$GOBJC" = yes; then
33537    OBJCFLAGS="-g -O2"
33538  else
33539    OBJCFLAGS="-g"
33540  fi
33541else
33542  if test "$GOBJC" = yes; then
33543    OBJCFLAGS="-O2"
33544  else
33545    OBJCFLAGS=
33546  fi
33547fi
33548ac_ext=cpp
33549ac_cpp='$CXXCPP $CPPFLAGS'
33550ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33551ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33552ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33553
33554
33555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33556
33557  # First separate the path from the arguments. This will split at the first
33558  # space.
33559  complete="$OBJC"
33560  path="${complete%% *}"
33561  tmp="$complete EOL"
33562  arguments="${tmp#* }"
33563
33564  # Input might be given as Windows format, start by converting to
33565  # unix format.
33566  new_path=`$CYGPATH -u "$path"`
33567
33568  # Now try to locate executable using which
33569  new_path=`$WHICH "$new_path" 2> /dev/null`
33570  # bat and cmd files are not always considered executable in cygwin causing which
33571  # to not find them
33572  if test "x$new_path" = x \
33573      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33574      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33575    new_path=`$CYGPATH -u "$path"`
33576  fi
33577  if test "x$new_path" = x; then
33578    # Oops. Which didn't find the executable.
33579    # The splitting of arguments from the executable at a space might have been incorrect,
33580    # since paths with space are more likely in Windows. Give it another try with the whole
33581    # argument.
33582    path="$complete"
33583    arguments="EOL"
33584    new_path=`$CYGPATH -u "$path"`
33585    new_path=`$WHICH "$new_path" 2> /dev/null`
33586    # bat and cmd files are not always considered executable in cygwin causing which
33587    # to not find them
33588    if test "x$new_path" = x \
33589        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33590        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33591      new_path=`$CYGPATH -u "$path"`
33592    fi
33593    if test "x$new_path" = x; then
33594      # It's still not found. Now this is an unrecoverable error.
33595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33596$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33597      has_space=`$ECHO "$complete" | $GREP " "`
33598      if test "x$has_space" != x; then
33599        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33600$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33601      fi
33602      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33603    fi
33604  fi
33605
33606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33609  # "foo.exe" is OK but "foo" is an error.
33610  #
33611  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33612  # It is also a way to make sure we got the proper file name for the real test later on.
33613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33614  if test "x$test_shortpath" = x; then
33615    # Short path failed, file does not exist as specified.
33616    # Try adding .exe or .cmd
33617    if test -f "${new_path}.exe"; then
33618      input_to_shortpath="${new_path}.exe"
33619    elif test -f "${new_path}.cmd"; then
33620      input_to_shortpath="${new_path}.cmd"
33621    else
33622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33623$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33624      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33625$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33626      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33627    fi
33628  else
33629    input_to_shortpath="$new_path"
33630  fi
33631
33632  # Call helper function which possibly converts this using DOS-style short mode.
33633  # If so, the updated path is stored in $new_path.
33634  new_path="$input_to_shortpath"
33635
33636  input_path="$input_to_shortpath"
33637  # Check if we need to convert this using DOS-style short mode. If the path
33638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33639  # take no chances and rewrite it.
33640  # Note: m4 eats our [], so we need to use [ and ] instead.
33641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33642  if test "x$has_forbidden_chars" != x; then
33643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33644    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33645    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33646    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33647      # Going to short mode and back again did indeed matter. Since short mode is
33648      # case insensitive, let's make it lowercase to improve readability.
33649      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33650      # Now convert it back to Unix-stile (cygpath)
33651      input_path=`$CYGPATH -u "$shortmode_path"`
33652      new_path="$input_path"
33653    fi
33654  fi
33655
33656  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33657  if test "x$test_cygdrive_prefix" = x; then
33658    # As a simple fix, exclude /usr/bin since it's not a real path.
33659    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33660      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33661      # a path prefixed by /cygdrive for fixpath to work.
33662      new_path="$CYGWIN_ROOT_PATH$input_path"
33663    fi
33664  fi
33665
33666  # remove trailing .exe if any
33667  new_path="${new_path/%.exe/}"
33668
33669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33670
33671  # First separate the path from the arguments. This will split at the first
33672  # space.
33673  complete="$OBJC"
33674  path="${complete%% *}"
33675  tmp="$complete EOL"
33676  arguments="${tmp#* }"
33677
33678  # Input might be given as Windows format, start by converting to
33679  # unix format.
33680  new_path="$path"
33681
33682  windows_path="$new_path"
33683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33684    unix_path=`$CYGPATH -u "$windows_path"`
33685    new_path="$unix_path"
33686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33688    new_path="$unix_path"
33689  fi
33690
33691
33692  # Now try to locate executable using which
33693  new_path=`$WHICH "$new_path" 2> /dev/null`
33694
33695  if test "x$new_path" = x; then
33696    # Oops. Which didn't find the executable.
33697    # The splitting of arguments from the executable at a space might have been incorrect,
33698    # since paths with space are more likely in Windows. Give it another try with the whole
33699    # argument.
33700    path="$complete"
33701    arguments="EOL"
33702    new_path="$path"
33703
33704  windows_path="$new_path"
33705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33706    unix_path=`$CYGPATH -u "$windows_path"`
33707    new_path="$unix_path"
33708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33710    new_path="$unix_path"
33711  fi
33712
33713
33714    new_path=`$WHICH "$new_path" 2> /dev/null`
33715    # bat and cmd files are not always considered executable in MSYS causing which
33716    # to not find them
33717    if test "x$new_path" = x \
33718        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33719        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33720      new_path="$path"
33721
33722  windows_path="$new_path"
33723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33724    unix_path=`$CYGPATH -u "$windows_path"`
33725    new_path="$unix_path"
33726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33728    new_path="$unix_path"
33729  fi
33730
33731    fi
33732
33733    if test "x$new_path" = x; then
33734      # It's still not found. Now this is an unrecoverable error.
33735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33736$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33737      has_space=`$ECHO "$complete" | $GREP " "`
33738      if test "x$has_space" != x; then
33739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33741      fi
33742      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33743    fi
33744  fi
33745
33746  # Now new_path has a complete unix path to the binary
33747  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33748    # Keep paths in /bin as-is, but remove trailing .exe if any
33749    new_path="${new_path/%.exe/}"
33750    # Do not save /bin paths to all_fixpath_prefixes!
33751  else
33752    # Not in mixed or Windows style, start by that.
33753    new_path=`cmd //c echo $new_path`
33754
33755  input_path="$new_path"
33756  # Check if we need to convert this using DOS-style short mode. If the path
33757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33758  # take no chances and rewrite it.
33759  # Note: m4 eats our [], so we need to use [ and ] instead.
33760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33761  if test "x$has_forbidden_chars" != x; then
33762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33763    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33764  fi
33765
33766    # Output is in $new_path
33767
33768  windows_path="$new_path"
33769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33770    unix_path=`$CYGPATH -u "$windows_path"`
33771    new_path="$unix_path"
33772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33774    new_path="$unix_path"
33775  fi
33776
33777    # remove trailing .exe if any
33778    new_path="${new_path/%.exe/}"
33779
33780    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33781    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33782  fi
33783
33784  else
33785    # We're on a posix platform. Hooray! :)
33786    # First separate the path from the arguments. This will split at the first
33787    # space.
33788    complete="$OBJC"
33789    path="${complete%% *}"
33790    tmp="$complete EOL"
33791    arguments="${tmp#* }"
33792
33793    # Cannot rely on the command "which" here since it doesn't always work.
33794    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33795    if test -z "$is_absolute_path"; then
33796      # Path to executable is not absolute. Find it.
33797      IFS_save="$IFS"
33798      IFS=:
33799      for p in $PATH; do
33800        if test -f "$p/$path" && test -x "$p/$path"; then
33801          new_path="$p/$path"
33802          break
33803        fi
33804      done
33805      IFS="$IFS_save"
33806    else
33807      # This is an absolute path, we can use it without further modifications.
33808      new_path="$path"
33809    fi
33810
33811    if test "x$new_path" = x; then
33812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33813$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33814      has_space=`$ECHO "$complete" | $GREP " "`
33815      if test "x$has_space" != x; then
33816        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33817$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33818      fi
33819      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33820    fi
33821  fi
33822
33823  # Now join together the path and the arguments once again
33824  if test "x$arguments" != xEOL; then
33825    new_complete="$new_path ${arguments% *}"
33826  else
33827    new_complete="$new_path"
33828  fi
33829
33830  if test "x$complete" != "x$new_complete"; then
33831    OBJC="$new_complete"
33832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33833$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33834  fi
33835
33836
33837
33838  # Publish this variable in the help.
33839
33840
33841  if test "x$LIPO" = x; then
33842    # The variable is not set by user, try to locate tool using the code snippet
33843    for ac_prog in lipo
33844do
33845  # Extract the first word of "$ac_prog", so it can be a program name with args.
33846set dummy $ac_prog; ac_word=$2
33847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33848$as_echo_n "checking for $ac_word... " >&6; }
33849if ${ac_cv_path_LIPO+:} false; then :
33850  $as_echo_n "(cached) " >&6
33851else
33852  case $LIPO in
33853  [\\/]* | ?:[\\/]*)
33854  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33855  ;;
33856  *)
33857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33858for as_dir in $PATH
33859do
33860  IFS=$as_save_IFS
33861  test -z "$as_dir" && as_dir=.
33862    for ac_exec_ext in '' $ac_executable_extensions; do
33863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33864    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33866    break 2
33867  fi
33868done
33869  done
33870IFS=$as_save_IFS
33871
33872  ;;
33873esac
33874fi
33875LIPO=$ac_cv_path_LIPO
33876if test -n "$LIPO"; then
33877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33878$as_echo "$LIPO" >&6; }
33879else
33880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33881$as_echo "no" >&6; }
33882fi
33883
33884
33885  test -n "$LIPO" && break
33886done
33887
33888  else
33889    # The variable is set, but is it from the command line or the environment?
33890
33891    # Try to remove the string !LIPO! from our list.
33892    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33893    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33894      # If it failed, the variable was not from the command line. Ignore it,
33895      # but warn the user (except for BASH, which is always set by the calling BASH).
33896      if test "xLIPO" != xBASH; then
33897        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33898$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33899      fi
33900      # Try to locate tool using the code snippet
33901      for ac_prog in lipo
33902do
33903  # Extract the first word of "$ac_prog", so it can be a program name with args.
33904set dummy $ac_prog; ac_word=$2
33905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33906$as_echo_n "checking for $ac_word... " >&6; }
33907if ${ac_cv_path_LIPO+:} false; then :
33908  $as_echo_n "(cached) " >&6
33909else
33910  case $LIPO in
33911  [\\/]* | ?:[\\/]*)
33912  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33913  ;;
33914  *)
33915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33916for as_dir in $PATH
33917do
33918  IFS=$as_save_IFS
33919  test -z "$as_dir" && as_dir=.
33920    for ac_exec_ext in '' $ac_executable_extensions; do
33921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33922    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33924    break 2
33925  fi
33926done
33927  done
33928IFS=$as_save_IFS
33929
33930  ;;
33931esac
33932fi
33933LIPO=$ac_cv_path_LIPO
33934if test -n "$LIPO"; then
33935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33936$as_echo "$LIPO" >&6; }
33937else
33938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33939$as_echo "no" >&6; }
33940fi
33941
33942
33943  test -n "$LIPO" && break
33944done
33945
33946    else
33947      # If it succeeded, then it was overridden by the user. We will use it
33948      # for the tool.
33949
33950      # First remove it from the list of overridden variables, so we can test
33951      # for unknown variables in the end.
33952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33953
33954      # Check if the provided tool contains a complete path.
33955      tool_specified="$LIPO"
33956      tool_basename="${tool_specified##*/}"
33957      if test "x$tool_basename" = "x$tool_specified"; then
33958        # A command without a complete path is provided, search $PATH.
33959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33960$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33961        # Extract the first word of "$tool_basename", so it can be a program name with args.
33962set dummy $tool_basename; ac_word=$2
33963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33964$as_echo_n "checking for $ac_word... " >&6; }
33965if ${ac_cv_path_LIPO+:} false; then :
33966  $as_echo_n "(cached) " >&6
33967else
33968  case $LIPO in
33969  [\\/]* | ?:[\\/]*)
33970  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33971  ;;
33972  *)
33973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33974for as_dir in $PATH
33975do
33976  IFS=$as_save_IFS
33977  test -z "$as_dir" && as_dir=.
33978    for ac_exec_ext in '' $ac_executable_extensions; do
33979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33980    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33982    break 2
33983  fi
33984done
33985  done
33986IFS=$as_save_IFS
33987
33988  ;;
33989esac
33990fi
33991LIPO=$ac_cv_path_LIPO
33992if test -n "$LIPO"; then
33993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33994$as_echo "$LIPO" >&6; }
33995else
33996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33997$as_echo "no" >&6; }
33998fi
33999
34000
34001        if test "x$LIPO" = x; then
34002          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34003        fi
34004      else
34005        # Otherwise we believe it is a complete path. Use it as it is.
34006        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34007$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34009$as_echo_n "checking for LIPO... " >&6; }
34010        if test ! -x "$tool_specified"; then
34011          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34012$as_echo "not found" >&6; }
34013          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34014        fi
34015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34016$as_echo "$tool_specified" >&6; }
34017      fi
34018    fi
34019  fi
34020
34021
34022
34023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34024
34025  # First separate the path from the arguments. This will split at the first
34026  # space.
34027  complete="$LIPO"
34028  path="${complete%% *}"
34029  tmp="$complete EOL"
34030  arguments="${tmp#* }"
34031
34032  # Input might be given as Windows format, start by converting to
34033  # unix format.
34034  new_path=`$CYGPATH -u "$path"`
34035
34036  # Now try to locate executable using which
34037  new_path=`$WHICH "$new_path" 2> /dev/null`
34038  # bat and cmd files are not always considered executable in cygwin causing which
34039  # to not find them
34040  if test "x$new_path" = x \
34041      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34042      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34043    new_path=`$CYGPATH -u "$path"`
34044  fi
34045  if test "x$new_path" = x; then
34046    # Oops. Which didn't find the executable.
34047    # The splitting of arguments from the executable at a space might have been incorrect,
34048    # since paths with space are more likely in Windows. Give it another try with the whole
34049    # argument.
34050    path="$complete"
34051    arguments="EOL"
34052    new_path=`$CYGPATH -u "$path"`
34053    new_path=`$WHICH "$new_path" 2> /dev/null`
34054    # bat and cmd files are not always considered executable in cygwin causing which
34055    # to not find them
34056    if test "x$new_path" = x \
34057        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34058        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34059      new_path=`$CYGPATH -u "$path"`
34060    fi
34061    if test "x$new_path" = x; then
34062      # It's still not found. Now this is an unrecoverable error.
34063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34064$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34065      has_space=`$ECHO "$complete" | $GREP " "`
34066      if test "x$has_space" != x; then
34067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34069      fi
34070      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34071    fi
34072  fi
34073
34074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34077  # "foo.exe" is OK but "foo" is an error.
34078  #
34079  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34080  # It is also a way to make sure we got the proper file name for the real test later on.
34081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34082  if test "x$test_shortpath" = x; then
34083    # Short path failed, file does not exist as specified.
34084    # Try adding .exe or .cmd
34085    if test -f "${new_path}.exe"; then
34086      input_to_shortpath="${new_path}.exe"
34087    elif test -f "${new_path}.cmd"; then
34088      input_to_shortpath="${new_path}.cmd"
34089    else
34090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34091$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34092      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34093$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34094      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34095    fi
34096  else
34097    input_to_shortpath="$new_path"
34098  fi
34099
34100  # Call helper function which possibly converts this using DOS-style short mode.
34101  # If so, the updated path is stored in $new_path.
34102  new_path="$input_to_shortpath"
34103
34104  input_path="$input_to_shortpath"
34105  # Check if we need to convert this using DOS-style short mode. If the path
34106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34107  # take no chances and rewrite it.
34108  # Note: m4 eats our [], so we need to use [ and ] instead.
34109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34110  if test "x$has_forbidden_chars" != x; then
34111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34115      # Going to short mode and back again did indeed matter. Since short mode is
34116      # case insensitive, let's make it lowercase to improve readability.
34117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34118      # Now convert it back to Unix-stile (cygpath)
34119      input_path=`$CYGPATH -u "$shortmode_path"`
34120      new_path="$input_path"
34121    fi
34122  fi
34123
34124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34125  if test "x$test_cygdrive_prefix" = x; then
34126    # As a simple fix, exclude /usr/bin since it's not a real path.
34127    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34129      # a path prefixed by /cygdrive for fixpath to work.
34130      new_path="$CYGWIN_ROOT_PATH$input_path"
34131    fi
34132  fi
34133
34134  # remove trailing .exe if any
34135  new_path="${new_path/%.exe/}"
34136
34137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34138
34139  # First separate the path from the arguments. This will split at the first
34140  # space.
34141  complete="$LIPO"
34142  path="${complete%% *}"
34143  tmp="$complete EOL"
34144  arguments="${tmp#* }"
34145
34146  # Input might be given as Windows format, start by converting to
34147  # unix format.
34148  new_path="$path"
34149
34150  windows_path="$new_path"
34151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34152    unix_path=`$CYGPATH -u "$windows_path"`
34153    new_path="$unix_path"
34154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34156    new_path="$unix_path"
34157  fi
34158
34159
34160  # Now try to locate executable using which
34161  new_path=`$WHICH "$new_path" 2> /dev/null`
34162
34163  if test "x$new_path" = x; then
34164    # Oops. Which didn't find the executable.
34165    # The splitting of arguments from the executable at a space might have been incorrect,
34166    # since paths with space are more likely in Windows. Give it another try with the whole
34167    # argument.
34168    path="$complete"
34169    arguments="EOL"
34170    new_path="$path"
34171
34172  windows_path="$new_path"
34173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34174    unix_path=`$CYGPATH -u "$windows_path"`
34175    new_path="$unix_path"
34176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34178    new_path="$unix_path"
34179  fi
34180
34181
34182    new_path=`$WHICH "$new_path" 2> /dev/null`
34183    # bat and cmd files are not always considered executable in MSYS causing which
34184    # to not find them
34185    if test "x$new_path" = x \
34186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34188      new_path="$path"
34189
34190  windows_path="$new_path"
34191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34192    unix_path=`$CYGPATH -u "$windows_path"`
34193    new_path="$unix_path"
34194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34196    new_path="$unix_path"
34197  fi
34198
34199    fi
34200
34201    if test "x$new_path" = x; then
34202      # It's still not found. Now this is an unrecoverable error.
34203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34204$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34205      has_space=`$ECHO "$complete" | $GREP " "`
34206      if test "x$has_space" != x; then
34207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34209      fi
34210      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34211    fi
34212  fi
34213
34214  # Now new_path has a complete unix path to the binary
34215  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34216    # Keep paths in /bin as-is, but remove trailing .exe if any
34217    new_path="${new_path/%.exe/}"
34218    # Do not save /bin paths to all_fixpath_prefixes!
34219  else
34220    # Not in mixed or Windows style, start by that.
34221    new_path=`cmd //c echo $new_path`
34222
34223  input_path="$new_path"
34224  # Check if we need to convert this using DOS-style short mode. If the path
34225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34226  # take no chances and rewrite it.
34227  # Note: m4 eats our [], so we need to use [ and ] instead.
34228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34229  if test "x$has_forbidden_chars" != x; then
34230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34232  fi
34233
34234    # Output is in $new_path
34235
34236  windows_path="$new_path"
34237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34238    unix_path=`$CYGPATH -u "$windows_path"`
34239    new_path="$unix_path"
34240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34242    new_path="$unix_path"
34243  fi
34244
34245    # remove trailing .exe if any
34246    new_path="${new_path/%.exe/}"
34247
34248    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34249    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34250  fi
34251
34252  else
34253    # We're on a posix platform. Hooray! :)
34254    # First separate the path from the arguments. This will split at the first
34255    # space.
34256    complete="$LIPO"
34257    path="${complete%% *}"
34258    tmp="$complete EOL"
34259    arguments="${tmp#* }"
34260
34261    # Cannot rely on the command "which" here since it doesn't always work.
34262    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34263    if test -z "$is_absolute_path"; then
34264      # Path to executable is not absolute. Find it.
34265      IFS_save="$IFS"
34266      IFS=:
34267      for p in $PATH; do
34268        if test -f "$p/$path" && test -x "$p/$path"; then
34269          new_path="$p/$path"
34270          break
34271        fi
34272      done
34273      IFS="$IFS_save"
34274    else
34275      # This is an absolute path, we can use it without further modifications.
34276      new_path="$path"
34277    fi
34278
34279    if test "x$new_path" = x; then
34280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34281$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34282      has_space=`$ECHO "$complete" | $GREP " "`
34283      if test "x$has_space" != x; then
34284        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34286      fi
34287      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34288    fi
34289  fi
34290
34291  # Now join together the path and the arguments once again
34292  if test "x$arguments" != xEOL; then
34293    new_complete="$new_path ${arguments% *}"
34294  else
34295    new_complete="$new_path"
34296  fi
34297
34298  if test "x$complete" != "x$new_complete"; then
34299    LIPO="$new_complete"
34300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34301$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34302  fi
34303
34304  else
34305    OBJC=
34306  fi
34307
34308  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34309    # Extract the first word of "mt", so it can be a program name with args.
34310set dummy mt; ac_word=$2
34311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34312$as_echo_n "checking for $ac_word... " >&6; }
34313if ${ac_cv_prog_MT+:} false; then :
34314  $as_echo_n "(cached) " >&6
34315else
34316  if test -n "$MT"; then
34317  ac_cv_prog_MT="$MT" # Let the user override the test.
34318else
34319  ac_prog_rejected=no
34320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34321for as_dir in $PATH
34322do
34323  IFS=$as_save_IFS
34324  test -z "$as_dir" && as_dir=.
34325    for ac_exec_ext in '' $ac_executable_extensions; do
34326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34327    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34328       ac_prog_rejected=yes
34329       continue
34330     fi
34331    ac_cv_prog_MT="mt"
34332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34333    break 2
34334  fi
34335done
34336  done
34337IFS=$as_save_IFS
34338
34339if test $ac_prog_rejected = yes; then
34340  # We found a bogon in the path, so make sure we never use it.
34341  set dummy $ac_cv_prog_MT
34342  shift
34343  if test $# != 0; then
34344    # We chose a different compiler from the bogus one.
34345    # However, it has the same basename, so the bogon will be chosen
34346    # first if we set MT to just the basename; use the full file name.
34347    shift
34348    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34349  fi
34350fi
34351fi
34352fi
34353MT=$ac_cv_prog_MT
34354if test -n "$MT"; then
34355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34356$as_echo "$MT" >&6; }
34357else
34358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34359$as_echo "no" >&6; }
34360fi
34361
34362
34363
34364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34365
34366  # First separate the path from the arguments. This will split at the first
34367  # space.
34368  complete="$MT"
34369  path="${complete%% *}"
34370  tmp="$complete EOL"
34371  arguments="${tmp#* }"
34372
34373  # Input might be given as Windows format, start by converting to
34374  # unix format.
34375  new_path=`$CYGPATH -u "$path"`
34376
34377  # Now try to locate executable using which
34378  new_path=`$WHICH "$new_path" 2> /dev/null`
34379  # bat and cmd files are not always considered executable in cygwin causing which
34380  # to not find them
34381  if test "x$new_path" = x \
34382      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34383      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34384    new_path=`$CYGPATH -u "$path"`
34385  fi
34386  if test "x$new_path" = x; then
34387    # Oops. Which didn't find the executable.
34388    # The splitting of arguments from the executable at a space might have been incorrect,
34389    # since paths with space are more likely in Windows. Give it another try with the whole
34390    # argument.
34391    path="$complete"
34392    arguments="EOL"
34393    new_path=`$CYGPATH -u "$path"`
34394    new_path=`$WHICH "$new_path" 2> /dev/null`
34395    # bat and cmd files are not always considered executable in cygwin causing which
34396    # to not find them
34397    if test "x$new_path" = x \
34398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34400      new_path=`$CYGPATH -u "$path"`
34401    fi
34402    if test "x$new_path" = x; then
34403      # It's still not found. Now this is an unrecoverable error.
34404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34405$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34406      has_space=`$ECHO "$complete" | $GREP " "`
34407      if test "x$has_space" != x; then
34408        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34409$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34410      fi
34411      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34412    fi
34413  fi
34414
34415  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34416  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34417  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34418  # "foo.exe" is OK but "foo" is an error.
34419  #
34420  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34421  # It is also a way to make sure we got the proper file name for the real test later on.
34422  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34423  if test "x$test_shortpath" = x; then
34424    # Short path failed, file does not exist as specified.
34425    # Try adding .exe or .cmd
34426    if test -f "${new_path}.exe"; then
34427      input_to_shortpath="${new_path}.exe"
34428    elif test -f "${new_path}.cmd"; then
34429      input_to_shortpath="${new_path}.cmd"
34430    else
34431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34432$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34433      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34434$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34435      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34436    fi
34437  else
34438    input_to_shortpath="$new_path"
34439  fi
34440
34441  # Call helper function which possibly converts this using DOS-style short mode.
34442  # If so, the updated path is stored in $new_path.
34443  new_path="$input_to_shortpath"
34444
34445  input_path="$input_to_shortpath"
34446  # Check if we need to convert this using DOS-style short mode. If the path
34447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34448  # take no chances and rewrite it.
34449  # Note: m4 eats our [], so we need to use [ and ] instead.
34450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34451  if test "x$has_forbidden_chars" != x; then
34452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34456      # Going to short mode and back again did indeed matter. Since short mode is
34457      # case insensitive, let's make it lowercase to improve readability.
34458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34459      # Now convert it back to Unix-stile (cygpath)
34460      input_path=`$CYGPATH -u "$shortmode_path"`
34461      new_path="$input_path"
34462    fi
34463  fi
34464
34465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34466  if test "x$test_cygdrive_prefix" = x; then
34467    # As a simple fix, exclude /usr/bin since it's not a real path.
34468    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34470      # a path prefixed by /cygdrive for fixpath to work.
34471      new_path="$CYGWIN_ROOT_PATH$input_path"
34472    fi
34473  fi
34474
34475  # remove trailing .exe if any
34476  new_path="${new_path/%.exe/}"
34477
34478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34479
34480  # First separate the path from the arguments. This will split at the first
34481  # space.
34482  complete="$MT"
34483  path="${complete%% *}"
34484  tmp="$complete EOL"
34485  arguments="${tmp#* }"
34486
34487  # Input might be given as Windows format, start by converting to
34488  # unix format.
34489  new_path="$path"
34490
34491  windows_path="$new_path"
34492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34493    unix_path=`$CYGPATH -u "$windows_path"`
34494    new_path="$unix_path"
34495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34497    new_path="$unix_path"
34498  fi
34499
34500
34501  # Now try to locate executable using which
34502  new_path=`$WHICH "$new_path" 2> /dev/null`
34503
34504  if test "x$new_path" = x; then
34505    # Oops. Which didn't find the executable.
34506    # The splitting of arguments from the executable at a space might have been incorrect,
34507    # since paths with space are more likely in Windows. Give it another try with the whole
34508    # argument.
34509    path="$complete"
34510    arguments="EOL"
34511    new_path="$path"
34512
34513  windows_path="$new_path"
34514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34515    unix_path=`$CYGPATH -u "$windows_path"`
34516    new_path="$unix_path"
34517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34519    new_path="$unix_path"
34520  fi
34521
34522
34523    new_path=`$WHICH "$new_path" 2> /dev/null`
34524    # bat and cmd files are not always considered executable in MSYS causing which
34525    # to not find them
34526    if test "x$new_path" = x \
34527        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34528        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34529      new_path="$path"
34530
34531  windows_path="$new_path"
34532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34533    unix_path=`$CYGPATH -u "$windows_path"`
34534    new_path="$unix_path"
34535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34537    new_path="$unix_path"
34538  fi
34539
34540    fi
34541
34542    if test "x$new_path" = x; then
34543      # It's still not found. Now this is an unrecoverable error.
34544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34545$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34546      has_space=`$ECHO "$complete" | $GREP " "`
34547      if test "x$has_space" != x; then
34548        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34549$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34550      fi
34551      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34552    fi
34553  fi
34554
34555  # Now new_path has a complete unix path to the binary
34556  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34557    # Keep paths in /bin as-is, but remove trailing .exe if any
34558    new_path="${new_path/%.exe/}"
34559    # Do not save /bin paths to all_fixpath_prefixes!
34560  else
34561    # Not in mixed or Windows style, start by that.
34562    new_path=`cmd //c echo $new_path`
34563
34564  input_path="$new_path"
34565  # Check if we need to convert this using DOS-style short mode. If the path
34566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34567  # take no chances and rewrite it.
34568  # Note: m4 eats our [], so we need to use [ and ] instead.
34569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34570  if test "x$has_forbidden_chars" != x; then
34571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34572    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34573  fi
34574
34575    # Output is in $new_path
34576
34577  windows_path="$new_path"
34578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34579    unix_path=`$CYGPATH -u "$windows_path"`
34580    new_path="$unix_path"
34581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34583    new_path="$unix_path"
34584  fi
34585
34586    # remove trailing .exe if any
34587    new_path="${new_path/%.exe/}"
34588
34589    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34590    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34591  fi
34592
34593  else
34594    # We're on a posix platform. Hooray! :)
34595    # First separate the path from the arguments. This will split at the first
34596    # space.
34597    complete="$MT"
34598    path="${complete%% *}"
34599    tmp="$complete EOL"
34600    arguments="${tmp#* }"
34601
34602    # Cannot rely on the command "which" here since it doesn't always work.
34603    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34604    if test -z "$is_absolute_path"; then
34605      # Path to executable is not absolute. Find it.
34606      IFS_save="$IFS"
34607      IFS=:
34608      for p in $PATH; do
34609        if test -f "$p/$path" && test -x "$p/$path"; then
34610          new_path="$p/$path"
34611          break
34612        fi
34613      done
34614      IFS="$IFS_save"
34615    else
34616      # This is an absolute path, we can use it without further modifications.
34617      new_path="$path"
34618    fi
34619
34620    if test "x$new_path" = x; then
34621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34622$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34623      has_space=`$ECHO "$complete" | $GREP " "`
34624      if test "x$has_space" != x; then
34625        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34626$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34627      fi
34628      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34629    fi
34630  fi
34631
34632  # Now join together the path and the arguments once again
34633  if test "x$arguments" != xEOL; then
34634    new_complete="$new_path ${arguments% *}"
34635  else
34636    new_complete="$new_path"
34637  fi
34638
34639  if test "x$complete" != "x$new_complete"; then
34640    MT="$new_complete"
34641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34642$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34643  fi
34644
34645    # Setup the resource compiler (RC)
34646    # Extract the first word of "rc", so it can be a program name with args.
34647set dummy rc; ac_word=$2
34648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34649$as_echo_n "checking for $ac_word... " >&6; }
34650if ${ac_cv_prog_RC+:} false; then :
34651  $as_echo_n "(cached) " >&6
34652else
34653  if test -n "$RC"; then
34654  ac_cv_prog_RC="$RC" # Let the user override the test.
34655else
34656  ac_prog_rejected=no
34657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34658for as_dir in $PATH
34659do
34660  IFS=$as_save_IFS
34661  test -z "$as_dir" && as_dir=.
34662    for ac_exec_ext in '' $ac_executable_extensions; do
34663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34664    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34665       ac_prog_rejected=yes
34666       continue
34667     fi
34668    ac_cv_prog_RC="rc"
34669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34670    break 2
34671  fi
34672done
34673  done
34674IFS=$as_save_IFS
34675
34676if test $ac_prog_rejected = yes; then
34677  # We found a bogon in the path, so make sure we never use it.
34678  set dummy $ac_cv_prog_RC
34679  shift
34680  if test $# != 0; then
34681    # We chose a different compiler from the bogus one.
34682    # However, it has the same basename, so the bogon will be chosen
34683    # first if we set RC to just the basename; use the full file name.
34684    shift
34685    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34686  fi
34687fi
34688fi
34689fi
34690RC=$ac_cv_prog_RC
34691if test -n "$RC"; then
34692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34693$as_echo "$RC" >&6; }
34694else
34695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34696$as_echo "no" >&6; }
34697fi
34698
34699
34700
34701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34702
34703  # First separate the path from the arguments. This will split at the first
34704  # space.
34705  complete="$RC"
34706  path="${complete%% *}"
34707  tmp="$complete EOL"
34708  arguments="${tmp#* }"
34709
34710  # Input might be given as Windows format, start by converting to
34711  # unix format.
34712  new_path=`$CYGPATH -u "$path"`
34713
34714  # Now try to locate executable using which
34715  new_path=`$WHICH "$new_path" 2> /dev/null`
34716  # bat and cmd files are not always considered executable in cygwin causing which
34717  # to not find them
34718  if test "x$new_path" = x \
34719      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34720      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34721    new_path=`$CYGPATH -u "$path"`
34722  fi
34723  if test "x$new_path" = x; then
34724    # Oops. Which didn't find the executable.
34725    # The splitting of arguments from the executable at a space might have been incorrect,
34726    # since paths with space are more likely in Windows. Give it another try with the whole
34727    # argument.
34728    path="$complete"
34729    arguments="EOL"
34730    new_path=`$CYGPATH -u "$path"`
34731    new_path=`$WHICH "$new_path" 2> /dev/null`
34732    # bat and cmd files are not always considered executable in cygwin causing which
34733    # to not find them
34734    if test "x$new_path" = x \
34735        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34736        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34737      new_path=`$CYGPATH -u "$path"`
34738    fi
34739    if test "x$new_path" = x; then
34740      # It's still not found. Now this is an unrecoverable error.
34741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34742$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34743      has_space=`$ECHO "$complete" | $GREP " "`
34744      if test "x$has_space" != x; then
34745        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34746$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34747      fi
34748      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34749    fi
34750  fi
34751
34752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34755  # "foo.exe" is OK but "foo" is an error.
34756  #
34757  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34758  # It is also a way to make sure we got the proper file name for the real test later on.
34759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34760  if test "x$test_shortpath" = x; then
34761    # Short path failed, file does not exist as specified.
34762    # Try adding .exe or .cmd
34763    if test -f "${new_path}.exe"; then
34764      input_to_shortpath="${new_path}.exe"
34765    elif test -f "${new_path}.cmd"; then
34766      input_to_shortpath="${new_path}.cmd"
34767    else
34768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34769$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34770      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34771$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34772      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34773    fi
34774  else
34775    input_to_shortpath="$new_path"
34776  fi
34777
34778  # Call helper function which possibly converts this using DOS-style short mode.
34779  # If so, the updated path is stored in $new_path.
34780  new_path="$input_to_shortpath"
34781
34782  input_path="$input_to_shortpath"
34783  # Check if we need to convert this using DOS-style short mode. If the path
34784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34785  # take no chances and rewrite it.
34786  # Note: m4 eats our [], so we need to use [ and ] instead.
34787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34788  if test "x$has_forbidden_chars" != x; then
34789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34790    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34793      # Going to short mode and back again did indeed matter. Since short mode is
34794      # case insensitive, let's make it lowercase to improve readability.
34795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34796      # Now convert it back to Unix-stile (cygpath)
34797      input_path=`$CYGPATH -u "$shortmode_path"`
34798      new_path="$input_path"
34799    fi
34800  fi
34801
34802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34803  if test "x$test_cygdrive_prefix" = x; then
34804    # As a simple fix, exclude /usr/bin since it's not a real path.
34805    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34807      # a path prefixed by /cygdrive for fixpath to work.
34808      new_path="$CYGWIN_ROOT_PATH$input_path"
34809    fi
34810  fi
34811
34812  # remove trailing .exe if any
34813  new_path="${new_path/%.exe/}"
34814
34815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34816
34817  # First separate the path from the arguments. This will split at the first
34818  # space.
34819  complete="$RC"
34820  path="${complete%% *}"
34821  tmp="$complete EOL"
34822  arguments="${tmp#* }"
34823
34824  # Input might be given as Windows format, start by converting to
34825  # unix format.
34826  new_path="$path"
34827
34828  windows_path="$new_path"
34829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34830    unix_path=`$CYGPATH -u "$windows_path"`
34831    new_path="$unix_path"
34832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34834    new_path="$unix_path"
34835  fi
34836
34837
34838  # Now try to locate executable using which
34839  new_path=`$WHICH "$new_path" 2> /dev/null`
34840
34841  if test "x$new_path" = x; then
34842    # Oops. Which didn't find the executable.
34843    # The splitting of arguments from the executable at a space might have been incorrect,
34844    # since paths with space are more likely in Windows. Give it another try with the whole
34845    # argument.
34846    path="$complete"
34847    arguments="EOL"
34848    new_path="$path"
34849
34850  windows_path="$new_path"
34851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34852    unix_path=`$CYGPATH -u "$windows_path"`
34853    new_path="$unix_path"
34854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34856    new_path="$unix_path"
34857  fi
34858
34859
34860    new_path=`$WHICH "$new_path" 2> /dev/null`
34861    # bat and cmd files are not always considered executable in MSYS causing which
34862    # to not find them
34863    if test "x$new_path" = x \
34864        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34865        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34866      new_path="$path"
34867
34868  windows_path="$new_path"
34869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34870    unix_path=`$CYGPATH -u "$windows_path"`
34871    new_path="$unix_path"
34872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34874    new_path="$unix_path"
34875  fi
34876
34877    fi
34878
34879    if test "x$new_path" = x; then
34880      # It's still not found. Now this is an unrecoverable error.
34881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34882$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34883      has_space=`$ECHO "$complete" | $GREP " "`
34884      if test "x$has_space" != x; then
34885        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34886$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34887      fi
34888      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34889    fi
34890  fi
34891
34892  # Now new_path has a complete unix path to the binary
34893  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34894    # Keep paths in /bin as-is, but remove trailing .exe if any
34895    new_path="${new_path/%.exe/}"
34896    # Do not save /bin paths to all_fixpath_prefixes!
34897  else
34898    # Not in mixed or Windows style, start by that.
34899    new_path=`cmd //c echo $new_path`
34900
34901  input_path="$new_path"
34902  # Check if we need to convert this using DOS-style short mode. If the path
34903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34904  # take no chances and rewrite it.
34905  # Note: m4 eats our [], so we need to use [ and ] instead.
34906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34907  if test "x$has_forbidden_chars" != x; then
34908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34910  fi
34911
34912    # Output is in $new_path
34913
34914  windows_path="$new_path"
34915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34916    unix_path=`$CYGPATH -u "$windows_path"`
34917    new_path="$unix_path"
34918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34920    new_path="$unix_path"
34921  fi
34922
34923    # remove trailing .exe if any
34924    new_path="${new_path/%.exe/}"
34925
34926    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34927    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34928  fi
34929
34930  else
34931    # We're on a posix platform. Hooray! :)
34932    # First separate the path from the arguments. This will split at the first
34933    # space.
34934    complete="$RC"
34935    path="${complete%% *}"
34936    tmp="$complete EOL"
34937    arguments="${tmp#* }"
34938
34939    # Cannot rely on the command "which" here since it doesn't always work.
34940    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34941    if test -z "$is_absolute_path"; then
34942      # Path to executable is not absolute. Find it.
34943      IFS_save="$IFS"
34944      IFS=:
34945      for p in $PATH; do
34946        if test -f "$p/$path" && test -x "$p/$path"; then
34947          new_path="$p/$path"
34948          break
34949        fi
34950      done
34951      IFS="$IFS_save"
34952    else
34953      # This is an absolute path, we can use it without further modifications.
34954      new_path="$path"
34955    fi
34956
34957    if test "x$new_path" = x; then
34958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34959$as_echo "$as_me: The path of RC, 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}: This might be caused by spaces in the path, which is not allowed." >&5
34963$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34964      fi
34965      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34966    fi
34967  fi
34968
34969  # Now join together the path and the arguments once again
34970  if test "x$arguments" != xEOL; then
34971    new_complete="$new_path ${arguments% *}"
34972  else
34973    new_complete="$new_path"
34974  fi
34975
34976  if test "x$complete" != "x$new_complete"; then
34977    RC="$new_complete"
34978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34979$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34980  fi
34981
34982    # Extract the first word of "dumpbin", so it can be a program name with args.
34983set dummy dumpbin; ac_word=$2
34984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34985$as_echo_n "checking for $ac_word... " >&6; }
34986if ${ac_cv_prog_DUMPBIN+:} false; then :
34987  $as_echo_n "(cached) " >&6
34988else
34989  if test -n "$DUMPBIN"; then
34990  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34991else
34992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34993for as_dir in $PATH
34994do
34995  IFS=$as_save_IFS
34996  test -z "$as_dir" && as_dir=.
34997    for ac_exec_ext in '' $ac_executable_extensions; do
34998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34999    ac_cv_prog_DUMPBIN="dumpbin"
35000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35001    break 2
35002  fi
35003done
35004  done
35005IFS=$as_save_IFS
35006
35007fi
35008fi
35009DUMPBIN=$ac_cv_prog_DUMPBIN
35010if test -n "$DUMPBIN"; then
35011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35012$as_echo "$DUMPBIN" >&6; }
35013else
35014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35015$as_echo "no" >&6; }
35016fi
35017
35018
35019
35020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35021
35022  # First separate the path from the arguments. This will split at the first
35023  # space.
35024  complete="$DUMPBIN"
35025  path="${complete%% *}"
35026  tmp="$complete EOL"
35027  arguments="${tmp#* }"
35028
35029  # Input might be given as Windows format, start by converting to
35030  # unix format.
35031  new_path=`$CYGPATH -u "$path"`
35032
35033  # Now try to locate executable using which
35034  new_path=`$WHICH "$new_path" 2> /dev/null`
35035  # bat and cmd files are not always considered executable in cygwin causing which
35036  # to not find them
35037  if test "x$new_path" = x \
35038      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35039      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35040    new_path=`$CYGPATH -u "$path"`
35041  fi
35042  if test "x$new_path" = x; then
35043    # Oops. Which didn't find the executable.
35044    # The splitting of arguments from the executable at a space might have been incorrect,
35045    # since paths with space are more likely in Windows. Give it another try with the whole
35046    # argument.
35047    path="$complete"
35048    arguments="EOL"
35049    new_path=`$CYGPATH -u "$path"`
35050    new_path=`$WHICH "$new_path" 2> /dev/null`
35051    # bat and cmd files are not always considered executable in cygwin causing which
35052    # to not find them
35053    if test "x$new_path" = x \
35054        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35055        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35056      new_path=`$CYGPATH -u "$path"`
35057    fi
35058    if test "x$new_path" = x; then
35059      # It's still not found. Now this is an unrecoverable error.
35060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35061$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35062      has_space=`$ECHO "$complete" | $GREP " "`
35063      if test "x$has_space" != x; then
35064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35066      fi
35067      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35068    fi
35069  fi
35070
35071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35074  # "foo.exe" is OK but "foo" is an error.
35075  #
35076  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35077  # It is also a way to make sure we got the proper file name for the real test later on.
35078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35079  if test "x$test_shortpath" = x; then
35080    # Short path failed, file does not exist as specified.
35081    # Try adding .exe or .cmd
35082    if test -f "${new_path}.exe"; then
35083      input_to_shortpath="${new_path}.exe"
35084    elif test -f "${new_path}.cmd"; then
35085      input_to_shortpath="${new_path}.cmd"
35086    else
35087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35088$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35089      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35090$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35091      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35092    fi
35093  else
35094    input_to_shortpath="$new_path"
35095  fi
35096
35097  # Call helper function which possibly converts this using DOS-style short mode.
35098  # If so, the updated path is stored in $new_path.
35099  new_path="$input_to_shortpath"
35100
35101  input_path="$input_to_shortpath"
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35112      # Going to short mode and back again did indeed matter. Since short mode is
35113      # case insensitive, let's make it lowercase to improve readability.
35114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35115      # Now convert it back to Unix-stile (cygpath)
35116      input_path=`$CYGPATH -u "$shortmode_path"`
35117      new_path="$input_path"
35118    fi
35119  fi
35120
35121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35122  if test "x$test_cygdrive_prefix" = x; then
35123    # As a simple fix, exclude /usr/bin since it's not a real path.
35124    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35126      # a path prefixed by /cygdrive for fixpath to work.
35127      new_path="$CYGWIN_ROOT_PATH$input_path"
35128    fi
35129  fi
35130
35131  # remove trailing .exe if any
35132  new_path="${new_path/%.exe/}"
35133
35134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35135
35136  # First separate the path from the arguments. This will split at the first
35137  # space.
35138  complete="$DUMPBIN"
35139  path="${complete%% *}"
35140  tmp="$complete EOL"
35141  arguments="${tmp#* }"
35142
35143  # Input might be given as Windows format, start by converting to
35144  # unix format.
35145  new_path="$path"
35146
35147  windows_path="$new_path"
35148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35149    unix_path=`$CYGPATH -u "$windows_path"`
35150    new_path="$unix_path"
35151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35153    new_path="$unix_path"
35154  fi
35155
35156
35157  # Now try to locate executable using which
35158  new_path=`$WHICH "$new_path" 2> /dev/null`
35159
35160  if test "x$new_path" = x; then
35161    # Oops. Which didn't find the executable.
35162    # The splitting of arguments from the executable at a space might have been incorrect,
35163    # since paths with space are more likely in Windows. Give it another try with the whole
35164    # argument.
35165    path="$complete"
35166    arguments="EOL"
35167    new_path="$path"
35168
35169  windows_path="$new_path"
35170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35171    unix_path=`$CYGPATH -u "$windows_path"`
35172    new_path="$unix_path"
35173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35175    new_path="$unix_path"
35176  fi
35177
35178
35179    new_path=`$WHICH "$new_path" 2> /dev/null`
35180    # bat and cmd files are not always considered executable in MSYS causing which
35181    # to not find them
35182    if test "x$new_path" = x \
35183        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35184        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35185      new_path="$path"
35186
35187  windows_path="$new_path"
35188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35189    unix_path=`$CYGPATH -u "$windows_path"`
35190    new_path="$unix_path"
35191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35193    new_path="$unix_path"
35194  fi
35195
35196    fi
35197
35198    if test "x$new_path" = x; then
35199      # It's still not found. Now this is an unrecoverable error.
35200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35201$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35202      has_space=`$ECHO "$complete" | $GREP " "`
35203      if test "x$has_space" != x; then
35204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35206      fi
35207      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35208    fi
35209  fi
35210
35211  # Now new_path has a complete unix path to the binary
35212  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35213    # Keep paths in /bin as-is, but remove trailing .exe if any
35214    new_path="${new_path/%.exe/}"
35215    # Do not save /bin paths to all_fixpath_prefixes!
35216  else
35217    # Not in mixed or Windows style, start by that.
35218    new_path=`cmd //c echo $new_path`
35219
35220  input_path="$new_path"
35221  # Check if we need to convert this using DOS-style short mode. If the path
35222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35223  # take no chances and rewrite it.
35224  # Note: m4 eats our [], so we need to use [ and ] instead.
35225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35226  if test "x$has_forbidden_chars" != x; then
35227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35229  fi
35230
35231    # Output is in $new_path
35232
35233  windows_path="$new_path"
35234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35235    unix_path=`$CYGPATH -u "$windows_path"`
35236    new_path="$unix_path"
35237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35239    new_path="$unix_path"
35240  fi
35241
35242    # remove trailing .exe if any
35243    new_path="${new_path/%.exe/}"
35244
35245    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35246    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35247  fi
35248
35249  else
35250    # We're on a posix platform. Hooray! :)
35251    # First separate the path from the arguments. This will split at the first
35252    # space.
35253    complete="$DUMPBIN"
35254    path="${complete%% *}"
35255    tmp="$complete EOL"
35256    arguments="${tmp#* }"
35257
35258    # Cannot rely on the command "which" here since it doesn't always work.
35259    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35260    if test -z "$is_absolute_path"; then
35261      # Path to executable is not absolute. Find it.
35262      IFS_save="$IFS"
35263      IFS=:
35264      for p in $PATH; do
35265        if test -f "$p/$path" && test -x "$p/$path"; then
35266          new_path="$p/$path"
35267          break
35268        fi
35269      done
35270      IFS="$IFS_save"
35271    else
35272      # This is an absolute path, we can use it without further modifications.
35273      new_path="$path"
35274    fi
35275
35276    if test "x$new_path" = x; then
35277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35278$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35279      has_space=`$ECHO "$complete" | $GREP " "`
35280      if test "x$has_space" != x; then
35281        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35282$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35283      fi
35284      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35285    fi
35286  fi
35287
35288  # Now join together the path and the arguments once again
35289  if test "x$arguments" != xEOL; then
35290    new_complete="$new_path ${arguments% *}"
35291  else
35292    new_complete="$new_path"
35293  fi
35294
35295  if test "x$complete" != "x$new_complete"; then
35296    DUMPBIN="$new_complete"
35297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35298$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35299  fi
35300
35301  fi
35302
35303  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35304
35305
35306  # Publish this variable in the help.
35307
35308
35309  if test "x$STRIP" = x; then
35310    # The variable is not set by user, try to locate tool using the code snippet
35311    for ac_prog in strip
35312do
35313  # Extract the first word of "$ac_prog", so it can be a program name with args.
35314set dummy $ac_prog; ac_word=$2
35315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35316$as_echo_n "checking for $ac_word... " >&6; }
35317if ${ac_cv_path_STRIP+:} false; then :
35318  $as_echo_n "(cached) " >&6
35319else
35320  case $STRIP in
35321  [\\/]* | ?:[\\/]*)
35322  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35323  ;;
35324  *)
35325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35326for as_dir in $PATH
35327do
35328  IFS=$as_save_IFS
35329  test -z "$as_dir" && as_dir=.
35330    for ac_exec_ext in '' $ac_executable_extensions; do
35331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35332    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35334    break 2
35335  fi
35336done
35337  done
35338IFS=$as_save_IFS
35339
35340  ;;
35341esac
35342fi
35343STRIP=$ac_cv_path_STRIP
35344if test -n "$STRIP"; then
35345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35346$as_echo "$STRIP" >&6; }
35347else
35348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35349$as_echo "no" >&6; }
35350fi
35351
35352
35353  test -n "$STRIP" && break
35354done
35355
35356  else
35357    # The variable is set, but is it from the command line or the environment?
35358
35359    # Try to remove the string !STRIP! from our list.
35360    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35361    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35362      # If it failed, the variable was not from the command line. Ignore it,
35363      # but warn the user (except for BASH, which is always set by the calling BASH).
35364      if test "xSTRIP" != xBASH; then
35365        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35366$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35367      fi
35368      # Try to locate tool using the code snippet
35369      for ac_prog in strip
35370do
35371  # Extract the first word of "$ac_prog", so it can be a program name with args.
35372set dummy $ac_prog; ac_word=$2
35373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35374$as_echo_n "checking for $ac_word... " >&6; }
35375if ${ac_cv_path_STRIP+:} false; then :
35376  $as_echo_n "(cached) " >&6
35377else
35378  case $STRIP in
35379  [\\/]* | ?:[\\/]*)
35380  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35381  ;;
35382  *)
35383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35384for as_dir in $PATH
35385do
35386  IFS=$as_save_IFS
35387  test -z "$as_dir" && as_dir=.
35388    for ac_exec_ext in '' $ac_executable_extensions; do
35389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35390    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35392    break 2
35393  fi
35394done
35395  done
35396IFS=$as_save_IFS
35397
35398  ;;
35399esac
35400fi
35401STRIP=$ac_cv_path_STRIP
35402if test -n "$STRIP"; then
35403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35404$as_echo "$STRIP" >&6; }
35405else
35406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35407$as_echo "no" >&6; }
35408fi
35409
35410
35411  test -n "$STRIP" && break
35412done
35413
35414    else
35415      # If it succeeded, then it was overridden by the user. We will use it
35416      # for the tool.
35417
35418      # First remove it from the list of overridden variables, so we can test
35419      # for unknown variables in the end.
35420      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35421
35422      # Check if the provided tool contains a complete path.
35423      tool_specified="$STRIP"
35424      tool_basename="${tool_specified##*/}"
35425      if test "x$tool_basename" = "x$tool_specified"; then
35426        # A command without a complete path is provided, search $PATH.
35427        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35428$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35429        # Extract the first word of "$tool_basename", so it can be a program name with args.
35430set dummy $tool_basename; ac_word=$2
35431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35432$as_echo_n "checking for $ac_word... " >&6; }
35433if ${ac_cv_path_STRIP+:} false; then :
35434  $as_echo_n "(cached) " >&6
35435else
35436  case $STRIP in
35437  [\\/]* | ?:[\\/]*)
35438  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35439  ;;
35440  *)
35441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35442for as_dir in $PATH
35443do
35444  IFS=$as_save_IFS
35445  test -z "$as_dir" && as_dir=.
35446    for ac_exec_ext in '' $ac_executable_extensions; do
35447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35448    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35450    break 2
35451  fi
35452done
35453  done
35454IFS=$as_save_IFS
35455
35456  ;;
35457esac
35458fi
35459STRIP=$ac_cv_path_STRIP
35460if test -n "$STRIP"; then
35461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35462$as_echo "$STRIP" >&6; }
35463else
35464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35465$as_echo "no" >&6; }
35466fi
35467
35468
35469        if test "x$STRIP" = x; then
35470          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35471        fi
35472      else
35473        # Otherwise we believe it is a complete path. Use it as it is.
35474        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35475$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35476        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35477$as_echo_n "checking for STRIP... " >&6; }
35478        if test ! -x "$tool_specified"; then
35479          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35480$as_echo "not found" >&6; }
35481          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35482        fi
35483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35484$as_echo "$tool_specified" >&6; }
35485      fi
35486    fi
35487  fi
35488
35489
35490
35491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35492
35493  # First separate the path from the arguments. This will split at the first
35494  # space.
35495  complete="$STRIP"
35496  path="${complete%% *}"
35497  tmp="$complete EOL"
35498  arguments="${tmp#* }"
35499
35500  # Input might be given as Windows format, start by converting to
35501  # unix format.
35502  new_path=`$CYGPATH -u "$path"`
35503
35504  # Now try to locate executable using which
35505  new_path=`$WHICH "$new_path" 2> /dev/null`
35506  # bat and cmd files are not always considered executable in cygwin causing which
35507  # to not find them
35508  if test "x$new_path" = x \
35509      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35510      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35511    new_path=`$CYGPATH -u "$path"`
35512  fi
35513  if test "x$new_path" = x; then
35514    # Oops. Which didn't find the executable.
35515    # The splitting of arguments from the executable at a space might have been incorrect,
35516    # since paths with space are more likely in Windows. Give it another try with the whole
35517    # argument.
35518    path="$complete"
35519    arguments="EOL"
35520    new_path=`$CYGPATH -u "$path"`
35521    new_path=`$WHICH "$new_path" 2> /dev/null`
35522    # bat and cmd files are not always considered executable in cygwin causing which
35523    # to not find them
35524    if test "x$new_path" = x \
35525        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35526        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35527      new_path=`$CYGPATH -u "$path"`
35528    fi
35529    if test "x$new_path" = x; then
35530      # It's still not found. Now this is an unrecoverable error.
35531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35532$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35533      has_space=`$ECHO "$complete" | $GREP " "`
35534      if test "x$has_space" != x; then
35535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35537      fi
35538      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35539    fi
35540  fi
35541
35542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35545  # "foo.exe" is OK but "foo" is an error.
35546  #
35547  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35548  # It is also a way to make sure we got the proper file name for the real test later on.
35549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35550  if test "x$test_shortpath" = x; then
35551    # Short path failed, file does not exist as specified.
35552    # Try adding .exe or .cmd
35553    if test -f "${new_path}.exe"; then
35554      input_to_shortpath="${new_path}.exe"
35555    elif test -f "${new_path}.cmd"; then
35556      input_to_shortpath="${new_path}.cmd"
35557    else
35558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35559$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35560      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35561$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35562      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35563    fi
35564  else
35565    input_to_shortpath="$new_path"
35566  fi
35567
35568  # Call helper function which possibly converts this using DOS-style short mode.
35569  # If so, the updated path is stored in $new_path.
35570  new_path="$input_to_shortpath"
35571
35572  input_path="$input_to_shortpath"
35573  # Check if we need to convert this using DOS-style short mode. If the path
35574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35575  # take no chances and rewrite it.
35576  # Note: m4 eats our [], so we need to use [ and ] instead.
35577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35578  if test "x$has_forbidden_chars" != x; then
35579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35583      # Going to short mode and back again did indeed matter. Since short mode is
35584      # case insensitive, let's make it lowercase to improve readability.
35585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35586      # Now convert it back to Unix-stile (cygpath)
35587      input_path=`$CYGPATH -u "$shortmode_path"`
35588      new_path="$input_path"
35589    fi
35590  fi
35591
35592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35593  if test "x$test_cygdrive_prefix" = x; then
35594    # As a simple fix, exclude /usr/bin since it's not a real path.
35595    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35597      # a path prefixed by /cygdrive for fixpath to work.
35598      new_path="$CYGWIN_ROOT_PATH$input_path"
35599    fi
35600  fi
35601
35602  # remove trailing .exe if any
35603  new_path="${new_path/%.exe/}"
35604
35605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35606
35607  # First separate the path from the arguments. This will split at the first
35608  # space.
35609  complete="$STRIP"
35610  path="${complete%% *}"
35611  tmp="$complete EOL"
35612  arguments="${tmp#* }"
35613
35614  # Input might be given as Windows format, start by converting to
35615  # unix format.
35616  new_path="$path"
35617
35618  windows_path="$new_path"
35619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35620    unix_path=`$CYGPATH -u "$windows_path"`
35621    new_path="$unix_path"
35622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35624    new_path="$unix_path"
35625  fi
35626
35627
35628  # Now try to locate executable using which
35629  new_path=`$WHICH "$new_path" 2> /dev/null`
35630
35631  if test "x$new_path" = x; then
35632    # Oops. Which didn't find the executable.
35633    # The splitting of arguments from the executable at a space might have been incorrect,
35634    # since paths with space are more likely in Windows. Give it another try with the whole
35635    # argument.
35636    path="$complete"
35637    arguments="EOL"
35638    new_path="$path"
35639
35640  windows_path="$new_path"
35641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35642    unix_path=`$CYGPATH -u "$windows_path"`
35643    new_path="$unix_path"
35644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35646    new_path="$unix_path"
35647  fi
35648
35649
35650    new_path=`$WHICH "$new_path" 2> /dev/null`
35651    # bat and cmd files are not always considered executable in MSYS causing which
35652    # to not find them
35653    if test "x$new_path" = x \
35654        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35655        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35656      new_path="$path"
35657
35658  windows_path="$new_path"
35659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35660    unix_path=`$CYGPATH -u "$windows_path"`
35661    new_path="$unix_path"
35662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35664    new_path="$unix_path"
35665  fi
35666
35667    fi
35668
35669    if test "x$new_path" = x; then
35670      # It's still not found. Now this is an unrecoverable error.
35671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35672$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35673      has_space=`$ECHO "$complete" | $GREP " "`
35674      if test "x$has_space" != x; then
35675        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35676$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35677      fi
35678      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35679    fi
35680  fi
35681
35682  # Now new_path has a complete unix path to the binary
35683  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35684    # Keep paths in /bin as-is, but remove trailing .exe if any
35685    new_path="${new_path/%.exe/}"
35686    # Do not save /bin paths to all_fixpath_prefixes!
35687  else
35688    # Not in mixed or Windows style, start by that.
35689    new_path=`cmd //c echo $new_path`
35690
35691  input_path="$new_path"
35692  # Check if we need to convert this using DOS-style short mode. If the path
35693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35694  # take no chances and rewrite it.
35695  # Note: m4 eats our [], so we need to use [ and ] instead.
35696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35697  if test "x$has_forbidden_chars" != x; then
35698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35699    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35700  fi
35701
35702    # Output is in $new_path
35703
35704  windows_path="$new_path"
35705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35706    unix_path=`$CYGPATH -u "$windows_path"`
35707    new_path="$unix_path"
35708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35710    new_path="$unix_path"
35711  fi
35712
35713    # remove trailing .exe if any
35714    new_path="${new_path/%.exe/}"
35715
35716    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35717    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35718  fi
35719
35720  else
35721    # We're on a posix platform. Hooray! :)
35722    # First separate the path from the arguments. This will split at the first
35723    # space.
35724    complete="$STRIP"
35725    path="${complete%% *}"
35726    tmp="$complete EOL"
35727    arguments="${tmp#* }"
35728
35729    # Cannot rely on the command "which" here since it doesn't always work.
35730    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35731    if test -z "$is_absolute_path"; then
35732      # Path to executable is not absolute. Find it.
35733      IFS_save="$IFS"
35734      IFS=:
35735      for p in $PATH; do
35736        if test -f "$p/$path" && test -x "$p/$path"; then
35737          new_path="$p/$path"
35738          break
35739        fi
35740      done
35741      IFS="$IFS_save"
35742    else
35743      # This is an absolute path, we can use it without further modifications.
35744      new_path="$path"
35745    fi
35746
35747    if test "x$new_path" = x; then
35748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35749$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35750      has_space=`$ECHO "$complete" | $GREP " "`
35751      if test "x$has_space" != x; then
35752        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35753$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35754      fi
35755      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35756    fi
35757  fi
35758
35759  # Now join together the path and the arguments once again
35760  if test "x$arguments" != xEOL; then
35761    new_complete="$new_path ${arguments% *}"
35762  else
35763    new_complete="$new_path"
35764  fi
35765
35766  if test "x$complete" != "x$new_complete"; then
35767    STRIP="$new_complete"
35768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35769$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35770  fi
35771
35772
35773
35774  # Publish this variable in the help.
35775
35776
35777  if test "x$NM" = x; then
35778    # The variable is not set by user, try to locate tool using the code snippet
35779    for ac_prog in nm
35780do
35781  # Extract the first word of "$ac_prog", so it can be a program name with args.
35782set dummy $ac_prog; ac_word=$2
35783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35784$as_echo_n "checking for $ac_word... " >&6; }
35785if ${ac_cv_path_NM+:} false; then :
35786  $as_echo_n "(cached) " >&6
35787else
35788  case $NM in
35789  [\\/]* | ?:[\\/]*)
35790  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35791  ;;
35792  *)
35793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35794for as_dir in $PATH
35795do
35796  IFS=$as_save_IFS
35797  test -z "$as_dir" && as_dir=.
35798    for ac_exec_ext in '' $ac_executable_extensions; do
35799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35800    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35802    break 2
35803  fi
35804done
35805  done
35806IFS=$as_save_IFS
35807
35808  ;;
35809esac
35810fi
35811NM=$ac_cv_path_NM
35812if test -n "$NM"; then
35813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35814$as_echo "$NM" >&6; }
35815else
35816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35817$as_echo "no" >&6; }
35818fi
35819
35820
35821  test -n "$NM" && break
35822done
35823
35824  else
35825    # The variable is set, but is it from the command line or the environment?
35826
35827    # Try to remove the string !NM! from our list.
35828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35830      # If it failed, the variable was not from the command line. Ignore it,
35831      # but warn the user (except for BASH, which is always set by the calling BASH).
35832      if test "xNM" != xBASH; then
35833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35834$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35835      fi
35836      # Try to locate tool using the code snippet
35837      for ac_prog in nm
35838do
35839  # Extract the first word of "$ac_prog", so it can be a program name with args.
35840set dummy $ac_prog; ac_word=$2
35841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35842$as_echo_n "checking for $ac_word... " >&6; }
35843if ${ac_cv_path_NM+:} false; then :
35844  $as_echo_n "(cached) " >&6
35845else
35846  case $NM in
35847  [\\/]* | ?:[\\/]*)
35848  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35849  ;;
35850  *)
35851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35852for as_dir in $PATH
35853do
35854  IFS=$as_save_IFS
35855  test -z "$as_dir" && as_dir=.
35856    for ac_exec_ext in '' $ac_executable_extensions; do
35857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35858    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35860    break 2
35861  fi
35862done
35863  done
35864IFS=$as_save_IFS
35865
35866  ;;
35867esac
35868fi
35869NM=$ac_cv_path_NM
35870if test -n "$NM"; then
35871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35872$as_echo "$NM" >&6; }
35873else
35874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35875$as_echo "no" >&6; }
35876fi
35877
35878
35879  test -n "$NM" && break
35880done
35881
35882    else
35883      # If it succeeded, then it was overridden by the user. We will use it
35884      # for the tool.
35885
35886      # First remove it from the list of overridden variables, so we can test
35887      # for unknown variables in the end.
35888      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35889
35890      # Check if the provided tool contains a complete path.
35891      tool_specified="$NM"
35892      tool_basename="${tool_specified##*/}"
35893      if test "x$tool_basename" = "x$tool_specified"; then
35894        # A command without a complete path is provided, search $PATH.
35895        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35896$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35897        # Extract the first word of "$tool_basename", so it can be a program name with args.
35898set dummy $tool_basename; ac_word=$2
35899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35900$as_echo_n "checking for $ac_word... " >&6; }
35901if ${ac_cv_path_NM+:} false; then :
35902  $as_echo_n "(cached) " >&6
35903else
35904  case $NM in
35905  [\\/]* | ?:[\\/]*)
35906  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35907  ;;
35908  *)
35909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35910for as_dir in $PATH
35911do
35912  IFS=$as_save_IFS
35913  test -z "$as_dir" && as_dir=.
35914    for ac_exec_ext in '' $ac_executable_extensions; do
35915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35916    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35918    break 2
35919  fi
35920done
35921  done
35922IFS=$as_save_IFS
35923
35924  ;;
35925esac
35926fi
35927NM=$ac_cv_path_NM
35928if test -n "$NM"; then
35929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35930$as_echo "$NM" >&6; }
35931else
35932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35933$as_echo "no" >&6; }
35934fi
35935
35936
35937        if test "x$NM" = x; then
35938          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35939        fi
35940      else
35941        # Otherwise we believe it is a complete path. Use it as it is.
35942        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35943$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35944        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35945$as_echo_n "checking for NM... " >&6; }
35946        if test ! -x "$tool_specified"; then
35947          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35948$as_echo "not found" >&6; }
35949          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35950        fi
35951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35952$as_echo "$tool_specified" >&6; }
35953      fi
35954    fi
35955  fi
35956
35957
35958
35959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35960
35961  # First separate the path from the arguments. This will split at the first
35962  # space.
35963  complete="$NM"
35964  path="${complete%% *}"
35965  tmp="$complete EOL"
35966  arguments="${tmp#* }"
35967
35968  # Input might be given as Windows format, start by converting to
35969  # unix format.
35970  new_path=`$CYGPATH -u "$path"`
35971
35972  # Now try to locate executable using which
35973  new_path=`$WHICH "$new_path" 2> /dev/null`
35974  # bat and cmd files are not always considered executable in cygwin causing which
35975  # to not find them
35976  if test "x$new_path" = x \
35977      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35978      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35979    new_path=`$CYGPATH -u "$path"`
35980  fi
35981  if test "x$new_path" = x; then
35982    # Oops. Which didn't find the executable.
35983    # The splitting of arguments from the executable at a space might have been incorrect,
35984    # since paths with space are more likely in Windows. Give it another try with the whole
35985    # argument.
35986    path="$complete"
35987    arguments="EOL"
35988    new_path=`$CYGPATH -u "$path"`
35989    new_path=`$WHICH "$new_path" 2> /dev/null`
35990    # bat and cmd files are not always considered executable in cygwin causing which
35991    # to not find them
35992    if test "x$new_path" = x \
35993        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35994        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35995      new_path=`$CYGPATH -u "$path"`
35996    fi
35997    if test "x$new_path" = x; then
35998      # It's still not found. Now this is an unrecoverable error.
35999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36000$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36001      has_space=`$ECHO "$complete" | $GREP " "`
36002      if test "x$has_space" != x; then
36003        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36004$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36005      fi
36006      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36007    fi
36008  fi
36009
36010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36013  # "foo.exe" is OK but "foo" is an error.
36014  #
36015  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36016  # It is also a way to make sure we got the proper file name for the real test later on.
36017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36018  if test "x$test_shortpath" = x; then
36019    # Short path failed, file does not exist as specified.
36020    # Try adding .exe or .cmd
36021    if test -f "${new_path}.exe"; then
36022      input_to_shortpath="${new_path}.exe"
36023    elif test -f "${new_path}.cmd"; then
36024      input_to_shortpath="${new_path}.cmd"
36025    else
36026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36027$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36028      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36029$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36030      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36031    fi
36032  else
36033    input_to_shortpath="$new_path"
36034  fi
36035
36036  # Call helper function which possibly converts this using DOS-style short mode.
36037  # If so, the updated path is stored in $new_path.
36038  new_path="$input_to_shortpath"
36039
36040  input_path="$input_to_shortpath"
36041  # Check if we need to convert this using DOS-style short mode. If the path
36042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36043  # take no chances and rewrite it.
36044  # Note: m4 eats our [], so we need to use [ and ] instead.
36045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36046  if test "x$has_forbidden_chars" != x; then
36047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36051      # Going to short mode and back again did indeed matter. Since short mode is
36052      # case insensitive, let's make it lowercase to improve readability.
36053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36054      # Now convert it back to Unix-stile (cygpath)
36055      input_path=`$CYGPATH -u "$shortmode_path"`
36056      new_path="$input_path"
36057    fi
36058  fi
36059
36060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36061  if test "x$test_cygdrive_prefix" = x; then
36062    # As a simple fix, exclude /usr/bin since it's not a real path.
36063    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36065      # a path prefixed by /cygdrive for fixpath to work.
36066      new_path="$CYGWIN_ROOT_PATH$input_path"
36067    fi
36068  fi
36069
36070  # remove trailing .exe if any
36071  new_path="${new_path/%.exe/}"
36072
36073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36074
36075  # First separate the path from the arguments. This will split at the first
36076  # space.
36077  complete="$NM"
36078  path="${complete%% *}"
36079  tmp="$complete EOL"
36080  arguments="${tmp#* }"
36081
36082  # Input might be given as Windows format, start by converting to
36083  # unix format.
36084  new_path="$path"
36085
36086  windows_path="$new_path"
36087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36088    unix_path=`$CYGPATH -u "$windows_path"`
36089    new_path="$unix_path"
36090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36092    new_path="$unix_path"
36093  fi
36094
36095
36096  # Now try to locate executable using which
36097  new_path=`$WHICH "$new_path" 2> /dev/null`
36098
36099  if test "x$new_path" = x; then
36100    # Oops. Which didn't find the executable.
36101    # The splitting of arguments from the executable at a space might have been incorrect,
36102    # since paths with space are more likely in Windows. Give it another try with the whole
36103    # argument.
36104    path="$complete"
36105    arguments="EOL"
36106    new_path="$path"
36107
36108  windows_path="$new_path"
36109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36110    unix_path=`$CYGPATH -u "$windows_path"`
36111    new_path="$unix_path"
36112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36114    new_path="$unix_path"
36115  fi
36116
36117
36118    new_path=`$WHICH "$new_path" 2> /dev/null`
36119    # bat and cmd files are not always considered executable in MSYS causing which
36120    # to not find them
36121    if test "x$new_path" = x \
36122        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36123        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36124      new_path="$path"
36125
36126  windows_path="$new_path"
36127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36128    unix_path=`$CYGPATH -u "$windows_path"`
36129    new_path="$unix_path"
36130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36132    new_path="$unix_path"
36133  fi
36134
36135    fi
36136
36137    if test "x$new_path" = x; then
36138      # It's still not found. Now this is an unrecoverable error.
36139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36140$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36141      has_space=`$ECHO "$complete" | $GREP " "`
36142      if test "x$has_space" != x; then
36143        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36144$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36145      fi
36146      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36147    fi
36148  fi
36149
36150  # Now new_path has a complete unix path to the binary
36151  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36152    # Keep paths in /bin as-is, but remove trailing .exe if any
36153    new_path="${new_path/%.exe/}"
36154    # Do not save /bin paths to all_fixpath_prefixes!
36155  else
36156    # Not in mixed or Windows style, start by that.
36157    new_path=`cmd //c echo $new_path`
36158
36159  input_path="$new_path"
36160  # Check if we need to convert this using DOS-style short mode. If the path
36161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36162  # take no chances and rewrite it.
36163  # Note: m4 eats our [], so we need to use [ and ] instead.
36164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36165  if test "x$has_forbidden_chars" != x; then
36166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36168  fi
36169
36170    # Output is in $new_path
36171
36172  windows_path="$new_path"
36173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36174    unix_path=`$CYGPATH -u "$windows_path"`
36175    new_path="$unix_path"
36176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36178    new_path="$unix_path"
36179  fi
36180
36181    # remove trailing .exe if any
36182    new_path="${new_path/%.exe/}"
36183
36184    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36185    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36186  fi
36187
36188  else
36189    # We're on a posix platform. Hooray! :)
36190    # First separate the path from the arguments. This will split at the first
36191    # space.
36192    complete="$NM"
36193    path="${complete%% *}"
36194    tmp="$complete EOL"
36195    arguments="${tmp#* }"
36196
36197    # Cannot rely on the command "which" here since it doesn't always work.
36198    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36199    if test -z "$is_absolute_path"; then
36200      # Path to executable is not absolute. Find it.
36201      IFS_save="$IFS"
36202      IFS=:
36203      for p in $PATH; do
36204        if test -f "$p/$path" && test -x "$p/$path"; then
36205          new_path="$p/$path"
36206          break
36207        fi
36208      done
36209      IFS="$IFS_save"
36210    else
36211      # This is an absolute path, we can use it without further modifications.
36212      new_path="$path"
36213    fi
36214
36215    if test "x$new_path" = x; then
36216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36217$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36218      has_space=`$ECHO "$complete" | $GREP " "`
36219      if test "x$has_space" != x; then
36220        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36221$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36222      fi
36223      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36224    fi
36225  fi
36226
36227  # Now join together the path and the arguments once again
36228  if test "x$arguments" != xEOL; then
36229    new_complete="$new_path ${arguments% *}"
36230  else
36231    new_complete="$new_path"
36232  fi
36233
36234  if test "x$complete" != "x$new_complete"; then
36235    NM="$new_complete"
36236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36237$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36238  fi
36239
36240
36241
36242  # Publish this variable in the help.
36243
36244
36245  if test "x$GNM" = x; then
36246    # The variable is not set by user, try to locate tool using the code snippet
36247    for ac_prog in gnm
36248do
36249  # Extract the first word of "$ac_prog", so it can be a program name with args.
36250set dummy $ac_prog; ac_word=$2
36251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36252$as_echo_n "checking for $ac_word... " >&6; }
36253if ${ac_cv_path_GNM+:} false; then :
36254  $as_echo_n "(cached) " >&6
36255else
36256  case $GNM in
36257  [\\/]* | ?:[\\/]*)
36258  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36259  ;;
36260  *)
36261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36262for as_dir in $PATH
36263do
36264  IFS=$as_save_IFS
36265  test -z "$as_dir" && as_dir=.
36266    for ac_exec_ext in '' $ac_executable_extensions; do
36267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36268    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36270    break 2
36271  fi
36272done
36273  done
36274IFS=$as_save_IFS
36275
36276  ;;
36277esac
36278fi
36279GNM=$ac_cv_path_GNM
36280if test -n "$GNM"; then
36281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36282$as_echo "$GNM" >&6; }
36283else
36284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36285$as_echo "no" >&6; }
36286fi
36287
36288
36289  test -n "$GNM" && break
36290done
36291
36292  else
36293    # The variable is set, but is it from the command line or the environment?
36294
36295    # Try to remove the string !GNM! from our list.
36296    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36297    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36298      # If it failed, the variable was not from the command line. Ignore it,
36299      # but warn the user (except for BASH, which is always set by the calling BASH).
36300      if test "xGNM" != xBASH; then
36301        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36302$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36303      fi
36304      # Try to locate tool using the code snippet
36305      for ac_prog in gnm
36306do
36307  # Extract the first word of "$ac_prog", so it can be a program name with args.
36308set dummy $ac_prog; ac_word=$2
36309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36310$as_echo_n "checking for $ac_word... " >&6; }
36311if ${ac_cv_path_GNM+:} false; then :
36312  $as_echo_n "(cached) " >&6
36313else
36314  case $GNM in
36315  [\\/]* | ?:[\\/]*)
36316  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36317  ;;
36318  *)
36319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36320for as_dir in $PATH
36321do
36322  IFS=$as_save_IFS
36323  test -z "$as_dir" && as_dir=.
36324    for ac_exec_ext in '' $ac_executable_extensions; do
36325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36326    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36328    break 2
36329  fi
36330done
36331  done
36332IFS=$as_save_IFS
36333
36334  ;;
36335esac
36336fi
36337GNM=$ac_cv_path_GNM
36338if test -n "$GNM"; then
36339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36340$as_echo "$GNM" >&6; }
36341else
36342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36343$as_echo "no" >&6; }
36344fi
36345
36346
36347  test -n "$GNM" && break
36348done
36349
36350    else
36351      # If it succeeded, then it was overridden by the user. We will use it
36352      # for the tool.
36353
36354      # First remove it from the list of overridden variables, so we can test
36355      # for unknown variables in the end.
36356      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36357
36358      # Check if the provided tool contains a complete path.
36359      tool_specified="$GNM"
36360      tool_basename="${tool_specified##*/}"
36361      if test "x$tool_basename" = "x$tool_specified"; then
36362        # A command without a complete path is provided, search $PATH.
36363        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36364$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36365        # Extract the first word of "$tool_basename", so it can be a program name with args.
36366set dummy $tool_basename; ac_word=$2
36367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36368$as_echo_n "checking for $ac_word... " >&6; }
36369if ${ac_cv_path_GNM+:} false; then :
36370  $as_echo_n "(cached) " >&6
36371else
36372  case $GNM in
36373  [\\/]* | ?:[\\/]*)
36374  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36375  ;;
36376  *)
36377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36378for as_dir in $PATH
36379do
36380  IFS=$as_save_IFS
36381  test -z "$as_dir" && as_dir=.
36382    for ac_exec_ext in '' $ac_executable_extensions; do
36383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36384    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36386    break 2
36387  fi
36388done
36389  done
36390IFS=$as_save_IFS
36391
36392  ;;
36393esac
36394fi
36395GNM=$ac_cv_path_GNM
36396if test -n "$GNM"; then
36397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36398$as_echo "$GNM" >&6; }
36399else
36400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36401$as_echo "no" >&6; }
36402fi
36403
36404
36405        if test "x$GNM" = x; then
36406          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36407        fi
36408      else
36409        # Otherwise we believe it is a complete path. Use it as it is.
36410        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36411$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36412        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36413$as_echo_n "checking for GNM... " >&6; }
36414        if test ! -x "$tool_specified"; then
36415          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36416$as_echo "not found" >&6; }
36417          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36418        fi
36419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36420$as_echo "$tool_specified" >&6; }
36421      fi
36422    fi
36423  fi
36424
36425
36426
36427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36428
36429  # First separate the path from the arguments. This will split at the first
36430  # space.
36431  complete="$GNM"
36432  path="${complete%% *}"
36433  tmp="$complete EOL"
36434  arguments="${tmp#* }"
36435
36436  # Input might be given as Windows format, start by converting to
36437  # unix format.
36438  new_path=`$CYGPATH -u "$path"`
36439
36440  # Now try to locate executable using which
36441  new_path=`$WHICH "$new_path" 2> /dev/null`
36442  # bat and cmd files are not always considered executable in cygwin causing which
36443  # to not find them
36444  if test "x$new_path" = x \
36445      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36446      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36447    new_path=`$CYGPATH -u "$path"`
36448  fi
36449  if test "x$new_path" = x; then
36450    # Oops. Which didn't find the executable.
36451    # The splitting of arguments from the executable at a space might have been incorrect,
36452    # since paths with space are more likely in Windows. Give it another try with the whole
36453    # argument.
36454    path="$complete"
36455    arguments="EOL"
36456    new_path=`$CYGPATH -u "$path"`
36457    new_path=`$WHICH "$new_path" 2> /dev/null`
36458    # bat and cmd files are not always considered executable in cygwin causing which
36459    # to not find them
36460    if test "x$new_path" = x \
36461        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36462        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36463      new_path=`$CYGPATH -u "$path"`
36464    fi
36465    if test "x$new_path" = x; then
36466      # It's still not found. Now this is an unrecoverable error.
36467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36468$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36469      has_space=`$ECHO "$complete" | $GREP " "`
36470      if test "x$has_space" != x; then
36471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36473      fi
36474      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36475    fi
36476  fi
36477
36478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36481  # "foo.exe" is OK but "foo" is an error.
36482  #
36483  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36484  # It is also a way to make sure we got the proper file name for the real test later on.
36485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36486  if test "x$test_shortpath" = x; then
36487    # Short path failed, file does not exist as specified.
36488    # Try adding .exe or .cmd
36489    if test -f "${new_path}.exe"; then
36490      input_to_shortpath="${new_path}.exe"
36491    elif test -f "${new_path}.cmd"; then
36492      input_to_shortpath="${new_path}.cmd"
36493    else
36494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36495$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36496      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36497$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36498      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36499    fi
36500  else
36501    input_to_shortpath="$new_path"
36502  fi
36503
36504  # Call helper function which possibly converts this using DOS-style short mode.
36505  # If so, the updated path is stored in $new_path.
36506  new_path="$input_to_shortpath"
36507
36508  input_path="$input_to_shortpath"
36509  # Check if we need to convert this using DOS-style short mode. If the path
36510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36511  # take no chances and rewrite it.
36512  # Note: m4 eats our [], so we need to use [ and ] instead.
36513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36514  if test "x$has_forbidden_chars" != x; then
36515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36519      # Going to short mode and back again did indeed matter. Since short mode is
36520      # case insensitive, let's make it lowercase to improve readability.
36521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36522      # Now convert it back to Unix-stile (cygpath)
36523      input_path=`$CYGPATH -u "$shortmode_path"`
36524      new_path="$input_path"
36525    fi
36526  fi
36527
36528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36529  if test "x$test_cygdrive_prefix" = x; then
36530    # As a simple fix, exclude /usr/bin since it's not a real path.
36531    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36533      # a path prefixed by /cygdrive for fixpath to work.
36534      new_path="$CYGWIN_ROOT_PATH$input_path"
36535    fi
36536  fi
36537
36538  # remove trailing .exe if any
36539  new_path="${new_path/%.exe/}"
36540
36541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36542
36543  # First separate the path from the arguments. This will split at the first
36544  # space.
36545  complete="$GNM"
36546  path="${complete%% *}"
36547  tmp="$complete EOL"
36548  arguments="${tmp#* }"
36549
36550  # Input might be given as Windows format, start by converting to
36551  # unix format.
36552  new_path="$path"
36553
36554  windows_path="$new_path"
36555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36556    unix_path=`$CYGPATH -u "$windows_path"`
36557    new_path="$unix_path"
36558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36560    new_path="$unix_path"
36561  fi
36562
36563
36564  # Now try to locate executable using which
36565  new_path=`$WHICH "$new_path" 2> /dev/null`
36566
36567  if test "x$new_path" = x; then
36568    # Oops. Which didn't find the executable.
36569    # The splitting of arguments from the executable at a space might have been incorrect,
36570    # since paths with space are more likely in Windows. Give it another try with the whole
36571    # argument.
36572    path="$complete"
36573    arguments="EOL"
36574    new_path="$path"
36575
36576  windows_path="$new_path"
36577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36578    unix_path=`$CYGPATH -u "$windows_path"`
36579    new_path="$unix_path"
36580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36582    new_path="$unix_path"
36583  fi
36584
36585
36586    new_path=`$WHICH "$new_path" 2> /dev/null`
36587    # bat and cmd files are not always considered executable in MSYS causing which
36588    # to not find them
36589    if test "x$new_path" = x \
36590        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36591        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36592      new_path="$path"
36593
36594  windows_path="$new_path"
36595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36596    unix_path=`$CYGPATH -u "$windows_path"`
36597    new_path="$unix_path"
36598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36600    new_path="$unix_path"
36601  fi
36602
36603    fi
36604
36605    if test "x$new_path" = x; then
36606      # It's still not found. Now this is an unrecoverable error.
36607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36608$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36609      has_space=`$ECHO "$complete" | $GREP " "`
36610      if test "x$has_space" != x; then
36611        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36612$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36613      fi
36614      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36615    fi
36616  fi
36617
36618  # Now new_path has a complete unix path to the binary
36619  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36620    # Keep paths in /bin as-is, but remove trailing .exe if any
36621    new_path="${new_path/%.exe/}"
36622    # Do not save /bin paths to all_fixpath_prefixes!
36623  else
36624    # Not in mixed or Windows style, start by that.
36625    new_path=`cmd //c echo $new_path`
36626
36627  input_path="$new_path"
36628  # Check if we need to convert this using DOS-style short mode. If the path
36629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36630  # take no chances and rewrite it.
36631  # Note: m4 eats our [], so we need to use [ and ] instead.
36632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36633  if test "x$has_forbidden_chars" != x; then
36634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36636  fi
36637
36638    # Output is in $new_path
36639
36640  windows_path="$new_path"
36641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36642    unix_path=`$CYGPATH -u "$windows_path"`
36643    new_path="$unix_path"
36644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36646    new_path="$unix_path"
36647  fi
36648
36649    # remove trailing .exe if any
36650    new_path="${new_path/%.exe/}"
36651
36652    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36653    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36654  fi
36655
36656  else
36657    # We're on a posix platform. Hooray! :)
36658    # First separate the path from the arguments. This will split at the first
36659    # space.
36660    complete="$GNM"
36661    path="${complete%% *}"
36662    tmp="$complete EOL"
36663    arguments="${tmp#* }"
36664
36665    # Cannot rely on the command "which" here since it doesn't always work.
36666    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36667    if test -z "$is_absolute_path"; then
36668      # Path to executable is not absolute. Find it.
36669      IFS_save="$IFS"
36670      IFS=:
36671      for p in $PATH; do
36672        if test -f "$p/$path" && test -x "$p/$path"; then
36673          new_path="$p/$path"
36674          break
36675        fi
36676      done
36677      IFS="$IFS_save"
36678    else
36679      # This is an absolute path, we can use it without further modifications.
36680      new_path="$path"
36681    fi
36682
36683    if test "x$new_path" = x; then
36684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36685$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36686      has_space=`$ECHO "$complete" | $GREP " "`
36687      if test "x$has_space" != x; then
36688        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36689$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36690      fi
36691      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36692    fi
36693  fi
36694
36695  # Now join together the path and the arguments once again
36696  if test "x$arguments" != xEOL; then
36697    new_complete="$new_path ${arguments% *}"
36698  else
36699    new_complete="$new_path"
36700  fi
36701
36702  if test "x$complete" != "x$new_complete"; then
36703    GNM="$new_complete"
36704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36705$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36706  fi
36707
36708
36709
36710
36711  # Publish this variable in the help.
36712
36713
36714  if test "x$MCS" = x; then
36715    # The variable is not set by user, try to locate tool using the code snippet
36716    for ac_prog in mcs
36717do
36718  # Extract the first word of "$ac_prog", so it can be a program name with args.
36719set dummy $ac_prog; ac_word=$2
36720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36721$as_echo_n "checking for $ac_word... " >&6; }
36722if ${ac_cv_path_MCS+:} false; then :
36723  $as_echo_n "(cached) " >&6
36724else
36725  case $MCS in
36726  [\\/]* | ?:[\\/]*)
36727  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36728  ;;
36729  *)
36730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36731for as_dir in $PATH
36732do
36733  IFS=$as_save_IFS
36734  test -z "$as_dir" && as_dir=.
36735    for ac_exec_ext in '' $ac_executable_extensions; do
36736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36737    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36739    break 2
36740  fi
36741done
36742  done
36743IFS=$as_save_IFS
36744
36745  ;;
36746esac
36747fi
36748MCS=$ac_cv_path_MCS
36749if test -n "$MCS"; then
36750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36751$as_echo "$MCS" >&6; }
36752else
36753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36754$as_echo "no" >&6; }
36755fi
36756
36757
36758  test -n "$MCS" && break
36759done
36760
36761  else
36762    # The variable is set, but is it from the command line or the environment?
36763
36764    # Try to remove the string !MCS! from our list.
36765    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36766    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36767      # If it failed, the variable was not from the command line. Ignore it,
36768      # but warn the user (except for BASH, which is always set by the calling BASH).
36769      if test "xMCS" != xBASH; then
36770        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36771$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36772      fi
36773      # Try to locate tool using the code snippet
36774      for ac_prog in mcs
36775do
36776  # Extract the first word of "$ac_prog", so it can be a program name with args.
36777set dummy $ac_prog; ac_word=$2
36778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36779$as_echo_n "checking for $ac_word... " >&6; }
36780if ${ac_cv_path_MCS+:} false; then :
36781  $as_echo_n "(cached) " >&6
36782else
36783  case $MCS in
36784  [\\/]* | ?:[\\/]*)
36785  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36786  ;;
36787  *)
36788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36789for as_dir in $PATH
36790do
36791  IFS=$as_save_IFS
36792  test -z "$as_dir" && as_dir=.
36793    for ac_exec_ext in '' $ac_executable_extensions; do
36794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36795    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36797    break 2
36798  fi
36799done
36800  done
36801IFS=$as_save_IFS
36802
36803  ;;
36804esac
36805fi
36806MCS=$ac_cv_path_MCS
36807if test -n "$MCS"; then
36808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36809$as_echo "$MCS" >&6; }
36810else
36811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36812$as_echo "no" >&6; }
36813fi
36814
36815
36816  test -n "$MCS" && break
36817done
36818
36819    else
36820      # If it succeeded, then it was overridden by the user. We will use it
36821      # for the tool.
36822
36823      # First remove it from the list of overridden variables, so we can test
36824      # for unknown variables in the end.
36825      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36826
36827      # Check if the provided tool contains a complete path.
36828      tool_specified="$MCS"
36829      tool_basename="${tool_specified##*/}"
36830      if test "x$tool_basename" = "x$tool_specified"; then
36831        # A command without a complete path is provided, search $PATH.
36832        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36833$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36834        # Extract the first word of "$tool_basename", so it can be a program name with args.
36835set dummy $tool_basename; ac_word=$2
36836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36837$as_echo_n "checking for $ac_word... " >&6; }
36838if ${ac_cv_path_MCS+:} false; then :
36839  $as_echo_n "(cached) " >&6
36840else
36841  case $MCS in
36842  [\\/]* | ?:[\\/]*)
36843  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36844  ;;
36845  *)
36846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36847for as_dir in $PATH
36848do
36849  IFS=$as_save_IFS
36850  test -z "$as_dir" && as_dir=.
36851    for ac_exec_ext in '' $ac_executable_extensions; do
36852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36853    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36855    break 2
36856  fi
36857done
36858  done
36859IFS=$as_save_IFS
36860
36861  ;;
36862esac
36863fi
36864MCS=$ac_cv_path_MCS
36865if test -n "$MCS"; then
36866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36867$as_echo "$MCS" >&6; }
36868else
36869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36870$as_echo "no" >&6; }
36871fi
36872
36873
36874        if test "x$MCS" = x; then
36875          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36876        fi
36877      else
36878        # Otherwise we believe it is a complete path. Use it as it is.
36879        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36880$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36881        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36882$as_echo_n "checking for MCS... " >&6; }
36883        if test ! -x "$tool_specified"; then
36884          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36885$as_echo "not found" >&6; }
36886          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36887        fi
36888        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36889$as_echo "$tool_specified" >&6; }
36890      fi
36891    fi
36892  fi
36893
36894
36895
36896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36897
36898  # First separate the path from the arguments. This will split at the first
36899  # space.
36900  complete="$MCS"
36901  path="${complete%% *}"
36902  tmp="$complete EOL"
36903  arguments="${tmp#* }"
36904
36905  # Input might be given as Windows format, start by converting to
36906  # unix format.
36907  new_path=`$CYGPATH -u "$path"`
36908
36909  # Now try to locate executable using which
36910  new_path=`$WHICH "$new_path" 2> /dev/null`
36911  # bat and cmd files are not always considered executable in cygwin causing which
36912  # to not find them
36913  if test "x$new_path" = x \
36914      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36915      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36916    new_path=`$CYGPATH -u "$path"`
36917  fi
36918  if test "x$new_path" = x; then
36919    # Oops. Which didn't find the executable.
36920    # The splitting of arguments from the executable at a space might have been incorrect,
36921    # since paths with space are more likely in Windows. Give it another try with the whole
36922    # argument.
36923    path="$complete"
36924    arguments="EOL"
36925    new_path=`$CYGPATH -u "$path"`
36926    new_path=`$WHICH "$new_path" 2> /dev/null`
36927    # bat and cmd files are not always considered executable in cygwin causing which
36928    # to not find them
36929    if test "x$new_path" = x \
36930        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36931        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36932      new_path=`$CYGPATH -u "$path"`
36933    fi
36934    if test "x$new_path" = x; then
36935      # It's still not found. Now this is an unrecoverable error.
36936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36937$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36938      has_space=`$ECHO "$complete" | $GREP " "`
36939      if test "x$has_space" != x; then
36940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36942      fi
36943      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36944    fi
36945  fi
36946
36947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36950  # "foo.exe" is OK but "foo" is an error.
36951  #
36952  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36953  # It is also a way to make sure we got the proper file name for the real test later on.
36954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36955  if test "x$test_shortpath" = x; then
36956    # Short path failed, file does not exist as specified.
36957    # Try adding .exe or .cmd
36958    if test -f "${new_path}.exe"; then
36959      input_to_shortpath="${new_path}.exe"
36960    elif test -f "${new_path}.cmd"; then
36961      input_to_shortpath="${new_path}.cmd"
36962    else
36963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36964$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36965      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36966$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36967      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36968    fi
36969  else
36970    input_to_shortpath="$new_path"
36971  fi
36972
36973  # Call helper function which possibly converts this using DOS-style short mode.
36974  # If so, the updated path is stored in $new_path.
36975  new_path="$input_to_shortpath"
36976
36977  input_path="$input_to_shortpath"
36978  # Check if we need to convert this using DOS-style short mode. If the path
36979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36980  # take no chances and rewrite it.
36981  # Note: m4 eats our [], so we need to use [ and ] instead.
36982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36983  if test "x$has_forbidden_chars" != x; then
36984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36988      # Going to short mode and back again did indeed matter. Since short mode is
36989      # case insensitive, let's make it lowercase to improve readability.
36990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36991      # Now convert it back to Unix-stile (cygpath)
36992      input_path=`$CYGPATH -u "$shortmode_path"`
36993      new_path="$input_path"
36994    fi
36995  fi
36996
36997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36998  if test "x$test_cygdrive_prefix" = x; then
36999    # As a simple fix, exclude /usr/bin since it's not a real path.
37000    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37002      # a path prefixed by /cygdrive for fixpath to work.
37003      new_path="$CYGWIN_ROOT_PATH$input_path"
37004    fi
37005  fi
37006
37007  # remove trailing .exe if any
37008  new_path="${new_path/%.exe/}"
37009
37010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37011
37012  # First separate the path from the arguments. This will split at the first
37013  # space.
37014  complete="$MCS"
37015  path="${complete%% *}"
37016  tmp="$complete EOL"
37017  arguments="${tmp#* }"
37018
37019  # Input might be given as Windows format, start by converting to
37020  # unix format.
37021  new_path="$path"
37022
37023  windows_path="$new_path"
37024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37025    unix_path=`$CYGPATH -u "$windows_path"`
37026    new_path="$unix_path"
37027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37029    new_path="$unix_path"
37030  fi
37031
37032
37033  # Now try to locate executable using which
37034  new_path=`$WHICH "$new_path" 2> /dev/null`
37035
37036  if test "x$new_path" = x; then
37037    # Oops. Which didn't find the executable.
37038    # The splitting of arguments from the executable at a space might have been incorrect,
37039    # since paths with space are more likely in Windows. Give it another try with the whole
37040    # argument.
37041    path="$complete"
37042    arguments="EOL"
37043    new_path="$path"
37044
37045  windows_path="$new_path"
37046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37047    unix_path=`$CYGPATH -u "$windows_path"`
37048    new_path="$unix_path"
37049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37051    new_path="$unix_path"
37052  fi
37053
37054
37055    new_path=`$WHICH "$new_path" 2> /dev/null`
37056    # bat and cmd files are not always considered executable in MSYS causing which
37057    # to not find them
37058    if test "x$new_path" = x \
37059        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37060        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37061      new_path="$path"
37062
37063  windows_path="$new_path"
37064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37065    unix_path=`$CYGPATH -u "$windows_path"`
37066    new_path="$unix_path"
37067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37069    new_path="$unix_path"
37070  fi
37071
37072    fi
37073
37074    if test "x$new_path" = x; then
37075      # It's still not found. Now this is an unrecoverable error.
37076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37077$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37078      has_space=`$ECHO "$complete" | $GREP " "`
37079      if test "x$has_space" != x; then
37080        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37081$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37082      fi
37083      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37084    fi
37085  fi
37086
37087  # Now new_path has a complete unix path to the binary
37088  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37089    # Keep paths in /bin as-is, but remove trailing .exe if any
37090    new_path="${new_path/%.exe/}"
37091    # Do not save /bin paths to all_fixpath_prefixes!
37092  else
37093    # Not in mixed or Windows style, start by that.
37094    new_path=`cmd //c echo $new_path`
37095
37096  input_path="$new_path"
37097  # Check if we need to convert this using DOS-style short mode. If the path
37098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37099  # take no chances and rewrite it.
37100  # Note: m4 eats our [], so we need to use [ and ] instead.
37101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37102  if test "x$has_forbidden_chars" != x; then
37103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37105  fi
37106
37107    # Output is in $new_path
37108
37109  windows_path="$new_path"
37110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37111    unix_path=`$CYGPATH -u "$windows_path"`
37112    new_path="$unix_path"
37113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37115    new_path="$unix_path"
37116  fi
37117
37118    # remove trailing .exe if any
37119    new_path="${new_path/%.exe/}"
37120
37121    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37122    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37123  fi
37124
37125  else
37126    # We're on a posix platform. Hooray! :)
37127    # First separate the path from the arguments. This will split at the first
37128    # space.
37129    complete="$MCS"
37130    path="${complete%% *}"
37131    tmp="$complete EOL"
37132    arguments="${tmp#* }"
37133
37134    # Cannot rely on the command "which" here since it doesn't always work.
37135    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37136    if test -z "$is_absolute_path"; then
37137      # Path to executable is not absolute. Find it.
37138      IFS_save="$IFS"
37139      IFS=:
37140      for p in $PATH; do
37141        if test -f "$p/$path" && test -x "$p/$path"; then
37142          new_path="$p/$path"
37143          break
37144        fi
37145      done
37146      IFS="$IFS_save"
37147    else
37148      # This is an absolute path, we can use it without further modifications.
37149      new_path="$path"
37150    fi
37151
37152    if test "x$new_path" = x; then
37153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37154$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37155      has_space=`$ECHO "$complete" | $GREP " "`
37156      if test "x$has_space" != x; then
37157        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37158$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37159      fi
37160      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37161    fi
37162  fi
37163
37164  # Now join together the path and the arguments once again
37165  if test "x$arguments" != xEOL; then
37166    new_complete="$new_path ${arguments% *}"
37167  else
37168    new_complete="$new_path"
37169  fi
37170
37171  if test "x$complete" != "x$new_complete"; then
37172    MCS="$new_complete"
37173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
37174$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
37175  fi
37176
37177  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37178    # FIXME: we should unify this with the solaris case above.
37179
37180
37181  # Publish this variable in the help.
37182
37183
37184  if test "x$STRIP" = x; then
37185    # The variable is not set by user, try to locate tool using the code snippet
37186    if test -n "$ac_tool_prefix"; then
37187  for ac_prog in strip
37188  do
37189    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37190set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37192$as_echo_n "checking for $ac_word... " >&6; }
37193if ${ac_cv_prog_STRIP+:} false; then :
37194  $as_echo_n "(cached) " >&6
37195else
37196  if test -n "$STRIP"; then
37197  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37198else
37199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37200for as_dir in $PATH
37201do
37202  IFS=$as_save_IFS
37203  test -z "$as_dir" && as_dir=.
37204    for ac_exec_ext in '' $ac_executable_extensions; do
37205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37206    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37208    break 2
37209  fi
37210done
37211  done
37212IFS=$as_save_IFS
37213
37214fi
37215fi
37216STRIP=$ac_cv_prog_STRIP
37217if test -n "$STRIP"; then
37218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37219$as_echo "$STRIP" >&6; }
37220else
37221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37222$as_echo "no" >&6; }
37223fi
37224
37225
37226    test -n "$STRIP" && break
37227  done
37228fi
37229if test -z "$STRIP"; then
37230  ac_ct_STRIP=$STRIP
37231  for ac_prog in strip
37232do
37233  # Extract the first word of "$ac_prog", so it can be a program name with args.
37234set dummy $ac_prog; ac_word=$2
37235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37236$as_echo_n "checking for $ac_word... " >&6; }
37237if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37238  $as_echo_n "(cached) " >&6
37239else
37240  if test -n "$ac_ct_STRIP"; then
37241  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37242else
37243as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37244for as_dir in $PATH
37245do
37246  IFS=$as_save_IFS
37247  test -z "$as_dir" && as_dir=.
37248    for ac_exec_ext in '' $ac_executable_extensions; do
37249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37250    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37252    break 2
37253  fi
37254done
37255  done
37256IFS=$as_save_IFS
37257
37258fi
37259fi
37260ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37261if test -n "$ac_ct_STRIP"; then
37262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37263$as_echo "$ac_ct_STRIP" >&6; }
37264else
37265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37266$as_echo "no" >&6; }
37267fi
37268
37269
37270  test -n "$ac_ct_STRIP" && break
37271done
37272
37273  if test "x$ac_ct_STRIP" = x; then
37274    STRIP=""
37275  else
37276    case $cross_compiling:$ac_tool_warned in
37277yes:)
37278{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37279$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37280ac_tool_warned=yes ;;
37281esac
37282    STRIP=$ac_ct_STRIP
37283  fi
37284fi
37285
37286  else
37287    # The variable is set, but is it from the command line or the environment?
37288
37289    # Try to remove the string !STRIP! from our list.
37290    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37291    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37292      # If it failed, the variable was not from the command line. Ignore it,
37293      # but warn the user (except for BASH, which is always set by the calling BASH).
37294      if test "xSTRIP" != xBASH; then
37295        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37296$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37297      fi
37298      # Try to locate tool using the code snippet
37299      if test -n "$ac_tool_prefix"; then
37300  for ac_prog in strip
37301  do
37302    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37303set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37305$as_echo_n "checking for $ac_word... " >&6; }
37306if ${ac_cv_prog_STRIP+:} false; then :
37307  $as_echo_n "(cached) " >&6
37308else
37309  if test -n "$STRIP"; then
37310  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37311else
37312as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37313for as_dir in $PATH
37314do
37315  IFS=$as_save_IFS
37316  test -z "$as_dir" && as_dir=.
37317    for ac_exec_ext in '' $ac_executable_extensions; do
37318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37319    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37321    break 2
37322  fi
37323done
37324  done
37325IFS=$as_save_IFS
37326
37327fi
37328fi
37329STRIP=$ac_cv_prog_STRIP
37330if test -n "$STRIP"; then
37331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37332$as_echo "$STRIP" >&6; }
37333else
37334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37335$as_echo "no" >&6; }
37336fi
37337
37338
37339    test -n "$STRIP" && break
37340  done
37341fi
37342if test -z "$STRIP"; then
37343  ac_ct_STRIP=$STRIP
37344  for ac_prog in strip
37345do
37346  # Extract the first word of "$ac_prog", so it can be a program name with args.
37347set dummy $ac_prog; ac_word=$2
37348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37349$as_echo_n "checking for $ac_word... " >&6; }
37350if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37351  $as_echo_n "(cached) " >&6
37352else
37353  if test -n "$ac_ct_STRIP"; then
37354  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37355else
37356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37357for as_dir in $PATH
37358do
37359  IFS=$as_save_IFS
37360  test -z "$as_dir" && as_dir=.
37361    for ac_exec_ext in '' $ac_executable_extensions; do
37362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37363    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37365    break 2
37366  fi
37367done
37368  done
37369IFS=$as_save_IFS
37370
37371fi
37372fi
37373ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37374if test -n "$ac_ct_STRIP"; then
37375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37376$as_echo "$ac_ct_STRIP" >&6; }
37377else
37378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37379$as_echo "no" >&6; }
37380fi
37381
37382
37383  test -n "$ac_ct_STRIP" && break
37384done
37385
37386  if test "x$ac_ct_STRIP" = x; then
37387    STRIP=""
37388  else
37389    case $cross_compiling:$ac_tool_warned in
37390yes:)
37391{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37392$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37393ac_tool_warned=yes ;;
37394esac
37395    STRIP=$ac_ct_STRIP
37396  fi
37397fi
37398
37399    else
37400      # If it succeeded, then it was overridden by the user. We will use it
37401      # for the tool.
37402
37403      # First remove it from the list of overridden variables, so we can test
37404      # for unknown variables in the end.
37405      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37406
37407      # Check if the provided tool contains a complete path.
37408      tool_specified="$STRIP"
37409      tool_basename="${tool_specified##*/}"
37410      if test "x$tool_basename" = "x$tool_specified"; then
37411        # A command without a complete path is provided, search $PATH.
37412        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37413$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37414        # Extract the first word of "$tool_basename", so it can be a program name with args.
37415set dummy $tool_basename; ac_word=$2
37416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37417$as_echo_n "checking for $ac_word... " >&6; }
37418if ${ac_cv_path_STRIP+:} false; then :
37419  $as_echo_n "(cached) " >&6
37420else
37421  case $STRIP in
37422  [\\/]* | ?:[\\/]*)
37423  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37424  ;;
37425  *)
37426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37427for as_dir in $PATH
37428do
37429  IFS=$as_save_IFS
37430  test -z "$as_dir" && as_dir=.
37431    for ac_exec_ext in '' $ac_executable_extensions; do
37432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37433    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37435    break 2
37436  fi
37437done
37438  done
37439IFS=$as_save_IFS
37440
37441  ;;
37442esac
37443fi
37444STRIP=$ac_cv_path_STRIP
37445if test -n "$STRIP"; then
37446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37447$as_echo "$STRIP" >&6; }
37448else
37449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37450$as_echo "no" >&6; }
37451fi
37452
37453
37454        if test "x$STRIP" = x; then
37455          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37456        fi
37457      else
37458        # Otherwise we believe it is a complete path. Use it as it is.
37459        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37460$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37461        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37462$as_echo_n "checking for STRIP... " >&6; }
37463        if test ! -x "$tool_specified"; then
37464          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37465$as_echo "not found" >&6; }
37466          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37467        fi
37468        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37469$as_echo "$tool_specified" >&6; }
37470      fi
37471    fi
37472  fi
37473
37474
37475
37476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37477
37478  # First separate the path from the arguments. This will split at the first
37479  # space.
37480  complete="$STRIP"
37481  path="${complete%% *}"
37482  tmp="$complete EOL"
37483  arguments="${tmp#* }"
37484
37485  # Input might be given as Windows format, start by converting to
37486  # unix format.
37487  new_path=`$CYGPATH -u "$path"`
37488
37489  # Now try to locate executable using which
37490  new_path=`$WHICH "$new_path" 2> /dev/null`
37491  # bat and cmd files are not always considered executable in cygwin causing which
37492  # to not find them
37493  if test "x$new_path" = x \
37494      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37495      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37496    new_path=`$CYGPATH -u "$path"`
37497  fi
37498  if test "x$new_path" = x; then
37499    # Oops. Which didn't find the executable.
37500    # The splitting of arguments from the executable at a space might have been incorrect,
37501    # since paths with space are more likely in Windows. Give it another try with the whole
37502    # argument.
37503    path="$complete"
37504    arguments="EOL"
37505    new_path=`$CYGPATH -u "$path"`
37506    new_path=`$WHICH "$new_path" 2> /dev/null`
37507    # bat and cmd files are not always considered executable in cygwin causing which
37508    # to not find them
37509    if test "x$new_path" = x \
37510        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37511        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37512      new_path=`$CYGPATH -u "$path"`
37513    fi
37514    if test "x$new_path" = x; then
37515      # It's still not found. Now this is an unrecoverable error.
37516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37517$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37518      has_space=`$ECHO "$complete" | $GREP " "`
37519      if test "x$has_space" != x; then
37520        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37521$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37522      fi
37523      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37524    fi
37525  fi
37526
37527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37530  # "foo.exe" is OK but "foo" is an error.
37531  #
37532  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37533  # It is also a way to make sure we got the proper file name for the real test later on.
37534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37535  if test "x$test_shortpath" = x; then
37536    # Short path failed, file does not exist as specified.
37537    # Try adding .exe or .cmd
37538    if test -f "${new_path}.exe"; then
37539      input_to_shortpath="${new_path}.exe"
37540    elif test -f "${new_path}.cmd"; then
37541      input_to_shortpath="${new_path}.cmd"
37542    else
37543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37544$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37545      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37546$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37547      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37548    fi
37549  else
37550    input_to_shortpath="$new_path"
37551  fi
37552
37553  # Call helper function which possibly converts this using DOS-style short mode.
37554  # If so, the updated path is stored in $new_path.
37555  new_path="$input_to_shortpath"
37556
37557  input_path="$input_to_shortpath"
37558  # Check if we need to convert this using DOS-style short mode. If the path
37559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37560  # take no chances and rewrite it.
37561  # Note: m4 eats our [], so we need to use [ and ] instead.
37562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37563  if test "x$has_forbidden_chars" != x; then
37564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37568      # Going to short mode and back again did indeed matter. Since short mode is
37569      # case insensitive, let's make it lowercase to improve readability.
37570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37571      # Now convert it back to Unix-stile (cygpath)
37572      input_path=`$CYGPATH -u "$shortmode_path"`
37573      new_path="$input_path"
37574    fi
37575  fi
37576
37577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37578  if test "x$test_cygdrive_prefix" = x; then
37579    # As a simple fix, exclude /usr/bin since it's not a real path.
37580    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37582      # a path prefixed by /cygdrive for fixpath to work.
37583      new_path="$CYGWIN_ROOT_PATH$input_path"
37584    fi
37585  fi
37586
37587  # remove trailing .exe if any
37588  new_path="${new_path/%.exe/}"
37589
37590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37591
37592  # First separate the path from the arguments. This will split at the first
37593  # space.
37594  complete="$STRIP"
37595  path="${complete%% *}"
37596  tmp="$complete EOL"
37597  arguments="${tmp#* }"
37598
37599  # Input might be given as Windows format, start by converting to
37600  # unix format.
37601  new_path="$path"
37602
37603  windows_path="$new_path"
37604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37605    unix_path=`$CYGPATH -u "$windows_path"`
37606    new_path="$unix_path"
37607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37609    new_path="$unix_path"
37610  fi
37611
37612
37613  # Now try to locate executable using which
37614  new_path=`$WHICH "$new_path" 2> /dev/null`
37615
37616  if test "x$new_path" = x; then
37617    # Oops. Which didn't find the executable.
37618    # The splitting of arguments from the executable at a space might have been incorrect,
37619    # since paths with space are more likely in Windows. Give it another try with the whole
37620    # argument.
37621    path="$complete"
37622    arguments="EOL"
37623    new_path="$path"
37624
37625  windows_path="$new_path"
37626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37627    unix_path=`$CYGPATH -u "$windows_path"`
37628    new_path="$unix_path"
37629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37631    new_path="$unix_path"
37632  fi
37633
37634
37635    new_path=`$WHICH "$new_path" 2> /dev/null`
37636    # bat and cmd files are not always considered executable in MSYS causing which
37637    # to not find them
37638    if test "x$new_path" = x \
37639        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37640        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37641      new_path="$path"
37642
37643  windows_path="$new_path"
37644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37645    unix_path=`$CYGPATH -u "$windows_path"`
37646    new_path="$unix_path"
37647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37649    new_path="$unix_path"
37650  fi
37651
37652    fi
37653
37654    if test "x$new_path" = x; then
37655      # It's still not found. Now this is an unrecoverable error.
37656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37657$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37658      has_space=`$ECHO "$complete" | $GREP " "`
37659      if test "x$has_space" != x; then
37660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37662      fi
37663      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37664    fi
37665  fi
37666
37667  # Now new_path has a complete unix path to the binary
37668  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37669    # Keep paths in /bin as-is, but remove trailing .exe if any
37670    new_path="${new_path/%.exe/}"
37671    # Do not save /bin paths to all_fixpath_prefixes!
37672  else
37673    # Not in mixed or Windows style, start by that.
37674    new_path=`cmd //c echo $new_path`
37675
37676  input_path="$new_path"
37677  # Check if we need to convert this using DOS-style short mode. If the path
37678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37679  # take no chances and rewrite it.
37680  # Note: m4 eats our [], so we need to use [ and ] instead.
37681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37682  if test "x$has_forbidden_chars" != x; then
37683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37685  fi
37686
37687    # Output is in $new_path
37688
37689  windows_path="$new_path"
37690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37691    unix_path=`$CYGPATH -u "$windows_path"`
37692    new_path="$unix_path"
37693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37695    new_path="$unix_path"
37696  fi
37697
37698    # remove trailing .exe if any
37699    new_path="${new_path/%.exe/}"
37700
37701    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37702    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37703  fi
37704
37705  else
37706    # We're on a posix platform. Hooray! :)
37707    # First separate the path from the arguments. This will split at the first
37708    # space.
37709    complete="$STRIP"
37710    path="${complete%% *}"
37711    tmp="$complete EOL"
37712    arguments="${tmp#* }"
37713
37714    # Cannot rely on the command "which" here since it doesn't always work.
37715    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37716    if test -z "$is_absolute_path"; then
37717      # Path to executable is not absolute. Find it.
37718      IFS_save="$IFS"
37719      IFS=:
37720      for p in $PATH; do
37721        if test -f "$p/$path" && test -x "$p/$path"; then
37722          new_path="$p/$path"
37723          break
37724        fi
37725      done
37726      IFS="$IFS_save"
37727    else
37728      # This is an absolute path, we can use it without further modifications.
37729      new_path="$path"
37730    fi
37731
37732    if test "x$new_path" = x; then
37733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37734$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37735      has_space=`$ECHO "$complete" | $GREP " "`
37736      if test "x$has_space" != x; then
37737        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37738$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37739      fi
37740      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37741    fi
37742  fi
37743
37744  # Now join together the path and the arguments once again
37745  if test "x$arguments" != xEOL; then
37746    new_complete="$new_path ${arguments% *}"
37747  else
37748    new_complete="$new_path"
37749  fi
37750
37751  if test "x$complete" != "x$new_complete"; then
37752    STRIP="$new_complete"
37753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37754$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37755  fi
37756
37757
37758
37759  # Publish this variable in the help.
37760
37761
37762  if test "x$NM" = x; then
37763    # The variable is not set by user, try to locate tool using the code snippet
37764    if test -n "$ac_tool_prefix"; then
37765  for ac_prog in nm
37766  do
37767    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37768set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37770$as_echo_n "checking for $ac_word... " >&6; }
37771if ${ac_cv_prog_NM+:} false; then :
37772  $as_echo_n "(cached) " >&6
37773else
37774  if test -n "$NM"; then
37775  ac_cv_prog_NM="$NM" # Let the user override the test.
37776else
37777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37778for as_dir in $PATH
37779do
37780  IFS=$as_save_IFS
37781  test -z "$as_dir" && as_dir=.
37782    for ac_exec_ext in '' $ac_executable_extensions; do
37783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37784    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37786    break 2
37787  fi
37788done
37789  done
37790IFS=$as_save_IFS
37791
37792fi
37793fi
37794NM=$ac_cv_prog_NM
37795if test -n "$NM"; then
37796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37797$as_echo "$NM" >&6; }
37798else
37799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37800$as_echo "no" >&6; }
37801fi
37802
37803
37804    test -n "$NM" && break
37805  done
37806fi
37807if test -z "$NM"; then
37808  ac_ct_NM=$NM
37809  for ac_prog in nm
37810do
37811  # Extract the first word of "$ac_prog", so it can be a program name with args.
37812set dummy $ac_prog; ac_word=$2
37813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37814$as_echo_n "checking for $ac_word... " >&6; }
37815if ${ac_cv_prog_ac_ct_NM+:} false; then :
37816  $as_echo_n "(cached) " >&6
37817else
37818  if test -n "$ac_ct_NM"; then
37819  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37820else
37821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37822for as_dir in $PATH
37823do
37824  IFS=$as_save_IFS
37825  test -z "$as_dir" && as_dir=.
37826    for ac_exec_ext in '' $ac_executable_extensions; do
37827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37828    ac_cv_prog_ac_ct_NM="$ac_prog"
37829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37830    break 2
37831  fi
37832done
37833  done
37834IFS=$as_save_IFS
37835
37836fi
37837fi
37838ac_ct_NM=$ac_cv_prog_ac_ct_NM
37839if test -n "$ac_ct_NM"; then
37840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37841$as_echo "$ac_ct_NM" >&6; }
37842else
37843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37844$as_echo "no" >&6; }
37845fi
37846
37847
37848  test -n "$ac_ct_NM" && break
37849done
37850
37851  if test "x$ac_ct_NM" = x; then
37852    NM=""
37853  else
37854    case $cross_compiling:$ac_tool_warned in
37855yes:)
37856{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37857$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37858ac_tool_warned=yes ;;
37859esac
37860    NM=$ac_ct_NM
37861  fi
37862fi
37863
37864  else
37865    # The variable is set, but is it from the command line or the environment?
37866
37867    # Try to remove the string !NM! from our list.
37868    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37869    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37870      # If it failed, the variable was not from the command line. Ignore it,
37871      # but warn the user (except for BASH, which is always set by the calling BASH).
37872      if test "xNM" != xBASH; then
37873        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37874$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37875      fi
37876      # Try to locate tool using the code snippet
37877      if test -n "$ac_tool_prefix"; then
37878  for ac_prog in nm
37879  do
37880    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37881set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37883$as_echo_n "checking for $ac_word... " >&6; }
37884if ${ac_cv_prog_NM+:} false; then :
37885  $as_echo_n "(cached) " >&6
37886else
37887  if test -n "$NM"; then
37888  ac_cv_prog_NM="$NM" # Let the user override the test.
37889else
37890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37891for as_dir in $PATH
37892do
37893  IFS=$as_save_IFS
37894  test -z "$as_dir" && as_dir=.
37895    for ac_exec_ext in '' $ac_executable_extensions; do
37896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37897    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37899    break 2
37900  fi
37901done
37902  done
37903IFS=$as_save_IFS
37904
37905fi
37906fi
37907NM=$ac_cv_prog_NM
37908if test -n "$NM"; then
37909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37910$as_echo "$NM" >&6; }
37911else
37912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37913$as_echo "no" >&6; }
37914fi
37915
37916
37917    test -n "$NM" && break
37918  done
37919fi
37920if test -z "$NM"; then
37921  ac_ct_NM=$NM
37922  for ac_prog in nm
37923do
37924  # Extract the first word of "$ac_prog", so it can be a program name with args.
37925set dummy $ac_prog; ac_word=$2
37926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37927$as_echo_n "checking for $ac_word... " >&6; }
37928if ${ac_cv_prog_ac_ct_NM+:} false; then :
37929  $as_echo_n "(cached) " >&6
37930else
37931  if test -n "$ac_ct_NM"; then
37932  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37933else
37934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37935for as_dir in $PATH
37936do
37937  IFS=$as_save_IFS
37938  test -z "$as_dir" && as_dir=.
37939    for ac_exec_ext in '' $ac_executable_extensions; do
37940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37941    ac_cv_prog_ac_ct_NM="$ac_prog"
37942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37943    break 2
37944  fi
37945done
37946  done
37947IFS=$as_save_IFS
37948
37949fi
37950fi
37951ac_ct_NM=$ac_cv_prog_ac_ct_NM
37952if test -n "$ac_ct_NM"; then
37953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37954$as_echo "$ac_ct_NM" >&6; }
37955else
37956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37957$as_echo "no" >&6; }
37958fi
37959
37960
37961  test -n "$ac_ct_NM" && break
37962done
37963
37964  if test "x$ac_ct_NM" = x; then
37965    NM=""
37966  else
37967    case $cross_compiling:$ac_tool_warned in
37968yes:)
37969{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37970$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37971ac_tool_warned=yes ;;
37972esac
37973    NM=$ac_ct_NM
37974  fi
37975fi
37976
37977    else
37978      # If it succeeded, then it was overridden by the user. We will use it
37979      # for the tool.
37980
37981      # First remove it from the list of overridden variables, so we can test
37982      # for unknown variables in the end.
37983      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37984
37985      # Check if the provided tool contains a complete path.
37986      tool_specified="$NM"
37987      tool_basename="${tool_specified##*/}"
37988      if test "x$tool_basename" = "x$tool_specified"; then
37989        # A command without a complete path is provided, search $PATH.
37990        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37991$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37992        # Extract the first word of "$tool_basename", so it can be a program name with args.
37993set dummy $tool_basename; ac_word=$2
37994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37995$as_echo_n "checking for $ac_word... " >&6; }
37996if ${ac_cv_path_NM+:} false; then :
37997  $as_echo_n "(cached) " >&6
37998else
37999  case $NM in
38000  [\\/]* | ?:[\\/]*)
38001  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38002  ;;
38003  *)
38004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38005for as_dir in $PATH
38006do
38007  IFS=$as_save_IFS
38008  test -z "$as_dir" && as_dir=.
38009    for ac_exec_ext in '' $ac_executable_extensions; do
38010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38011    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38013    break 2
38014  fi
38015done
38016  done
38017IFS=$as_save_IFS
38018
38019  ;;
38020esac
38021fi
38022NM=$ac_cv_path_NM
38023if test -n "$NM"; then
38024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38025$as_echo "$NM" >&6; }
38026else
38027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38028$as_echo "no" >&6; }
38029fi
38030
38031
38032        if test "x$NM" = x; then
38033          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38034        fi
38035      else
38036        # Otherwise we believe it is a complete path. Use it as it is.
38037        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38038$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38039        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38040$as_echo_n "checking for NM... " >&6; }
38041        if test ! -x "$tool_specified"; then
38042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38043$as_echo "not found" >&6; }
38044          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38045        fi
38046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38047$as_echo "$tool_specified" >&6; }
38048      fi
38049    fi
38050  fi
38051
38052
38053
38054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38055
38056  # First separate the path from the arguments. This will split at the first
38057  # space.
38058  complete="$NM"
38059  path="${complete%% *}"
38060  tmp="$complete EOL"
38061  arguments="${tmp#* }"
38062
38063  # Input might be given as Windows format, start by converting to
38064  # unix format.
38065  new_path=`$CYGPATH -u "$path"`
38066
38067  # Now try to locate executable using which
38068  new_path=`$WHICH "$new_path" 2> /dev/null`
38069  # bat and cmd files are not always considered executable in cygwin causing which
38070  # to not find them
38071  if test "x$new_path" = x \
38072      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38073      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38074    new_path=`$CYGPATH -u "$path"`
38075  fi
38076  if test "x$new_path" = x; then
38077    # Oops. Which didn't find the executable.
38078    # The splitting of arguments from the executable at a space might have been incorrect,
38079    # since paths with space are more likely in Windows. Give it another try with the whole
38080    # argument.
38081    path="$complete"
38082    arguments="EOL"
38083    new_path=`$CYGPATH -u "$path"`
38084    new_path=`$WHICH "$new_path" 2> /dev/null`
38085    # bat and cmd files are not always considered executable in cygwin causing which
38086    # to not find them
38087    if test "x$new_path" = x \
38088        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38089        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38090      new_path=`$CYGPATH -u "$path"`
38091    fi
38092    if test "x$new_path" = x; then
38093      # It's still not found. Now this is an unrecoverable error.
38094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38095$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38096      has_space=`$ECHO "$complete" | $GREP " "`
38097      if test "x$has_space" != x; then
38098        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38099$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38100      fi
38101      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38102    fi
38103  fi
38104
38105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38108  # "foo.exe" is OK but "foo" is an error.
38109  #
38110  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38111  # It is also a way to make sure we got the proper file name for the real test later on.
38112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38113  if test "x$test_shortpath" = x; then
38114    # Short path failed, file does not exist as specified.
38115    # Try adding .exe or .cmd
38116    if test -f "${new_path}.exe"; then
38117      input_to_shortpath="${new_path}.exe"
38118    elif test -f "${new_path}.cmd"; then
38119      input_to_shortpath="${new_path}.cmd"
38120    else
38121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38122$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38123      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38124$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38125      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38126    fi
38127  else
38128    input_to_shortpath="$new_path"
38129  fi
38130
38131  # Call helper function which possibly converts this using DOS-style short mode.
38132  # If so, the updated path is stored in $new_path.
38133  new_path="$input_to_shortpath"
38134
38135  input_path="$input_to_shortpath"
38136  # Check if we need to convert this using DOS-style short mode. If the path
38137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38138  # take no chances and rewrite it.
38139  # Note: m4 eats our [], so we need to use [ and ] instead.
38140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38141  if test "x$has_forbidden_chars" != x; then
38142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38146      # Going to short mode and back again did indeed matter. Since short mode is
38147      # case insensitive, let's make it lowercase to improve readability.
38148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38149      # Now convert it back to Unix-stile (cygpath)
38150      input_path=`$CYGPATH -u "$shortmode_path"`
38151      new_path="$input_path"
38152    fi
38153  fi
38154
38155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38156  if test "x$test_cygdrive_prefix" = x; then
38157    # As a simple fix, exclude /usr/bin since it's not a real path.
38158    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38160      # a path prefixed by /cygdrive for fixpath to work.
38161      new_path="$CYGWIN_ROOT_PATH$input_path"
38162    fi
38163  fi
38164
38165  # remove trailing .exe if any
38166  new_path="${new_path/%.exe/}"
38167
38168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38169
38170  # First separate the path from the arguments. This will split at the first
38171  # space.
38172  complete="$NM"
38173  path="${complete%% *}"
38174  tmp="$complete EOL"
38175  arguments="${tmp#* }"
38176
38177  # Input might be given as Windows format, start by converting to
38178  # unix format.
38179  new_path="$path"
38180
38181  windows_path="$new_path"
38182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38183    unix_path=`$CYGPATH -u "$windows_path"`
38184    new_path="$unix_path"
38185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38187    new_path="$unix_path"
38188  fi
38189
38190
38191  # Now try to locate executable using which
38192  new_path=`$WHICH "$new_path" 2> /dev/null`
38193
38194  if test "x$new_path" = x; then
38195    # Oops. Which didn't find the executable.
38196    # The splitting of arguments from the executable at a space might have been incorrect,
38197    # since paths with space are more likely in Windows. Give it another try with the whole
38198    # argument.
38199    path="$complete"
38200    arguments="EOL"
38201    new_path="$path"
38202
38203  windows_path="$new_path"
38204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38205    unix_path=`$CYGPATH -u "$windows_path"`
38206    new_path="$unix_path"
38207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38209    new_path="$unix_path"
38210  fi
38211
38212
38213    new_path=`$WHICH "$new_path" 2> /dev/null`
38214    # bat and cmd files are not always considered executable in MSYS causing which
38215    # to not find them
38216    if test "x$new_path" = x \
38217        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38218        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38219      new_path="$path"
38220
38221  windows_path="$new_path"
38222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38223    unix_path=`$CYGPATH -u "$windows_path"`
38224    new_path="$unix_path"
38225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38227    new_path="$unix_path"
38228  fi
38229
38230    fi
38231
38232    if test "x$new_path" = x; then
38233      # It's still not found. Now this is an unrecoverable error.
38234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38235$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38236      has_space=`$ECHO "$complete" | $GREP " "`
38237      if test "x$has_space" != x; then
38238        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38239$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38240      fi
38241      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38242    fi
38243  fi
38244
38245  # Now new_path has a complete unix path to the binary
38246  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38247    # Keep paths in /bin as-is, but remove trailing .exe if any
38248    new_path="${new_path/%.exe/}"
38249    # Do not save /bin paths to all_fixpath_prefixes!
38250  else
38251    # Not in mixed or Windows style, start by that.
38252    new_path=`cmd //c echo $new_path`
38253
38254  input_path="$new_path"
38255  # Check if we need to convert this using DOS-style short mode. If the path
38256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38257  # take no chances and rewrite it.
38258  # Note: m4 eats our [], so we need to use [ and ] instead.
38259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38260  if test "x$has_forbidden_chars" != x; then
38261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38263  fi
38264
38265    # Output is in $new_path
38266
38267  windows_path="$new_path"
38268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38269    unix_path=`$CYGPATH -u "$windows_path"`
38270    new_path="$unix_path"
38271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38273    new_path="$unix_path"
38274  fi
38275
38276    # remove trailing .exe if any
38277    new_path="${new_path/%.exe/}"
38278
38279    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38280    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38281  fi
38282
38283  else
38284    # We're on a posix platform. Hooray! :)
38285    # First separate the path from the arguments. This will split at the first
38286    # space.
38287    complete="$NM"
38288    path="${complete%% *}"
38289    tmp="$complete EOL"
38290    arguments="${tmp#* }"
38291
38292    # Cannot rely on the command "which" here since it doesn't always work.
38293    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38294    if test -z "$is_absolute_path"; then
38295      # Path to executable is not absolute. Find it.
38296      IFS_save="$IFS"
38297      IFS=:
38298      for p in $PATH; do
38299        if test -f "$p/$path" && test -x "$p/$path"; then
38300          new_path="$p/$path"
38301          break
38302        fi
38303      done
38304      IFS="$IFS_save"
38305    else
38306      # This is an absolute path, we can use it without further modifications.
38307      new_path="$path"
38308    fi
38309
38310    if test "x$new_path" = x; then
38311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38312$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38313      has_space=`$ECHO "$complete" | $GREP " "`
38314      if test "x$has_space" != x; then
38315        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38316$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38317      fi
38318      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38319    fi
38320  fi
38321
38322  # Now join together the path and the arguments once again
38323  if test "x$arguments" != xEOL; then
38324    new_complete="$new_path ${arguments% *}"
38325  else
38326    new_complete="$new_path"
38327  fi
38328
38329  if test "x$complete" != "x$new_complete"; then
38330    NM="$new_complete"
38331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38332$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38333  fi
38334
38335    GNM="$NM"
38336
38337  fi
38338
38339  # objcopy is used for moving debug symbols to separate files when
38340  # full debug symbols are enabled.
38341  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38342
38343
38344  # Publish this variable in the help.
38345
38346
38347  if test "x$OBJCOPY" = x; then
38348    # The variable is not set by user, try to locate tool using the code snippet
38349    if test -n "$ac_tool_prefix"; then
38350  for ac_prog in gobjcopy objcopy
38351  do
38352    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38353set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38355$as_echo_n "checking for $ac_word... " >&6; }
38356if ${ac_cv_prog_OBJCOPY+:} false; then :
38357  $as_echo_n "(cached) " >&6
38358else
38359  if test -n "$OBJCOPY"; then
38360  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38361else
38362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38363for as_dir in $PATH
38364do
38365  IFS=$as_save_IFS
38366  test -z "$as_dir" && as_dir=.
38367    for ac_exec_ext in '' $ac_executable_extensions; do
38368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38369    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38371    break 2
38372  fi
38373done
38374  done
38375IFS=$as_save_IFS
38376
38377fi
38378fi
38379OBJCOPY=$ac_cv_prog_OBJCOPY
38380if test -n "$OBJCOPY"; then
38381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38382$as_echo "$OBJCOPY" >&6; }
38383else
38384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38385$as_echo "no" >&6; }
38386fi
38387
38388
38389    test -n "$OBJCOPY" && break
38390  done
38391fi
38392if test -z "$OBJCOPY"; then
38393  ac_ct_OBJCOPY=$OBJCOPY
38394  for ac_prog in gobjcopy objcopy
38395do
38396  # Extract the first word of "$ac_prog", so it can be a program name with args.
38397set dummy $ac_prog; ac_word=$2
38398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38399$as_echo_n "checking for $ac_word... " >&6; }
38400if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38401  $as_echo_n "(cached) " >&6
38402else
38403  if test -n "$ac_ct_OBJCOPY"; then
38404  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38405else
38406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38407for as_dir in $PATH
38408do
38409  IFS=$as_save_IFS
38410  test -z "$as_dir" && as_dir=.
38411    for ac_exec_ext in '' $ac_executable_extensions; do
38412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38413    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38415    break 2
38416  fi
38417done
38418  done
38419IFS=$as_save_IFS
38420
38421fi
38422fi
38423ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38424if test -n "$ac_ct_OBJCOPY"; then
38425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38426$as_echo "$ac_ct_OBJCOPY" >&6; }
38427else
38428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38429$as_echo "no" >&6; }
38430fi
38431
38432
38433  test -n "$ac_ct_OBJCOPY" && break
38434done
38435
38436  if test "x$ac_ct_OBJCOPY" = x; then
38437    OBJCOPY=""
38438  else
38439    case $cross_compiling:$ac_tool_warned in
38440yes:)
38441{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38442$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38443ac_tool_warned=yes ;;
38444esac
38445    OBJCOPY=$ac_ct_OBJCOPY
38446  fi
38447fi
38448
38449  else
38450    # The variable is set, but is it from the command line or the environment?
38451
38452    # Try to remove the string !OBJCOPY! from our list.
38453    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38454    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38455      # If it failed, the variable was not from the command line. Ignore it,
38456      # but warn the user (except for BASH, which is always set by the calling BASH).
38457      if test "xOBJCOPY" != xBASH; then
38458        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38459$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38460      fi
38461      # Try to locate tool using the code snippet
38462      if test -n "$ac_tool_prefix"; then
38463  for ac_prog in gobjcopy objcopy
38464  do
38465    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38466set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38468$as_echo_n "checking for $ac_word... " >&6; }
38469if ${ac_cv_prog_OBJCOPY+:} false; then :
38470  $as_echo_n "(cached) " >&6
38471else
38472  if test -n "$OBJCOPY"; then
38473  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38474else
38475as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38476for as_dir in $PATH
38477do
38478  IFS=$as_save_IFS
38479  test -z "$as_dir" && as_dir=.
38480    for ac_exec_ext in '' $ac_executable_extensions; do
38481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38482    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38484    break 2
38485  fi
38486done
38487  done
38488IFS=$as_save_IFS
38489
38490fi
38491fi
38492OBJCOPY=$ac_cv_prog_OBJCOPY
38493if test -n "$OBJCOPY"; then
38494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38495$as_echo "$OBJCOPY" >&6; }
38496else
38497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38498$as_echo "no" >&6; }
38499fi
38500
38501
38502    test -n "$OBJCOPY" && break
38503  done
38504fi
38505if test -z "$OBJCOPY"; then
38506  ac_ct_OBJCOPY=$OBJCOPY
38507  for ac_prog in gobjcopy objcopy
38508do
38509  # Extract the first word of "$ac_prog", so it can be a program name with args.
38510set dummy $ac_prog; ac_word=$2
38511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38512$as_echo_n "checking for $ac_word... " >&6; }
38513if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38514  $as_echo_n "(cached) " >&6
38515else
38516  if test -n "$ac_ct_OBJCOPY"; then
38517  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38518else
38519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38520for as_dir in $PATH
38521do
38522  IFS=$as_save_IFS
38523  test -z "$as_dir" && as_dir=.
38524    for ac_exec_ext in '' $ac_executable_extensions; do
38525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38526    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38528    break 2
38529  fi
38530done
38531  done
38532IFS=$as_save_IFS
38533
38534fi
38535fi
38536ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38537if test -n "$ac_ct_OBJCOPY"; then
38538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38539$as_echo "$ac_ct_OBJCOPY" >&6; }
38540else
38541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38542$as_echo "no" >&6; }
38543fi
38544
38545
38546  test -n "$ac_ct_OBJCOPY" && break
38547done
38548
38549  if test "x$ac_ct_OBJCOPY" = x; then
38550    OBJCOPY=""
38551  else
38552    case $cross_compiling:$ac_tool_warned in
38553yes:)
38554{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38555$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38556ac_tool_warned=yes ;;
38557esac
38558    OBJCOPY=$ac_ct_OBJCOPY
38559  fi
38560fi
38561
38562    else
38563      # If it succeeded, then it was overridden by the user. We will use it
38564      # for the tool.
38565
38566      # First remove it from the list of overridden variables, so we can test
38567      # for unknown variables in the end.
38568      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38569
38570      # Check if the provided tool contains a complete path.
38571      tool_specified="$OBJCOPY"
38572      tool_basename="${tool_specified##*/}"
38573      if test "x$tool_basename" = "x$tool_specified"; then
38574        # A command without a complete path is provided, search $PATH.
38575        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38576$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38577        # Extract the first word of "$tool_basename", so it can be a program name with args.
38578set dummy $tool_basename; ac_word=$2
38579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38580$as_echo_n "checking for $ac_word... " >&6; }
38581if ${ac_cv_path_OBJCOPY+:} false; then :
38582  $as_echo_n "(cached) " >&6
38583else
38584  case $OBJCOPY in
38585  [\\/]* | ?:[\\/]*)
38586  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38587  ;;
38588  *)
38589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38590for as_dir in $PATH
38591do
38592  IFS=$as_save_IFS
38593  test -z "$as_dir" && as_dir=.
38594    for ac_exec_ext in '' $ac_executable_extensions; do
38595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38596    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38598    break 2
38599  fi
38600done
38601  done
38602IFS=$as_save_IFS
38603
38604  ;;
38605esac
38606fi
38607OBJCOPY=$ac_cv_path_OBJCOPY
38608if test -n "$OBJCOPY"; then
38609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38610$as_echo "$OBJCOPY" >&6; }
38611else
38612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38613$as_echo "no" >&6; }
38614fi
38615
38616
38617        if test "x$OBJCOPY" = x; then
38618          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38619        fi
38620      else
38621        # Otherwise we believe it is a complete path. Use it as it is.
38622        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38623$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38624        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38625$as_echo_n "checking for OBJCOPY... " >&6; }
38626        if test ! -x "$tool_specified"; then
38627          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38628$as_echo "not found" >&6; }
38629          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38630        fi
38631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38632$as_echo "$tool_specified" >&6; }
38633      fi
38634    fi
38635  fi
38636
38637
38638    # Only call fixup if objcopy was found.
38639    if test -n "$OBJCOPY"; then
38640
38641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38642
38643  # First separate the path from the arguments. This will split at the first
38644  # space.
38645  complete="$OBJCOPY"
38646  path="${complete%% *}"
38647  tmp="$complete EOL"
38648  arguments="${tmp#* }"
38649
38650  # Input might be given as Windows format, start by converting to
38651  # unix format.
38652  new_path=`$CYGPATH -u "$path"`
38653
38654  # Now try to locate executable using which
38655  new_path=`$WHICH "$new_path" 2> /dev/null`
38656  # bat and cmd files are not always considered executable in cygwin causing which
38657  # to not find them
38658  if test "x$new_path" = x \
38659      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38660      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38661    new_path=`$CYGPATH -u "$path"`
38662  fi
38663  if test "x$new_path" = x; then
38664    # Oops. Which didn't find the executable.
38665    # The splitting of arguments from the executable at a space might have been incorrect,
38666    # since paths with space are more likely in Windows. Give it another try with the whole
38667    # argument.
38668    path="$complete"
38669    arguments="EOL"
38670    new_path=`$CYGPATH -u "$path"`
38671    new_path=`$WHICH "$new_path" 2> /dev/null`
38672    # bat and cmd files are not always considered executable in cygwin causing which
38673    # to not find them
38674    if test "x$new_path" = x \
38675        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38676        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38677      new_path=`$CYGPATH -u "$path"`
38678    fi
38679    if test "x$new_path" = x; then
38680      # It's still not found. Now this is an unrecoverable error.
38681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38682$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38683      has_space=`$ECHO "$complete" | $GREP " "`
38684      if test "x$has_space" != x; then
38685        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38686$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38687      fi
38688      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38689    fi
38690  fi
38691
38692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38695  # "foo.exe" is OK but "foo" is an error.
38696  #
38697  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38698  # It is also a way to make sure we got the proper file name for the real test later on.
38699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38700  if test "x$test_shortpath" = x; then
38701    # Short path failed, file does not exist as specified.
38702    # Try adding .exe or .cmd
38703    if test -f "${new_path}.exe"; then
38704      input_to_shortpath="${new_path}.exe"
38705    elif test -f "${new_path}.cmd"; then
38706      input_to_shortpath="${new_path}.cmd"
38707    else
38708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38709$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38710      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38711$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38712      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38713    fi
38714  else
38715    input_to_shortpath="$new_path"
38716  fi
38717
38718  # Call helper function which possibly converts this using DOS-style short mode.
38719  # If so, the updated path is stored in $new_path.
38720  new_path="$input_to_shortpath"
38721
38722  input_path="$input_to_shortpath"
38723  # Check if we need to convert this using DOS-style short mode. If the path
38724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38725  # take no chances and rewrite it.
38726  # Note: m4 eats our [], so we need to use [ and ] instead.
38727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38728  if test "x$has_forbidden_chars" != x; then
38729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38730    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38731    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38732    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38733      # Going to short mode and back again did indeed matter. Since short mode is
38734      # case insensitive, let's make it lowercase to improve readability.
38735      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38736      # Now convert it back to Unix-stile (cygpath)
38737      input_path=`$CYGPATH -u "$shortmode_path"`
38738      new_path="$input_path"
38739    fi
38740  fi
38741
38742  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38743  if test "x$test_cygdrive_prefix" = x; then
38744    # As a simple fix, exclude /usr/bin since it's not a real path.
38745    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38746      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38747      # a path prefixed by /cygdrive for fixpath to work.
38748      new_path="$CYGWIN_ROOT_PATH$input_path"
38749    fi
38750  fi
38751
38752  # remove trailing .exe if any
38753  new_path="${new_path/%.exe/}"
38754
38755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38756
38757  # First separate the path from the arguments. This will split at the first
38758  # space.
38759  complete="$OBJCOPY"
38760  path="${complete%% *}"
38761  tmp="$complete EOL"
38762  arguments="${tmp#* }"
38763
38764  # Input might be given as Windows format, start by converting to
38765  # unix format.
38766  new_path="$path"
38767
38768  windows_path="$new_path"
38769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38770    unix_path=`$CYGPATH -u "$windows_path"`
38771    new_path="$unix_path"
38772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38774    new_path="$unix_path"
38775  fi
38776
38777
38778  # Now try to locate executable using which
38779  new_path=`$WHICH "$new_path" 2> /dev/null`
38780
38781  if test "x$new_path" = x; then
38782    # Oops. Which didn't find the executable.
38783    # The splitting of arguments from the executable at a space might have been incorrect,
38784    # since paths with space are more likely in Windows. Give it another try with the whole
38785    # argument.
38786    path="$complete"
38787    arguments="EOL"
38788    new_path="$path"
38789
38790  windows_path="$new_path"
38791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38792    unix_path=`$CYGPATH -u "$windows_path"`
38793    new_path="$unix_path"
38794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38796    new_path="$unix_path"
38797  fi
38798
38799
38800    new_path=`$WHICH "$new_path" 2> /dev/null`
38801    # bat and cmd files are not always considered executable in MSYS causing which
38802    # to not find them
38803    if test "x$new_path" = x \
38804        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38805        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38806      new_path="$path"
38807
38808  windows_path="$new_path"
38809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38810    unix_path=`$CYGPATH -u "$windows_path"`
38811    new_path="$unix_path"
38812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38814    new_path="$unix_path"
38815  fi
38816
38817    fi
38818
38819    if test "x$new_path" = x; then
38820      # It's still not found. Now this is an unrecoverable error.
38821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38822$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38823      has_space=`$ECHO "$complete" | $GREP " "`
38824      if test "x$has_space" != x; then
38825        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38826$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38827      fi
38828      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38829    fi
38830  fi
38831
38832  # Now new_path has a complete unix path to the binary
38833  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38834    # Keep paths in /bin as-is, but remove trailing .exe if any
38835    new_path="${new_path/%.exe/}"
38836    # Do not save /bin paths to all_fixpath_prefixes!
38837  else
38838    # Not in mixed or Windows style, start by that.
38839    new_path=`cmd //c echo $new_path`
38840
38841  input_path="$new_path"
38842  # Check if we need to convert this using DOS-style short mode. If the path
38843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38844  # take no chances and rewrite it.
38845  # Note: m4 eats our [], so we need to use [ and ] instead.
38846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38847  if test "x$has_forbidden_chars" != x; then
38848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38850  fi
38851
38852    # Output is in $new_path
38853
38854  windows_path="$new_path"
38855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38856    unix_path=`$CYGPATH -u "$windows_path"`
38857    new_path="$unix_path"
38858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38860    new_path="$unix_path"
38861  fi
38862
38863    # remove trailing .exe if any
38864    new_path="${new_path/%.exe/}"
38865
38866    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38867    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38868  fi
38869
38870  else
38871    # We're on a posix platform. Hooray! :)
38872    # First separate the path from the arguments. This will split at the first
38873    # space.
38874    complete="$OBJCOPY"
38875    path="${complete%% *}"
38876    tmp="$complete EOL"
38877    arguments="${tmp#* }"
38878
38879    # Cannot rely on the command "which" here since it doesn't always work.
38880    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38881    if test -z "$is_absolute_path"; then
38882      # Path to executable is not absolute. Find it.
38883      IFS_save="$IFS"
38884      IFS=:
38885      for p in $PATH; do
38886        if test -f "$p/$path" && test -x "$p/$path"; then
38887          new_path="$p/$path"
38888          break
38889        fi
38890      done
38891      IFS="$IFS_save"
38892    else
38893      # This is an absolute path, we can use it without further modifications.
38894      new_path="$path"
38895    fi
38896
38897    if test "x$new_path" = x; then
38898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38899$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38900      has_space=`$ECHO "$complete" | $GREP " "`
38901      if test "x$has_space" != x; then
38902        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38903$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38904      fi
38905      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38906    fi
38907  fi
38908
38909  # Now join together the path and the arguments once again
38910  if test "x$arguments" != xEOL; then
38911    new_complete="$new_path ${arguments% *}"
38912  else
38913    new_complete="$new_path"
38914  fi
38915
38916  if test "x$complete" != "x$new_complete"; then
38917    OBJCOPY="$new_complete"
38918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38919$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38920  fi
38921
38922    fi
38923  fi
38924
38925
38926
38927  # Publish this variable in the help.
38928
38929
38930  if test "x$OBJDUMP" = x; then
38931    # The variable is not set by user, try to locate tool using the code snippet
38932    if test -n "$ac_tool_prefix"; then
38933  for ac_prog in gobjdump objdump
38934  do
38935    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38936set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38938$as_echo_n "checking for $ac_word... " >&6; }
38939if ${ac_cv_prog_OBJDUMP+:} false; then :
38940  $as_echo_n "(cached) " >&6
38941else
38942  if test -n "$OBJDUMP"; then
38943  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38944else
38945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38946for as_dir in $PATH
38947do
38948  IFS=$as_save_IFS
38949  test -z "$as_dir" && as_dir=.
38950    for ac_exec_ext in '' $ac_executable_extensions; do
38951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38952    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38954    break 2
38955  fi
38956done
38957  done
38958IFS=$as_save_IFS
38959
38960fi
38961fi
38962OBJDUMP=$ac_cv_prog_OBJDUMP
38963if test -n "$OBJDUMP"; then
38964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38965$as_echo "$OBJDUMP" >&6; }
38966else
38967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38968$as_echo "no" >&6; }
38969fi
38970
38971
38972    test -n "$OBJDUMP" && break
38973  done
38974fi
38975if test -z "$OBJDUMP"; then
38976  ac_ct_OBJDUMP=$OBJDUMP
38977  for ac_prog in gobjdump objdump
38978do
38979  # Extract the first word of "$ac_prog", so it can be a program name with args.
38980set dummy $ac_prog; ac_word=$2
38981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38982$as_echo_n "checking for $ac_word... " >&6; }
38983if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38984  $as_echo_n "(cached) " >&6
38985else
38986  if test -n "$ac_ct_OBJDUMP"; then
38987  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38988else
38989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38990for as_dir in $PATH
38991do
38992  IFS=$as_save_IFS
38993  test -z "$as_dir" && as_dir=.
38994    for ac_exec_ext in '' $ac_executable_extensions; do
38995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38996    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38998    break 2
38999  fi
39000done
39001  done
39002IFS=$as_save_IFS
39003
39004fi
39005fi
39006ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39007if test -n "$ac_ct_OBJDUMP"; then
39008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39009$as_echo "$ac_ct_OBJDUMP" >&6; }
39010else
39011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39012$as_echo "no" >&6; }
39013fi
39014
39015
39016  test -n "$ac_ct_OBJDUMP" && break
39017done
39018
39019  if test "x$ac_ct_OBJDUMP" = x; then
39020    OBJDUMP=""
39021  else
39022    case $cross_compiling:$ac_tool_warned in
39023yes:)
39024{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39025$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39026ac_tool_warned=yes ;;
39027esac
39028    OBJDUMP=$ac_ct_OBJDUMP
39029  fi
39030fi
39031
39032  else
39033    # The variable is set, but is it from the command line or the environment?
39034
39035    # Try to remove the string !OBJDUMP! from our list.
39036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
39037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39038      # If it failed, the variable was not from the command line. Ignore it,
39039      # but warn the user (except for BASH, which is always set by the calling BASH).
39040      if test "xOBJDUMP" != xBASH; then
39041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
39042$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
39043      fi
39044      # Try to locate tool using the code snippet
39045      if test -n "$ac_tool_prefix"; then
39046  for ac_prog in gobjdump objdump
39047  do
39048    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39049set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39051$as_echo_n "checking for $ac_word... " >&6; }
39052if ${ac_cv_prog_OBJDUMP+:} false; then :
39053  $as_echo_n "(cached) " >&6
39054else
39055  if test -n "$OBJDUMP"; then
39056  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39057else
39058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39059for as_dir in $PATH
39060do
39061  IFS=$as_save_IFS
39062  test -z "$as_dir" && as_dir=.
39063    for ac_exec_ext in '' $ac_executable_extensions; do
39064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39065    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39067    break 2
39068  fi
39069done
39070  done
39071IFS=$as_save_IFS
39072
39073fi
39074fi
39075OBJDUMP=$ac_cv_prog_OBJDUMP
39076if test -n "$OBJDUMP"; then
39077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39078$as_echo "$OBJDUMP" >&6; }
39079else
39080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39081$as_echo "no" >&6; }
39082fi
39083
39084
39085    test -n "$OBJDUMP" && break
39086  done
39087fi
39088if test -z "$OBJDUMP"; then
39089  ac_ct_OBJDUMP=$OBJDUMP
39090  for ac_prog in gobjdump objdump
39091do
39092  # Extract the first word of "$ac_prog", so it can be a program name with args.
39093set dummy $ac_prog; ac_word=$2
39094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39095$as_echo_n "checking for $ac_word... " >&6; }
39096if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39097  $as_echo_n "(cached) " >&6
39098else
39099  if test -n "$ac_ct_OBJDUMP"; then
39100  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39101else
39102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39103for as_dir in $PATH
39104do
39105  IFS=$as_save_IFS
39106  test -z "$as_dir" && as_dir=.
39107    for ac_exec_ext in '' $ac_executable_extensions; do
39108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39109    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39111    break 2
39112  fi
39113done
39114  done
39115IFS=$as_save_IFS
39116
39117fi
39118fi
39119ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39120if test -n "$ac_ct_OBJDUMP"; then
39121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39122$as_echo "$ac_ct_OBJDUMP" >&6; }
39123else
39124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39125$as_echo "no" >&6; }
39126fi
39127
39128
39129  test -n "$ac_ct_OBJDUMP" && break
39130done
39131
39132  if test "x$ac_ct_OBJDUMP" = x; then
39133    OBJDUMP=""
39134  else
39135    case $cross_compiling:$ac_tool_warned in
39136yes:)
39137{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39138$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39139ac_tool_warned=yes ;;
39140esac
39141    OBJDUMP=$ac_ct_OBJDUMP
39142  fi
39143fi
39144
39145    else
39146      # If it succeeded, then it was overridden by the user. We will use it
39147      # for the tool.
39148
39149      # First remove it from the list of overridden variables, so we can test
39150      # for unknown variables in the end.
39151      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39152
39153      # Check if the provided tool contains a complete path.
39154      tool_specified="$OBJDUMP"
39155      tool_basename="${tool_specified##*/}"
39156      if test "x$tool_basename" = "x$tool_specified"; then
39157        # A command without a complete path is provided, search $PATH.
39158        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39159$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39160        # Extract the first word of "$tool_basename", so it can be a program name with args.
39161set dummy $tool_basename; ac_word=$2
39162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39163$as_echo_n "checking for $ac_word... " >&6; }
39164if ${ac_cv_path_OBJDUMP+:} false; then :
39165  $as_echo_n "(cached) " >&6
39166else
39167  case $OBJDUMP in
39168  [\\/]* | ?:[\\/]*)
39169  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39170  ;;
39171  *)
39172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39173for as_dir in $PATH
39174do
39175  IFS=$as_save_IFS
39176  test -z "$as_dir" && as_dir=.
39177    for ac_exec_ext in '' $ac_executable_extensions; do
39178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39179    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39181    break 2
39182  fi
39183done
39184  done
39185IFS=$as_save_IFS
39186
39187  ;;
39188esac
39189fi
39190OBJDUMP=$ac_cv_path_OBJDUMP
39191if test -n "$OBJDUMP"; then
39192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39193$as_echo "$OBJDUMP" >&6; }
39194else
39195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39196$as_echo "no" >&6; }
39197fi
39198
39199
39200        if test "x$OBJDUMP" = x; then
39201          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39202        fi
39203      else
39204        # Otherwise we believe it is a complete path. Use it as it is.
39205        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39206$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39208$as_echo_n "checking for OBJDUMP... " >&6; }
39209        if test ! -x "$tool_specified"; then
39210          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39211$as_echo "not found" >&6; }
39212          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39213        fi
39214        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39215$as_echo "$tool_specified" >&6; }
39216      fi
39217    fi
39218  fi
39219
39220
39221  if test "x$OBJDUMP" != x; then
39222    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39223    # bails if argument is missing.
39224
39225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39226
39227  # First separate the path from the arguments. This will split at the first
39228  # space.
39229  complete="$OBJDUMP"
39230  path="${complete%% *}"
39231  tmp="$complete EOL"
39232  arguments="${tmp#* }"
39233
39234  # Input might be given as Windows format, start by converting to
39235  # unix format.
39236  new_path=`$CYGPATH -u "$path"`
39237
39238  # Now try to locate executable using which
39239  new_path=`$WHICH "$new_path" 2> /dev/null`
39240  # bat and cmd files are not always considered executable in cygwin causing which
39241  # to not find them
39242  if test "x$new_path" = x \
39243      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39244      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39245    new_path=`$CYGPATH -u "$path"`
39246  fi
39247  if test "x$new_path" = x; then
39248    # Oops. Which didn't find the executable.
39249    # The splitting of arguments from the executable at a space might have been incorrect,
39250    # since paths with space are more likely in Windows. Give it another try with the whole
39251    # argument.
39252    path="$complete"
39253    arguments="EOL"
39254    new_path=`$CYGPATH -u "$path"`
39255    new_path=`$WHICH "$new_path" 2> /dev/null`
39256    # bat and cmd files are not always considered executable in cygwin causing which
39257    # to not find them
39258    if test "x$new_path" = x \
39259        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39260        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39261      new_path=`$CYGPATH -u "$path"`
39262    fi
39263    if test "x$new_path" = x; then
39264      # It's still not found. Now this is an unrecoverable error.
39265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39266$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39267      has_space=`$ECHO "$complete" | $GREP " "`
39268      if test "x$has_space" != x; then
39269        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39270$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39271      fi
39272      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39273    fi
39274  fi
39275
39276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39279  # "foo.exe" is OK but "foo" is an error.
39280  #
39281  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39282  # It is also a way to make sure we got the proper file name for the real test later on.
39283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39284  if test "x$test_shortpath" = x; then
39285    # Short path failed, file does not exist as specified.
39286    # Try adding .exe or .cmd
39287    if test -f "${new_path}.exe"; then
39288      input_to_shortpath="${new_path}.exe"
39289    elif test -f "${new_path}.cmd"; then
39290      input_to_shortpath="${new_path}.cmd"
39291    else
39292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39293$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39294      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39295$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39296      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39297    fi
39298  else
39299    input_to_shortpath="$new_path"
39300  fi
39301
39302  # Call helper function which possibly converts this using DOS-style short mode.
39303  # If so, the updated path is stored in $new_path.
39304  new_path="$input_to_shortpath"
39305
39306  input_path="$input_to_shortpath"
39307  # Check if we need to convert this using DOS-style short mode. If the path
39308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39309  # take no chances and rewrite it.
39310  # Note: m4 eats our [], so we need to use [ and ] instead.
39311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39312  if test "x$has_forbidden_chars" != x; then
39313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39317      # Going to short mode and back again did indeed matter. Since short mode is
39318      # case insensitive, let's make it lowercase to improve readability.
39319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39320      # Now convert it back to Unix-stile (cygpath)
39321      input_path=`$CYGPATH -u "$shortmode_path"`
39322      new_path="$input_path"
39323    fi
39324  fi
39325
39326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39327  if test "x$test_cygdrive_prefix" = x; then
39328    # As a simple fix, exclude /usr/bin since it's not a real path.
39329    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39331      # a path prefixed by /cygdrive for fixpath to work.
39332      new_path="$CYGWIN_ROOT_PATH$input_path"
39333    fi
39334  fi
39335
39336  # remove trailing .exe if any
39337  new_path="${new_path/%.exe/}"
39338
39339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39340
39341  # First separate the path from the arguments. This will split at the first
39342  # space.
39343  complete="$OBJDUMP"
39344  path="${complete%% *}"
39345  tmp="$complete EOL"
39346  arguments="${tmp#* }"
39347
39348  # Input might be given as Windows format, start by converting to
39349  # unix format.
39350  new_path="$path"
39351
39352  windows_path="$new_path"
39353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39354    unix_path=`$CYGPATH -u "$windows_path"`
39355    new_path="$unix_path"
39356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39358    new_path="$unix_path"
39359  fi
39360
39361
39362  # Now try to locate executable using which
39363  new_path=`$WHICH "$new_path" 2> /dev/null`
39364
39365  if test "x$new_path" = x; then
39366    # Oops. Which didn't find the executable.
39367    # The splitting of arguments from the executable at a space might have been incorrect,
39368    # since paths with space are more likely in Windows. Give it another try with the whole
39369    # argument.
39370    path="$complete"
39371    arguments="EOL"
39372    new_path="$path"
39373
39374  windows_path="$new_path"
39375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39376    unix_path=`$CYGPATH -u "$windows_path"`
39377    new_path="$unix_path"
39378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39380    new_path="$unix_path"
39381  fi
39382
39383
39384    new_path=`$WHICH "$new_path" 2> /dev/null`
39385    # bat and cmd files are not always considered executable in MSYS causing which
39386    # to not find them
39387    if test "x$new_path" = x \
39388        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39389        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39390      new_path="$path"
39391
39392  windows_path="$new_path"
39393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39394    unix_path=`$CYGPATH -u "$windows_path"`
39395    new_path="$unix_path"
39396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39398    new_path="$unix_path"
39399  fi
39400
39401    fi
39402
39403    if test "x$new_path" = x; then
39404      # It's still not found. Now this is an unrecoverable error.
39405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39406$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39407      has_space=`$ECHO "$complete" | $GREP " "`
39408      if test "x$has_space" != x; then
39409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39411      fi
39412      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39413    fi
39414  fi
39415
39416  # Now new_path has a complete unix path to the binary
39417  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39418    # Keep paths in /bin as-is, but remove trailing .exe if any
39419    new_path="${new_path/%.exe/}"
39420    # Do not save /bin paths to all_fixpath_prefixes!
39421  else
39422    # Not in mixed or Windows style, start by that.
39423    new_path=`cmd //c echo $new_path`
39424
39425  input_path="$new_path"
39426  # Check if we need to convert this using DOS-style short mode. If the path
39427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39428  # take no chances and rewrite it.
39429  # Note: m4 eats our [], so we need to use [ and ] instead.
39430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39431  if test "x$has_forbidden_chars" != x; then
39432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39434  fi
39435
39436    # Output is in $new_path
39437
39438  windows_path="$new_path"
39439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39440    unix_path=`$CYGPATH -u "$windows_path"`
39441    new_path="$unix_path"
39442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39444    new_path="$unix_path"
39445  fi
39446
39447    # remove trailing .exe if any
39448    new_path="${new_path/%.exe/}"
39449
39450    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39451    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39452  fi
39453
39454  else
39455    # We're on a posix platform. Hooray! :)
39456    # First separate the path from the arguments. This will split at the first
39457    # space.
39458    complete="$OBJDUMP"
39459    path="${complete%% *}"
39460    tmp="$complete EOL"
39461    arguments="${tmp#* }"
39462
39463    # Cannot rely on the command "which" here since it doesn't always work.
39464    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39465    if test -z "$is_absolute_path"; then
39466      # Path to executable is not absolute. Find it.
39467      IFS_save="$IFS"
39468      IFS=:
39469      for p in $PATH; do
39470        if test -f "$p/$path" && test -x "$p/$path"; then
39471          new_path="$p/$path"
39472          break
39473        fi
39474      done
39475      IFS="$IFS_save"
39476    else
39477      # This is an absolute path, we can use it without further modifications.
39478      new_path="$path"
39479    fi
39480
39481    if test "x$new_path" = x; then
39482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39483$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39484      has_space=`$ECHO "$complete" | $GREP " "`
39485      if test "x$has_space" != x; then
39486        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39487$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39488      fi
39489      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39490    fi
39491  fi
39492
39493  # Now join together the path and the arguments once again
39494  if test "x$arguments" != xEOL; then
39495    new_complete="$new_path ${arguments% *}"
39496  else
39497    new_complete="$new_path"
39498  fi
39499
39500  if test "x$complete" != "x$new_complete"; then
39501    OBJDUMP="$new_complete"
39502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39503$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39504  fi
39505
39506  fi
39507
39508
39509  # Restore old path.
39510  PATH="$OLD_PATH"
39511
39512  # Restore the flags to the user specified values.
39513  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39514  CFLAGS="$ORG_CFLAGS"
39515  CXXFLAGS="$ORG_CXXFLAGS"
39516  OBJCFLAGS="$ORG_OBJCFLAGS"
39517
39518
39519# Finally do some processing after the detection phase
39520
39521  if test "x$COMPILE_TYPE" = "xcross"; then
39522    # Now we need to find a C/C++ compiler that can build executables for the
39523    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39524    # used once. Also, we need to do this without adding a tools dir to the
39525    # path, otherwise we might pick up cross-compilers which don't use standard
39526    # naming.
39527
39528    # FIXME: we should list the discovered compilers as an exclude pattern!
39529    # If we do that, we can do this detection before POST_DETECTION, and still
39530    # find the build compilers in the tools dir, if needed.
39531
39532
39533  # Publish this variable in the help.
39534
39535
39536  if test "x$BUILD_CC" = x; then
39537    # The variable is not set by user, try to locate tool using the code snippet
39538    for ac_prog in cl cc gcc
39539do
39540  # Extract the first word of "$ac_prog", so it can be a program name with args.
39541set dummy $ac_prog; ac_word=$2
39542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39543$as_echo_n "checking for $ac_word... " >&6; }
39544if ${ac_cv_path_BUILD_CC+:} false; then :
39545  $as_echo_n "(cached) " >&6
39546else
39547  case $BUILD_CC in
39548  [\\/]* | ?:[\\/]*)
39549  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39550  ;;
39551  *)
39552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39553for as_dir in $PATH
39554do
39555  IFS=$as_save_IFS
39556  test -z "$as_dir" && as_dir=.
39557    for ac_exec_ext in '' $ac_executable_extensions; do
39558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39559    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39561    break 2
39562  fi
39563done
39564  done
39565IFS=$as_save_IFS
39566
39567  ;;
39568esac
39569fi
39570BUILD_CC=$ac_cv_path_BUILD_CC
39571if test -n "$BUILD_CC"; then
39572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39573$as_echo "$BUILD_CC" >&6; }
39574else
39575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39576$as_echo "no" >&6; }
39577fi
39578
39579
39580  test -n "$BUILD_CC" && break
39581done
39582
39583  else
39584    # The variable is set, but is it from the command line or the environment?
39585
39586    # Try to remove the string !BUILD_CC! from our list.
39587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39589      # If it failed, the variable was not from the command line. Ignore it,
39590      # but warn the user (except for BASH, which is always set by the calling BASH).
39591      if test "xBUILD_CC" != xBASH; then
39592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39593$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39594      fi
39595      # Try to locate tool using the code snippet
39596      for ac_prog in cl cc gcc
39597do
39598  # Extract the first word of "$ac_prog", so it can be a program name with args.
39599set dummy $ac_prog; ac_word=$2
39600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39601$as_echo_n "checking for $ac_word... " >&6; }
39602if ${ac_cv_path_BUILD_CC+:} false; then :
39603  $as_echo_n "(cached) " >&6
39604else
39605  case $BUILD_CC in
39606  [\\/]* | ?:[\\/]*)
39607  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39608  ;;
39609  *)
39610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39611for as_dir in $PATH
39612do
39613  IFS=$as_save_IFS
39614  test -z "$as_dir" && as_dir=.
39615    for ac_exec_ext in '' $ac_executable_extensions; do
39616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39617    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39619    break 2
39620  fi
39621done
39622  done
39623IFS=$as_save_IFS
39624
39625  ;;
39626esac
39627fi
39628BUILD_CC=$ac_cv_path_BUILD_CC
39629if test -n "$BUILD_CC"; then
39630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39631$as_echo "$BUILD_CC" >&6; }
39632else
39633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39634$as_echo "no" >&6; }
39635fi
39636
39637
39638  test -n "$BUILD_CC" && break
39639done
39640
39641    else
39642      # If it succeeded, then it was overridden by the user. We will use it
39643      # for the tool.
39644
39645      # First remove it from the list of overridden variables, so we can test
39646      # for unknown variables in the end.
39647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39648
39649      # Check if the provided tool contains a complete path.
39650      tool_specified="$BUILD_CC"
39651      tool_basename="${tool_specified##*/}"
39652      if test "x$tool_basename" = "x$tool_specified"; then
39653        # A command without a complete path is provided, search $PATH.
39654        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39655$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39656        # Extract the first word of "$tool_basename", so it can be a program name with args.
39657set dummy $tool_basename; ac_word=$2
39658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39659$as_echo_n "checking for $ac_word... " >&6; }
39660if ${ac_cv_path_BUILD_CC+:} false; then :
39661  $as_echo_n "(cached) " >&6
39662else
39663  case $BUILD_CC in
39664  [\\/]* | ?:[\\/]*)
39665  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39666  ;;
39667  *)
39668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39669for as_dir in $PATH
39670do
39671  IFS=$as_save_IFS
39672  test -z "$as_dir" && as_dir=.
39673    for ac_exec_ext in '' $ac_executable_extensions; do
39674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39675    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39677    break 2
39678  fi
39679done
39680  done
39681IFS=$as_save_IFS
39682
39683  ;;
39684esac
39685fi
39686BUILD_CC=$ac_cv_path_BUILD_CC
39687if test -n "$BUILD_CC"; then
39688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39689$as_echo "$BUILD_CC" >&6; }
39690else
39691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39692$as_echo "no" >&6; }
39693fi
39694
39695
39696        if test "x$BUILD_CC" = x; then
39697          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39698        fi
39699      else
39700        # Otherwise we believe it is a complete path. Use it as it is.
39701        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39702$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39704$as_echo_n "checking for BUILD_CC... " >&6; }
39705        if test ! -x "$tool_specified"; then
39706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39707$as_echo "not found" >&6; }
39708          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39709        fi
39710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39711$as_echo "$tool_specified" >&6; }
39712      fi
39713    fi
39714  fi
39715
39716
39717
39718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39719
39720  # First separate the path from the arguments. This will split at the first
39721  # space.
39722  complete="$BUILD_CC"
39723  path="${complete%% *}"
39724  tmp="$complete EOL"
39725  arguments="${tmp#* }"
39726
39727  # Input might be given as Windows format, start by converting to
39728  # unix format.
39729  new_path=`$CYGPATH -u "$path"`
39730
39731  # Now try to locate executable using which
39732  new_path=`$WHICH "$new_path" 2> /dev/null`
39733  # bat and cmd files are not always considered executable in cygwin causing which
39734  # to not find them
39735  if test "x$new_path" = x \
39736      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39737      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39738    new_path=`$CYGPATH -u "$path"`
39739  fi
39740  if test "x$new_path" = x; then
39741    # Oops. Which didn't find the executable.
39742    # The splitting of arguments from the executable at a space might have been incorrect,
39743    # since paths with space are more likely in Windows. Give it another try with the whole
39744    # argument.
39745    path="$complete"
39746    arguments="EOL"
39747    new_path=`$CYGPATH -u "$path"`
39748    new_path=`$WHICH "$new_path" 2> /dev/null`
39749    # bat and cmd files are not always considered executable in cygwin causing which
39750    # to not find them
39751    if test "x$new_path" = x \
39752        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39753        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39754      new_path=`$CYGPATH -u "$path"`
39755    fi
39756    if test "x$new_path" = x; then
39757      # It's still not found. Now this is an unrecoverable error.
39758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39759$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39760      has_space=`$ECHO "$complete" | $GREP " "`
39761      if test "x$has_space" != x; then
39762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39764      fi
39765      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39766    fi
39767  fi
39768
39769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39772  # "foo.exe" is OK but "foo" is an error.
39773  #
39774  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39775  # It is also a way to make sure we got the proper file name for the real test later on.
39776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39777  if test "x$test_shortpath" = x; then
39778    # Short path failed, file does not exist as specified.
39779    # Try adding .exe or .cmd
39780    if test -f "${new_path}.exe"; then
39781      input_to_shortpath="${new_path}.exe"
39782    elif test -f "${new_path}.cmd"; then
39783      input_to_shortpath="${new_path}.cmd"
39784    else
39785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39786$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39787      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39788$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39789      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39790    fi
39791  else
39792    input_to_shortpath="$new_path"
39793  fi
39794
39795  # Call helper function which possibly converts this using DOS-style short mode.
39796  # If so, the updated path is stored in $new_path.
39797  new_path="$input_to_shortpath"
39798
39799  input_path="$input_to_shortpath"
39800  # Check if we need to convert this using DOS-style short mode. If the path
39801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39802  # take no chances and rewrite it.
39803  # Note: m4 eats our [], so we need to use [ and ] instead.
39804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39805  if test "x$has_forbidden_chars" != x; then
39806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39810      # Going to short mode and back again did indeed matter. Since short mode is
39811      # case insensitive, let's make it lowercase to improve readability.
39812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39813      # Now convert it back to Unix-stile (cygpath)
39814      input_path=`$CYGPATH -u "$shortmode_path"`
39815      new_path="$input_path"
39816    fi
39817  fi
39818
39819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39820  if test "x$test_cygdrive_prefix" = x; then
39821    # As a simple fix, exclude /usr/bin since it's not a real path.
39822    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39824      # a path prefixed by /cygdrive for fixpath to work.
39825      new_path="$CYGWIN_ROOT_PATH$input_path"
39826    fi
39827  fi
39828
39829  # remove trailing .exe if any
39830  new_path="${new_path/%.exe/}"
39831
39832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39833
39834  # First separate the path from the arguments. This will split at the first
39835  # space.
39836  complete="$BUILD_CC"
39837  path="${complete%% *}"
39838  tmp="$complete EOL"
39839  arguments="${tmp#* }"
39840
39841  # Input might be given as Windows format, start by converting to
39842  # unix format.
39843  new_path="$path"
39844
39845  windows_path="$new_path"
39846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39847    unix_path=`$CYGPATH -u "$windows_path"`
39848    new_path="$unix_path"
39849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39851    new_path="$unix_path"
39852  fi
39853
39854
39855  # Now try to locate executable using which
39856  new_path=`$WHICH "$new_path" 2> /dev/null`
39857
39858  if test "x$new_path" = x; then
39859    # Oops. Which didn't find the executable.
39860    # The splitting of arguments from the executable at a space might have been incorrect,
39861    # since paths with space are more likely in Windows. Give it another try with the whole
39862    # argument.
39863    path="$complete"
39864    arguments="EOL"
39865    new_path="$path"
39866
39867  windows_path="$new_path"
39868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39869    unix_path=`$CYGPATH -u "$windows_path"`
39870    new_path="$unix_path"
39871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39873    new_path="$unix_path"
39874  fi
39875
39876
39877    new_path=`$WHICH "$new_path" 2> /dev/null`
39878    # bat and cmd files are not always considered executable in MSYS causing which
39879    # to not find them
39880    if test "x$new_path" = x \
39881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39883      new_path="$path"
39884
39885  windows_path="$new_path"
39886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39887    unix_path=`$CYGPATH -u "$windows_path"`
39888    new_path="$unix_path"
39889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39891    new_path="$unix_path"
39892  fi
39893
39894    fi
39895
39896    if test "x$new_path" = x; then
39897      # It's still not found. Now this is an unrecoverable error.
39898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39899$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39900      has_space=`$ECHO "$complete" | $GREP " "`
39901      if test "x$has_space" != x; then
39902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39904      fi
39905      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39906    fi
39907  fi
39908
39909  # Now new_path has a complete unix path to the binary
39910  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39911    # Keep paths in /bin as-is, but remove trailing .exe if any
39912    new_path="${new_path/%.exe/}"
39913    # Do not save /bin paths to all_fixpath_prefixes!
39914  else
39915    # Not in mixed or Windows style, start by that.
39916    new_path=`cmd //c echo $new_path`
39917
39918  input_path="$new_path"
39919  # Check if we need to convert this using DOS-style short mode. If the path
39920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39921  # take no chances and rewrite it.
39922  # Note: m4 eats our [], so we need to use [ and ] instead.
39923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39924  if test "x$has_forbidden_chars" != x; then
39925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39927  fi
39928
39929    # Output is in $new_path
39930
39931  windows_path="$new_path"
39932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39933    unix_path=`$CYGPATH -u "$windows_path"`
39934    new_path="$unix_path"
39935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39937    new_path="$unix_path"
39938  fi
39939
39940    # remove trailing .exe if any
39941    new_path="${new_path/%.exe/}"
39942
39943    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39944    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39945  fi
39946
39947  else
39948    # We're on a posix platform. Hooray! :)
39949    # First separate the path from the arguments. This will split at the first
39950    # space.
39951    complete="$BUILD_CC"
39952    path="${complete%% *}"
39953    tmp="$complete EOL"
39954    arguments="${tmp#* }"
39955
39956    # Cannot rely on the command "which" here since it doesn't always work.
39957    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39958    if test -z "$is_absolute_path"; then
39959      # Path to executable is not absolute. Find it.
39960      IFS_save="$IFS"
39961      IFS=:
39962      for p in $PATH; do
39963        if test -f "$p/$path" && test -x "$p/$path"; then
39964          new_path="$p/$path"
39965          break
39966        fi
39967      done
39968      IFS="$IFS_save"
39969    else
39970      # This is an absolute path, we can use it without further modifications.
39971      new_path="$path"
39972    fi
39973
39974    if test "x$new_path" = x; then
39975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39976$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39977      has_space=`$ECHO "$complete" | $GREP " "`
39978      if test "x$has_space" != x; then
39979        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39980$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39981      fi
39982      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39983    fi
39984  fi
39985
39986  # Now join together the path and the arguments once again
39987  if test "x$arguments" != xEOL; then
39988    new_complete="$new_path ${arguments% *}"
39989  else
39990    new_complete="$new_path"
39991  fi
39992
39993  if test "x$complete" != "x$new_complete"; then
39994    BUILD_CC="$new_complete"
39995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39996$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39997  fi
39998
39999
40000
40001  # Publish this variable in the help.
40002
40003
40004  if test "x$BUILD_CXX" = x; then
40005    # The variable is not set by user, try to locate tool using the code snippet
40006    for ac_prog in cl CC g++
40007do
40008  # Extract the first word of "$ac_prog", so it can be a program name with args.
40009set dummy $ac_prog; ac_word=$2
40010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40011$as_echo_n "checking for $ac_word... " >&6; }
40012if ${ac_cv_path_BUILD_CXX+:} false; then :
40013  $as_echo_n "(cached) " >&6
40014else
40015  case $BUILD_CXX in
40016  [\\/]* | ?:[\\/]*)
40017  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40018  ;;
40019  *)
40020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40021for as_dir in $PATH
40022do
40023  IFS=$as_save_IFS
40024  test -z "$as_dir" && as_dir=.
40025    for ac_exec_ext in '' $ac_executable_extensions; do
40026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40027    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40029    break 2
40030  fi
40031done
40032  done
40033IFS=$as_save_IFS
40034
40035  ;;
40036esac
40037fi
40038BUILD_CXX=$ac_cv_path_BUILD_CXX
40039if test -n "$BUILD_CXX"; then
40040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40041$as_echo "$BUILD_CXX" >&6; }
40042else
40043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40044$as_echo "no" >&6; }
40045fi
40046
40047
40048  test -n "$BUILD_CXX" && break
40049done
40050
40051  else
40052    # The variable is set, but is it from the command line or the environment?
40053
40054    # Try to remove the string !BUILD_CXX! from our list.
40055    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
40056    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40057      # If it failed, the variable was not from the command line. Ignore it,
40058      # but warn the user (except for BASH, which is always set by the calling BASH).
40059      if test "xBUILD_CXX" != xBASH; then
40060        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
40061$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
40062      fi
40063      # Try to locate tool using the code snippet
40064      for ac_prog in cl CC g++
40065do
40066  # Extract the first word of "$ac_prog", so it can be a program name with args.
40067set dummy $ac_prog; ac_word=$2
40068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40069$as_echo_n "checking for $ac_word... " >&6; }
40070if ${ac_cv_path_BUILD_CXX+:} false; then :
40071  $as_echo_n "(cached) " >&6
40072else
40073  case $BUILD_CXX in
40074  [\\/]* | ?:[\\/]*)
40075  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40076  ;;
40077  *)
40078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40079for as_dir in $PATH
40080do
40081  IFS=$as_save_IFS
40082  test -z "$as_dir" && as_dir=.
40083    for ac_exec_ext in '' $ac_executable_extensions; do
40084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40085    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40087    break 2
40088  fi
40089done
40090  done
40091IFS=$as_save_IFS
40092
40093  ;;
40094esac
40095fi
40096BUILD_CXX=$ac_cv_path_BUILD_CXX
40097if test -n "$BUILD_CXX"; then
40098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40099$as_echo "$BUILD_CXX" >&6; }
40100else
40101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40102$as_echo "no" >&6; }
40103fi
40104
40105
40106  test -n "$BUILD_CXX" && break
40107done
40108
40109    else
40110      # If it succeeded, then it was overridden by the user. We will use it
40111      # for the tool.
40112
40113      # First remove it from the list of overridden variables, so we can test
40114      # for unknown variables in the end.
40115      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40116
40117      # Check if the provided tool contains a complete path.
40118      tool_specified="$BUILD_CXX"
40119      tool_basename="${tool_specified##*/}"
40120      if test "x$tool_basename" = "x$tool_specified"; then
40121        # A command without a complete path is provided, search $PATH.
40122        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40123$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40124        # Extract the first word of "$tool_basename", so it can be a program name with args.
40125set dummy $tool_basename; ac_word=$2
40126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40127$as_echo_n "checking for $ac_word... " >&6; }
40128if ${ac_cv_path_BUILD_CXX+:} false; then :
40129  $as_echo_n "(cached) " >&6
40130else
40131  case $BUILD_CXX in
40132  [\\/]* | ?:[\\/]*)
40133  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40134  ;;
40135  *)
40136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40137for as_dir in $PATH
40138do
40139  IFS=$as_save_IFS
40140  test -z "$as_dir" && as_dir=.
40141    for ac_exec_ext in '' $ac_executable_extensions; do
40142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40143    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40145    break 2
40146  fi
40147done
40148  done
40149IFS=$as_save_IFS
40150
40151  ;;
40152esac
40153fi
40154BUILD_CXX=$ac_cv_path_BUILD_CXX
40155if test -n "$BUILD_CXX"; then
40156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40157$as_echo "$BUILD_CXX" >&6; }
40158else
40159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40160$as_echo "no" >&6; }
40161fi
40162
40163
40164        if test "x$BUILD_CXX" = x; then
40165          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40166        fi
40167      else
40168        # Otherwise we believe it is a complete path. Use it as it is.
40169        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40170$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40172$as_echo_n "checking for BUILD_CXX... " >&6; }
40173        if test ! -x "$tool_specified"; then
40174          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40175$as_echo "not found" >&6; }
40176          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40177        fi
40178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40179$as_echo "$tool_specified" >&6; }
40180      fi
40181    fi
40182  fi
40183
40184
40185
40186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40187
40188  # First separate the path from the arguments. This will split at the first
40189  # space.
40190  complete="$BUILD_CXX"
40191  path="${complete%% *}"
40192  tmp="$complete EOL"
40193  arguments="${tmp#* }"
40194
40195  # Input might be given as Windows format, start by converting to
40196  # unix format.
40197  new_path=`$CYGPATH -u "$path"`
40198
40199  # Now try to locate executable using which
40200  new_path=`$WHICH "$new_path" 2> /dev/null`
40201  # bat and cmd files are not always considered executable in cygwin causing which
40202  # to not find them
40203  if test "x$new_path" = x \
40204      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40205      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40206    new_path=`$CYGPATH -u "$path"`
40207  fi
40208  if test "x$new_path" = x; then
40209    # Oops. Which didn't find the executable.
40210    # The splitting of arguments from the executable at a space might have been incorrect,
40211    # since paths with space are more likely in Windows. Give it another try with the whole
40212    # argument.
40213    path="$complete"
40214    arguments="EOL"
40215    new_path=`$CYGPATH -u "$path"`
40216    new_path=`$WHICH "$new_path" 2> /dev/null`
40217    # bat and cmd files are not always considered executable in cygwin causing which
40218    # to not find them
40219    if test "x$new_path" = x \
40220        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40221        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40222      new_path=`$CYGPATH -u "$path"`
40223    fi
40224    if test "x$new_path" = x; then
40225      # It's still not found. Now this is an unrecoverable error.
40226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40227$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40228      has_space=`$ECHO "$complete" | $GREP " "`
40229      if test "x$has_space" != x; then
40230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40232      fi
40233      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40234    fi
40235  fi
40236
40237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40240  # "foo.exe" is OK but "foo" is an error.
40241  #
40242  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40243  # It is also a way to make sure we got the proper file name for the real test later on.
40244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40245  if test "x$test_shortpath" = x; then
40246    # Short path failed, file does not exist as specified.
40247    # Try adding .exe or .cmd
40248    if test -f "${new_path}.exe"; then
40249      input_to_shortpath="${new_path}.exe"
40250    elif test -f "${new_path}.cmd"; then
40251      input_to_shortpath="${new_path}.cmd"
40252    else
40253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40254$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40255      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40256$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40257      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40258    fi
40259  else
40260    input_to_shortpath="$new_path"
40261  fi
40262
40263  # Call helper function which possibly converts this using DOS-style short mode.
40264  # If so, the updated path is stored in $new_path.
40265  new_path="$input_to_shortpath"
40266
40267  input_path="$input_to_shortpath"
40268  # Check if we need to convert this using DOS-style short mode. If the path
40269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40270  # take no chances and rewrite it.
40271  # Note: m4 eats our [], so we need to use [ and ] instead.
40272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40273  if test "x$has_forbidden_chars" != x; then
40274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40275    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40276    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40277    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40278      # Going to short mode and back again did indeed matter. Since short mode is
40279      # case insensitive, let's make it lowercase to improve readability.
40280      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40281      # Now convert it back to Unix-stile (cygpath)
40282      input_path=`$CYGPATH -u "$shortmode_path"`
40283      new_path="$input_path"
40284    fi
40285  fi
40286
40287  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40288  if test "x$test_cygdrive_prefix" = x; then
40289    # As a simple fix, exclude /usr/bin since it's not a real path.
40290    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40291      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40292      # a path prefixed by /cygdrive for fixpath to work.
40293      new_path="$CYGWIN_ROOT_PATH$input_path"
40294    fi
40295  fi
40296
40297  # remove trailing .exe if any
40298  new_path="${new_path/%.exe/}"
40299
40300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40301
40302  # First separate the path from the arguments. This will split at the first
40303  # space.
40304  complete="$BUILD_CXX"
40305  path="${complete%% *}"
40306  tmp="$complete EOL"
40307  arguments="${tmp#* }"
40308
40309  # Input might be given as Windows format, start by converting to
40310  # unix format.
40311  new_path="$path"
40312
40313  windows_path="$new_path"
40314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40315    unix_path=`$CYGPATH -u "$windows_path"`
40316    new_path="$unix_path"
40317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40319    new_path="$unix_path"
40320  fi
40321
40322
40323  # Now try to locate executable using which
40324  new_path=`$WHICH "$new_path" 2> /dev/null`
40325
40326  if test "x$new_path" = x; then
40327    # Oops. Which didn't find the executable.
40328    # The splitting of arguments from the executable at a space might have been incorrect,
40329    # since paths with space are more likely in Windows. Give it another try with the whole
40330    # argument.
40331    path="$complete"
40332    arguments="EOL"
40333    new_path="$path"
40334
40335  windows_path="$new_path"
40336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40337    unix_path=`$CYGPATH -u "$windows_path"`
40338    new_path="$unix_path"
40339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40341    new_path="$unix_path"
40342  fi
40343
40344
40345    new_path=`$WHICH "$new_path" 2> /dev/null`
40346    # bat and cmd files are not always considered executable in MSYS causing which
40347    # to not find them
40348    if test "x$new_path" = x \
40349        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40350        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40351      new_path="$path"
40352
40353  windows_path="$new_path"
40354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40355    unix_path=`$CYGPATH -u "$windows_path"`
40356    new_path="$unix_path"
40357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40359    new_path="$unix_path"
40360  fi
40361
40362    fi
40363
40364    if test "x$new_path" = x; then
40365      # It's still not found. Now this is an unrecoverable error.
40366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40367$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40368      has_space=`$ECHO "$complete" | $GREP " "`
40369      if test "x$has_space" != x; then
40370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40372      fi
40373      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40374    fi
40375  fi
40376
40377  # Now new_path has a complete unix path to the binary
40378  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40379    # Keep paths in /bin as-is, but remove trailing .exe if any
40380    new_path="${new_path/%.exe/}"
40381    # Do not save /bin paths to all_fixpath_prefixes!
40382  else
40383    # Not in mixed or Windows style, start by that.
40384    new_path=`cmd //c echo $new_path`
40385
40386  input_path="$new_path"
40387  # Check if we need to convert this using DOS-style short mode. If the path
40388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40389  # take no chances and rewrite it.
40390  # Note: m4 eats our [], so we need to use [ and ] instead.
40391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40392  if test "x$has_forbidden_chars" != x; then
40393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40395  fi
40396
40397    # Output is in $new_path
40398
40399  windows_path="$new_path"
40400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40401    unix_path=`$CYGPATH -u "$windows_path"`
40402    new_path="$unix_path"
40403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40405    new_path="$unix_path"
40406  fi
40407
40408    # remove trailing .exe if any
40409    new_path="${new_path/%.exe/}"
40410
40411    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40412    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40413  fi
40414
40415  else
40416    # We're on a posix platform. Hooray! :)
40417    # First separate the path from the arguments. This will split at the first
40418    # space.
40419    complete="$BUILD_CXX"
40420    path="${complete%% *}"
40421    tmp="$complete EOL"
40422    arguments="${tmp#* }"
40423
40424    # Cannot rely on the command "which" here since it doesn't always work.
40425    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40426    if test -z "$is_absolute_path"; then
40427      # Path to executable is not absolute. Find it.
40428      IFS_save="$IFS"
40429      IFS=:
40430      for p in $PATH; do
40431        if test -f "$p/$path" && test -x "$p/$path"; then
40432          new_path="$p/$path"
40433          break
40434        fi
40435      done
40436      IFS="$IFS_save"
40437    else
40438      # This is an absolute path, we can use it without further modifications.
40439      new_path="$path"
40440    fi
40441
40442    if test "x$new_path" = x; then
40443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40444$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40445      has_space=`$ECHO "$complete" | $GREP " "`
40446      if test "x$has_space" != x; then
40447        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40448$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40449      fi
40450      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40451    fi
40452  fi
40453
40454  # Now join together the path and the arguments once again
40455  if test "x$arguments" != xEOL; then
40456    new_complete="$new_path ${arguments% *}"
40457  else
40458    new_complete="$new_path"
40459  fi
40460
40461  if test "x$complete" != "x$new_complete"; then
40462    BUILD_CXX="$new_complete"
40463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40464$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40465  fi
40466
40467
40468
40469  # Publish this variable in the help.
40470
40471
40472  if test "x$BUILD_LD" = x; then
40473    # The variable is not set by user, try to locate tool using the code snippet
40474    for ac_prog in ld
40475do
40476  # Extract the first word of "$ac_prog", so it can be a program name with args.
40477set dummy $ac_prog; ac_word=$2
40478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40479$as_echo_n "checking for $ac_word... " >&6; }
40480if ${ac_cv_path_BUILD_LD+:} false; then :
40481  $as_echo_n "(cached) " >&6
40482else
40483  case $BUILD_LD in
40484  [\\/]* | ?:[\\/]*)
40485  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40486  ;;
40487  *)
40488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40489for as_dir in $PATH
40490do
40491  IFS=$as_save_IFS
40492  test -z "$as_dir" && as_dir=.
40493    for ac_exec_ext in '' $ac_executable_extensions; do
40494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40495    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40497    break 2
40498  fi
40499done
40500  done
40501IFS=$as_save_IFS
40502
40503  ;;
40504esac
40505fi
40506BUILD_LD=$ac_cv_path_BUILD_LD
40507if test -n "$BUILD_LD"; then
40508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40509$as_echo "$BUILD_LD" >&6; }
40510else
40511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40512$as_echo "no" >&6; }
40513fi
40514
40515
40516  test -n "$BUILD_LD" && break
40517done
40518
40519  else
40520    # The variable is set, but is it from the command line or the environment?
40521
40522    # Try to remove the string !BUILD_LD! from our list.
40523    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40524    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40525      # If it failed, the variable was not from the command line. Ignore it,
40526      # but warn the user (except for BASH, which is always set by the calling BASH).
40527      if test "xBUILD_LD" != xBASH; then
40528        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40529$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40530      fi
40531      # Try to locate tool using the code snippet
40532      for ac_prog in ld
40533do
40534  # Extract the first word of "$ac_prog", so it can be a program name with args.
40535set dummy $ac_prog; ac_word=$2
40536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40537$as_echo_n "checking for $ac_word... " >&6; }
40538if ${ac_cv_path_BUILD_LD+:} false; then :
40539  $as_echo_n "(cached) " >&6
40540else
40541  case $BUILD_LD in
40542  [\\/]* | ?:[\\/]*)
40543  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40544  ;;
40545  *)
40546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40547for as_dir in $PATH
40548do
40549  IFS=$as_save_IFS
40550  test -z "$as_dir" && as_dir=.
40551    for ac_exec_ext in '' $ac_executable_extensions; do
40552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40553    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40555    break 2
40556  fi
40557done
40558  done
40559IFS=$as_save_IFS
40560
40561  ;;
40562esac
40563fi
40564BUILD_LD=$ac_cv_path_BUILD_LD
40565if test -n "$BUILD_LD"; then
40566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40567$as_echo "$BUILD_LD" >&6; }
40568else
40569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40570$as_echo "no" >&6; }
40571fi
40572
40573
40574  test -n "$BUILD_LD" && break
40575done
40576
40577    else
40578      # If it succeeded, then it was overridden by the user. We will use it
40579      # for the tool.
40580
40581      # First remove it from the list of overridden variables, so we can test
40582      # for unknown variables in the end.
40583      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40584
40585      # Check if the provided tool contains a complete path.
40586      tool_specified="$BUILD_LD"
40587      tool_basename="${tool_specified##*/}"
40588      if test "x$tool_basename" = "x$tool_specified"; then
40589        # A command without a complete path is provided, search $PATH.
40590        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40591$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40592        # Extract the first word of "$tool_basename", so it can be a program name with args.
40593set dummy $tool_basename; ac_word=$2
40594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40595$as_echo_n "checking for $ac_word... " >&6; }
40596if ${ac_cv_path_BUILD_LD+:} false; then :
40597  $as_echo_n "(cached) " >&6
40598else
40599  case $BUILD_LD in
40600  [\\/]* | ?:[\\/]*)
40601  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40602  ;;
40603  *)
40604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40605for as_dir in $PATH
40606do
40607  IFS=$as_save_IFS
40608  test -z "$as_dir" && as_dir=.
40609    for ac_exec_ext in '' $ac_executable_extensions; do
40610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40611    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40613    break 2
40614  fi
40615done
40616  done
40617IFS=$as_save_IFS
40618
40619  ;;
40620esac
40621fi
40622BUILD_LD=$ac_cv_path_BUILD_LD
40623if test -n "$BUILD_LD"; then
40624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40625$as_echo "$BUILD_LD" >&6; }
40626else
40627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40628$as_echo "no" >&6; }
40629fi
40630
40631
40632        if test "x$BUILD_LD" = x; then
40633          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40634        fi
40635      else
40636        # Otherwise we believe it is a complete path. Use it as it is.
40637        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40638$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40640$as_echo_n "checking for BUILD_LD... " >&6; }
40641        if test ! -x "$tool_specified"; then
40642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40643$as_echo "not found" >&6; }
40644          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40645        fi
40646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40647$as_echo "$tool_specified" >&6; }
40648      fi
40649    fi
40650  fi
40651
40652
40653
40654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40655
40656  # First separate the path from the arguments. This will split at the first
40657  # space.
40658  complete="$BUILD_LD"
40659  path="${complete%% *}"
40660  tmp="$complete EOL"
40661  arguments="${tmp#* }"
40662
40663  # Input might be given as Windows format, start by converting to
40664  # unix format.
40665  new_path=`$CYGPATH -u "$path"`
40666
40667  # Now try to locate executable using which
40668  new_path=`$WHICH "$new_path" 2> /dev/null`
40669  # bat and cmd files are not always considered executable in cygwin causing which
40670  # to not find them
40671  if test "x$new_path" = x \
40672      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40673      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40674    new_path=`$CYGPATH -u "$path"`
40675  fi
40676  if test "x$new_path" = x; then
40677    # Oops. Which didn't find the executable.
40678    # The splitting of arguments from the executable at a space might have been incorrect,
40679    # since paths with space are more likely in Windows. Give it another try with the whole
40680    # argument.
40681    path="$complete"
40682    arguments="EOL"
40683    new_path=`$CYGPATH -u "$path"`
40684    new_path=`$WHICH "$new_path" 2> /dev/null`
40685    # bat and cmd files are not always considered executable in cygwin causing which
40686    # to not find them
40687    if test "x$new_path" = x \
40688        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40689        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40690      new_path=`$CYGPATH -u "$path"`
40691    fi
40692    if test "x$new_path" = x; then
40693      # It's still not found. Now this is an unrecoverable error.
40694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40695$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40696      has_space=`$ECHO "$complete" | $GREP " "`
40697      if test "x$has_space" != x; then
40698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40700      fi
40701      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40702    fi
40703  fi
40704
40705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40708  # "foo.exe" is OK but "foo" is an error.
40709  #
40710  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40711  # It is also a way to make sure we got the proper file name for the real test later on.
40712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40713  if test "x$test_shortpath" = x; then
40714    # Short path failed, file does not exist as specified.
40715    # Try adding .exe or .cmd
40716    if test -f "${new_path}.exe"; then
40717      input_to_shortpath="${new_path}.exe"
40718    elif test -f "${new_path}.cmd"; then
40719      input_to_shortpath="${new_path}.cmd"
40720    else
40721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40722$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40723      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40724$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40725      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40726    fi
40727  else
40728    input_to_shortpath="$new_path"
40729  fi
40730
40731  # Call helper function which possibly converts this using DOS-style short mode.
40732  # If so, the updated path is stored in $new_path.
40733  new_path="$input_to_shortpath"
40734
40735  input_path="$input_to_shortpath"
40736  # Check if we need to convert this using DOS-style short mode. If the path
40737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40738  # take no chances and rewrite it.
40739  # Note: m4 eats our [], so we need to use [ and ] instead.
40740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40741  if test "x$has_forbidden_chars" != x; then
40742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40746      # Going to short mode and back again did indeed matter. Since short mode is
40747      # case insensitive, let's make it lowercase to improve readability.
40748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40749      # Now convert it back to Unix-stile (cygpath)
40750      input_path=`$CYGPATH -u "$shortmode_path"`
40751      new_path="$input_path"
40752    fi
40753  fi
40754
40755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40756  if test "x$test_cygdrive_prefix" = x; then
40757    # As a simple fix, exclude /usr/bin since it's not a real path.
40758    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40760      # a path prefixed by /cygdrive for fixpath to work.
40761      new_path="$CYGWIN_ROOT_PATH$input_path"
40762    fi
40763  fi
40764
40765  # remove trailing .exe if any
40766  new_path="${new_path/%.exe/}"
40767
40768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40769
40770  # First separate the path from the arguments. This will split at the first
40771  # space.
40772  complete="$BUILD_LD"
40773  path="${complete%% *}"
40774  tmp="$complete EOL"
40775  arguments="${tmp#* }"
40776
40777  # Input might be given as Windows format, start by converting to
40778  # unix format.
40779  new_path="$path"
40780
40781  windows_path="$new_path"
40782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40783    unix_path=`$CYGPATH -u "$windows_path"`
40784    new_path="$unix_path"
40785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40787    new_path="$unix_path"
40788  fi
40789
40790
40791  # Now try to locate executable using which
40792  new_path=`$WHICH "$new_path" 2> /dev/null`
40793
40794  if test "x$new_path" = x; then
40795    # Oops. Which didn't find the executable.
40796    # The splitting of arguments from the executable at a space might have been incorrect,
40797    # since paths with space are more likely in Windows. Give it another try with the whole
40798    # argument.
40799    path="$complete"
40800    arguments="EOL"
40801    new_path="$path"
40802
40803  windows_path="$new_path"
40804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40805    unix_path=`$CYGPATH -u "$windows_path"`
40806    new_path="$unix_path"
40807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40809    new_path="$unix_path"
40810  fi
40811
40812
40813    new_path=`$WHICH "$new_path" 2> /dev/null`
40814    # bat and cmd files are not always considered executable in MSYS causing which
40815    # to not find them
40816    if test "x$new_path" = x \
40817        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40818        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40819      new_path="$path"
40820
40821  windows_path="$new_path"
40822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40823    unix_path=`$CYGPATH -u "$windows_path"`
40824    new_path="$unix_path"
40825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40827    new_path="$unix_path"
40828  fi
40829
40830    fi
40831
40832    if test "x$new_path" = x; then
40833      # It's still not found. Now this is an unrecoverable error.
40834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40835$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40836      has_space=`$ECHO "$complete" | $GREP " "`
40837      if test "x$has_space" != x; then
40838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40840      fi
40841      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40842    fi
40843  fi
40844
40845  # Now new_path has a complete unix path to the binary
40846  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40847    # Keep paths in /bin as-is, but remove trailing .exe if any
40848    new_path="${new_path/%.exe/}"
40849    # Do not save /bin paths to all_fixpath_prefixes!
40850  else
40851    # Not in mixed or Windows style, start by that.
40852    new_path=`cmd //c echo $new_path`
40853
40854  input_path="$new_path"
40855  # Check if we need to convert this using DOS-style short mode. If the path
40856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40857  # take no chances and rewrite it.
40858  # Note: m4 eats our [], so we need to use [ and ] instead.
40859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40860  if test "x$has_forbidden_chars" != x; then
40861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40863  fi
40864
40865    # Output is in $new_path
40866
40867  windows_path="$new_path"
40868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40869    unix_path=`$CYGPATH -u "$windows_path"`
40870    new_path="$unix_path"
40871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40873    new_path="$unix_path"
40874  fi
40875
40876    # remove trailing .exe if any
40877    new_path="${new_path/%.exe/}"
40878
40879    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40880    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40881  fi
40882
40883  else
40884    # We're on a posix platform. Hooray! :)
40885    # First separate the path from the arguments. This will split at the first
40886    # space.
40887    complete="$BUILD_LD"
40888    path="${complete%% *}"
40889    tmp="$complete EOL"
40890    arguments="${tmp#* }"
40891
40892    # Cannot rely on the command "which" here since it doesn't always work.
40893    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40894    if test -z "$is_absolute_path"; then
40895      # Path to executable is not absolute. Find it.
40896      IFS_save="$IFS"
40897      IFS=:
40898      for p in $PATH; do
40899        if test -f "$p/$path" && test -x "$p/$path"; then
40900          new_path="$p/$path"
40901          break
40902        fi
40903      done
40904      IFS="$IFS_save"
40905    else
40906      # This is an absolute path, we can use it without further modifications.
40907      new_path="$path"
40908    fi
40909
40910    if test "x$new_path" = x; then
40911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40912$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40913      has_space=`$ECHO "$complete" | $GREP " "`
40914      if test "x$has_space" != x; then
40915        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40916$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40917      fi
40918      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40919    fi
40920  fi
40921
40922  # Now join together the path and the arguments once again
40923  if test "x$arguments" != xEOL; then
40924    new_complete="$new_path ${arguments% *}"
40925  else
40926    new_complete="$new_path"
40927  fi
40928
40929  if test "x$complete" != "x$new_complete"; then
40930    BUILD_LD="$new_complete"
40931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40932$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40933  fi
40934
40935  else
40936    # If we are not cross compiling, use the normal target compilers for
40937    # building the build platform executables.
40938    BUILD_CC="$CC"
40939    BUILD_CXX="$CXX"
40940    BUILD_LD="$LD"
40941  fi
40942
40943
40944
40945
40946
40947
40948  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40949    # For hotspot, we need these in Windows mixed path,
40950    # so rewrite them all. Need added .exe suffix.
40951    HOTSPOT_CXX="$CXX.exe"
40952    HOTSPOT_LD="$LD.exe"
40953    HOTSPOT_MT="$MT.exe"
40954    HOTSPOT_RC="$RC.exe"
40955
40956  unix_path="$HOTSPOT_CXX"
40957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40958    windows_path=`$CYGPATH -m "$unix_path"`
40959    HOTSPOT_CXX="$windows_path"
40960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40961    windows_path=`cmd //c echo $unix_path`
40962    HOTSPOT_CXX="$windows_path"
40963  fi
40964
40965
40966  unix_path="$HOTSPOT_LD"
40967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40968    windows_path=`$CYGPATH -m "$unix_path"`
40969    HOTSPOT_LD="$windows_path"
40970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40971    windows_path=`cmd //c echo $unix_path`
40972    HOTSPOT_LD="$windows_path"
40973  fi
40974
40975
40976  unix_path="$HOTSPOT_MT"
40977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40978    windows_path=`$CYGPATH -m "$unix_path"`
40979    HOTSPOT_MT="$windows_path"
40980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40981    windows_path=`cmd //c echo $unix_path`
40982    HOTSPOT_MT="$windows_path"
40983  fi
40984
40985
40986  unix_path="$HOTSPOT_RC"
40987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40988    windows_path=`$CYGPATH -m "$unix_path"`
40989    HOTSPOT_RC="$windows_path"
40990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40991    windows_path=`cmd //c echo $unix_path`
40992    HOTSPOT_RC="$windows_path"
40993  fi
40994
40995
40996
40997  else
40998    HOTSPOT_CXX="$CXX"
40999    HOTSPOT_LD="$LD"
41000  fi
41001
41002
41003
41004  if test  "x$TOOLCHAIN_TYPE" = xclang; then
41005    USE_CLANG=true
41006  fi
41007
41008
41009  # LDEXE is the linker to use, when creating executables. Not really used.
41010  # FIXME: These should just be removed!
41011  LDEXE="$LD"
41012  LDEXECXX="$LDCXX"
41013
41014
41015
41016
41017
41018
41019  # The package path is used only on macosx?
41020  # FIXME: clean this up, and/or move it elsewhere.
41021  PACKAGE_PATH=/opt/local
41022
41023
41024  # Check for extra potential brokenness.
41025  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41026    # On Windows, double-check that we got the right compiler.
41027    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
41028    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
41029    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
41030      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
41031        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
41032      fi
41033    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
41034      if test "x$COMPILER_CPU_TEST" != "xx64"; then
41035        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
41036      fi
41037    fi
41038  fi
41039
41040  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41041    # If this is a --hash-style=gnu system, use --hash-style=both, why?
41042    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
41043    # This is later checked when setting flags.
41044
41045    # "-Og" suppported for GCC 4.8 and later
41046    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
41047
41048  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
41049$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
41050  supports=yes
41051
41052  saved_cflags="$CFLAGS"
41053  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
41054  ac_ext=c
41055ac_cpp='$CPP $CPPFLAGS'
41056ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41057ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41058ac_compiler_gnu=$ac_cv_c_compiler_gnu
41059
41060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41061/* end confdefs.h.  */
41062int i;
41063_ACEOF
41064if ac_fn_c_try_compile "$LINENO"; then :
41065
41066else
41067  supports=no
41068fi
41069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41070  ac_ext=cpp
41071ac_cpp='$CXXCPP $CPPFLAGS'
41072ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41073ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41074ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41075
41076  CFLAGS="$saved_cflags"
41077
41078  saved_cxxflags="$CXXFLAGS"
41079  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
41080  ac_ext=cpp
41081ac_cpp='$CXXCPP $CPPFLAGS'
41082ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41083ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41084ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41085
41086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41087/* end confdefs.h.  */
41088int i;
41089_ACEOF
41090if ac_fn_cxx_try_compile "$LINENO"; then :
41091
41092else
41093  supports=no
41094fi
41095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41096  ac_ext=cpp
41097ac_cpp='$CXXCPP $CPPFLAGS'
41098ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41099ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41100ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41101
41102  CXXFLAGS="$saved_cxxflags"
41103
41104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41105$as_echo "$supports" >&6; }
41106  if test "x$supports" = "xyes" ; then
41107    HAS_CFLAG_OPTIMIZE_DEBUG=true
41108  else
41109    HAS_CFLAG_OPTIMIZE_DEBUG=false
41110  fi
41111
41112
41113    # "-fsanitize=undefined" supported for GCC 4.9 and later
41114    CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG="-fsanitize=undefined -fsanitize-recover"
41115
41116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"" >&5
41117$as_echo_n "checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"... " >&6; }
41118  supports=yes
41119
41120  saved_cflags="$CFLAGS"
41121  CFLAGS="$CFLAGS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41122  ac_ext=c
41123ac_cpp='$CPP $CPPFLAGS'
41124ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41125ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41126ac_compiler_gnu=$ac_cv_c_compiler_gnu
41127
41128  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41129/* end confdefs.h.  */
41130int i;
41131_ACEOF
41132if ac_fn_c_try_compile "$LINENO"; then :
41133
41134else
41135  supports=no
41136fi
41137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41138  ac_ext=cpp
41139ac_cpp='$CXXCPP $CPPFLAGS'
41140ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41141ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41142ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41143
41144  CFLAGS="$saved_cflags"
41145
41146  saved_cxxflags="$CXXFLAGS"
41147  CXXFLAGS="$CXXFLAG $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41148  ac_ext=cpp
41149ac_cpp='$CXXCPP $CPPFLAGS'
41150ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41151ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41152ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41153
41154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41155/* end confdefs.h.  */
41156int i;
41157_ACEOF
41158if ac_fn_cxx_try_compile "$LINENO"; then :
41159
41160else
41161  supports=no
41162fi
41163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41164  ac_ext=cpp
41165ac_cpp='$CXXCPP $CPPFLAGS'
41166ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41167ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41168ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41169
41170  CXXFLAGS="$saved_cxxflags"
41171
41172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41173$as_echo "$supports" >&6; }
41174  if test "x$supports" = "xyes" ; then
41175    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=true
41176  else
41177    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=false
41178  fi
41179
41180
41181    # "-z relro" supported in GNU binutils 2.17 and later
41182    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41183
41184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41185$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41186  supports=yes
41187
41188  saved_ldflags="$LDFLAGS"
41189  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41190  ac_ext=c
41191ac_cpp='$CPP $CPPFLAGS'
41192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41194ac_compiler_gnu=$ac_cv_c_compiler_gnu
41195
41196  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41197/* end confdefs.h.  */
41198
41199int
41200main ()
41201{
41202
41203  ;
41204  return 0;
41205}
41206_ACEOF
41207if ac_fn_c_try_link "$LINENO"; then :
41208
41209else
41210  supports=no
41211fi
41212rm -f core conftest.err conftest.$ac_objext \
41213    conftest$ac_exeext conftest.$ac_ext
41214  ac_ext=cpp
41215ac_cpp='$CXXCPP $CPPFLAGS'
41216ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41217ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41218ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41219
41220  LDFLAGS="$saved_ldflags"
41221
41222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41223$as_echo "$supports" >&6; }
41224  if test "x$supports" = "xyes" ; then
41225    HAS_LINKER_RELRO=true
41226  else
41227    HAS_LINKER_RELRO=false
41228  fi
41229
41230
41231    # "-z now" supported in GNU binutils 2.11 and later
41232    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41233
41234  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41235$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41236  supports=yes
41237
41238  saved_ldflags="$LDFLAGS"
41239  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41240  ac_ext=c
41241ac_cpp='$CPP $CPPFLAGS'
41242ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41243ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41244ac_compiler_gnu=$ac_cv_c_compiler_gnu
41245
41246  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41247/* end confdefs.h.  */
41248
41249int
41250main ()
41251{
41252
41253  ;
41254  return 0;
41255}
41256_ACEOF
41257if ac_fn_c_try_link "$LINENO"; then :
41258
41259else
41260  supports=no
41261fi
41262rm -f core conftest.err conftest.$ac_objext \
41263    conftest$ac_exeext conftest.$ac_ext
41264  ac_ext=cpp
41265ac_cpp='$CXXCPP $CPPFLAGS'
41266ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41267ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41268ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41269
41270  LDFLAGS="$saved_ldflags"
41271
41272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41273$as_echo "$supports" >&6; }
41274  if test "x$supports" = "xyes" ; then
41275    HAS_LINKER_NOW=true
41276  else
41277    HAS_LINKER_NOW=false
41278  fi
41279
41280  fi
41281
41282  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41283  # in executable.'
41284  USING_BROKEN_SUSE_LD=no
41285  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41287$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41288    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41289    $ECHO "int main() { }" > main.c
41290    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41291      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41292$as_echo "no" >&6; }
41293      USING_BROKEN_SUSE_LD=no
41294    else
41295      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41296$as_echo "yes" >&6; }
41297      USING_BROKEN_SUSE_LD=yes
41298    fi
41299    rm -rf version-script.map main.c a.out
41300  fi
41301
41302
41303
41304# Setup the JTReg Regression Test Harness.
41305
41306
41307# Check whether --with-jtreg was given.
41308if test "${with_jtreg+set}" = set; then :
41309  withval=$with_jtreg;
41310else
41311  with_jtreg=no
41312fi
41313
41314
41315  if test "x$with_jtreg" = xno; then
41316    # jtreg disabled
41317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41318$as_echo_n "checking for jtreg... " >&6; }
41319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41320$as_echo "no" >&6; }
41321  else
41322    if test "x$with_jtreg" != xyes; then
41323      # with path specified.
41324      JT_HOME="$with_jtreg"
41325    fi
41326
41327    if test "x$JT_HOME" != x; then
41328      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41329$as_echo_n "checking for jtreg... " >&6; }
41330
41331      # use JT_HOME enviroment var.
41332
41333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41334
41335  # Input might be given as Windows format, start by converting to
41336  # unix format.
41337  path="$JT_HOME"
41338  new_path=`$CYGPATH -u "$path"`
41339
41340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41343  # "foo.exe" is OK but "foo" is an error.
41344  #
41345  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41346  # It is also a way to make sure we got the proper file name for the real test later on.
41347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41348  if test "x$test_shortpath" = x; then
41349    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41350$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41351    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41352  fi
41353
41354  # Call helper function which possibly converts this using DOS-style short mode.
41355  # If so, the updated path is stored in $new_path.
41356
41357  input_path="$new_path"
41358  # Check if we need to convert this using DOS-style short mode. If the path
41359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41360  # take no chances and rewrite it.
41361  # Note: m4 eats our [], so we need to use [ and ] instead.
41362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41363  if test "x$has_forbidden_chars" != x; then
41364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41368      # Going to short mode and back again did indeed matter. Since short mode is
41369      # case insensitive, let's make it lowercase to improve readability.
41370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41371      # Now convert it back to Unix-stile (cygpath)
41372      input_path=`$CYGPATH -u "$shortmode_path"`
41373      new_path="$input_path"
41374    fi
41375  fi
41376
41377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41378  if test "x$test_cygdrive_prefix" = x; then
41379    # As a simple fix, exclude /usr/bin since it's not a real path.
41380    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41382      # a path prefixed by /cygdrive for fixpath to work.
41383      new_path="$CYGWIN_ROOT_PATH$input_path"
41384    fi
41385  fi
41386
41387
41388  if test "x$path" != "x$new_path"; then
41389    JT_HOME="$new_path"
41390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41391$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41392  fi
41393
41394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41395
41396  path="$JT_HOME"
41397  has_colon=`$ECHO $path | $GREP ^.:`
41398  new_path="$path"
41399  if test "x$has_colon" = x; then
41400    # Not in mixed or Windows style, start by that.
41401    new_path=`cmd //c echo $path`
41402  fi
41403
41404
41405  input_path="$new_path"
41406  # Check if we need to convert this using DOS-style short mode. If the path
41407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41408  # take no chances and rewrite it.
41409  # Note: m4 eats our [], so we need to use [ and ] instead.
41410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41411  if test "x$has_forbidden_chars" != x; then
41412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41414  fi
41415
41416
41417  windows_path="$new_path"
41418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41419    unix_path=`$CYGPATH -u "$windows_path"`
41420    new_path="$unix_path"
41421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41423    new_path="$unix_path"
41424  fi
41425
41426  if test "x$path" != "x$new_path"; then
41427    JT_HOME="$new_path"
41428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41429$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41430  fi
41431
41432  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41433  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41434
41435  else
41436    # We're on a posix platform. Hooray! :)
41437    path="$JT_HOME"
41438    has_space=`$ECHO "$path" | $GREP " "`
41439    if test "x$has_space" != x; then
41440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41441$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41442      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41443    fi
41444
41445    # Use eval to expand a potential ~
41446    eval path="$path"
41447    if test ! -f "$path" && test ! -d "$path"; then
41448      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41449    fi
41450
41451    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41452  fi
41453
41454
41455      # jtreg win32 script works for everybody
41456      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41457
41458      if test ! -f "$JTREGEXE"; then
41459        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41460      fi
41461
41462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41463$as_echo "$JTREGEXE" >&6; }
41464    else
41465      # try to find jtreg on path
41466
41467
41468
41469  # Publish this variable in the help.
41470
41471
41472  if test "x$JTREGEXE" = x; then
41473    # The variable is not set by user, try to locate tool using the code snippet
41474    for ac_prog in jtreg
41475do
41476  # Extract the first word of "$ac_prog", so it can be a program name with args.
41477set dummy $ac_prog; ac_word=$2
41478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41479$as_echo_n "checking for $ac_word... " >&6; }
41480if ${ac_cv_path_JTREGEXE+:} false; then :
41481  $as_echo_n "(cached) " >&6
41482else
41483  case $JTREGEXE in
41484  [\\/]* | ?:[\\/]*)
41485  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41486  ;;
41487  *)
41488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41489for as_dir in $PATH
41490do
41491  IFS=$as_save_IFS
41492  test -z "$as_dir" && as_dir=.
41493    for ac_exec_ext in '' $ac_executable_extensions; do
41494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41495    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41497    break 2
41498  fi
41499done
41500  done
41501IFS=$as_save_IFS
41502
41503  ;;
41504esac
41505fi
41506JTREGEXE=$ac_cv_path_JTREGEXE
41507if test -n "$JTREGEXE"; then
41508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41509$as_echo "$JTREGEXE" >&6; }
41510else
41511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41512$as_echo "no" >&6; }
41513fi
41514
41515
41516  test -n "$JTREGEXE" && break
41517done
41518
41519  else
41520    # The variable is set, but is it from the command line or the environment?
41521
41522    # Try to remove the string !JTREGEXE! from our list.
41523    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41524    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41525      # If it failed, the variable was not from the command line. Ignore it,
41526      # but warn the user (except for BASH, which is always set by the calling BASH).
41527      if test "xJTREGEXE" != xBASH; then
41528        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41529$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41530      fi
41531      # Try to locate tool using the code snippet
41532      for ac_prog in jtreg
41533do
41534  # Extract the first word of "$ac_prog", so it can be a program name with args.
41535set dummy $ac_prog; ac_word=$2
41536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41537$as_echo_n "checking for $ac_word... " >&6; }
41538if ${ac_cv_path_JTREGEXE+:} false; then :
41539  $as_echo_n "(cached) " >&6
41540else
41541  case $JTREGEXE in
41542  [\\/]* | ?:[\\/]*)
41543  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41544  ;;
41545  *)
41546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41547for as_dir in $PATH
41548do
41549  IFS=$as_save_IFS
41550  test -z "$as_dir" && as_dir=.
41551    for ac_exec_ext in '' $ac_executable_extensions; do
41552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41553    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41555    break 2
41556  fi
41557done
41558  done
41559IFS=$as_save_IFS
41560
41561  ;;
41562esac
41563fi
41564JTREGEXE=$ac_cv_path_JTREGEXE
41565if test -n "$JTREGEXE"; then
41566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41567$as_echo "$JTREGEXE" >&6; }
41568else
41569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41570$as_echo "no" >&6; }
41571fi
41572
41573
41574  test -n "$JTREGEXE" && break
41575done
41576
41577    else
41578      # If it succeeded, then it was overridden by the user. We will use it
41579      # for the tool.
41580
41581      # First remove it from the list of overridden variables, so we can test
41582      # for unknown variables in the end.
41583      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41584
41585      # Check if the provided tool contains a complete path.
41586      tool_specified="$JTREGEXE"
41587      tool_basename="${tool_specified##*/}"
41588      if test "x$tool_basename" = "x$tool_specified"; then
41589        # A command without a complete path is provided, search $PATH.
41590        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41591$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41592        # Extract the first word of "$tool_basename", so it can be a program name with args.
41593set dummy $tool_basename; ac_word=$2
41594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41595$as_echo_n "checking for $ac_word... " >&6; }
41596if ${ac_cv_path_JTREGEXE+:} false; then :
41597  $as_echo_n "(cached) " >&6
41598else
41599  case $JTREGEXE in
41600  [\\/]* | ?:[\\/]*)
41601  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41602  ;;
41603  *)
41604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41605for as_dir in $PATH
41606do
41607  IFS=$as_save_IFS
41608  test -z "$as_dir" && as_dir=.
41609    for ac_exec_ext in '' $ac_executable_extensions; do
41610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41611    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41613    break 2
41614  fi
41615done
41616  done
41617IFS=$as_save_IFS
41618
41619  ;;
41620esac
41621fi
41622JTREGEXE=$ac_cv_path_JTREGEXE
41623if test -n "$JTREGEXE"; then
41624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41625$as_echo "$JTREGEXE" >&6; }
41626else
41627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41628$as_echo "no" >&6; }
41629fi
41630
41631
41632        if test "x$JTREGEXE" = x; then
41633          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41634        fi
41635      else
41636        # Otherwise we believe it is a complete path. Use it as it is.
41637        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41638$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41640$as_echo_n "checking for JTREGEXE... " >&6; }
41641        if test ! -x "$tool_specified"; then
41642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41643$as_echo "not found" >&6; }
41644          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41645        fi
41646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41647$as_echo "$tool_specified" >&6; }
41648      fi
41649    fi
41650  fi
41651
41652
41653
41654  if test "x$JTREGEXE" = x; then
41655    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41656  fi
41657
41658
41659      JT_HOME="`$DIRNAME $JTREGEXE`"
41660    fi
41661  fi
41662
41663
41664
41665
41666
41667
41668  # Option used to tell the compiler whether to create 32- or 64-bit executables
41669  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41670    COMPILER_TARGET_BITS_FLAG="-q"
41671  else
41672    COMPILER_TARGET_BITS_FLAG="-m"
41673  fi
41674
41675
41676  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41677  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41678    ARFLAGS="-r"
41679  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41680    ARFLAGS="-X64"
41681  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41682    # lib.exe is used as AR to create static libraries.
41683    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41684  else
41685    ARFLAGS=""
41686  fi
41687
41688
41689  ## Setup strip.
41690  # FIXME: should this really be per platform, or should it be per toolchain type?
41691  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41692  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41693  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41694    STRIPFLAGS="-g"
41695  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41696    STRIPFLAGS="-x"
41697  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41698    STRIPFLAGS="-S"
41699  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41700    STRIPFLAGS="-X32_64"
41701  fi
41702
41703  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41704    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41705  fi
41706
41707
41708  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41709    # FIXME: break out into MCSFLAGS
41710    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41711  fi
41712
41713
41714  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41715    CC_OUT_OPTION=-Fo
41716    EXE_OUT_OPTION=-out:
41717    LD_OUT_OPTION=-out:
41718    AR_OUT_OPTION=-out:
41719  else
41720    # The option used to specify the target .o,.a or .so file.
41721    # When compiling, how to specify the to be created object file.
41722    CC_OUT_OPTION='-o$(SPACE)'
41723    # When linking, how to specify the to be created executable.
41724    EXE_OUT_OPTION='-o$(SPACE)'
41725    # When linking, how to specify the to be created dynamically linkable library.
41726    LD_OUT_OPTION='-o$(SPACE)'
41727    # When archiving, how to specify the to be create static archive for object files.
41728    AR_OUT_OPTION='rcs$(SPACE)'
41729  fi
41730
41731
41732
41733
41734
41735  # On Windows, we need to set RC flags.
41736  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41737    RC_FLAGS="-nologo -l 0x409 -r"
41738    if test "x$VARIANT" = xOPT; then
41739      RC_FLAGS="$RC_FLAGS -d NDEBUG"
41740    fi
41741
41742    # The version variables used to create RC_FLAGS may be overridden
41743    # in a custom configure script, or possibly the command line.
41744    # Let those variables be expanded at make time in spec.gmk.
41745    # The \$ are escaped to the shell, and the $(...) variables
41746    # are evaluated by make.
41747    RC_FLAGS="$RC_FLAGS \
41748        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41749        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
41750        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41751        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41752        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41753        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41754        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41755  fi
41756
41757
41758  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41759    # silence copyright notice and other headers.
41760    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41761  fi
41762
41763  if test "x$SYSROOT" != "x"; then
41764    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41765      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41766        # Solaris Studio does not have a concept of sysroot. Instead we must
41767        # make sure the default include and lib dirs are appended to each
41768        # compile and link command line.
41769        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41770        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41771            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41772            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41773      fi
41774    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41775      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41776      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41777      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41778    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41779      SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
41780      SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
41781    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41782      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41783      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41784    fi
41785    # Propagate the sysroot args to hotspot
41786    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41787    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41788    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41789  fi
41790
41791  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41792  # set this here so it doesn't have to be peppered throughout the forest
41793  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41794    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41795    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41796  fi
41797
41798
41799
41800
41801
41802# FIXME: Currently we must test this after toolchain but before flags. Fix!
41803
41804# Now we can test some aspects on the target using configure macros.
41805
41806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41807$as_echo_n "checking for ANSI C header files... " >&6; }
41808if ${ac_cv_header_stdc+:} false; then :
41809  $as_echo_n "(cached) " >&6
41810else
41811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41812/* end confdefs.h.  */
41813#include <stdlib.h>
41814#include <stdarg.h>
41815#include <string.h>
41816#include <float.h>
41817
41818int
41819main ()
41820{
41821
41822  ;
41823  return 0;
41824}
41825_ACEOF
41826if ac_fn_cxx_try_compile "$LINENO"; then :
41827  ac_cv_header_stdc=yes
41828else
41829  ac_cv_header_stdc=no
41830fi
41831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41832
41833if test $ac_cv_header_stdc = yes; then
41834  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41835  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41836/* end confdefs.h.  */
41837#include <string.h>
41838
41839_ACEOF
41840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41841  $EGREP "memchr" >/dev/null 2>&1; then :
41842
41843else
41844  ac_cv_header_stdc=no
41845fi
41846rm -f conftest*
41847
41848fi
41849
41850if test $ac_cv_header_stdc = yes; then
41851  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41853/* end confdefs.h.  */
41854#include <stdlib.h>
41855
41856_ACEOF
41857if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41858  $EGREP "free" >/dev/null 2>&1; then :
41859
41860else
41861  ac_cv_header_stdc=no
41862fi
41863rm -f conftest*
41864
41865fi
41866
41867if test $ac_cv_header_stdc = yes; then
41868  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41869  if test "$cross_compiling" = yes; then :
41870  :
41871else
41872  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41873/* end confdefs.h.  */
41874#include <ctype.h>
41875#include <stdlib.h>
41876#if ((' ' & 0x0FF) == 0x020)
41877# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41878# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41879#else
41880# define ISLOWER(c) \
41881		   (('a' <= (c) && (c) <= 'i') \
41882		     || ('j' <= (c) && (c) <= 'r') \
41883		     || ('s' <= (c) && (c) <= 'z'))
41884# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41885#endif
41886
41887#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41888int
41889main ()
41890{
41891  int i;
41892  for (i = 0; i < 256; i++)
41893    if (XOR (islower (i), ISLOWER (i))
41894	|| toupper (i) != TOUPPER (i))
41895      return 2;
41896  return 0;
41897}
41898_ACEOF
41899if ac_fn_cxx_try_run "$LINENO"; then :
41900
41901else
41902  ac_cv_header_stdc=no
41903fi
41904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41905  conftest.$ac_objext conftest.beam conftest.$ac_ext
41906fi
41907
41908fi
41909fi
41910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41911$as_echo "$ac_cv_header_stdc" >&6; }
41912if test $ac_cv_header_stdc = yes; then
41913
41914$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41915
41916fi
41917
41918# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41919for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41920		  inttypes.h stdint.h unistd.h
41921do :
41922  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41923ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41924"
41925if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41926  cat >>confdefs.h <<_ACEOF
41927#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41928_ACEOF
41929
41930fi
41931
41932done
41933
41934
41935
41936  ###############################################################################
41937  #
41938  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41939  # (The JVM can use 32 or 64 bit Java pointers but that decision
41940  # is made at runtime.)
41941  #
41942
41943  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41944    # Always specify -m flag on Solaris
41945    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41946
41947  # When we add flags to the "official" CFLAGS etc, we need to
41948  # keep track of these additions in ADDED_CFLAGS etc. These
41949  # will later be checked to make sure only controlled additions
41950  # have been made to CFLAGS etc.
41951  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41952  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41953  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41954
41955  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41956  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41957  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41958
41959  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41960  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41961  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41962
41963  elif test "x$COMPILE_TYPE" = xreduced; then
41964    if test "x$OPENJDK_TARGET_OS" != xwindows; then
41965      # Specify -m if running reduced on other Posix platforms
41966
41967  # When we add flags to the "official" CFLAGS etc, we need to
41968  # keep track of these additions in ADDED_CFLAGS etc. These
41969  # will later be checked to make sure only controlled additions
41970  # have been made to CFLAGS etc.
41971  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41972  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41973  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41974
41975  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41976  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41977  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41978
41979  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41980  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41981  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41982
41983    fi
41984  fi
41985
41986  # Make compilation sanity check
41987  for ac_header in stdio.h
41988do :
41989  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41990if test "x$ac_cv_header_stdio_h" = xyes; then :
41991  cat >>confdefs.h <<_ACEOF
41992#define HAVE_STDIO_H 1
41993_ACEOF
41994
41995else
41996
41997    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41998$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41999    if test "x$COMPILE_TYPE" = xreduced; then
42000      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
42001$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
42002    elif test "x$COMPILE_TYPE" = xcross; then
42003      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
42004$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
42005    fi
42006    as_fn_error $? "Cannot continue." "$LINENO" 5
42007
42008fi
42009
42010done
42011
42012
42013  # The cast to long int works around a bug in the HP C Compiler
42014# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42015# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42016# This bug is HP SR number 8606223364.
42017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42018$as_echo_n "checking size of int *... " >&6; }
42019if ${ac_cv_sizeof_int_p+:} false; then :
42020  $as_echo_n "(cached) " >&6
42021else
42022  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42023
42024else
42025  if test "$ac_cv_type_int_p" = yes; then
42026     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42028as_fn_error 77 "cannot compute sizeof (int *)
42029See \`config.log' for more details" "$LINENO" 5; }
42030   else
42031     ac_cv_sizeof_int_p=0
42032   fi
42033fi
42034
42035fi
42036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42037$as_echo "$ac_cv_sizeof_int_p" >&6; }
42038
42039
42040
42041cat >>confdefs.h <<_ACEOF
42042#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42043_ACEOF
42044
42045
42046
42047  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
42048  if test "x$ac_cv_sizeof_int_p" = x; then
42049    # The test failed, lets stick to the assumed value.
42050    { $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
42051$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
42052  else
42053    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42054
42055    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42056      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
42057      # Let's try to implicitely set the compilers target architecture and retry the test
42058      { $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
42059$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;}
42060      { $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
42061$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;}
42062
42063  # When we add flags to the "official" CFLAGS etc, we need to
42064  # keep track of these additions in ADDED_CFLAGS etc. These
42065  # will later be checked to make sure only controlled additions
42066  # have been made to CFLAGS etc.
42067  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42068  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42069  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42070
42071  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42072  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42073  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42074
42075  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42076  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42077  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42078
42079
42080      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
42081      unset ac_cv_sizeof_int_p
42082      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
42083      cat >>confdefs.h <<_ACEOF
42084#undef SIZEOF_INT_P
42085_ACEOF
42086
42087      # The cast to long int works around a bug in the HP C Compiler
42088# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42089# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42090# This bug is HP SR number 8606223364.
42091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42092$as_echo_n "checking size of int *... " >&6; }
42093if ${ac_cv_sizeof_int_p+:} false; then :
42094  $as_echo_n "(cached) " >&6
42095else
42096  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42097
42098else
42099  if test "$ac_cv_type_int_p" = yes; then
42100     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42102as_fn_error 77 "cannot compute sizeof (int *)
42103See \`config.log' for more details" "$LINENO" 5; }
42104   else
42105     ac_cv_sizeof_int_p=0
42106   fi
42107fi
42108
42109fi
42110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42111$as_echo "$ac_cv_sizeof_int_p" >&6; }
42112
42113
42114
42115cat >>confdefs.h <<_ACEOF
42116#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42117_ACEOF
42118
42119
42120
42121      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42122
42123      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42124        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
42125      fi
42126    fi
42127  fi
42128
42129  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42130$as_echo_n "checking for target address size... " >&6; }
42131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42132$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42133
42134
42135  ###############################################################################
42136  #
42137  # Is the target little of big endian?
42138  #
42139   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42140$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42141if ${ac_cv_c_bigendian+:} false; then :
42142  $as_echo_n "(cached) " >&6
42143else
42144  ac_cv_c_bigendian=unknown
42145    # See if we're dealing with a universal compiler.
42146    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42147/* end confdefs.h.  */
42148#ifndef __APPLE_CC__
42149	       not a universal capable compiler
42150	     #endif
42151	     typedef int dummy;
42152
42153_ACEOF
42154if ac_fn_cxx_try_compile "$LINENO"; then :
42155
42156	# Check for potential -arch flags.  It is not universal unless
42157	# there are at least two -arch flags with different values.
42158	ac_arch=
42159	ac_prev=
42160	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42161	 if test -n "$ac_prev"; then
42162	   case $ac_word in
42163	     i?86 | x86_64 | ppc | ppc64)
42164	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42165		 ac_arch=$ac_word
42166	       else
42167		 ac_cv_c_bigendian=universal
42168		 break
42169	       fi
42170	       ;;
42171	   esac
42172	   ac_prev=
42173	 elif test "x$ac_word" = "x-arch"; then
42174	   ac_prev=arch
42175	 fi
42176       done
42177fi
42178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42179    if test $ac_cv_c_bigendian = unknown; then
42180      # See if sys/param.h defines the BYTE_ORDER macro.
42181      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42182/* end confdefs.h.  */
42183#include <sys/types.h>
42184	     #include <sys/param.h>
42185
42186int
42187main ()
42188{
42189#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42190		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42191		     && LITTLE_ENDIAN)
42192	      bogus endian macros
42193	     #endif
42194
42195  ;
42196  return 0;
42197}
42198_ACEOF
42199if ac_fn_cxx_try_compile "$LINENO"; then :
42200  # It does; now see whether it defined to BIG_ENDIAN or not.
42201	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42202/* end confdefs.h.  */
42203#include <sys/types.h>
42204		#include <sys/param.h>
42205
42206int
42207main ()
42208{
42209#if BYTE_ORDER != BIG_ENDIAN
42210		 not big endian
42211		#endif
42212
42213  ;
42214  return 0;
42215}
42216_ACEOF
42217if ac_fn_cxx_try_compile "$LINENO"; then :
42218  ac_cv_c_bigendian=yes
42219else
42220  ac_cv_c_bigendian=no
42221fi
42222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42223fi
42224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42225    fi
42226    if test $ac_cv_c_bigendian = unknown; then
42227      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42228      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42229/* end confdefs.h.  */
42230#include <limits.h>
42231
42232int
42233main ()
42234{
42235#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42236	      bogus endian macros
42237	     #endif
42238
42239  ;
42240  return 0;
42241}
42242_ACEOF
42243if ac_fn_cxx_try_compile "$LINENO"; then :
42244  # It does; now see whether it defined to _BIG_ENDIAN or not.
42245	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42246/* end confdefs.h.  */
42247#include <limits.h>
42248
42249int
42250main ()
42251{
42252#ifndef _BIG_ENDIAN
42253		 not big endian
42254		#endif
42255
42256  ;
42257  return 0;
42258}
42259_ACEOF
42260if ac_fn_cxx_try_compile "$LINENO"; then :
42261  ac_cv_c_bigendian=yes
42262else
42263  ac_cv_c_bigendian=no
42264fi
42265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42266fi
42267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42268    fi
42269    if test $ac_cv_c_bigendian = unknown; then
42270      # Compile a test program.
42271      if test "$cross_compiling" = yes; then :
42272  # Try to guess by grepping values from an object file.
42273	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42274/* end confdefs.h.  */
42275short int ascii_mm[] =
42276		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42277		short int ascii_ii[] =
42278		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42279		int use_ascii (int i) {
42280		  return ascii_mm[i] + ascii_ii[i];
42281		}
42282		short int ebcdic_ii[] =
42283		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42284		short int ebcdic_mm[] =
42285		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42286		int use_ebcdic (int i) {
42287		  return ebcdic_mm[i] + ebcdic_ii[i];
42288		}
42289		extern int foo;
42290
42291int
42292main ()
42293{
42294return use_ascii (foo) == use_ebcdic (foo);
42295  ;
42296  return 0;
42297}
42298_ACEOF
42299if ac_fn_cxx_try_compile "$LINENO"; then :
42300  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42301	      ac_cv_c_bigendian=yes
42302	    fi
42303	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42304	      if test "$ac_cv_c_bigendian" = unknown; then
42305		ac_cv_c_bigendian=no
42306	      else
42307		# finding both strings is unlikely to happen, but who knows?
42308		ac_cv_c_bigendian=unknown
42309	      fi
42310	    fi
42311fi
42312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42313else
42314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42315/* end confdefs.h.  */
42316$ac_includes_default
42317int
42318main ()
42319{
42320
42321	     /* Are we little or big endian?  From Harbison&Steele.  */
42322	     union
42323	     {
42324	       long int l;
42325	       char c[sizeof (long int)];
42326	     } u;
42327	     u.l = 1;
42328	     return u.c[sizeof (long int) - 1] == 1;
42329
42330  ;
42331  return 0;
42332}
42333_ACEOF
42334if ac_fn_cxx_try_run "$LINENO"; then :
42335  ac_cv_c_bigendian=no
42336else
42337  ac_cv_c_bigendian=yes
42338fi
42339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42340  conftest.$ac_objext conftest.beam conftest.$ac_ext
42341fi
42342
42343    fi
42344fi
42345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42346$as_echo "$ac_cv_c_bigendian" >&6; }
42347 case $ac_cv_c_bigendian in #(
42348   yes)
42349     ENDIAN="big";; #(
42350   no)
42351     ENDIAN="little" ;; #(
42352   universal)
42353     ENDIAN="universal_endianness"
42354     ;; #(
42355   *)
42356     ENDIAN="unknown" ;;
42357 esac
42358
42359
42360  if test "x$ENDIAN" = xuniversal_endianness; then
42361    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42362  fi
42363  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42364    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
42365  fi
42366
42367
42368# Configure flags for the tools
42369
42370  ###############################################################################
42371  #
42372  # How to compile shared libraries.
42373  #
42374
42375  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42376    PICFLAG="-fPIC"
42377    C_FLAG_REORDER=''
42378    CXX_FLAG_REORDER=''
42379
42380    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42381      # Linking is different on MacOSX
42382      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42383      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42384      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42385      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42386      SET_SHARED_LIBRARY_MAPFILE=''
42387    else
42388      # Default works for linux, might work on other platforms as well.
42389      SHARED_LIBRARY_FLAGS='-shared'
42390      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42391      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42392      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42393      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42394    fi
42395  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42396    PICFLAG=''
42397    C_FLAG_REORDER=''
42398    CXX_FLAG_REORDER=''
42399
42400    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42401      # Linking is different on MacOSX
42402      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42403      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42404      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42405      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42406      SET_SHARED_LIBRARY_MAPFILE=''
42407    else
42408      # Default works for linux, might work on other platforms as well.
42409      SHARED_LIBRARY_FLAGS='-shared'
42410      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42411      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42412      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42413      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42414    fi
42415  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42416    PICFLAG="-KPIC"
42417    C_FLAG_REORDER='-xF'
42418    CXX_FLAG_REORDER='-xF'
42419    SHARED_LIBRARY_FLAGS="-G"
42420    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42421    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42422    SET_SHARED_LIBRARY_NAME=''
42423    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42424  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42425    PICFLAG="-qpic=large"
42426    C_FLAG_REORDER=''
42427    CXX_FLAG_REORDER=''
42428    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42429    SET_EXECUTABLE_ORIGIN=""
42430    SET_SHARED_LIBRARY_ORIGIN=''
42431    SET_SHARED_LIBRARY_NAME=''
42432    SET_SHARED_LIBRARY_MAPFILE=''
42433  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42434    PICFLAG=""
42435    C_FLAG_REORDER=''
42436    CXX_FLAG_REORDER=''
42437    SHARED_LIBRARY_FLAGS="-LD"
42438    SET_EXECUTABLE_ORIGIN=''
42439    SET_SHARED_LIBRARY_ORIGIN=''
42440    SET_SHARED_LIBRARY_NAME=''
42441    SET_SHARED_LIBRARY_MAPFILE=''
42442  fi
42443
42444
42445
42446
42447
42448
42449
42450
42451
42452  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42453    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42454    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42455    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42456  fi
42457  # The (cross) compiler is now configured, we can now test capabilities
42458  # of the target platform.
42459
42460
42461
42462  ###############################################################################
42463  #
42464  # Setup the opt flags for different compilers
42465  # and different operating systems.
42466  #
42467
42468  # FIXME: this was indirectly the old default, but just inherited.
42469  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42470  #   C_FLAG_DEPS="-MMD -MF"
42471  # fi
42472
42473  # Generate make dependency files
42474  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42475    C_FLAG_DEPS="-MMD -MF"
42476  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42477    C_FLAG_DEPS="-MMD -MF"
42478  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42479    C_FLAG_DEPS="-xMMD -xMF"
42480  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42481    C_FLAG_DEPS="-qmakedep=gcc -MF"
42482  fi
42483  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42484
42485
42486
42487  # Debug symbols
42488  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42489    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42490      # reduce from default "-g2" option to save space
42491      CFLAGS_DEBUG_SYMBOLS="-g1"
42492      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42493    else
42494      CFLAGS_DEBUG_SYMBOLS="-g"
42495      CXXFLAGS_DEBUG_SYMBOLS="-g"
42496    fi
42497  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42498    CFLAGS_DEBUG_SYMBOLS="-g"
42499    CXXFLAGS_DEBUG_SYMBOLS="-g"
42500  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42501    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42502    # FIXME: likely a bug, this disables debug symbols rather than enables them
42503    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42504  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42505    CFLAGS_DEBUG_SYMBOLS="-g"
42506    CXXFLAGS_DEBUG_SYMBOLS="-g"
42507  fi
42508
42509
42510
42511  # bounds, memory and behavior checking options
42512  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42513    case $DEBUG_LEVEL in
42514    release )
42515      # no adjustment
42516      ;;
42517    fastdebug )
42518      # Add compile time bounds checks.
42519      CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
42520      CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
42521      ;;
42522    slowdebug )
42523      # Add runtime bounds checks and symbol info.
42524      CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
42525      CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
42526      if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42527        CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
42528        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
42529      fi
42530      ;;
42531    esac
42532  fi
42533
42534
42535
42536  # Optimization levels
42537  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42538    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42539
42540    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42541      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42542      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42543      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42544      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42545      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42546      C_O_FLAG_NONE="-xregs=no%frameptr"
42547      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42548      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42549      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42550      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42551      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42552      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42553        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42554        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42555      fi
42556    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42557      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42558      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42559      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42560      C_O_FLAG_DEBUG=""
42561      C_O_FLAG_NONE=""
42562      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42563      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42564      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42565      C_O_FLAG_DEBUG=""
42566      CXX_O_FLAG_NONE=""
42567    fi
42568  else
42569    # The remaining toolchains share opt flags between CC and CXX;
42570    # setup for C and duplicate afterwards.
42571    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42572      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42573        # On MacOSX we optimize for size, something
42574        # we should do for all platforms?
42575        C_O_FLAG_HIGHEST="-Os"
42576        C_O_FLAG_HI="-Os"
42577        C_O_FLAG_NORM="-Os"
42578      else
42579        C_O_FLAG_HIGHEST="-O3"
42580        C_O_FLAG_HI="-O3"
42581        C_O_FLAG_NORM="-O2"
42582      fi
42583      C_O_FLAG_DEBUG="-O0"
42584      C_O_FLAG_NONE="-O0"
42585    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42586      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42587        # On MacOSX we optimize for size, something
42588        # we should do for all platforms?
42589        C_O_FLAG_HIGHEST="-Os"
42590        C_O_FLAG_HI="-Os"
42591        C_O_FLAG_NORM="-Os"
42592      else
42593        C_O_FLAG_HIGHEST="-O3"
42594        C_O_FLAG_HI="-O3"
42595        C_O_FLAG_NORM="-O2"
42596      fi
42597      C_O_FLAG_DEBUG="-O0"
42598      C_O_FLAG_NONE="-O0"
42599    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42600      C_O_FLAG_HIGHEST="-O3"
42601      C_O_FLAG_HI="-O3 -qstrict"
42602      C_O_FLAG_NORM="-O2"
42603      C_O_FLAG_DEBUG="-qnoopt"
42604      C_O_FLAG_NONE="-qnoop"
42605    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42606      C_O_FLAG_HIGHEST="-O2"
42607      C_O_FLAG_HI="-O1"
42608      C_O_FLAG_NORM="-O1"
42609      C_O_FLAG_DEBUG="-Od"
42610      C_O_FLAG_NONE="-Od"
42611    fi
42612    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42613    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42614    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42615    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42616    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42617  fi
42618
42619  # Adjust optimization flags according to debug level.
42620  case $DEBUG_LEVEL in
42621    release )
42622      # no adjustment
42623      ;;
42624    fastdebug )
42625      # Not quite so much optimization
42626      C_O_FLAG_HI="$C_O_FLAG_NORM"
42627      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42628      ;;
42629    slowdebug )
42630      # Disable optimization
42631      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42632      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42633      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42634      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42635      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42636      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42637      ;;
42638  esac
42639
42640
42641
42642
42643
42644
42645
42646
42647
42648
42649
42650
42651
42652  # Special extras...
42653  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42654    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42655      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42656      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42657    fi
42658  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42659    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42660    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42661    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42662  fi
42663
42664  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42665    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42666$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42667  fi
42668
42669  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42670    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42671$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42672  fi
42673
42674  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42675    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42676$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42677  fi
42678
42679
42680# Check whether --with-extra-cflags was given.
42681if test "${with_extra_cflags+set}" = set; then :
42682  withval=$with_extra_cflags;
42683fi
42684
42685
42686
42687# Check whether --with-extra-cxxflags was given.
42688if test "${with_extra_cxxflags+set}" = set; then :
42689  withval=$with_extra_cxxflags;
42690fi
42691
42692
42693
42694# Check whether --with-extra-ldflags was given.
42695if test "${with_extra_ldflags+set}" = set; then :
42696  withval=$with_extra_ldflags;
42697fi
42698
42699
42700  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42701  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42702  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42703
42704  # Hotspot needs these set in their legacy form
42705  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42706  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42707  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42708
42709
42710
42711
42712
42713  ###############################################################################
42714  #
42715  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42716  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42717  #
42718
42719  # Setup compiler/platform specific flags into
42720  #    CFLAGS_JDK    - C Compiler flags
42721  #    CXXFLAGS_JDK  - C++ Compiler flags
42722  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42723  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42724    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42725        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42726    case $OPENJDK_TARGET_CPU_ARCH in
42727      arm )
42728        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42729        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42730        ;;
42731      ppc )
42732        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42733        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42734        ;;
42735      * )
42736        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42737        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42738        ;;
42739    esac
42740  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42741    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42742    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42743      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42744      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42745    fi
42746
42747    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42748    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42749  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42750    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42751    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42752  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42753    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42754    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42755    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42756    -DWIN32 -DIAL"
42757    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42758      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42759    else
42760      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42761    fi
42762  fi
42763
42764  ###############################################################################
42765
42766  # Adjust flags according to debug level.
42767  case $DEBUG_LEVEL in
42768    fastdebug | slowdebug )
42769      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42770      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42771      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42772      ;;
42773    release )
42774      ;;
42775    * )
42776      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42777      ;;
42778  esac
42779
42780  # Setup LP64
42781  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42782
42783  # Set some common defines. These works for all compilers, but assume
42784  # -D is universally accepted.
42785
42786  # Setup endianness
42787  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42788    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42789    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42790    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42791    #   Note: -Dmacro         is the same as    #define macro 1
42792    #         -Dmacro=        is the same as    #define macro
42793    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42794      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42795    else
42796      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42797    fi
42798  else
42799    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42800    # are defined in the system?
42801    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42802      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42803    else
42804      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42805    fi
42806  fi
42807
42808  # Setup target OS define. Use OS target name but in upper case.
42809  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42810  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42811
42812  # Setup target CPU
42813  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42814
42815  # Setup debug/release defines
42816  if test "x$DEBUG_LEVEL" = xrelease; then
42817    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42818    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42819      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42820    fi
42821  else
42822    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42823  fi
42824
42825  # Setup release name
42826  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42827
42828
42829  # Set some additional per-OS defines.
42830  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42831    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42832  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42833    # FIXME: PPC64 should not be here.
42834    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42835  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42836    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42837  fi
42838
42839  # Additional macosx handling
42840  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42841    # Setting these parameters makes it an error to link to macosx APIs that are
42842    # newer than the given OS version and makes the linked binaries compatible
42843    # even if built on a newer version of the OS.
42844    # The expected format is X.Y.Z
42845    MACOSX_VERSION_MIN=10.7.0
42846
42847
42848    # The macro takes the version with no dots, ex: 1070
42849    # Let the flags variables get resolved in make for easier override on make
42850    # command line.
42851    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42852    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42853  fi
42854
42855  # Setup some hard coded includes
42856  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42857      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42858      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42859      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_API_DIR/native/include"
42860
42861  # The shared libraries are compiled using the picflag.
42862  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42863  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42864
42865  # Executable flags
42866  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42867  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42868
42869
42870
42871
42872
42873
42874  # Setup LDFLAGS et al.
42875  #
42876
42877  # Now this is odd. The JDK native libraries have to link against libjvm.so
42878  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42879  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42880  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42881  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42882  # libraries will link to whatever is in memory. Yuck.
42883  #
42884  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42885  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42886    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42887    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42888      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42889    fi
42890    # TODO: make -debug optional "--disable-full-debug-symbols"
42891    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42892  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42893    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42894    # We have previously set HAS_GNU_HASH if this is the case
42895    if test -n "$HAS_GNU_HASH"; then
42896      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42897    fi
42898    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42899      # And since we now know that the linker is gnu, then add -z defs, to forbid
42900      # undefined symbols in object files.
42901      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42902      case $DEBUG_LEVEL in
42903        release )
42904          # tell linker to optimize libraries.
42905          # Should this be supplied to the OSS linker as well?
42906          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42907          ;;
42908        slowdebug )
42909          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42910            # do relocations at load
42911            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42912            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42913          fi
42914          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42915            # mark relocations read only
42916            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42917            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42918          fi
42919          ;;
42920        fastdebug )
42921          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42922            # mark relocations read only
42923            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42924            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42925          fi
42926          ;;
42927        * )
42928          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42929          ;;
42930        esac
42931    fi
42932  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42933    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42934    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42935  fi
42936
42937  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
42938    # If undefined behaviour detection is enabled then we need to tell linker.
42939    case $DEBUG_LEVEL in
42940      release | fastdebug )
42941        ;;
42942      slowdebug )
42943        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&5
42944$as_echo "$as_me: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&2;}
42945        if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42946          # enable undefined behaviour checking
42947          LDFLAGS_JDK="$LDFLAGS_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42948          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42949        fi
42950        ;;
42951      * )
42952        as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42953        ;;
42954    esac
42955  fi
42956
42957  # Customize LDFLAGS for executables
42958
42959  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42960
42961  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42962    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42963      LDFLAGS_STACK_SIZE=1048576
42964    else
42965      LDFLAGS_STACK_SIZE=327680
42966    fi
42967    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42968  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42969    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42970  fi
42971
42972  # Customize LDFLAGS for libs
42973  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42974
42975  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42976    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42977    LDFLAGS_JDKLIB_SUFFIX=""
42978  else
42979    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42980        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42981
42982    # On some platforms (mac) the linker warns about non existing -L dirs.
42983    # Add server first if available. Linking aginst client does not always produce the same results.
42984    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42985    # Default to server for other variants.
42986    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42987      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42988    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42989      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42990    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42991      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42992    else
42993      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42994    fi
42995
42996    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42997    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42998      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42999    fi
43000  fi
43001
43002
43003
43004
43005
43006
43007
43008
43009  # Some Zero and Shark settings.
43010  # ZERO_ARCHFLAG tells the compiler which mode to build for
43011  case "${OPENJDK_TARGET_CPU}" in
43012    s390)
43013      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
43014      ;;
43015    *)
43016      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43017  esac
43018
43019  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
43020$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
43021  supports=yes
43022
43023  saved_cflags="$CFLAGS"
43024  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
43025  ac_ext=c
43026ac_cpp='$CPP $CPPFLAGS'
43027ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43028ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43029ac_compiler_gnu=$ac_cv_c_compiler_gnu
43030
43031  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43032/* end confdefs.h.  */
43033int i;
43034_ACEOF
43035if ac_fn_c_try_compile "$LINENO"; then :
43036
43037else
43038  supports=no
43039fi
43040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43041  ac_ext=cpp
43042ac_cpp='$CXXCPP $CPPFLAGS'
43043ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43044ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43045ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43046
43047  CFLAGS="$saved_cflags"
43048
43049  saved_cxxflags="$CXXFLAGS"
43050  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
43051  ac_ext=cpp
43052ac_cpp='$CXXCPP $CPPFLAGS'
43053ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43054ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43055ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43056
43057  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43058/* end confdefs.h.  */
43059int i;
43060_ACEOF
43061if ac_fn_cxx_try_compile "$LINENO"; then :
43062
43063else
43064  supports=no
43065fi
43066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43067  ac_ext=cpp
43068ac_cpp='$CXXCPP $CPPFLAGS'
43069ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43070ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43071ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43072
43073  CXXFLAGS="$saved_cxxflags"
43074
43075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43076$as_echo "$supports" >&6; }
43077  if test "x$supports" = "xyes" ; then
43078    :
43079  else
43080    ZERO_ARCHFLAG=""
43081  fi
43082
43083
43084
43085  # Check that the compiler supports -mX (or -qX on AIX) flags
43086  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
43087
43088  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43089$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43090  supports=yes
43091
43092  saved_cflags="$CFLAGS"
43093  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43094  ac_ext=c
43095ac_cpp='$CPP $CPPFLAGS'
43096ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43097ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43098ac_compiler_gnu=$ac_cv_c_compiler_gnu
43099
43100  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43101/* end confdefs.h.  */
43102int i;
43103_ACEOF
43104if ac_fn_c_try_compile "$LINENO"; then :
43105
43106else
43107  supports=no
43108fi
43109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43110  ac_ext=cpp
43111ac_cpp='$CXXCPP $CPPFLAGS'
43112ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43113ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43114ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43115
43116  CFLAGS="$saved_cflags"
43117
43118  saved_cxxflags="$CXXFLAGS"
43119  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43120  ac_ext=cpp
43121ac_cpp='$CXXCPP $CPPFLAGS'
43122ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43123ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43124ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43125
43126  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43127/* end confdefs.h.  */
43128int i;
43129_ACEOF
43130if ac_fn_cxx_try_compile "$LINENO"; then :
43131
43132else
43133  supports=no
43134fi
43135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43136  ac_ext=cpp
43137ac_cpp='$CXXCPP $CPPFLAGS'
43138ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43139ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43140ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43141
43142  CXXFLAGS="$saved_cxxflags"
43143
43144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43145$as_echo "$supports" >&6; }
43146  if test "x$supports" = "xyes" ; then
43147    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43148  else
43149    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43150  fi
43151
43152
43153
43154  case "${TOOLCHAIN_TYPE}" in
43155    microsoft)
43156      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43157      ;;
43158    solstudio)
43159      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43160      ;;
43161    gcc)
43162      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43163      ;;
43164    clang)
43165      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43166      ;;
43167  esac
43168
43169
43170
43171# Setup debug symbols (need objcopy from the toolchain for that)
43172
43173  #
43174  # ENABLE_DEBUG_SYMBOLS
43175  # This must be done after the toolchain is setup, since we're looking at objcopy.
43176  #
43177  # Check whether --enable-debug-symbols was given.
43178if test "${enable_debug_symbols+set}" = set; then :
43179  enableval=$enable_debug_symbols;
43180fi
43181
43182
43183  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43184$as_echo_n "checking if we should generate debug symbols... " >&6; }
43185
43186  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43187    # explicit enabling of enable-debug-symbols and can't find objcopy
43188    #   this is an error
43189    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43190  fi
43191
43192  if test "x$enable_debug_symbols" = "xyes"; then
43193    ENABLE_DEBUG_SYMBOLS=true
43194  elif test "x$enable_debug_symbols" = "xno"; then
43195    ENABLE_DEBUG_SYMBOLS=false
43196  else
43197    # Default is on if objcopy is found
43198    if test "x$OBJCOPY" != x; then
43199      ENABLE_DEBUG_SYMBOLS=true
43200    # MacOS X and Windows don't use objcopy but default is on for those OSes
43201    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43202      ENABLE_DEBUG_SYMBOLS=true
43203    else
43204      ENABLE_DEBUG_SYMBOLS=false
43205    fi
43206  fi
43207
43208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43209$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43210
43211  #
43212  # ZIP_DEBUGINFO_FILES
43213  #
43214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43215$as_echo_n "checking if we should zip debug-info files... " >&6; }
43216  # Check whether --enable-zip-debug-info was given.
43217if test "${enable_zip_debug_info+set}" = set; then :
43218  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43219else
43220  enable_zip_debug_info="yes"
43221fi
43222
43223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43224$as_echo "${enable_zip_debug_info}" >&6; }
43225
43226  if test "x${enable_zip_debug_info}" = "xno"; then
43227    ZIP_DEBUGINFO_FILES=false
43228  else
43229    ZIP_DEBUGINFO_FILES=true
43230  fi
43231
43232
43233
43234
43235
43236###############################################################################
43237#
43238# Check dependencies for external and internal libraries.
43239#
43240###############################################################################
43241
43242# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43243
43244  # When using cygwin or msys, we need a wrapper binary that renames
43245  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43246  # @files and rewrites these too! This wrapper binary is
43247  # called fixpath.
43248  FIXPATH=
43249  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43251$as_echo_n "checking if fixpath can be created... " >&6; }
43252    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43253    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43254    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43255      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43256      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43257      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43258      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43259    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43260      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43261      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43262
43263      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43264      # @ was chosen as separator to minimize risk of other tools messing around with it
43265      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43266      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43267
43268      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43269    fi
43270    rm -f $OUTPUT_ROOT/fixpath*
43271    cd $OUTPUT_ROOT
43272    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43273    cd $CURDIR
43274
43275    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43276      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43277$as_echo "no" >&6; }
43278      cat $OUTPUT_ROOT/fixpath1.log
43279      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43280    fi
43281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43282$as_echo "yes" >&6; }
43283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43284$as_echo_n "checking if fixpath.exe works... " >&6; }
43285    cd $OUTPUT_ROOT
43286    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43287    cd $CURDIR
43288    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43290$as_echo "no" >&6; }
43291      cat $OUTPUT_ROOT/fixpath2.log
43292      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43293    fi
43294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43295$as_echo "yes" >&6; }
43296    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43297  fi
43298
43299
43300
43301
43302
43303
43304  ###############################################################################
43305  #
43306  # OS specific settings that we never will need to probe.
43307  #
43308  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43310$as_echo_n "checking what is not needed on Linux?... " >&6; }
43311    PULSE_NOT_NEEDED=yes
43312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43313$as_echo "pulse" >&6; }
43314  fi
43315
43316  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43318$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43319    ALSA_NOT_NEEDED=yes
43320    PULSE_NOT_NEEDED=yes
43321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43322$as_echo "alsa pulse" >&6; }
43323  fi
43324
43325  if test "x$OPENJDK_TARGET_OS" = xaix; then
43326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43327$as_echo_n "checking what is not needed on AIX?... " >&6; }
43328    ALSA_NOT_NEEDED=yes
43329    PULSE_NOT_NEEDED=yes
43330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43331$as_echo "alsa pulse" >&6; }
43332  fi
43333
43334
43335  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43337$as_echo_n "checking what is not needed on Windows?... " >&6; }
43338    CUPS_NOT_NEEDED=yes
43339    ALSA_NOT_NEEDED=yes
43340    PULSE_NOT_NEEDED=yes
43341    X11_NOT_NEEDED=yes
43342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43343$as_echo "alsa cups pulse x11" >&6; }
43344  fi
43345
43346  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43347    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43348$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43349    ALSA_NOT_NEEDED=yes
43350    PULSE_NOT_NEEDED=yes
43351    X11_NOT_NEEDED=yes
43352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43353$as_echo "alsa pulse x11" >&6; }
43354  fi
43355
43356  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43357    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43358$as_echo_n "checking what is not needed on bsd?... " >&6; }
43359    ALSA_NOT_NEEDED=yes
43360    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43361$as_echo "alsa" >&6; }
43362  fi
43363
43364  if test "x$OPENJDK" = "xfalse"; then
43365    FREETYPE_NOT_NEEDED=yes
43366  fi
43367
43368  if test "x$SUPPORT_HEADFUL" = xno; then
43369    X11_NOT_NEEDED=yes
43370  fi
43371
43372
43373
43374  ###############################################################################
43375  #
43376  # Check for X Windows
43377  #
43378
43379  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43380  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43381  # --x-libraries for the sysroot, if that seems to be correct.
43382  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43383    if test "x$SYSROOT" != "x"; then
43384      if test "x$x_includes" = xNONE; then
43385        if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43386          x_includes="$SYSROOT/usr/X11R6/include"
43387        elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43388          x_includes="$SYSROOT/usr/include"
43389        fi
43390      fi
43391      if test "x$x_libraries" = xNONE; then
43392        if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43393          x_libraries="$SYSROOT/usr/X11R6/lib"
43394        elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43395          x_libraries="$SYSROOT/usr/lib64"
43396        elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43397          x_libraries="$SYSROOT/usr/lib"
43398        fi
43399      fi
43400    fi
43401  fi
43402
43403  # Now let autoconf do it's magic
43404  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43405$as_echo_n "checking for X... " >&6; }
43406
43407
43408# Check whether --with-x was given.
43409if test "${with_x+set}" = set; then :
43410  withval=$with_x;
43411fi
43412
43413# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43414if test "x$with_x" = xno; then
43415  # The user explicitly disabled X.
43416  have_x=disabled
43417else
43418  case $x_includes,$x_libraries in #(
43419    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43420    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43421  $as_echo_n "(cached) " >&6
43422else
43423  # One or both of the vars are not set, and there is no cached value.
43424ac_x_includes=no ac_x_libraries=no
43425rm -f -r conftest.dir
43426if mkdir conftest.dir; then
43427  cd conftest.dir
43428  cat >Imakefile <<'_ACEOF'
43429incroot:
43430	@echo incroot='${INCROOT}'
43431usrlibdir:
43432	@echo usrlibdir='${USRLIBDIR}'
43433libdir:
43434	@echo libdir='${LIBDIR}'
43435_ACEOF
43436  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43437    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43438    for ac_var in incroot usrlibdir libdir; do
43439      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43440    done
43441    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43442    for ac_extension in a so sl dylib la dll; do
43443      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43444	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43445	ac_im_usrlibdir=$ac_im_libdir; break
43446      fi
43447    done
43448    # Screen out bogus values from the imake configuration.  They are
43449    # bogus both because they are the default anyway, and because
43450    # using them would break gcc on systems where it needs fixed includes.
43451    case $ac_im_incroot in
43452	/usr/include) ac_x_includes= ;;
43453	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43454    esac
43455    case $ac_im_usrlibdir in
43456	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43457	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43458    esac
43459  fi
43460  cd ..
43461  rm -f -r conftest.dir
43462fi
43463
43464# Standard set of common directories for X headers.
43465# Check X11 before X11Rn because it is often a symlink to the current release.
43466ac_x_header_dirs='
43467/usr/X11/include
43468/usr/X11R7/include
43469/usr/X11R6/include
43470/usr/X11R5/include
43471/usr/X11R4/include
43472
43473/usr/include/X11
43474/usr/include/X11R7
43475/usr/include/X11R6
43476/usr/include/X11R5
43477/usr/include/X11R4
43478
43479/usr/local/X11/include
43480/usr/local/X11R7/include
43481/usr/local/X11R6/include
43482/usr/local/X11R5/include
43483/usr/local/X11R4/include
43484
43485/usr/local/include/X11
43486/usr/local/include/X11R7
43487/usr/local/include/X11R6
43488/usr/local/include/X11R5
43489/usr/local/include/X11R4
43490
43491/usr/X386/include
43492/usr/x386/include
43493/usr/XFree86/include/X11
43494
43495/usr/include
43496/usr/local/include
43497/usr/unsupported/include
43498/usr/athena/include
43499/usr/local/x11r5/include
43500/usr/lpp/Xamples/include
43501
43502/usr/openwin/include
43503/usr/openwin/share/include'
43504
43505if test "$ac_x_includes" = no; then
43506  # Guess where to find include files, by looking for Xlib.h.
43507  # First, try using that file with no special directory specified.
43508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43509/* end confdefs.h.  */
43510#include <X11/Xlib.h>
43511_ACEOF
43512if ac_fn_cxx_try_cpp "$LINENO"; then :
43513  # We can compile using X headers with no special include directory.
43514ac_x_includes=
43515else
43516  for ac_dir in $ac_x_header_dirs; do
43517  if test -r "$ac_dir/X11/Xlib.h"; then
43518    ac_x_includes=$ac_dir
43519    break
43520  fi
43521done
43522fi
43523rm -f conftest.err conftest.i conftest.$ac_ext
43524fi # $ac_x_includes = no
43525
43526if test "$ac_x_libraries" = no; then
43527  # Check for the libraries.
43528  # See if we find them without any special options.
43529  # Don't add to $LIBS permanently.
43530  ac_save_LIBS=$LIBS
43531  LIBS="-lX11 $LIBS"
43532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43533/* end confdefs.h.  */
43534#include <X11/Xlib.h>
43535int
43536main ()
43537{
43538XrmInitialize ()
43539  ;
43540  return 0;
43541}
43542_ACEOF
43543if ac_fn_cxx_try_link "$LINENO"; then :
43544  LIBS=$ac_save_LIBS
43545# We can link X programs with no special library path.
43546ac_x_libraries=
43547else
43548  LIBS=$ac_save_LIBS
43549for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43550do
43551  # Don't even attempt the hair of trying to link an X program!
43552  for ac_extension in a so sl dylib la dll; do
43553    if test -r "$ac_dir/libX11.$ac_extension"; then
43554      ac_x_libraries=$ac_dir
43555      break 2
43556    fi
43557  done
43558done
43559fi
43560rm -f core conftest.err conftest.$ac_objext \
43561    conftest$ac_exeext conftest.$ac_ext
43562fi # $ac_x_libraries = no
43563
43564case $ac_x_includes,$ac_x_libraries in #(
43565  no,* | *,no | *\'*)
43566    # Didn't find X, or a directory has "'" in its name.
43567    ac_cv_have_x="have_x=no";; #(
43568  *)
43569    # Record where we found X for the cache.
43570    ac_cv_have_x="have_x=yes\
43571	ac_x_includes='$ac_x_includes'\
43572	ac_x_libraries='$ac_x_libraries'"
43573esac
43574fi
43575;; #(
43576    *) have_x=yes;;
43577  esac
43578  eval "$ac_cv_have_x"
43579fi # $with_x != no
43580
43581if test "$have_x" != yes; then
43582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43583$as_echo "$have_x" >&6; }
43584  no_x=yes
43585else
43586  # If each of the values was on the command line, it overrides each guess.
43587  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43588  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43589  # Update the cache value to reflect the command line values.
43590  ac_cv_have_x="have_x=yes\
43591	ac_x_includes='$x_includes'\
43592	ac_x_libraries='$x_libraries'"
43593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43594$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43595fi
43596
43597  if test "$no_x" = yes; then
43598  # Not all programs may use this symbol, but it does not hurt to define it.
43599
43600$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43601
43602  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43603else
43604  if test -n "$x_includes"; then
43605    X_CFLAGS="$X_CFLAGS -I$x_includes"
43606  fi
43607
43608  # It would also be nice to do this for all -L options, not just this one.
43609  if test -n "$x_libraries"; then
43610    X_LIBS="$X_LIBS -L$x_libraries"
43611    # For Solaris; some versions of Sun CC require a space after -R and
43612    # others require no space.  Words are not sufficient . . . .
43613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43614$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43615    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43616    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43617    ac_cxx_werror_flag=yes
43618    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43619/* end confdefs.h.  */
43620
43621int
43622main ()
43623{
43624
43625  ;
43626  return 0;
43627}
43628_ACEOF
43629if ac_fn_cxx_try_link "$LINENO"; then :
43630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43631$as_echo "no" >&6; }
43632       X_LIBS="$X_LIBS -R$x_libraries"
43633else
43634  LIBS="$ac_xsave_LIBS -R $x_libraries"
43635       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43636/* end confdefs.h.  */
43637
43638int
43639main ()
43640{
43641
43642  ;
43643  return 0;
43644}
43645_ACEOF
43646if ac_fn_cxx_try_link "$LINENO"; then :
43647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43648$as_echo "yes" >&6; }
43649	  X_LIBS="$X_LIBS -R $x_libraries"
43650else
43651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43652$as_echo "neither works" >&6; }
43653fi
43654rm -f core conftest.err conftest.$ac_objext \
43655    conftest$ac_exeext conftest.$ac_ext
43656fi
43657rm -f core conftest.err conftest.$ac_objext \
43658    conftest$ac_exeext conftest.$ac_ext
43659    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43660    LIBS=$ac_xsave_LIBS
43661  fi
43662
43663  # Check for system-dependent libraries X programs must link with.
43664  # Do this before checking for the system-independent R6 libraries
43665  # (-lICE), since we may need -lsocket or whatever for X linking.
43666
43667  if test "$ISC" = yes; then
43668    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43669  else
43670    # Martyn Johnson says this is needed for Ultrix, if the X
43671    # libraries were built with DECnet support.  And Karl Berry says
43672    # the Alpha needs dnet_stub (dnet does not exist).
43673    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43674    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43675/* end confdefs.h.  */
43676
43677/* Override any GCC internal prototype to avoid an error.
43678   Use char because int might match the return type of a GCC
43679   builtin and then its argument prototype would still apply.  */
43680#ifdef __cplusplus
43681extern "C"
43682#endif
43683char XOpenDisplay ();
43684int
43685main ()
43686{
43687return XOpenDisplay ();
43688  ;
43689  return 0;
43690}
43691_ACEOF
43692if ac_fn_cxx_try_link "$LINENO"; then :
43693
43694else
43695  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43696$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43697if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43698  $as_echo_n "(cached) " >&6
43699else
43700  ac_check_lib_save_LIBS=$LIBS
43701LIBS="-ldnet  $LIBS"
43702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43703/* end confdefs.h.  */
43704
43705/* Override any GCC internal prototype to avoid an error.
43706   Use char because int might match the return type of a GCC
43707   builtin and then its argument prototype would still apply.  */
43708#ifdef __cplusplus
43709extern "C"
43710#endif
43711char dnet_ntoa ();
43712int
43713main ()
43714{
43715return dnet_ntoa ();
43716  ;
43717  return 0;
43718}
43719_ACEOF
43720if ac_fn_cxx_try_link "$LINENO"; then :
43721  ac_cv_lib_dnet_dnet_ntoa=yes
43722else
43723  ac_cv_lib_dnet_dnet_ntoa=no
43724fi
43725rm -f core conftest.err conftest.$ac_objext \
43726    conftest$ac_exeext conftest.$ac_ext
43727LIBS=$ac_check_lib_save_LIBS
43728fi
43729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43730$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43731if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43732  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43733fi
43734
43735    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43736      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43737$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43738if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43739  $as_echo_n "(cached) " >&6
43740else
43741  ac_check_lib_save_LIBS=$LIBS
43742LIBS="-ldnet_stub  $LIBS"
43743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43744/* end confdefs.h.  */
43745
43746/* Override any GCC internal prototype to avoid an error.
43747   Use char because int might match the return type of a GCC
43748   builtin and then its argument prototype would still apply.  */
43749#ifdef __cplusplus
43750extern "C"
43751#endif
43752char dnet_ntoa ();
43753int
43754main ()
43755{
43756return dnet_ntoa ();
43757  ;
43758  return 0;
43759}
43760_ACEOF
43761if ac_fn_cxx_try_link "$LINENO"; then :
43762  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43763else
43764  ac_cv_lib_dnet_stub_dnet_ntoa=no
43765fi
43766rm -f core conftest.err conftest.$ac_objext \
43767    conftest$ac_exeext conftest.$ac_ext
43768LIBS=$ac_check_lib_save_LIBS
43769fi
43770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43771$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43772if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43773  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43774fi
43775
43776    fi
43777fi
43778rm -f core conftest.err conftest.$ac_objext \
43779    conftest$ac_exeext conftest.$ac_ext
43780    LIBS="$ac_xsave_LIBS"
43781
43782    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43783    # to get the SysV transport functions.
43784    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43785    # needs -lnsl.
43786    # The nsl library prevents programs from opening the X display
43787    # on Irix 5.2, according to T.E. Dickey.
43788    # The functions gethostbyname, getservbyname, and inet_addr are
43789    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43790    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43791if test "x$ac_cv_func_gethostbyname" = xyes; then :
43792
43793fi
43794
43795    if test $ac_cv_func_gethostbyname = no; then
43796      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43797$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43798if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43799  $as_echo_n "(cached) " >&6
43800else
43801  ac_check_lib_save_LIBS=$LIBS
43802LIBS="-lnsl  $LIBS"
43803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43804/* end confdefs.h.  */
43805
43806/* Override any GCC internal prototype to avoid an error.
43807   Use char because int might match the return type of a GCC
43808   builtin and then its argument prototype would still apply.  */
43809#ifdef __cplusplus
43810extern "C"
43811#endif
43812char gethostbyname ();
43813int
43814main ()
43815{
43816return gethostbyname ();
43817  ;
43818  return 0;
43819}
43820_ACEOF
43821if ac_fn_cxx_try_link "$LINENO"; then :
43822  ac_cv_lib_nsl_gethostbyname=yes
43823else
43824  ac_cv_lib_nsl_gethostbyname=no
43825fi
43826rm -f core conftest.err conftest.$ac_objext \
43827    conftest$ac_exeext conftest.$ac_ext
43828LIBS=$ac_check_lib_save_LIBS
43829fi
43830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43831$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43832if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43833  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43834fi
43835
43836      if test $ac_cv_lib_nsl_gethostbyname = no; then
43837	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43838$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43839if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43840  $as_echo_n "(cached) " >&6
43841else
43842  ac_check_lib_save_LIBS=$LIBS
43843LIBS="-lbsd  $LIBS"
43844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43845/* end confdefs.h.  */
43846
43847/* Override any GCC internal prototype to avoid an error.
43848   Use char because int might match the return type of a GCC
43849   builtin and then its argument prototype would still apply.  */
43850#ifdef __cplusplus
43851extern "C"
43852#endif
43853char gethostbyname ();
43854int
43855main ()
43856{
43857return gethostbyname ();
43858  ;
43859  return 0;
43860}
43861_ACEOF
43862if ac_fn_cxx_try_link "$LINENO"; then :
43863  ac_cv_lib_bsd_gethostbyname=yes
43864else
43865  ac_cv_lib_bsd_gethostbyname=no
43866fi
43867rm -f core conftest.err conftest.$ac_objext \
43868    conftest$ac_exeext conftest.$ac_ext
43869LIBS=$ac_check_lib_save_LIBS
43870fi
43871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43872$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43873if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43874  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43875fi
43876
43877      fi
43878    fi
43879
43880    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43881    # socket/setsockopt and other routines are undefined under SCO ODT
43882    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43883    # on later versions), says Simon Leinen: it contains gethostby*
43884    # variants that don't use the name server (or something).  -lsocket
43885    # must be given before -lnsl if both are needed.  We assume that
43886    # if connect needs -lnsl, so does gethostbyname.
43887    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43888if test "x$ac_cv_func_connect" = xyes; then :
43889
43890fi
43891
43892    if test $ac_cv_func_connect = no; then
43893      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43894$as_echo_n "checking for connect in -lsocket... " >&6; }
43895if ${ac_cv_lib_socket_connect+:} false; then :
43896  $as_echo_n "(cached) " >&6
43897else
43898  ac_check_lib_save_LIBS=$LIBS
43899LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43901/* end confdefs.h.  */
43902
43903/* Override any GCC internal prototype to avoid an error.
43904   Use char because int might match the return type of a GCC
43905   builtin and then its argument prototype would still apply.  */
43906#ifdef __cplusplus
43907extern "C"
43908#endif
43909char connect ();
43910int
43911main ()
43912{
43913return connect ();
43914  ;
43915  return 0;
43916}
43917_ACEOF
43918if ac_fn_cxx_try_link "$LINENO"; then :
43919  ac_cv_lib_socket_connect=yes
43920else
43921  ac_cv_lib_socket_connect=no
43922fi
43923rm -f core conftest.err conftest.$ac_objext \
43924    conftest$ac_exeext conftest.$ac_ext
43925LIBS=$ac_check_lib_save_LIBS
43926fi
43927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43928$as_echo "$ac_cv_lib_socket_connect" >&6; }
43929if test "x$ac_cv_lib_socket_connect" = xyes; then :
43930  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43931fi
43932
43933    fi
43934
43935    # Guillermo Gomez says -lposix is necessary on A/UX.
43936    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43937if test "x$ac_cv_func_remove" = xyes; then :
43938
43939fi
43940
43941    if test $ac_cv_func_remove = no; then
43942      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43943$as_echo_n "checking for remove in -lposix... " >&6; }
43944if ${ac_cv_lib_posix_remove+:} false; then :
43945  $as_echo_n "(cached) " >&6
43946else
43947  ac_check_lib_save_LIBS=$LIBS
43948LIBS="-lposix  $LIBS"
43949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43950/* end confdefs.h.  */
43951
43952/* Override any GCC internal prototype to avoid an error.
43953   Use char because int might match the return type of a GCC
43954   builtin and then its argument prototype would still apply.  */
43955#ifdef __cplusplus
43956extern "C"
43957#endif
43958char remove ();
43959int
43960main ()
43961{
43962return remove ();
43963  ;
43964  return 0;
43965}
43966_ACEOF
43967if ac_fn_cxx_try_link "$LINENO"; then :
43968  ac_cv_lib_posix_remove=yes
43969else
43970  ac_cv_lib_posix_remove=no
43971fi
43972rm -f core conftest.err conftest.$ac_objext \
43973    conftest$ac_exeext conftest.$ac_ext
43974LIBS=$ac_check_lib_save_LIBS
43975fi
43976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43977$as_echo "$ac_cv_lib_posix_remove" >&6; }
43978if test "x$ac_cv_lib_posix_remove" = xyes; then :
43979  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43980fi
43981
43982    fi
43983
43984    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43985    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43986if test "x$ac_cv_func_shmat" = xyes; then :
43987
43988fi
43989
43990    if test $ac_cv_func_shmat = no; then
43991      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43992$as_echo_n "checking for shmat in -lipc... " >&6; }
43993if ${ac_cv_lib_ipc_shmat+:} false; then :
43994  $as_echo_n "(cached) " >&6
43995else
43996  ac_check_lib_save_LIBS=$LIBS
43997LIBS="-lipc  $LIBS"
43998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43999/* end confdefs.h.  */
44000
44001/* Override any GCC internal prototype to avoid an error.
44002   Use char because int might match the return type of a GCC
44003   builtin and then its argument prototype would still apply.  */
44004#ifdef __cplusplus
44005extern "C"
44006#endif
44007char shmat ();
44008int
44009main ()
44010{
44011return shmat ();
44012  ;
44013  return 0;
44014}
44015_ACEOF
44016if ac_fn_cxx_try_link "$LINENO"; then :
44017  ac_cv_lib_ipc_shmat=yes
44018else
44019  ac_cv_lib_ipc_shmat=no
44020fi
44021rm -f core conftest.err conftest.$ac_objext \
44022    conftest$ac_exeext conftest.$ac_ext
44023LIBS=$ac_check_lib_save_LIBS
44024fi
44025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
44026$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
44027if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
44028  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
44029fi
44030
44031    fi
44032  fi
44033
44034  # Check for libraries that X11R6 Xt/Xaw programs need.
44035  ac_save_LDFLAGS=$LDFLAGS
44036  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
44037  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
44038  # check for ICE first), but we must link in the order -lSM -lICE or
44039  # we get undefined symbols.  So assume we have SM if we have ICE.
44040  # These have to be linked with before -lX11, unlike the other
44041  # libraries we check for below, so use a different variable.
44042  # John Interrante, Karl Berry
44043  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
44044$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
44045if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
44046  $as_echo_n "(cached) " >&6
44047else
44048  ac_check_lib_save_LIBS=$LIBS
44049LIBS="-lICE $X_EXTRA_LIBS $LIBS"
44050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44051/* end confdefs.h.  */
44052
44053/* Override any GCC internal prototype to avoid an error.
44054   Use char because int might match the return type of a GCC
44055   builtin and then its argument prototype would still apply.  */
44056#ifdef __cplusplus
44057extern "C"
44058#endif
44059char IceConnectionNumber ();
44060int
44061main ()
44062{
44063return IceConnectionNumber ();
44064  ;
44065  return 0;
44066}
44067_ACEOF
44068if ac_fn_cxx_try_link "$LINENO"; then :
44069  ac_cv_lib_ICE_IceConnectionNumber=yes
44070else
44071  ac_cv_lib_ICE_IceConnectionNumber=no
44072fi
44073rm -f core conftest.err conftest.$ac_objext \
44074    conftest$ac_exeext conftest.$ac_ext
44075LIBS=$ac_check_lib_save_LIBS
44076fi
44077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44078$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44079if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44080  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44081fi
44082
44083  LDFLAGS=$ac_save_LDFLAGS
44084
44085fi
44086
44087
44088  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44089  # this doesn't make sense so we remove it.
44090  if test "x$COMPILE_TYPE" = xcross; then
44091    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44092  fi
44093
44094  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
44095
44096  # Print a helpful message on how to acquire the necessary build dependency.
44097  # x11 is the help tag: freetype, cups, pulse, alsa etc
44098  MISSING_DEPENDENCY=x11
44099
44100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44101    cygwin_help $MISSING_DEPENDENCY
44102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44103    msys_help $MISSING_DEPENDENCY
44104  else
44105    PKGHANDLER_COMMAND=
44106
44107    case $PKGHANDLER in
44108      apt-get)
44109        apt_help     $MISSING_DEPENDENCY ;;
44110      yum)
44111        yum_help     $MISSING_DEPENDENCY ;;
44112      port)
44113        port_help    $MISSING_DEPENDENCY ;;
44114      pkgutil)
44115        pkgutil_help $MISSING_DEPENDENCY ;;
44116      pkgadd)
44117        pkgadd_help  $MISSING_DEPENDENCY ;;
44118    esac
44119
44120    if test "x$PKGHANDLER_COMMAND" != x; then
44121      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44122    fi
44123  fi
44124
44125    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44126  fi
44127
44128  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44129    OPENWIN_HOME="/usr/openwin"
44130    X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44131    X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44132        -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44133        -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44134        -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44135  fi
44136
44137  #
44138  # Weird Sol10 something check...TODO change to try compile
44139  #
44140  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
44141    if test "`uname -r`" = "5.10"; then
44142      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
44143        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
44144      fi
44145    fi
44146  fi
44147
44148  ac_ext=c
44149ac_cpp='$CPP $CPPFLAGS'
44150ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44151ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44152ac_compiler_gnu=$ac_cv_c_compiler_gnu
44153
44154  OLD_CFLAGS="$CFLAGS"
44155  CFLAGS="$CFLAGS $X_CFLAGS"
44156
44157  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44158  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44159do :
44160  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44161ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44162        # include <X11/Xlib.h>
44163        # include <X11/Xutil.h>
44164
44165
44166"
44167if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44168  cat >>confdefs.h <<_ACEOF
44169#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44170_ACEOF
44171 X11_A_OK=yes
44172else
44173  X11_A_OK=no; break
44174fi
44175
44176done
44177
44178
44179  CFLAGS="$OLD_CFLAGS"
44180  ac_ext=cpp
44181ac_cpp='$CXXCPP $CPPFLAGS'
44182ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44183ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44184ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44185
44186
44187  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
44188
44189  # Print a helpful message on how to acquire the necessary build dependency.
44190  # x11 is the help tag: freetype, cups, pulse, alsa etc
44191  MISSING_DEPENDENCY=x11
44192
44193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44194    cygwin_help $MISSING_DEPENDENCY
44195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44196    msys_help $MISSING_DEPENDENCY
44197  else
44198    PKGHANDLER_COMMAND=
44199
44200    case $PKGHANDLER in
44201      apt-get)
44202        apt_help     $MISSING_DEPENDENCY ;;
44203      yum)
44204        yum_help     $MISSING_DEPENDENCY ;;
44205      port)
44206        port_help    $MISSING_DEPENDENCY ;;
44207      pkgutil)
44208        pkgutil_help $MISSING_DEPENDENCY ;;
44209      pkgadd)
44210        pkgadd_help  $MISSING_DEPENDENCY ;;
44211    esac
44212
44213    if test "x$PKGHANDLER_COMMAND" != x; then
44214      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44215    fi
44216  fi
44217
44218    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44219  fi
44220
44221
44222
44223
44224
44225
44226  ###############################################################################
44227  #
44228  # The common unix printing system cups is used to print from java.
44229  #
44230
44231# Check whether --with-cups was given.
44232if test "${with_cups+set}" = set; then :
44233  withval=$with_cups;
44234fi
44235
44236
44237# Check whether --with-cups-include was given.
44238if test "${with_cups_include+set}" = set; then :
44239  withval=$with_cups_include;
44240fi
44241
44242
44243  if test "x$CUPS_NOT_NEEDED" = xyes; then
44244    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44245      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44246$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44247    fi
44248    CUPS_CFLAGS=
44249  else
44250    CUPS_FOUND=no
44251
44252    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44253      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44254    fi
44255
44256    if test "x${with_cups}" != x; then
44257      CUPS_CFLAGS="-I${with_cups}/include"
44258      CUPS_FOUND=yes
44259    fi
44260    if test "x${with_cups_include}" != x; then
44261      CUPS_CFLAGS="-I${with_cups_include}"
44262      CUPS_FOUND=yes
44263    fi
44264    if test "x$CUPS_FOUND" = xno; then
44265
44266
44267  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44268    # Source the builddeps file again, to make sure it uses the latest variables!
44269    . $builddepsfile
44270    # Look for a target and build machine specific resource!
44271    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44272    if test "x$resource" = x; then
44273      # Ok, lets instead look for a target specific resource
44274      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44275    fi
44276    if test "x$resource" = x; then
44277      # Ok, lets instead look for a build specific resource
44278      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44279    fi
44280    if test "x$resource" = x; then
44281      # Ok, lets instead look for a generic resource
44282      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44283      resource=${builddep_cups}
44284    fi
44285    if test "x$resource" != x; then
44286      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44287$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44288      # If the resource in the builddeps.conf file is an existing directory,
44289      # for example /java/linux/cups
44290      if test -d ${resource}; then
44291        depdir=${resource}
44292      else
44293
44294  # cups is for example mymodule
44295  # $resource is for example libs/general/libmymod_1_2_3.zip
44296  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44297  # $with_builddeps_dir is for example /localhome/builddeps
44298  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44299  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44300  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44301  filename=`basename $resource`
44302  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44303  filebase=${filename%%.*}
44304  extension=${filename#*.}
44305  installdir=$with_builddeps_dir/$filebase
44306  if test ! -f $installdir/$filename.unpacked; then
44307    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44308$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44309    if test ! -d $installdir; then
44310      mkdir -p $installdir
44311    fi
44312    if test ! -d $installdir; then
44313      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44314    fi
44315    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44316    touch $tmpfile
44317    if test ! -f $tmpfile; then
44318      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44319    fi
44320
44321  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44322  # $tmpfile is the local file name for the downloaded file.
44323  VALID_TOOL=no
44324  if test "x$BDEPS_FTP" = xwget; then
44325    VALID_TOOL=yes
44326    wget -O $tmpfile $with_builddeps_server/$resource
44327  fi
44328  if test "x$BDEPS_FTP" = xlftp; then
44329    VALID_TOOL=yes
44330    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44331  fi
44332  if test "x$BDEPS_FTP" = xftp; then
44333    VALID_TOOL=yes
44334    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44335    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44336    FTPUSERPWD=${FTPSERVER%%@*}
44337    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44338      FTPUSER=${userpwd%%:*}
44339      FTPPWD=${userpwd#*@}
44340      FTPSERVER=${FTPSERVER#*@}
44341    else
44342      FTPUSER=ftp
44343      FTPPWD=ftp
44344    fi
44345    # the "pass" command does not work on some
44346    # ftp clients (read ftp.exe) but if it works,
44347    # passive mode is better!
44348    ( \
44349        echo "user $FTPUSER $FTPPWD"        ; \
44350        echo "pass"                         ; \
44351        echo "bin"                          ; \
44352        echo "get $FTPPATH $tmpfile"              ; \
44353    ) | ftp -in $FTPSERVER
44354  fi
44355  if test "x$VALID_TOOL" != xyes; then
44356    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44357  fi
44358
44359    mv $tmpfile $installdir/$filename
44360    if test ! -s $installdir/$filename; then
44361      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44362    fi
44363    case "$extension" in
44364      zip)  echo "Unzipping $installdir/$filename..."
44365        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44366        ;;
44367      tar.gz) echo "Untaring $installdir/$filename..."
44368        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44369        ;;
44370      tgz) echo "Untaring $installdir/$filename..."
44371        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44372        ;;
44373      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44374        ;;
44375    esac
44376  fi
44377  if test -f $installdir/$filename.unpacked; then
44378    depdir=$installdir
44379  fi
44380
44381      fi
44382      # Source the builddeps file again, because in the previous command, the depdir
44383      # was updated to point at the current build dependency install directory.
44384      . $builddepsfile
44385      # Now extract variables from the builddeps.conf files.
44386      theroot=${builddep_cups_ROOT}
44387      thecflags=${builddep_cups_CFLAGS}
44388      thelibs=${builddep_cups_LIBS}
44389      if test "x$depdir" = x; then
44390        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44391      fi
44392      CUPS=$depdir
44393      if test "x$theroot" != x; then
44394        CUPS="$theroot"
44395      fi
44396      if test "x$thecflags" != x; then
44397        CUPS_CFLAGS="$thecflags"
44398      fi
44399      if test "x$thelibs" != x; then
44400        CUPS_LIBS="$thelibs"
44401      fi
44402      CUPS_FOUND=yes
44403
44404    fi
44405
44406  fi
44407
44408    fi
44409    if test "x$CUPS_FOUND" = xno; then
44410      # Are the cups headers installed in the default /usr/include location?
44411      for ac_header in cups/cups.h cups/ppd.h
44412do :
44413  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44414ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44415if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44416  cat >>confdefs.h <<_ACEOF
44417#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44418_ACEOF
44419
44420            CUPS_FOUND=yes
44421            CUPS_CFLAGS=
44422            DEFAULT_CUPS=yes
44423
44424
44425fi
44426
44427done
44428
44429    fi
44430    if test "x$CUPS_FOUND" = xno; then
44431      # Getting nervous now? Lets poke around for standard Solaris third-party
44432      # package installation locations.
44433      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44434$as_echo_n "checking for cups headers... " >&6; }
44435      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44436        # An SFW package seems to be installed!
44437        CUPS_FOUND=yes
44438        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44439      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44440        # A CSW package seems to be installed!
44441        CUPS_FOUND=yes
44442        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44443      fi
44444      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44445$as_echo "$CUPS_FOUND" >&6; }
44446    fi
44447    if test "x$CUPS_FOUND" = xno; then
44448
44449  # Print a helpful message on how to acquire the necessary build dependency.
44450  # cups is the help tag: freetype, cups, pulse, alsa etc
44451  MISSING_DEPENDENCY=cups
44452
44453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44454    cygwin_help $MISSING_DEPENDENCY
44455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44456    msys_help $MISSING_DEPENDENCY
44457  else
44458    PKGHANDLER_COMMAND=
44459
44460    case $PKGHANDLER in
44461      apt-get)
44462        apt_help     $MISSING_DEPENDENCY ;;
44463      yum)
44464        yum_help     $MISSING_DEPENDENCY ;;
44465      port)
44466        port_help    $MISSING_DEPENDENCY ;;
44467      pkgutil)
44468        pkgutil_help $MISSING_DEPENDENCY ;;
44469      pkgadd)
44470        pkgadd_help  $MISSING_DEPENDENCY ;;
44471    esac
44472
44473    if test "x$PKGHANDLER_COMMAND" != x; then
44474      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44475    fi
44476  fi
44477
44478      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44479    fi
44480  fi
44481
44482
44483
44484
44485
44486
44487  ###############################################################################
44488  #
44489  # The ubiquitous freetype library is used to render fonts.
44490  #
44491
44492# Check whether --with-freetype was given.
44493if test "${with_freetype+set}" = set; then :
44494  withval=$with_freetype;
44495fi
44496
44497
44498# Check whether --with-freetype-include was given.
44499if test "${with_freetype_include+set}" = set; then :
44500  withval=$with_freetype_include;
44501fi
44502
44503
44504# Check whether --with-freetype-lib was given.
44505if test "${with_freetype_lib+set}" = set; then :
44506  withval=$with_freetype_lib;
44507fi
44508
44509  # Check whether --enable-freetype-bundling was given.
44510if test "${enable_freetype_bundling+set}" = set; then :
44511  enableval=$enable_freetype_bundling;
44512fi
44513
44514
44515  FREETYPE_CFLAGS=
44516  FREETYPE_LIBS=
44517  FREETYPE_BUNDLE_LIB_PATH=
44518
44519  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44520    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44521      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44522$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44523    fi
44524    if test "x$enable_freetype_bundling" != x; then
44525      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44526$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44527    fi
44528  else
44529    # freetype is needed to build; go get it!
44530
44531    BUNDLE_FREETYPE="$enable_freetype_bundling"
44532
44533    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44534      # User has specified settings
44535
44536      if test "x$BUNDLE_FREETYPE" = x; then
44537        # If not specified, default is to bundle freetype
44538        BUNDLE_FREETYPE=yes
44539      fi
44540
44541      if test "x$with_freetype" != x; then
44542        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44543        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44544      fi
44545
44546      # Allow --with-freetype-lib and --with-freetype-include to override
44547      if test "x$with_freetype_include" != x; then
44548        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44549      fi
44550      if test "x$with_freetype_lib" != x; then
44551        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44552      fi
44553
44554      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44555        # Okay, we got it. Check that it works.
44556
44557  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44558  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44559  METHOD="--with-freetype"
44560
44561  # First check if the files exists.
44562  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44563    # We found an arbitrary include file. That's a good sign.
44564    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44565$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44566    FOUND_FREETYPE=yes
44567
44568    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44569    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44570      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44571$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44572      FOUND_FREETYPE=no
44573    else
44574      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44575        # On Windows, we will need both .lib and .dll file.
44576        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44577          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44578$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44579          FOUND_FREETYPE=no
44580        fi
44581      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44582          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44583        # Found lib in isa dir, use that instead.
44584        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44585      fi
44586    fi
44587  fi
44588
44589  if test "x$FOUND_FREETYPE" = xyes; then
44590
44591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44592
44593  # Input might be given as Windows format, start by converting to
44594  # unix format.
44595  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44596  new_path=`$CYGPATH -u "$path"`
44597
44598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44601  # "foo.exe" is OK but "foo" is an error.
44602  #
44603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44604  # It is also a way to make sure we got the proper file name for the real test later on.
44605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44606  if test "x$test_shortpath" = x; then
44607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44608$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44609    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44610  fi
44611
44612  # Call helper function which possibly converts this using DOS-style short mode.
44613  # If so, the updated path is stored in $new_path.
44614
44615  input_path="$new_path"
44616  # Check if we need to convert this using DOS-style short mode. If the path
44617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44618  # take no chances and rewrite it.
44619  # Note: m4 eats our [], so we need to use [ and ] instead.
44620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44621  if test "x$has_forbidden_chars" != x; then
44622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44626      # Going to short mode and back again did indeed matter. Since short mode is
44627      # case insensitive, let's make it lowercase to improve readability.
44628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44629      # Now convert it back to Unix-stile (cygpath)
44630      input_path=`$CYGPATH -u "$shortmode_path"`
44631      new_path="$input_path"
44632    fi
44633  fi
44634
44635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44636  if test "x$test_cygdrive_prefix" = x; then
44637    # As a simple fix, exclude /usr/bin since it's not a real path.
44638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44640      # a path prefixed by /cygdrive for fixpath to work.
44641      new_path="$CYGWIN_ROOT_PATH$input_path"
44642    fi
44643  fi
44644
44645
44646  if test "x$path" != "x$new_path"; then
44647    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44649$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44650  fi
44651
44652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44653
44654  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44655  has_colon=`$ECHO $path | $GREP ^.:`
44656  new_path="$path"
44657  if test "x$has_colon" = x; then
44658    # Not in mixed or Windows style, start by that.
44659    new_path=`cmd //c echo $path`
44660  fi
44661
44662
44663  input_path="$new_path"
44664  # Check if we need to convert this using DOS-style short mode. If the path
44665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44666  # take no chances and rewrite it.
44667  # Note: m4 eats our [], so we need to use [ and ] instead.
44668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44669  if test "x$has_forbidden_chars" != x; then
44670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44672  fi
44673
44674
44675  windows_path="$new_path"
44676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44677    unix_path=`$CYGPATH -u "$windows_path"`
44678    new_path="$unix_path"
44679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44681    new_path="$unix_path"
44682  fi
44683
44684  if test "x$path" != "x$new_path"; then
44685    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44687$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44688  fi
44689
44690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44692
44693  else
44694    # We're on a posix platform. Hooray! :)
44695    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44696    has_space=`$ECHO "$path" | $GREP " "`
44697    if test "x$has_space" != x; then
44698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44699$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44700      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44701    fi
44702
44703    # Use eval to expand a potential ~
44704    eval path="$path"
44705    if test ! -f "$path" && test ! -d "$path"; then
44706      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44707    fi
44708
44709    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44710  fi
44711
44712
44713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44714
44715  # Input might be given as Windows format, start by converting to
44716  # unix format.
44717  path="$POTENTIAL_FREETYPE_LIB_PATH"
44718  new_path=`$CYGPATH -u "$path"`
44719
44720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44723  # "foo.exe" is OK but "foo" is an error.
44724  #
44725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44726  # It is also a way to make sure we got the proper file name for the real test later on.
44727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44728  if test "x$test_shortpath" = x; then
44729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44730$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44731    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44732  fi
44733
44734  # Call helper function which possibly converts this using DOS-style short mode.
44735  # If so, the updated path is stored in $new_path.
44736
44737  input_path="$new_path"
44738  # Check if we need to convert this using DOS-style short mode. If the path
44739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44740  # take no chances and rewrite it.
44741  # Note: m4 eats our [], so we need to use [ and ] instead.
44742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44743  if test "x$has_forbidden_chars" != x; then
44744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44748      # Going to short mode and back again did indeed matter. Since short mode is
44749      # case insensitive, let's make it lowercase to improve readability.
44750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44751      # Now convert it back to Unix-stile (cygpath)
44752      input_path=`$CYGPATH -u "$shortmode_path"`
44753      new_path="$input_path"
44754    fi
44755  fi
44756
44757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44758  if test "x$test_cygdrive_prefix" = x; then
44759    # As a simple fix, exclude /usr/bin since it's not a real path.
44760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44762      # a path prefixed by /cygdrive for fixpath to work.
44763      new_path="$CYGWIN_ROOT_PATH$input_path"
44764    fi
44765  fi
44766
44767
44768  if test "x$path" != "x$new_path"; then
44769    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44771$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44772  fi
44773
44774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44775
44776  path="$POTENTIAL_FREETYPE_LIB_PATH"
44777  has_colon=`$ECHO $path | $GREP ^.:`
44778  new_path="$path"
44779  if test "x$has_colon" = x; then
44780    # Not in mixed or Windows style, start by that.
44781    new_path=`cmd //c echo $path`
44782  fi
44783
44784
44785  input_path="$new_path"
44786  # Check if we need to convert this using DOS-style short mode. If the path
44787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44788  # take no chances and rewrite it.
44789  # Note: m4 eats our [], so we need to use [ and ] instead.
44790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44791  if test "x$has_forbidden_chars" != x; then
44792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44794  fi
44795
44796
44797  windows_path="$new_path"
44798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44799    unix_path=`$CYGPATH -u "$windows_path"`
44800    new_path="$unix_path"
44801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44803    new_path="$unix_path"
44804  fi
44805
44806  if test "x$path" != "x$new_path"; then
44807    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44809$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44810  fi
44811
44812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44814
44815  else
44816    # We're on a posix platform. Hooray! :)
44817    path="$POTENTIAL_FREETYPE_LIB_PATH"
44818    has_space=`$ECHO "$path" | $GREP " "`
44819    if test "x$has_space" != x; then
44820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44821$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44822      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44823    fi
44824
44825    # Use eval to expand a potential ~
44826    eval path="$path"
44827    if test ! -f "$path" && test ! -d "$path"; then
44828      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44829    fi
44830
44831    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44832  fi
44833
44834
44835    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44836    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44837$as_echo_n "checking for freetype includes... " >&6; }
44838    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44839$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44840    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44842$as_echo_n "checking for freetype libraries... " >&6; }
44843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44844$as_echo "$FREETYPE_LIB_PATH" >&6; }
44845  fi
44846
44847        if test "x$FOUND_FREETYPE" != xyes; then
44848          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44849        fi
44850      else
44851        # User specified only one of lib or include. This is an error.
44852        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44853          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44854$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44855          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44856        else
44857          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44858$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44859          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44860        fi
44861      fi
44862    else
44863      # User did not specify settings, but we need freetype. Try to locate it.
44864
44865      if test "x$BUNDLE_FREETYPE" = x; then
44866        # If not specified, default is to bundle freetype only on windows
44867        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44868          BUNDLE_FREETYPE=yes
44869        else
44870          BUNDLE_FREETYPE=no
44871        fi
44872      fi
44873
44874      if test "x$FOUND_FREETYPE" != xyes; then
44875        # Check builddeps
44876
44877
44878  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44879    # Source the builddeps file again, to make sure it uses the latest variables!
44880    . $builddepsfile
44881    # Look for a target and build machine specific resource!
44882    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44883    if test "x$resource" = x; then
44884      # Ok, lets instead look for a target specific resource
44885      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44886    fi
44887    if test "x$resource" = x; then
44888      # Ok, lets instead look for a build specific resource
44889      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44890    fi
44891    if test "x$resource" = x; then
44892      # Ok, lets instead look for a generic resource
44893      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44894      resource=${builddep_freetype2}
44895    fi
44896    if test "x$resource" != x; then
44897      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44898$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44899      # If the resource in the builddeps.conf file is an existing directory,
44900      # for example /java/linux/cups
44901      if test -d ${resource}; then
44902        depdir=${resource}
44903      else
44904
44905  # freetype2 is for example mymodule
44906  # $resource is for example libs/general/libmymod_1_2_3.zip
44907  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44908  # $with_builddeps_dir is for example /localhome/builddeps
44909  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44910  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44911  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44912  filename=`basename $resource`
44913  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44914  filebase=${filename%%.*}
44915  extension=${filename#*.}
44916  installdir=$with_builddeps_dir/$filebase
44917  if test ! -f $installdir/$filename.unpacked; then
44918    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44919$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44920    if test ! -d $installdir; then
44921      mkdir -p $installdir
44922    fi
44923    if test ! -d $installdir; then
44924      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44925    fi
44926    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44927    touch $tmpfile
44928    if test ! -f $tmpfile; then
44929      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44930    fi
44931
44932  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44933  # $tmpfile is the local file name for the downloaded file.
44934  VALID_TOOL=no
44935  if test "x$BDEPS_FTP" = xwget; then
44936    VALID_TOOL=yes
44937    wget -O $tmpfile $with_builddeps_server/$resource
44938  fi
44939  if test "x$BDEPS_FTP" = xlftp; then
44940    VALID_TOOL=yes
44941    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44942  fi
44943  if test "x$BDEPS_FTP" = xftp; then
44944    VALID_TOOL=yes
44945    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44946    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44947    FTPUSERPWD=${FTPSERVER%%@*}
44948    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44949      FTPUSER=${userpwd%%:*}
44950      FTPPWD=${userpwd#*@}
44951      FTPSERVER=${FTPSERVER#*@}
44952    else
44953      FTPUSER=ftp
44954      FTPPWD=ftp
44955    fi
44956    # the "pass" command does not work on some
44957    # ftp clients (read ftp.exe) but if it works,
44958    # passive mode is better!
44959    ( \
44960        echo "user $FTPUSER $FTPPWD"        ; \
44961        echo "pass"                         ; \
44962        echo "bin"                          ; \
44963        echo "get $FTPPATH $tmpfile"              ; \
44964    ) | ftp -in $FTPSERVER
44965  fi
44966  if test "x$VALID_TOOL" != xyes; then
44967    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44968  fi
44969
44970    mv $tmpfile $installdir/$filename
44971    if test ! -s $installdir/$filename; then
44972      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44973    fi
44974    case "$extension" in
44975      zip)  echo "Unzipping $installdir/$filename..."
44976        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44977        ;;
44978      tar.gz) echo "Untaring $installdir/$filename..."
44979        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44980        ;;
44981      tgz) echo "Untaring $installdir/$filename..."
44982        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44983        ;;
44984      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44985        ;;
44986    esac
44987  fi
44988  if test -f $installdir/$filename.unpacked; then
44989    depdir=$installdir
44990  fi
44991
44992      fi
44993      # Source the builddeps file again, because in the previous command, the depdir
44994      # was updated to point at the current build dependency install directory.
44995      . $builddepsfile
44996      # Now extract variables from the builddeps.conf files.
44997      theroot=${builddep_freetype2_ROOT}
44998      thecflags=${builddep_freetype2_CFLAGS}
44999      thelibs=${builddep_freetype2_LIBS}
45000      if test "x$depdir" = x; then
45001        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45002      fi
45003      FREETYPE=$depdir
45004      if test "x$theroot" != x; then
45005        FREETYPE="$theroot"
45006      fi
45007      if test "x$thecflags" != x; then
45008        FREETYPE_CFLAGS="$thecflags"
45009      fi
45010      if test "x$thelibs" != x; then
45011        FREETYPE_LIBS="$thelibs"
45012      fi
45013      FOUND_FREETYPE=yes
45014      else FOUND_FREETYPE=no
45015
45016    fi
45017    else FOUND_FREETYPE=no
45018
45019  fi
45020
45021        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45022        if test "x$FOUND_FREETYPE" = xyes; then
45023          if test "x$BUNDLE_FREETYPE" = xyes; then
45024            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45025$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45026            FOUND_FREETYPE=no
45027          else
45028            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45029$as_echo_n "checking for freetype... " >&6; }
45030            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45031$as_echo "yes (using builddeps)" >&6; }
45032          fi
45033        fi
45034      fi
45035
45036      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45037      if test "x$SYSROOT" = x; then
45038        if test "x$FOUND_FREETYPE" != xyes; then
45039          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45040          if test "x$PKG_CONFIG" != x; then
45041
45042pkg_failed=no
45043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45044$as_echo_n "checking for FREETYPE... " >&6; }
45045
45046if test -n "$FREETYPE_CFLAGS"; then
45047    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45048 elif test -n "$PKG_CONFIG"; then
45049    if test -n "$PKG_CONFIG" && \
45050    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45051  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45052  ac_status=$?
45053  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45054  test $ac_status = 0; }; then
45055  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45056else
45057  pkg_failed=yes
45058fi
45059 else
45060    pkg_failed=untried
45061fi
45062if test -n "$FREETYPE_LIBS"; then
45063    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45064 elif test -n "$PKG_CONFIG"; then
45065    if test -n "$PKG_CONFIG" && \
45066    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45067  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45068  ac_status=$?
45069  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45070  test $ac_status = 0; }; then
45071  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45072else
45073  pkg_failed=yes
45074fi
45075 else
45076    pkg_failed=untried
45077fi
45078
45079
45080
45081if test $pkg_failed = yes; then
45082
45083if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45084        _pkg_short_errors_supported=yes
45085else
45086        _pkg_short_errors_supported=no
45087fi
45088        if test $_pkg_short_errors_supported = yes; then
45089	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45090        else
45091	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45092        fi
45093	# Put the nasty error message in config.log where it belongs
45094	echo "$FREETYPE_PKG_ERRORS" >&5
45095
45096	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45097$as_echo "no" >&6; }
45098                FOUND_FREETYPE=no
45099elif test $pkg_failed = untried; then
45100	FOUND_FREETYPE=no
45101else
45102	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45103	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45105$as_echo "yes" >&6; }
45106	FOUND_FREETYPE=yes
45107fi
45108            if test "x$FOUND_FREETYPE" = xyes; then
45109              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45110              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45111              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45112              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45113                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45114              fi
45115              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45116              if test "x$BUNDLE_FREETYPE" = xyes; then
45117                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45118$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45119                FOUND_FREETYPE=no
45120              else
45121                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45122$as_echo_n "checking for freetype... " >&6; }
45123                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45124$as_echo "yes (using pkg-config)" >&6; }
45125              fi
45126            fi
45127          fi
45128        fi
45129      fi
45130
45131      if test "x$FOUND_FREETYPE" != xyes; then
45132        # Check in well-known locations
45133        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45134          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45135
45136  windows_path="$FREETYPE_BASE_DIR"
45137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45138    unix_path=`$CYGPATH -u "$windows_path"`
45139    FREETYPE_BASE_DIR="$unix_path"
45140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45142    FREETYPE_BASE_DIR="$unix_path"
45143  fi
45144
45145
45146  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45147  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45148  METHOD="well-known location"
45149
45150  # First check if the files exists.
45151  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45152    # We found an arbitrary include file. That's a good sign.
45153    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45154$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45155    FOUND_FREETYPE=yes
45156
45157    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45158    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45159      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45160$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45161      FOUND_FREETYPE=no
45162    else
45163      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45164        # On Windows, we will need both .lib and .dll file.
45165        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45166          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45167$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45168          FOUND_FREETYPE=no
45169        fi
45170      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45171          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45172        # Found lib in isa dir, use that instead.
45173        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45174      fi
45175    fi
45176  fi
45177
45178  if test "x$FOUND_FREETYPE" = xyes; then
45179
45180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45181
45182  # Input might be given as Windows format, start by converting to
45183  # unix format.
45184  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45185  new_path=`$CYGPATH -u "$path"`
45186
45187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45190  # "foo.exe" is OK but "foo" is an error.
45191  #
45192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45193  # It is also a way to make sure we got the proper file name for the real test later on.
45194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45195  if test "x$test_shortpath" = x; then
45196    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45197$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45198    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45199  fi
45200
45201  # Call helper function which possibly converts this using DOS-style short mode.
45202  # If so, the updated path is stored in $new_path.
45203
45204  input_path="$new_path"
45205  # Check if we need to convert this using DOS-style short mode. If the path
45206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45207  # take no chances and rewrite it.
45208  # Note: m4 eats our [], so we need to use [ and ] instead.
45209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45210  if test "x$has_forbidden_chars" != x; then
45211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45215      # Going to short mode and back again did indeed matter. Since short mode is
45216      # case insensitive, let's make it lowercase to improve readability.
45217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45218      # Now convert it back to Unix-stile (cygpath)
45219      input_path=`$CYGPATH -u "$shortmode_path"`
45220      new_path="$input_path"
45221    fi
45222  fi
45223
45224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45225  if test "x$test_cygdrive_prefix" = x; then
45226    # As a simple fix, exclude /usr/bin since it's not a real path.
45227    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45229      # a path prefixed by /cygdrive for fixpath to work.
45230      new_path="$CYGWIN_ROOT_PATH$input_path"
45231    fi
45232  fi
45233
45234
45235  if test "x$path" != "x$new_path"; then
45236    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45238$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45239  fi
45240
45241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45242
45243  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45244  has_colon=`$ECHO $path | $GREP ^.:`
45245  new_path="$path"
45246  if test "x$has_colon" = x; then
45247    # Not in mixed or Windows style, start by that.
45248    new_path=`cmd //c echo $path`
45249  fi
45250
45251
45252  input_path="$new_path"
45253  # Check if we need to convert this using DOS-style short mode. If the path
45254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45255  # take no chances and rewrite it.
45256  # Note: m4 eats our [], so we need to use [ and ] instead.
45257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45258  if test "x$has_forbidden_chars" != x; then
45259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45261  fi
45262
45263
45264  windows_path="$new_path"
45265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45266    unix_path=`$CYGPATH -u "$windows_path"`
45267    new_path="$unix_path"
45268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45270    new_path="$unix_path"
45271  fi
45272
45273  if test "x$path" != "x$new_path"; then
45274    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45276$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45277  fi
45278
45279  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45280  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45281
45282  else
45283    # We're on a posix platform. Hooray! :)
45284    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45285    has_space=`$ECHO "$path" | $GREP " "`
45286    if test "x$has_space" != x; then
45287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45288$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45289      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45290    fi
45291
45292    # Use eval to expand a potential ~
45293    eval path="$path"
45294    if test ! -f "$path" && test ! -d "$path"; then
45295      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45296    fi
45297
45298    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45299  fi
45300
45301
45302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45303
45304  # Input might be given as Windows format, start by converting to
45305  # unix format.
45306  path="$POTENTIAL_FREETYPE_LIB_PATH"
45307  new_path=`$CYGPATH -u "$path"`
45308
45309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45312  # "foo.exe" is OK but "foo" is an error.
45313  #
45314  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45315  # It is also a way to make sure we got the proper file name for the real test later on.
45316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45317  if test "x$test_shortpath" = x; then
45318    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45319$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45320    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45321  fi
45322
45323  # Call helper function which possibly converts this using DOS-style short mode.
45324  # If so, the updated path is stored in $new_path.
45325
45326  input_path="$new_path"
45327  # Check if we need to convert this using DOS-style short mode. If the path
45328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45329  # take no chances and rewrite it.
45330  # Note: m4 eats our [], so we need to use [ and ] instead.
45331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45332  if test "x$has_forbidden_chars" != x; then
45333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45337      # Going to short mode and back again did indeed matter. Since short mode is
45338      # case insensitive, let's make it lowercase to improve readability.
45339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45340      # Now convert it back to Unix-stile (cygpath)
45341      input_path=`$CYGPATH -u "$shortmode_path"`
45342      new_path="$input_path"
45343    fi
45344  fi
45345
45346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45347  if test "x$test_cygdrive_prefix" = x; then
45348    # As a simple fix, exclude /usr/bin since it's not a real path.
45349    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45351      # a path prefixed by /cygdrive for fixpath to work.
45352      new_path="$CYGWIN_ROOT_PATH$input_path"
45353    fi
45354  fi
45355
45356
45357  if test "x$path" != "x$new_path"; then
45358    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45360$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45361  fi
45362
45363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45364
45365  path="$POTENTIAL_FREETYPE_LIB_PATH"
45366  has_colon=`$ECHO $path | $GREP ^.:`
45367  new_path="$path"
45368  if test "x$has_colon" = x; then
45369    # Not in mixed or Windows style, start by that.
45370    new_path=`cmd //c echo $path`
45371  fi
45372
45373
45374  input_path="$new_path"
45375  # Check if we need to convert this using DOS-style short mode. If the path
45376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45377  # take no chances and rewrite it.
45378  # Note: m4 eats our [], so we need to use [ and ] instead.
45379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45380  if test "x$has_forbidden_chars" != x; then
45381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45383  fi
45384
45385
45386  windows_path="$new_path"
45387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45388    unix_path=`$CYGPATH -u "$windows_path"`
45389    new_path="$unix_path"
45390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45392    new_path="$unix_path"
45393  fi
45394
45395  if test "x$path" != "x$new_path"; then
45396    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45398$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45399  fi
45400
45401  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45402  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45403
45404  else
45405    # We're on a posix platform. Hooray! :)
45406    path="$POTENTIAL_FREETYPE_LIB_PATH"
45407    has_space=`$ECHO "$path" | $GREP " "`
45408    if test "x$has_space" != x; then
45409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45410$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45411      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45412    fi
45413
45414    # Use eval to expand a potential ~
45415    eval path="$path"
45416    if test ! -f "$path" && test ! -d "$path"; then
45417      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45418    fi
45419
45420    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45421  fi
45422
45423
45424    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45426$as_echo_n "checking for freetype includes... " >&6; }
45427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45428$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45429    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45430    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45431$as_echo_n "checking for freetype libraries... " >&6; }
45432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45433$as_echo "$FREETYPE_LIB_PATH" >&6; }
45434  fi
45435
45436          if test "x$FOUND_FREETYPE" != xyes; then
45437            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45438
45439  windows_path="$FREETYPE_BASE_DIR"
45440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45441    unix_path=`$CYGPATH -u "$windows_path"`
45442    FREETYPE_BASE_DIR="$unix_path"
45443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45445    FREETYPE_BASE_DIR="$unix_path"
45446  fi
45447
45448
45449  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45450  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45451  METHOD="well-known location"
45452
45453  # First check if the files exists.
45454  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45455    # We found an arbitrary include file. That's a good sign.
45456    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45457$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45458    FOUND_FREETYPE=yes
45459
45460    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45461    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45462      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45463$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45464      FOUND_FREETYPE=no
45465    else
45466      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45467        # On Windows, we will need both .lib and .dll file.
45468        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45469          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45470$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45471          FOUND_FREETYPE=no
45472        fi
45473      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45474          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45475        # Found lib in isa dir, use that instead.
45476        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45477      fi
45478    fi
45479  fi
45480
45481  if test "x$FOUND_FREETYPE" = xyes; then
45482
45483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45484
45485  # Input might be given as Windows format, start by converting to
45486  # unix format.
45487  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45488  new_path=`$CYGPATH -u "$path"`
45489
45490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45493  # "foo.exe" is OK but "foo" is an error.
45494  #
45495  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45496  # It is also a way to make sure we got the proper file name for the real test later on.
45497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45498  if test "x$test_shortpath" = x; then
45499    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45500$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45501    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45502  fi
45503
45504  # Call helper function which possibly converts this using DOS-style short mode.
45505  # If so, the updated path is stored in $new_path.
45506
45507  input_path="$new_path"
45508  # Check if we need to convert this using DOS-style short mode. If the path
45509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45510  # take no chances and rewrite it.
45511  # Note: m4 eats our [], so we need to use [ and ] instead.
45512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45513  if test "x$has_forbidden_chars" != x; then
45514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45518      # Going to short mode and back again did indeed matter. Since short mode is
45519      # case insensitive, let's make it lowercase to improve readability.
45520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45521      # Now convert it back to Unix-stile (cygpath)
45522      input_path=`$CYGPATH -u "$shortmode_path"`
45523      new_path="$input_path"
45524    fi
45525  fi
45526
45527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45528  if test "x$test_cygdrive_prefix" = x; then
45529    # As a simple fix, exclude /usr/bin since it's not a real path.
45530    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45532      # a path prefixed by /cygdrive for fixpath to work.
45533      new_path="$CYGWIN_ROOT_PATH$input_path"
45534    fi
45535  fi
45536
45537
45538  if test "x$path" != "x$new_path"; then
45539    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45541$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45542  fi
45543
45544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45545
45546  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45547  has_colon=`$ECHO $path | $GREP ^.:`
45548  new_path="$path"
45549  if test "x$has_colon" = x; then
45550    # Not in mixed or Windows style, start by that.
45551    new_path=`cmd //c echo $path`
45552  fi
45553
45554
45555  input_path="$new_path"
45556  # Check if we need to convert this using DOS-style short mode. If the path
45557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45558  # take no chances and rewrite it.
45559  # Note: m4 eats our [], so we need to use [ and ] instead.
45560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45561  if test "x$has_forbidden_chars" != x; then
45562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45564  fi
45565
45566
45567  windows_path="$new_path"
45568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45569    unix_path=`$CYGPATH -u "$windows_path"`
45570    new_path="$unix_path"
45571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45573    new_path="$unix_path"
45574  fi
45575
45576  if test "x$path" != "x$new_path"; then
45577    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45579$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45580  fi
45581
45582  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45583  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45584
45585  else
45586    # We're on a posix platform. Hooray! :)
45587    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45588    has_space=`$ECHO "$path" | $GREP " "`
45589    if test "x$has_space" != x; then
45590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45591$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45592      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45593    fi
45594
45595    # Use eval to expand a potential ~
45596    eval path="$path"
45597    if test ! -f "$path" && test ! -d "$path"; then
45598      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45599    fi
45600
45601    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45602  fi
45603
45604
45605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45606
45607  # Input might be given as Windows format, start by converting to
45608  # unix format.
45609  path="$POTENTIAL_FREETYPE_LIB_PATH"
45610  new_path=`$CYGPATH -u "$path"`
45611
45612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45615  # "foo.exe" is OK but "foo" is an error.
45616  #
45617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45618  # It is also a way to make sure we got the proper file name for the real test later on.
45619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45620  if test "x$test_shortpath" = x; then
45621    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45622$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45623    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45624  fi
45625
45626  # Call helper function which possibly converts this using DOS-style short mode.
45627  # If so, the updated path is stored in $new_path.
45628
45629  input_path="$new_path"
45630  # Check if we need to convert this using DOS-style short mode. If the path
45631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45632  # take no chances and rewrite it.
45633  # Note: m4 eats our [], so we need to use [ and ] instead.
45634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45635  if test "x$has_forbidden_chars" != x; then
45636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45640      # Going to short mode and back again did indeed matter. Since short mode is
45641      # case insensitive, let's make it lowercase to improve readability.
45642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45643      # Now convert it back to Unix-stile (cygpath)
45644      input_path=`$CYGPATH -u "$shortmode_path"`
45645      new_path="$input_path"
45646    fi
45647  fi
45648
45649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45650  if test "x$test_cygdrive_prefix" = x; then
45651    # As a simple fix, exclude /usr/bin since it's not a real path.
45652    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45654      # a path prefixed by /cygdrive for fixpath to work.
45655      new_path="$CYGWIN_ROOT_PATH$input_path"
45656    fi
45657  fi
45658
45659
45660  if test "x$path" != "x$new_path"; then
45661    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45663$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45664  fi
45665
45666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45667
45668  path="$POTENTIAL_FREETYPE_LIB_PATH"
45669  has_colon=`$ECHO $path | $GREP ^.:`
45670  new_path="$path"
45671  if test "x$has_colon" = x; then
45672    # Not in mixed or Windows style, start by that.
45673    new_path=`cmd //c echo $path`
45674  fi
45675
45676
45677  input_path="$new_path"
45678  # Check if we need to convert this using DOS-style short mode. If the path
45679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45680  # take no chances and rewrite it.
45681  # Note: m4 eats our [], so we need to use [ and ] instead.
45682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45683  if test "x$has_forbidden_chars" != x; then
45684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45686  fi
45687
45688
45689  windows_path="$new_path"
45690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45691    unix_path=`$CYGPATH -u "$windows_path"`
45692    new_path="$unix_path"
45693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45695    new_path="$unix_path"
45696  fi
45697
45698  if test "x$path" != "x$new_path"; then
45699    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45701$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45702  fi
45703
45704  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45705  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45706
45707  else
45708    # We're on a posix platform. Hooray! :)
45709    path="$POTENTIAL_FREETYPE_LIB_PATH"
45710    has_space=`$ECHO "$path" | $GREP " "`
45711    if test "x$has_space" != x; then
45712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45713$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45714      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45715    fi
45716
45717    # Use eval to expand a potential ~
45718    eval path="$path"
45719    if test ! -f "$path" && test ! -d "$path"; then
45720      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45721    fi
45722
45723    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45724  fi
45725
45726
45727    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45729$as_echo_n "checking for freetype includes... " >&6; }
45730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45731$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45732    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45733    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45734$as_echo_n "checking for freetype libraries... " >&6; }
45735    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45736$as_echo "$FREETYPE_LIB_PATH" >&6; }
45737  fi
45738
45739          fi
45740        else
45741          FREETYPE_BASE_DIR="$SYSROOT/usr"
45742
45743  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45744  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45745  METHOD="well-known location"
45746
45747  # First check if the files exists.
45748  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45749    # We found an arbitrary include file. That's a good sign.
45750    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45751$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45752    FOUND_FREETYPE=yes
45753
45754    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45755    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45756      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45757$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45758      FOUND_FREETYPE=no
45759    else
45760      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45761        # On Windows, we will need both .lib and .dll file.
45762        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45763          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45764$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45765          FOUND_FREETYPE=no
45766        fi
45767      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45768          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45769        # Found lib in isa dir, use that instead.
45770        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45771      fi
45772    fi
45773  fi
45774
45775  if test "x$FOUND_FREETYPE" = xyes; then
45776
45777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45778
45779  # Input might be given as Windows format, start by converting to
45780  # unix format.
45781  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45782  new_path=`$CYGPATH -u "$path"`
45783
45784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45787  # "foo.exe" is OK but "foo" is an error.
45788  #
45789  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45790  # It is also a way to make sure we got the proper file name for the real test later on.
45791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45792  if test "x$test_shortpath" = x; then
45793    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45794$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45795    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45796  fi
45797
45798  # Call helper function which possibly converts this using DOS-style short mode.
45799  # If so, the updated path is stored in $new_path.
45800
45801  input_path="$new_path"
45802  # Check if we need to convert this using DOS-style short mode. If the path
45803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45804  # take no chances and rewrite it.
45805  # Note: m4 eats our [], so we need to use [ and ] instead.
45806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45807  if test "x$has_forbidden_chars" != x; then
45808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45809    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45810    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45811    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45812      # Going to short mode and back again did indeed matter. Since short mode is
45813      # case insensitive, let's make it lowercase to improve readability.
45814      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45815      # Now convert it back to Unix-stile (cygpath)
45816      input_path=`$CYGPATH -u "$shortmode_path"`
45817      new_path="$input_path"
45818    fi
45819  fi
45820
45821  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45822  if test "x$test_cygdrive_prefix" = x; then
45823    # As a simple fix, exclude /usr/bin since it's not a real path.
45824    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45825      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45826      # a path prefixed by /cygdrive for fixpath to work.
45827      new_path="$CYGWIN_ROOT_PATH$input_path"
45828    fi
45829  fi
45830
45831
45832  if test "x$path" != "x$new_path"; then
45833    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45835$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45836  fi
45837
45838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45839
45840  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45841  has_colon=`$ECHO $path | $GREP ^.:`
45842  new_path="$path"
45843  if test "x$has_colon" = x; then
45844    # Not in mixed or Windows style, start by that.
45845    new_path=`cmd //c echo $path`
45846  fi
45847
45848
45849  input_path="$new_path"
45850  # Check if we need to convert this using DOS-style short mode. If the path
45851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45852  # take no chances and rewrite it.
45853  # Note: m4 eats our [], so we need to use [ and ] instead.
45854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45855  if test "x$has_forbidden_chars" != x; then
45856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45858  fi
45859
45860
45861  windows_path="$new_path"
45862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45863    unix_path=`$CYGPATH -u "$windows_path"`
45864    new_path="$unix_path"
45865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45867    new_path="$unix_path"
45868  fi
45869
45870  if test "x$path" != "x$new_path"; then
45871    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45873$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45874  fi
45875
45876  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45877  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45878
45879  else
45880    # We're on a posix platform. Hooray! :)
45881    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45882    has_space=`$ECHO "$path" | $GREP " "`
45883    if test "x$has_space" != x; then
45884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45885$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45886      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45887    fi
45888
45889    # Use eval to expand a potential ~
45890    eval path="$path"
45891    if test ! -f "$path" && test ! -d "$path"; then
45892      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45893    fi
45894
45895    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45896  fi
45897
45898
45899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45900
45901  # Input might be given as Windows format, start by converting to
45902  # unix format.
45903  path="$POTENTIAL_FREETYPE_LIB_PATH"
45904  new_path=`$CYGPATH -u "$path"`
45905
45906  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45907  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45908  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45909  # "foo.exe" is OK but "foo" is an error.
45910  #
45911  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45912  # It is also a way to make sure we got the proper file name for the real test later on.
45913  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45914  if test "x$test_shortpath" = x; then
45915    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45916$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45917    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45918  fi
45919
45920  # Call helper function which possibly converts this using DOS-style short mode.
45921  # If so, the updated path is stored in $new_path.
45922
45923  input_path="$new_path"
45924  # Check if we need to convert this using DOS-style short mode. If the path
45925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45926  # take no chances and rewrite it.
45927  # Note: m4 eats our [], so we need to use [ and ] instead.
45928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45929  if test "x$has_forbidden_chars" != x; then
45930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45931    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45932    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45933    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45934      # Going to short mode and back again did indeed matter. Since short mode is
45935      # case insensitive, let's make it lowercase to improve readability.
45936      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45937      # Now convert it back to Unix-stile (cygpath)
45938      input_path=`$CYGPATH -u "$shortmode_path"`
45939      new_path="$input_path"
45940    fi
45941  fi
45942
45943  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45944  if test "x$test_cygdrive_prefix" = x; then
45945    # As a simple fix, exclude /usr/bin since it's not a real path.
45946    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45947      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45948      # a path prefixed by /cygdrive for fixpath to work.
45949      new_path="$CYGWIN_ROOT_PATH$input_path"
45950    fi
45951  fi
45952
45953
45954  if test "x$path" != "x$new_path"; then
45955    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45957$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45958  fi
45959
45960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45961
45962  path="$POTENTIAL_FREETYPE_LIB_PATH"
45963  has_colon=`$ECHO $path | $GREP ^.:`
45964  new_path="$path"
45965  if test "x$has_colon" = x; then
45966    # Not in mixed or Windows style, start by that.
45967    new_path=`cmd //c echo $path`
45968  fi
45969
45970
45971  input_path="$new_path"
45972  # Check if we need to convert this using DOS-style short mode. If the path
45973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45974  # take no chances and rewrite it.
45975  # Note: m4 eats our [], so we need to use [ and ] instead.
45976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45977  if test "x$has_forbidden_chars" != x; then
45978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45980  fi
45981
45982
45983  windows_path="$new_path"
45984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45985    unix_path=`$CYGPATH -u "$windows_path"`
45986    new_path="$unix_path"
45987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45989    new_path="$unix_path"
45990  fi
45991
45992  if test "x$path" != "x$new_path"; then
45993    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45995$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45996  fi
45997
45998  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45999  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46000
46001  else
46002    # We're on a posix platform. Hooray! :)
46003    path="$POTENTIAL_FREETYPE_LIB_PATH"
46004    has_space=`$ECHO "$path" | $GREP " "`
46005    if test "x$has_space" != x; then
46006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46007$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46008      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46009    fi
46010
46011    # Use eval to expand a potential ~
46012    eval path="$path"
46013    if test ! -f "$path" && test ! -d "$path"; then
46014      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46015    fi
46016
46017    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46018  fi
46019
46020
46021    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46023$as_echo_n "checking for freetype includes... " >&6; }
46024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46025$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46026    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46028$as_echo_n "checking for freetype libraries... " >&6; }
46029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46030$as_echo "$FREETYPE_LIB_PATH" >&6; }
46031  fi
46032
46033
46034          if test "x$FOUND_FREETYPE" != xyes; then
46035            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46036
46037  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46038  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46039  METHOD="well-known location"
46040
46041  # First check if the files exists.
46042  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46043    # We found an arbitrary include file. That's a good sign.
46044    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46045$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46046    FOUND_FREETYPE=yes
46047
46048    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46049    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46050      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46051$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46052      FOUND_FREETYPE=no
46053    else
46054      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46055        # On Windows, we will need both .lib and .dll file.
46056        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46057          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46058$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46059          FOUND_FREETYPE=no
46060        fi
46061      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46062          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46063        # Found lib in isa dir, use that instead.
46064        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46065      fi
46066    fi
46067  fi
46068
46069  if test "x$FOUND_FREETYPE" = xyes; then
46070
46071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46072
46073  # Input might be given as Windows format, start by converting to
46074  # unix format.
46075  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46076  new_path=`$CYGPATH -u "$path"`
46077
46078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46081  # "foo.exe" is OK but "foo" is an error.
46082  #
46083  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46084  # It is also a way to make sure we got the proper file name for the real test later on.
46085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46086  if test "x$test_shortpath" = x; then
46087    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46088$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46089    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46090  fi
46091
46092  # Call helper function which possibly converts this using DOS-style short mode.
46093  # If so, the updated path is stored in $new_path.
46094
46095  input_path="$new_path"
46096  # Check if we need to convert this using DOS-style short mode. If the path
46097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46098  # take no chances and rewrite it.
46099  # Note: m4 eats our [], so we need to use [ and ] instead.
46100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46101  if test "x$has_forbidden_chars" != x; then
46102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46103    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46104    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46105    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46106      # Going to short mode and back again did indeed matter. Since short mode is
46107      # case insensitive, let's make it lowercase to improve readability.
46108      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46109      # Now convert it back to Unix-stile (cygpath)
46110      input_path=`$CYGPATH -u "$shortmode_path"`
46111      new_path="$input_path"
46112    fi
46113  fi
46114
46115  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46116  if test "x$test_cygdrive_prefix" = x; then
46117    # As a simple fix, exclude /usr/bin since it's not a real path.
46118    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46119      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46120      # a path prefixed by /cygdrive for fixpath to work.
46121      new_path="$CYGWIN_ROOT_PATH$input_path"
46122    fi
46123  fi
46124
46125
46126  if test "x$path" != "x$new_path"; then
46127    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46128    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46129$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46130  fi
46131
46132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46133
46134  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46135  has_colon=`$ECHO $path | $GREP ^.:`
46136  new_path="$path"
46137  if test "x$has_colon" = x; then
46138    # Not in mixed or Windows style, start by that.
46139    new_path=`cmd //c echo $path`
46140  fi
46141
46142
46143  input_path="$new_path"
46144  # Check if we need to convert this using DOS-style short mode. If the path
46145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46146  # take no chances and rewrite it.
46147  # Note: m4 eats our [], so we need to use [ and ] instead.
46148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46149  if test "x$has_forbidden_chars" != x; then
46150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46151    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46152  fi
46153
46154
46155  windows_path="$new_path"
46156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46157    unix_path=`$CYGPATH -u "$windows_path"`
46158    new_path="$unix_path"
46159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46161    new_path="$unix_path"
46162  fi
46163
46164  if test "x$path" != "x$new_path"; then
46165    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46167$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46168  fi
46169
46170  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46171  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46172
46173  else
46174    # We're on a posix platform. Hooray! :)
46175    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46176    has_space=`$ECHO "$path" | $GREP " "`
46177    if test "x$has_space" != x; then
46178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46179$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46180      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46181    fi
46182
46183    # Use eval to expand a potential ~
46184    eval path="$path"
46185    if test ! -f "$path" && test ! -d "$path"; then
46186      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46187    fi
46188
46189    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46190  fi
46191
46192
46193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46194
46195  # Input might be given as Windows format, start by converting to
46196  # unix format.
46197  path="$POTENTIAL_FREETYPE_LIB_PATH"
46198  new_path=`$CYGPATH -u "$path"`
46199
46200  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46201  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46202  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46203  # "foo.exe" is OK but "foo" is an error.
46204  #
46205  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46206  # It is also a way to make sure we got the proper file name for the real test later on.
46207  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46208  if test "x$test_shortpath" = x; then
46209    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46210$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46211    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46212  fi
46213
46214  # Call helper function which possibly converts this using DOS-style short mode.
46215  # If so, the updated path is stored in $new_path.
46216
46217  input_path="$new_path"
46218  # Check if we need to convert this using DOS-style short mode. If the path
46219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46220  # take no chances and rewrite it.
46221  # Note: m4 eats our [], so we need to use [ and ] instead.
46222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46223  if test "x$has_forbidden_chars" != x; then
46224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46225    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46226    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46227    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46228      # Going to short mode and back again did indeed matter. Since short mode is
46229      # case insensitive, let's make it lowercase to improve readability.
46230      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46231      # Now convert it back to Unix-stile (cygpath)
46232      input_path=`$CYGPATH -u "$shortmode_path"`
46233      new_path="$input_path"
46234    fi
46235  fi
46236
46237  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46238  if test "x$test_cygdrive_prefix" = x; then
46239    # As a simple fix, exclude /usr/bin since it's not a real path.
46240    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46241      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46242      # a path prefixed by /cygdrive for fixpath to work.
46243      new_path="$CYGWIN_ROOT_PATH$input_path"
46244    fi
46245  fi
46246
46247
46248  if test "x$path" != "x$new_path"; then
46249    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46251$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46252  fi
46253
46254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46255
46256  path="$POTENTIAL_FREETYPE_LIB_PATH"
46257  has_colon=`$ECHO $path | $GREP ^.:`
46258  new_path="$path"
46259  if test "x$has_colon" = x; then
46260    # Not in mixed or Windows style, start by that.
46261    new_path=`cmd //c echo $path`
46262  fi
46263
46264
46265  input_path="$new_path"
46266  # Check if we need to convert this using DOS-style short mode. If the path
46267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46268  # take no chances and rewrite it.
46269  # Note: m4 eats our [], so we need to use [ and ] instead.
46270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46271  if test "x$has_forbidden_chars" != x; then
46272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46273    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46274  fi
46275
46276
46277  windows_path="$new_path"
46278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46279    unix_path=`$CYGPATH -u "$windows_path"`
46280    new_path="$unix_path"
46281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46283    new_path="$unix_path"
46284  fi
46285
46286  if test "x$path" != "x$new_path"; then
46287    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46289$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46290  fi
46291
46292  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46293  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46294
46295  else
46296    # We're on a posix platform. Hooray! :)
46297    path="$POTENTIAL_FREETYPE_LIB_PATH"
46298    has_space=`$ECHO "$path" | $GREP " "`
46299    if test "x$has_space" != x; then
46300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46301$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46302      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46303    fi
46304
46305    # Use eval to expand a potential ~
46306    eval path="$path"
46307    if test ! -f "$path" && test ! -d "$path"; then
46308      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46309    fi
46310
46311    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46312  fi
46313
46314
46315    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46317$as_echo_n "checking for freetype includes... " >&6; }
46318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46319$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46320    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46322$as_echo_n "checking for freetype libraries... " >&6; }
46323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46324$as_echo "$FREETYPE_LIB_PATH" >&6; }
46325  fi
46326
46327          fi
46328
46329          if test "x$FOUND_FREETYPE" != xyes; then
46330            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46331
46332  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46333  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46334  METHOD="well-known location"
46335
46336  # First check if the files exists.
46337  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46338    # We found an arbitrary include file. That's a good sign.
46339    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46340$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46341    FOUND_FREETYPE=yes
46342
46343    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46344    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46345      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46346$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46347      FOUND_FREETYPE=no
46348    else
46349      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46350        # On Windows, we will need both .lib and .dll file.
46351        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46352          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46353$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46354          FOUND_FREETYPE=no
46355        fi
46356      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46357          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46358        # Found lib in isa dir, use that instead.
46359        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46360      fi
46361    fi
46362  fi
46363
46364  if test "x$FOUND_FREETYPE" = xyes; then
46365
46366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46367
46368  # Input might be given as Windows format, start by converting to
46369  # unix format.
46370  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46371  new_path=`$CYGPATH -u "$path"`
46372
46373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46376  # "foo.exe" is OK but "foo" is an error.
46377  #
46378  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46379  # It is also a way to make sure we got the proper file name for the real test later on.
46380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46381  if test "x$test_shortpath" = x; then
46382    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46383$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46384    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46385  fi
46386
46387  # Call helper function which possibly converts this using DOS-style short mode.
46388  # If so, the updated path is stored in $new_path.
46389
46390  input_path="$new_path"
46391  # Check if we need to convert this using DOS-style short mode. If the path
46392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46393  # take no chances and rewrite it.
46394  # Note: m4 eats our [], so we need to use [ and ] instead.
46395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46396  if test "x$has_forbidden_chars" != x; then
46397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46401      # Going to short mode and back again did indeed matter. Since short mode is
46402      # case insensitive, let's make it lowercase to improve readability.
46403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46404      # Now convert it back to Unix-stile (cygpath)
46405      input_path=`$CYGPATH -u "$shortmode_path"`
46406      new_path="$input_path"
46407    fi
46408  fi
46409
46410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46411  if test "x$test_cygdrive_prefix" = x; then
46412    # As a simple fix, exclude /usr/bin since it's not a real path.
46413    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46415      # a path prefixed by /cygdrive for fixpath to work.
46416      new_path="$CYGWIN_ROOT_PATH$input_path"
46417    fi
46418  fi
46419
46420
46421  if test "x$path" != "x$new_path"; then
46422    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46424$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46425  fi
46426
46427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46428
46429  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46430  has_colon=`$ECHO $path | $GREP ^.:`
46431  new_path="$path"
46432  if test "x$has_colon" = x; then
46433    # Not in mixed or Windows style, start by that.
46434    new_path=`cmd //c echo $path`
46435  fi
46436
46437
46438  input_path="$new_path"
46439  # Check if we need to convert this using DOS-style short mode. If the path
46440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46441  # take no chances and rewrite it.
46442  # Note: m4 eats our [], so we need to use [ and ] instead.
46443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46444  if test "x$has_forbidden_chars" != x; then
46445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46447  fi
46448
46449
46450  windows_path="$new_path"
46451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46452    unix_path=`$CYGPATH -u "$windows_path"`
46453    new_path="$unix_path"
46454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46456    new_path="$unix_path"
46457  fi
46458
46459  if test "x$path" != "x$new_path"; then
46460    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46462$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46463  fi
46464
46465  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46466  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46467
46468  else
46469    # We're on a posix platform. Hooray! :)
46470    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46471    has_space=`$ECHO "$path" | $GREP " "`
46472    if test "x$has_space" != x; then
46473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46474$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46475      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46476    fi
46477
46478    # Use eval to expand a potential ~
46479    eval path="$path"
46480    if test ! -f "$path" && test ! -d "$path"; then
46481      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46482    fi
46483
46484    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46485  fi
46486
46487
46488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46489
46490  # Input might be given as Windows format, start by converting to
46491  # unix format.
46492  path="$POTENTIAL_FREETYPE_LIB_PATH"
46493  new_path=`$CYGPATH -u "$path"`
46494
46495  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46496  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46497  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46498  # "foo.exe" is OK but "foo" is an error.
46499  #
46500  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46501  # It is also a way to make sure we got the proper file name for the real test later on.
46502  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46503  if test "x$test_shortpath" = x; then
46504    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46505$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46506    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46507  fi
46508
46509  # Call helper function which possibly converts this using DOS-style short mode.
46510  # If so, the updated path is stored in $new_path.
46511
46512  input_path="$new_path"
46513  # Check if we need to convert this using DOS-style short mode. If the path
46514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46515  # take no chances and rewrite it.
46516  # Note: m4 eats our [], so we need to use [ and ] instead.
46517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46518  if test "x$has_forbidden_chars" != x; then
46519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46520    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46521    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46522    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46523      # Going to short mode and back again did indeed matter. Since short mode is
46524      # case insensitive, let's make it lowercase to improve readability.
46525      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46526      # Now convert it back to Unix-stile (cygpath)
46527      input_path=`$CYGPATH -u "$shortmode_path"`
46528      new_path="$input_path"
46529    fi
46530  fi
46531
46532  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46533  if test "x$test_cygdrive_prefix" = x; then
46534    # As a simple fix, exclude /usr/bin since it's not a real path.
46535    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46536      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46537      # a path prefixed by /cygdrive for fixpath to work.
46538      new_path="$CYGWIN_ROOT_PATH$input_path"
46539    fi
46540  fi
46541
46542
46543  if test "x$path" != "x$new_path"; then
46544    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46546$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46547  fi
46548
46549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46550
46551  path="$POTENTIAL_FREETYPE_LIB_PATH"
46552  has_colon=`$ECHO $path | $GREP ^.:`
46553  new_path="$path"
46554  if test "x$has_colon" = x; then
46555    # Not in mixed or Windows style, start by that.
46556    new_path=`cmd //c echo $path`
46557  fi
46558
46559
46560  input_path="$new_path"
46561  # Check if we need to convert this using DOS-style short mode. If the path
46562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46563  # take no chances and rewrite it.
46564  # Note: m4 eats our [], so we need to use [ and ] instead.
46565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46566  if test "x$has_forbidden_chars" != x; then
46567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46568    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46569  fi
46570
46571
46572  windows_path="$new_path"
46573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46574    unix_path=`$CYGPATH -u "$windows_path"`
46575    new_path="$unix_path"
46576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46578    new_path="$unix_path"
46579  fi
46580
46581  if test "x$path" != "x$new_path"; then
46582    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46584$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46585  fi
46586
46587  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46588  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46589
46590  else
46591    # We're on a posix platform. Hooray! :)
46592    path="$POTENTIAL_FREETYPE_LIB_PATH"
46593    has_space=`$ECHO "$path" | $GREP " "`
46594    if test "x$has_space" != x; then
46595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46596$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46597      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46598    fi
46599
46600    # Use eval to expand a potential ~
46601    eval path="$path"
46602    if test ! -f "$path" && test ! -d "$path"; then
46603      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46604    fi
46605
46606    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46607  fi
46608
46609
46610    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46611    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46612$as_echo_n "checking for freetype includes... " >&6; }
46613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46614$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46615    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46617$as_echo_n "checking for freetype libraries... " >&6; }
46618    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46619$as_echo "$FREETYPE_LIB_PATH" >&6; }
46620  fi
46621
46622          fi
46623
46624          if test "x$FOUND_FREETYPE" != xyes; then
46625            FREETYPE_BASE_DIR="$SYSROOT/usr"
46626            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46627
46628  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46629  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46630  METHOD="well-known location"
46631
46632  # First check if the files exists.
46633  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46634    # We found an arbitrary include file. That's a good sign.
46635    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46636$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46637    FOUND_FREETYPE=yes
46638
46639    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46640    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46641      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46642$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46643      FOUND_FREETYPE=no
46644    else
46645      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46646        # On Windows, we will need both .lib and .dll file.
46647        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46648          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46649$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46650          FOUND_FREETYPE=no
46651        fi
46652      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46653          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46654        # Found lib in isa dir, use that instead.
46655        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46656      fi
46657    fi
46658  fi
46659
46660  if test "x$FOUND_FREETYPE" = xyes; then
46661
46662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46663
46664  # Input might be given as Windows format, start by converting to
46665  # unix format.
46666  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46667  new_path=`$CYGPATH -u "$path"`
46668
46669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46672  # "foo.exe" is OK but "foo" is an error.
46673  #
46674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46675  # It is also a way to make sure we got the proper file name for the real test later on.
46676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46677  if test "x$test_shortpath" = x; then
46678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46679$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46680    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46681  fi
46682
46683  # Call helper function which possibly converts this using DOS-style short mode.
46684  # If so, the updated path is stored in $new_path.
46685
46686  input_path="$new_path"
46687  # Check if we need to convert this using DOS-style short mode. If the path
46688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46689  # take no chances and rewrite it.
46690  # Note: m4 eats our [], so we need to use [ and ] instead.
46691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46692  if test "x$has_forbidden_chars" != x; then
46693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46697      # Going to short mode and back again did indeed matter. Since short mode is
46698      # case insensitive, let's make it lowercase to improve readability.
46699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46700      # Now convert it back to Unix-stile (cygpath)
46701      input_path=`$CYGPATH -u "$shortmode_path"`
46702      new_path="$input_path"
46703    fi
46704  fi
46705
46706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46707  if test "x$test_cygdrive_prefix" = x; then
46708    # As a simple fix, exclude /usr/bin since it's not a real path.
46709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46711      # a path prefixed by /cygdrive for fixpath to work.
46712      new_path="$CYGWIN_ROOT_PATH$input_path"
46713    fi
46714  fi
46715
46716
46717  if test "x$path" != "x$new_path"; then
46718    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46720$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46721  fi
46722
46723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46724
46725  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46726  has_colon=`$ECHO $path | $GREP ^.:`
46727  new_path="$path"
46728  if test "x$has_colon" = x; then
46729    # Not in mixed or Windows style, start by that.
46730    new_path=`cmd //c echo $path`
46731  fi
46732
46733
46734  input_path="$new_path"
46735  # Check if we need to convert this using DOS-style short mode. If the path
46736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46737  # take no chances and rewrite it.
46738  # Note: m4 eats our [], so we need to use [ and ] instead.
46739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46740  if test "x$has_forbidden_chars" != x; then
46741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46743  fi
46744
46745
46746  windows_path="$new_path"
46747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46748    unix_path=`$CYGPATH -u "$windows_path"`
46749    new_path="$unix_path"
46750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46752    new_path="$unix_path"
46753  fi
46754
46755  if test "x$path" != "x$new_path"; then
46756    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46758$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46759  fi
46760
46761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46763
46764  else
46765    # We're on a posix platform. Hooray! :)
46766    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46767    has_space=`$ECHO "$path" | $GREP " "`
46768    if test "x$has_space" != x; then
46769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46770$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46771      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46772    fi
46773
46774    # Use eval to expand a potential ~
46775    eval path="$path"
46776    if test ! -f "$path" && test ! -d "$path"; then
46777      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46778    fi
46779
46780    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46781  fi
46782
46783
46784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46785
46786  # Input might be given as Windows format, start by converting to
46787  # unix format.
46788  path="$POTENTIAL_FREETYPE_LIB_PATH"
46789  new_path=`$CYGPATH -u "$path"`
46790
46791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46794  # "foo.exe" is OK but "foo" is an error.
46795  #
46796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46797  # It is also a way to make sure we got the proper file name for the real test later on.
46798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46799  if test "x$test_shortpath" = x; then
46800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46801$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46802    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46803  fi
46804
46805  # Call helper function which possibly converts this using DOS-style short mode.
46806  # If so, the updated path is stored in $new_path.
46807
46808  input_path="$new_path"
46809  # Check if we need to convert this using DOS-style short mode. If the path
46810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46811  # take no chances and rewrite it.
46812  # Note: m4 eats our [], so we need to use [ and ] instead.
46813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46814  if test "x$has_forbidden_chars" != x; then
46815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46819      # Going to short mode and back again did indeed matter. Since short mode is
46820      # case insensitive, let's make it lowercase to improve readability.
46821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46822      # Now convert it back to Unix-stile (cygpath)
46823      input_path=`$CYGPATH -u "$shortmode_path"`
46824      new_path="$input_path"
46825    fi
46826  fi
46827
46828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46829  if test "x$test_cygdrive_prefix" = x; then
46830    # As a simple fix, exclude /usr/bin since it's not a real path.
46831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46833      # a path prefixed by /cygdrive for fixpath to work.
46834      new_path="$CYGWIN_ROOT_PATH$input_path"
46835    fi
46836  fi
46837
46838
46839  if test "x$path" != "x$new_path"; then
46840    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46842$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46843  fi
46844
46845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46846
46847  path="$POTENTIAL_FREETYPE_LIB_PATH"
46848  has_colon=`$ECHO $path | $GREP ^.:`
46849  new_path="$path"
46850  if test "x$has_colon" = x; then
46851    # Not in mixed or Windows style, start by that.
46852    new_path=`cmd //c echo $path`
46853  fi
46854
46855
46856  input_path="$new_path"
46857  # Check if we need to convert this using DOS-style short mode. If the path
46858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46859  # take no chances and rewrite it.
46860  # Note: m4 eats our [], so we need to use [ and ] instead.
46861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46862  if test "x$has_forbidden_chars" != x; then
46863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46865  fi
46866
46867
46868  windows_path="$new_path"
46869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46870    unix_path=`$CYGPATH -u "$windows_path"`
46871    new_path="$unix_path"
46872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46874    new_path="$unix_path"
46875  fi
46876
46877  if test "x$path" != "x$new_path"; then
46878    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46880$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46881  fi
46882
46883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46885
46886  else
46887    # We're on a posix platform. Hooray! :)
46888    path="$POTENTIAL_FREETYPE_LIB_PATH"
46889    has_space=`$ECHO "$path" | $GREP " "`
46890    if test "x$has_space" != x; then
46891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46892$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46893      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46894    fi
46895
46896    # Use eval to expand a potential ~
46897    eval path="$path"
46898    if test ! -f "$path" && test ! -d "$path"; then
46899      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46900    fi
46901
46902    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46903  fi
46904
46905
46906    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46908$as_echo_n "checking for freetype includes... " >&6; }
46909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46910$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46911    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46913$as_echo_n "checking for freetype libraries... " >&6; }
46914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46915$as_echo "$FREETYPE_LIB_PATH" >&6; }
46916  fi
46917
46918            else
46919
46920  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46921  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
46922  METHOD="well-known location"
46923
46924  # First check if the files exists.
46925  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46926    # We found an arbitrary include file. That's a good sign.
46927    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46928$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46929    FOUND_FREETYPE=yes
46930
46931    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46932    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46933      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46934$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46935      FOUND_FREETYPE=no
46936    else
46937      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46938        # On Windows, we will need both .lib and .dll file.
46939        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46940          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46941$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46942          FOUND_FREETYPE=no
46943        fi
46944      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46945          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46946        # Found lib in isa dir, use that instead.
46947        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46948      fi
46949    fi
46950  fi
46951
46952  if test "x$FOUND_FREETYPE" = xyes; then
46953
46954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46955
46956  # Input might be given as Windows format, start by converting to
46957  # unix format.
46958  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46959  new_path=`$CYGPATH -u "$path"`
46960
46961  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46962  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46963  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46964  # "foo.exe" is OK but "foo" is an error.
46965  #
46966  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46967  # It is also a way to make sure we got the proper file name for the real test later on.
46968  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46969  if test "x$test_shortpath" = x; then
46970    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46971$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46972    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46973  fi
46974
46975  # Call helper function which possibly converts this using DOS-style short mode.
46976  # If so, the updated path is stored in $new_path.
46977
46978  input_path="$new_path"
46979  # Check if we need to convert this using DOS-style short mode. If the path
46980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46981  # take no chances and rewrite it.
46982  # Note: m4 eats our [], so we need to use [ and ] instead.
46983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46984  if test "x$has_forbidden_chars" != x; then
46985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46986    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46987    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46988    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46989      # Going to short mode and back again did indeed matter. Since short mode is
46990      # case insensitive, let's make it lowercase to improve readability.
46991      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46992      # Now convert it back to Unix-stile (cygpath)
46993      input_path=`$CYGPATH -u "$shortmode_path"`
46994      new_path="$input_path"
46995    fi
46996  fi
46997
46998  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46999  if test "x$test_cygdrive_prefix" = x; then
47000    # As a simple fix, exclude /usr/bin since it's not a real path.
47001    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47002      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47003      # a path prefixed by /cygdrive for fixpath to work.
47004      new_path="$CYGWIN_ROOT_PATH$input_path"
47005    fi
47006  fi
47007
47008
47009  if test "x$path" != "x$new_path"; then
47010    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47013  fi
47014
47015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47016
47017  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47018  has_colon=`$ECHO $path | $GREP ^.:`
47019  new_path="$path"
47020  if test "x$has_colon" = x; then
47021    # Not in mixed or Windows style, start by that.
47022    new_path=`cmd //c echo $path`
47023  fi
47024
47025
47026  input_path="$new_path"
47027  # Check if we need to convert this using DOS-style short mode. If the path
47028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47029  # take no chances and rewrite it.
47030  # Note: m4 eats our [], so we need to use [ and ] instead.
47031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47032  if test "x$has_forbidden_chars" != x; then
47033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47035  fi
47036
47037
47038  windows_path="$new_path"
47039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47040    unix_path=`$CYGPATH -u "$windows_path"`
47041    new_path="$unix_path"
47042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47044    new_path="$unix_path"
47045  fi
47046
47047  if test "x$path" != "x$new_path"; then
47048    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47050$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47051  fi
47052
47053  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47054  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47055
47056  else
47057    # We're on a posix platform. Hooray! :)
47058    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47059    has_space=`$ECHO "$path" | $GREP " "`
47060    if test "x$has_space" != x; then
47061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47062$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47063      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47064    fi
47065
47066    # Use eval to expand a potential ~
47067    eval path="$path"
47068    if test ! -f "$path" && test ! -d "$path"; then
47069      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47070    fi
47071
47072    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47073  fi
47074
47075
47076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47077
47078  # Input might be given as Windows format, start by converting to
47079  # unix format.
47080  path="$POTENTIAL_FREETYPE_LIB_PATH"
47081  new_path=`$CYGPATH -u "$path"`
47082
47083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47086  # "foo.exe" is OK but "foo" is an error.
47087  #
47088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47089  # It is also a way to make sure we got the proper file name for the real test later on.
47090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47091  if test "x$test_shortpath" = x; then
47092    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47093$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47094    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47095  fi
47096
47097  # Call helper function which possibly converts this using DOS-style short mode.
47098  # If so, the updated path is stored in $new_path.
47099
47100  input_path="$new_path"
47101  # Check if we need to convert this using DOS-style short mode. If the path
47102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47103  # take no chances and rewrite it.
47104  # Note: m4 eats our [], so we need to use [ and ] instead.
47105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47106  if test "x$has_forbidden_chars" != x; then
47107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47111      # Going to short mode and back again did indeed matter. Since short mode is
47112      # case insensitive, let's make it lowercase to improve readability.
47113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47114      # Now convert it back to Unix-stile (cygpath)
47115      input_path=`$CYGPATH -u "$shortmode_path"`
47116      new_path="$input_path"
47117    fi
47118  fi
47119
47120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47121  if test "x$test_cygdrive_prefix" = x; then
47122    # As a simple fix, exclude /usr/bin since it's not a real path.
47123    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47125      # a path prefixed by /cygdrive for fixpath to work.
47126      new_path="$CYGWIN_ROOT_PATH$input_path"
47127    fi
47128  fi
47129
47130
47131  if test "x$path" != "x$new_path"; then
47132    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47134$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47135  fi
47136
47137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47138
47139  path="$POTENTIAL_FREETYPE_LIB_PATH"
47140  has_colon=`$ECHO $path | $GREP ^.:`
47141  new_path="$path"
47142  if test "x$has_colon" = x; then
47143    # Not in mixed or Windows style, start by that.
47144    new_path=`cmd //c echo $path`
47145  fi
47146
47147
47148  input_path="$new_path"
47149  # Check if we need to convert this using DOS-style short mode. If the path
47150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47151  # take no chances and rewrite it.
47152  # Note: m4 eats our [], so we need to use [ and ] instead.
47153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47154  if test "x$has_forbidden_chars" != x; then
47155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47157  fi
47158
47159
47160  windows_path="$new_path"
47161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47162    unix_path=`$CYGPATH -u "$windows_path"`
47163    new_path="$unix_path"
47164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47166    new_path="$unix_path"
47167  fi
47168
47169  if test "x$path" != "x$new_path"; then
47170    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47172$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47173  fi
47174
47175  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47176  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47177
47178  else
47179    # We're on a posix platform. Hooray! :)
47180    path="$POTENTIAL_FREETYPE_LIB_PATH"
47181    has_space=`$ECHO "$path" | $GREP " "`
47182    if test "x$has_space" != x; then
47183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47184$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47185      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47186    fi
47187
47188    # Use eval to expand a potential ~
47189    eval path="$path"
47190    if test ! -f "$path" && test ! -d "$path"; then
47191      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47192    fi
47193
47194    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47195  fi
47196
47197
47198    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47200$as_echo_n "checking for freetype includes... " >&6; }
47201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47202$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47203    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47204    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47205$as_echo_n "checking for freetype libraries... " >&6; }
47206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47207$as_echo "$FREETYPE_LIB_PATH" >&6; }
47208  fi
47209
47210              if test "x$FOUND_FREETYPE" != xyes; then
47211
47212  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47213  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47214  METHOD="well-known location"
47215
47216  # First check if the files exists.
47217  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47218    # We found an arbitrary include file. That's a good sign.
47219    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47220$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47221    FOUND_FREETYPE=yes
47222
47223    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
47224    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47225      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47226$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47227      FOUND_FREETYPE=no
47228    else
47229      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47230        # On Windows, we will need both .lib and .dll file.
47231        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
47232          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
47233$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
47234          FOUND_FREETYPE=no
47235        fi
47236      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47237          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47238        # Found lib in isa dir, use that instead.
47239        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47240      fi
47241    fi
47242  fi
47243
47244  if test "x$FOUND_FREETYPE" = xyes; then
47245
47246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47247
47248  # Input might be given as Windows format, start by converting to
47249  # unix format.
47250  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47251  new_path=`$CYGPATH -u "$path"`
47252
47253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47256  # "foo.exe" is OK but "foo" is an error.
47257  #
47258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47259  # It is also a way to make sure we got the proper file name for the real test later on.
47260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47261  if test "x$test_shortpath" = x; then
47262    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47263$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47264    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47265  fi
47266
47267  # Call helper function which possibly converts this using DOS-style short mode.
47268  # If so, the updated path is stored in $new_path.
47269
47270  input_path="$new_path"
47271  # Check if we need to convert this using DOS-style short mode. If the path
47272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47273  # take no chances and rewrite it.
47274  # Note: m4 eats our [], so we need to use [ and ] instead.
47275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47276  if test "x$has_forbidden_chars" != x; then
47277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47281      # Going to short mode and back again did indeed matter. Since short mode is
47282      # case insensitive, let's make it lowercase to improve readability.
47283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47284      # Now convert it back to Unix-stile (cygpath)
47285      input_path=`$CYGPATH -u "$shortmode_path"`
47286      new_path="$input_path"
47287    fi
47288  fi
47289
47290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47291  if test "x$test_cygdrive_prefix" = x; then
47292    # As a simple fix, exclude /usr/bin since it's not a real path.
47293    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47295      # a path prefixed by /cygdrive for fixpath to work.
47296      new_path="$CYGWIN_ROOT_PATH$input_path"
47297    fi
47298  fi
47299
47300
47301  if test "x$path" != "x$new_path"; then
47302    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47304$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47305  fi
47306
47307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47308
47309  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47310  has_colon=`$ECHO $path | $GREP ^.:`
47311  new_path="$path"
47312  if test "x$has_colon" = x; then
47313    # Not in mixed or Windows style, start by that.
47314    new_path=`cmd //c echo $path`
47315  fi
47316
47317
47318  input_path="$new_path"
47319  # Check if we need to convert this using DOS-style short mode. If the path
47320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47321  # take no chances and rewrite it.
47322  # Note: m4 eats our [], so we need to use [ and ] instead.
47323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47324  if test "x$has_forbidden_chars" != x; then
47325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47327  fi
47328
47329
47330  windows_path="$new_path"
47331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47332    unix_path=`$CYGPATH -u "$windows_path"`
47333    new_path="$unix_path"
47334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47336    new_path="$unix_path"
47337  fi
47338
47339  if test "x$path" != "x$new_path"; then
47340    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47342$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47343  fi
47344
47345  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47346  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47347
47348  else
47349    # We're on a posix platform. Hooray! :)
47350    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47351    has_space=`$ECHO "$path" | $GREP " "`
47352    if test "x$has_space" != x; then
47353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47354$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47355      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47356    fi
47357
47358    # Use eval to expand a potential ~
47359    eval path="$path"
47360    if test ! -f "$path" && test ! -d "$path"; then
47361      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47362    fi
47363
47364    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47365  fi
47366
47367
47368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47369
47370  # Input might be given as Windows format, start by converting to
47371  # unix format.
47372  path="$POTENTIAL_FREETYPE_LIB_PATH"
47373  new_path=`$CYGPATH -u "$path"`
47374
47375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47378  # "foo.exe" is OK but "foo" is an error.
47379  #
47380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47381  # It is also a way to make sure we got the proper file name for the real test later on.
47382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47383  if test "x$test_shortpath" = x; then
47384    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47385$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47386    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47387  fi
47388
47389  # Call helper function which possibly converts this using DOS-style short mode.
47390  # If so, the updated path is stored in $new_path.
47391
47392  input_path="$new_path"
47393  # Check if we need to convert this using DOS-style short mode. If the path
47394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47395  # take no chances and rewrite it.
47396  # Note: m4 eats our [], so we need to use [ and ] instead.
47397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47398  if test "x$has_forbidden_chars" != x; then
47399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47403      # Going to short mode and back again did indeed matter. Since short mode is
47404      # case insensitive, let's make it lowercase to improve readability.
47405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47406      # Now convert it back to Unix-stile (cygpath)
47407      input_path=`$CYGPATH -u "$shortmode_path"`
47408      new_path="$input_path"
47409    fi
47410  fi
47411
47412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47413  if test "x$test_cygdrive_prefix" = x; then
47414    # As a simple fix, exclude /usr/bin since it's not a real path.
47415    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47417      # a path prefixed by /cygdrive for fixpath to work.
47418      new_path="$CYGWIN_ROOT_PATH$input_path"
47419    fi
47420  fi
47421
47422
47423  if test "x$path" != "x$new_path"; then
47424    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47426$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47427  fi
47428
47429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47430
47431  path="$POTENTIAL_FREETYPE_LIB_PATH"
47432  has_colon=`$ECHO $path | $GREP ^.:`
47433  new_path="$path"
47434  if test "x$has_colon" = x; then
47435    # Not in mixed or Windows style, start by that.
47436    new_path=`cmd //c echo $path`
47437  fi
47438
47439
47440  input_path="$new_path"
47441  # Check if we need to convert this using DOS-style short mode. If the path
47442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47443  # take no chances and rewrite it.
47444  # Note: m4 eats our [], so we need to use [ and ] instead.
47445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47446  if test "x$has_forbidden_chars" != x; then
47447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47449  fi
47450
47451
47452  windows_path="$new_path"
47453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47454    unix_path=`$CYGPATH -u "$windows_path"`
47455    new_path="$unix_path"
47456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47458    new_path="$unix_path"
47459  fi
47460
47461  if test "x$path" != "x$new_path"; then
47462    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47464$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47465  fi
47466
47467  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47468  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47469
47470  else
47471    # We're on a posix platform. Hooray! :)
47472    path="$POTENTIAL_FREETYPE_LIB_PATH"
47473    has_space=`$ECHO "$path" | $GREP " "`
47474    if test "x$has_space" != x; then
47475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47476$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47477      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47478    fi
47479
47480    # Use eval to expand a potential ~
47481    eval path="$path"
47482    if test ! -f "$path" && test ! -d "$path"; then
47483      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47484    fi
47485
47486    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47487  fi
47488
47489
47490    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47492$as_echo_n "checking for freetype includes... " >&6; }
47493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47494$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47495    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47497$as_echo_n "checking for freetype libraries... " >&6; }
47498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47499$as_echo "$FREETYPE_LIB_PATH" >&6; }
47500  fi
47501
47502              fi
47503            fi
47504          fi
47505        fi
47506      fi # end check in well-known locations
47507
47508      if test "x$FOUND_FREETYPE" != xyes; then
47509
47510  # Print a helpful message on how to acquire the necessary build dependency.
47511  # freetype is the help tag: freetype, cups, pulse, alsa etc
47512  MISSING_DEPENDENCY=freetype
47513
47514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47515    cygwin_help $MISSING_DEPENDENCY
47516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47517    msys_help $MISSING_DEPENDENCY
47518  else
47519    PKGHANDLER_COMMAND=
47520
47521    case $PKGHANDLER in
47522      apt-get)
47523        apt_help     $MISSING_DEPENDENCY ;;
47524      yum)
47525        yum_help     $MISSING_DEPENDENCY ;;
47526      port)
47527        port_help    $MISSING_DEPENDENCY ;;
47528      pkgutil)
47529        pkgutil_help $MISSING_DEPENDENCY ;;
47530      pkgadd)
47531        pkgadd_help  $MISSING_DEPENDENCY ;;
47532    esac
47533
47534    if test "x$PKGHANDLER_COMMAND" != x; then
47535      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47536    fi
47537  fi
47538
47539        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47540      fi
47541    fi # end user specified settings
47542
47543    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47544    if test "x$FREETYPE_CFLAGS" = x; then
47545
47546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47547
47548  # Input might be given as Windows format, start by converting to
47549  # unix format.
47550  path="$FREETYPE_INCLUDE_PATH"
47551  new_path=`$CYGPATH -u "$path"`
47552
47553  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47554  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47555  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47556  # "foo.exe" is OK but "foo" is an error.
47557  #
47558  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47559  # It is also a way to make sure we got the proper file name for the real test later on.
47560  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47561  if test "x$test_shortpath" = x; then
47562    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47563$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47564    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47565  fi
47566
47567  # Call helper function which possibly converts this using DOS-style short mode.
47568  # If so, the updated path is stored in $new_path.
47569
47570  input_path="$new_path"
47571  # Check if we need to convert this using DOS-style short mode. If the path
47572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47573  # take no chances and rewrite it.
47574  # Note: m4 eats our [], so we need to use [ and ] instead.
47575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47576  if test "x$has_forbidden_chars" != x; then
47577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47581      # Going to short mode and back again did indeed matter. Since short mode is
47582      # case insensitive, let's make it lowercase to improve readability.
47583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47584      # Now convert it back to Unix-stile (cygpath)
47585      input_path=`$CYGPATH -u "$shortmode_path"`
47586      new_path="$input_path"
47587    fi
47588  fi
47589
47590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47591  if test "x$test_cygdrive_prefix" = x; then
47592    # As a simple fix, exclude /usr/bin since it's not a real path.
47593    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47595      # a path prefixed by /cygdrive for fixpath to work.
47596      new_path="$CYGWIN_ROOT_PATH$input_path"
47597    fi
47598  fi
47599
47600
47601  if test "x$path" != "x$new_path"; then
47602    FREETYPE_INCLUDE_PATH="$new_path"
47603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47604$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47605  fi
47606
47607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47608
47609  path="$FREETYPE_INCLUDE_PATH"
47610  has_colon=`$ECHO $path | $GREP ^.:`
47611  new_path="$path"
47612  if test "x$has_colon" = x; then
47613    # Not in mixed or Windows style, start by that.
47614    new_path=`cmd //c echo $path`
47615  fi
47616
47617
47618  input_path="$new_path"
47619  # Check if we need to convert this using DOS-style short mode. If the path
47620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47621  # take no chances and rewrite it.
47622  # Note: m4 eats our [], so we need to use [ and ] instead.
47623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47624  if test "x$has_forbidden_chars" != x; then
47625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47627  fi
47628
47629
47630  windows_path="$new_path"
47631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47632    unix_path=`$CYGPATH -u "$windows_path"`
47633    new_path="$unix_path"
47634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47636    new_path="$unix_path"
47637  fi
47638
47639  if test "x$path" != "x$new_path"; then
47640    FREETYPE_INCLUDE_PATH="$new_path"
47641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47642$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47643  fi
47644
47645  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47646  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47647
47648  else
47649    # We're on a posix platform. Hooray! :)
47650    path="$FREETYPE_INCLUDE_PATH"
47651    has_space=`$ECHO "$path" | $GREP " "`
47652    if test "x$has_space" != x; then
47653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47654$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47655      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47656    fi
47657
47658    # Use eval to expand a potential ~
47659    eval path="$path"
47660    if test ! -f "$path" && test ! -d "$path"; then
47661      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47662    fi
47663
47664    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47665  fi
47666
47667      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47668        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47669      else
47670        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47671      fi
47672    fi
47673
47674    if test "x$FREETYPE_LIBS" = x; then
47675
47676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47677
47678  # Input might be given as Windows format, start by converting to
47679  # unix format.
47680  path="$FREETYPE_LIB_PATH"
47681  new_path=`$CYGPATH -u "$path"`
47682
47683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47686  # "foo.exe" is OK but "foo" is an error.
47687  #
47688  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47689  # It is also a way to make sure we got the proper file name for the real test later on.
47690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47691  if test "x$test_shortpath" = x; then
47692    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47693$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47694    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
47695  fi
47696
47697  # Call helper function which possibly converts this using DOS-style short mode.
47698  # If so, the updated path is stored in $new_path.
47699
47700  input_path="$new_path"
47701  # Check if we need to convert this using DOS-style short mode. If the path
47702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47703  # take no chances and rewrite it.
47704  # Note: m4 eats our [], so we need to use [ and ] instead.
47705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47706  if test "x$has_forbidden_chars" != x; then
47707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47708    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47709    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47710    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47711      # Going to short mode and back again did indeed matter. Since short mode is
47712      # case insensitive, let's make it lowercase to improve readability.
47713      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47714      # Now convert it back to Unix-stile (cygpath)
47715      input_path=`$CYGPATH -u "$shortmode_path"`
47716      new_path="$input_path"
47717    fi
47718  fi
47719
47720  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47721  if test "x$test_cygdrive_prefix" = x; then
47722    # As a simple fix, exclude /usr/bin since it's not a real path.
47723    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47724      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47725      # a path prefixed by /cygdrive for fixpath to work.
47726      new_path="$CYGWIN_ROOT_PATH$input_path"
47727    fi
47728  fi
47729
47730
47731  if test "x$path" != "x$new_path"; then
47732    FREETYPE_LIB_PATH="$new_path"
47733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47734$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47735  fi
47736
47737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47738
47739  path="$FREETYPE_LIB_PATH"
47740  has_colon=`$ECHO $path | $GREP ^.:`
47741  new_path="$path"
47742  if test "x$has_colon" = x; then
47743    # Not in mixed or Windows style, start by that.
47744    new_path=`cmd //c echo $path`
47745  fi
47746
47747
47748  input_path="$new_path"
47749  # Check if we need to convert this using DOS-style short mode. If the path
47750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47751  # take no chances and rewrite it.
47752  # Note: m4 eats our [], so we need to use [ and ] instead.
47753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47754  if test "x$has_forbidden_chars" != x; then
47755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47756    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47757  fi
47758
47759
47760  windows_path="$new_path"
47761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47762    unix_path=`$CYGPATH -u "$windows_path"`
47763    new_path="$unix_path"
47764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47766    new_path="$unix_path"
47767  fi
47768
47769  if test "x$path" != "x$new_path"; then
47770    FREETYPE_LIB_PATH="$new_path"
47771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47772$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47773  fi
47774
47775  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47776  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47777
47778  else
47779    # We're on a posix platform. Hooray! :)
47780    path="$FREETYPE_LIB_PATH"
47781    has_space=`$ECHO "$path" | $GREP " "`
47782    if test "x$has_space" != x; then
47783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47784$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47785      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47786    fi
47787
47788    # Use eval to expand a potential ~
47789    eval path="$path"
47790    if test ! -f "$path" && test ! -d "$path"; then
47791      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47792    fi
47793
47794    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47795  fi
47796
47797      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47798        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
47799      else
47800        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
47801      fi
47802    fi
47803
47804    # Try to compile it
47805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
47806$as_echo_n "checking if we can compile and link with freetype... " >&6; }
47807    ac_ext=cpp
47808ac_cpp='$CXXCPP $CPPFLAGS'
47809ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47810ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47811ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47812
47813    PREV_CXXCFLAGS="$CXXFLAGS"
47814    PREV_LIBS="$LIBS"
47815    PREV_CXX="$CXX"
47816    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
47817    LIBS="$LIBS $FREETYPE_LIBS"
47818    CXX="$FIXPATH $CXX"
47819    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47820/* end confdefs.h.  */
47821
47822          #include<ft2build.h>
47823          #include FT_FREETYPE_H
47824          int main () {
47825            FT_Init_FreeType(NULL);
47826            return 0;
47827          }
47828
47829_ACEOF
47830if ac_fn_cxx_try_link "$LINENO"; then :
47831
47832          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47833$as_echo "yes" >&6; }
47834
47835else
47836
47837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47838$as_echo "no" >&6; }
47839          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
47840$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
47841          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
47842$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
47843
47844
47845  # Print a helpful message on how to acquire the necessary build dependency.
47846  # freetype is the help tag: freetype, cups, pulse, alsa etc
47847  MISSING_DEPENDENCY=freetype
47848
47849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47850    cygwin_help $MISSING_DEPENDENCY
47851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47852    msys_help $MISSING_DEPENDENCY
47853  else
47854    PKGHANDLER_COMMAND=
47855
47856    case $PKGHANDLER in
47857      apt-get)
47858        apt_help     $MISSING_DEPENDENCY ;;
47859      yum)
47860        yum_help     $MISSING_DEPENDENCY ;;
47861      port)
47862        port_help    $MISSING_DEPENDENCY ;;
47863      pkgutil)
47864        pkgutil_help $MISSING_DEPENDENCY ;;
47865      pkgadd)
47866        pkgadd_help  $MISSING_DEPENDENCY ;;
47867    esac
47868
47869    if test "x$PKGHANDLER_COMMAND" != x; then
47870      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47871    fi
47872  fi
47873
47874
47875          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
47876
47877
47878fi
47879rm -f core conftest.err conftest.$ac_objext \
47880    conftest$ac_exeext conftest.$ac_ext
47881    CXXCFLAGS="$PREV_CXXFLAGS"
47882    LIBS="$PREV_LIBS"
47883    CXX="$PREV_CXX"
47884    ac_ext=cpp
47885ac_cpp='$CXXCPP $CPPFLAGS'
47886ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47887ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47888ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47889
47890
47891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
47892$as_echo_n "checking if we should bundle freetype... " >&6; }
47893    if test "x$BUNDLE_FREETYPE" = xyes; then
47894      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
47895    fi
47896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
47897$as_echo "$BUNDLE_FREETYPE" >&6; }
47898
47899  fi # end freetype needed
47900
47901
47902
47903
47904
47905
47906
47907  ###############################################################################
47908  #
47909  # Check for alsa headers and libraries. Used on Linux/GNU systems.
47910  #
47911
47912# Check whether --with-alsa was given.
47913if test "${with_alsa+set}" = set; then :
47914  withval=$with_alsa;
47915fi
47916
47917
47918# Check whether --with-alsa-include was given.
47919if test "${with_alsa_include+set}" = set; then :
47920  withval=$with_alsa_include;
47921fi
47922
47923
47924# Check whether --with-alsa-lib was given.
47925if test "${with_alsa_lib+set}" = set; then :
47926  withval=$with_alsa_lib;
47927fi
47928
47929
47930  if test "x$ALSA_NOT_NEEDED" = xyes; then
47931    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
47932      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
47933$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
47934    fi
47935    ALSA_CFLAGS=
47936    ALSA_LIBS=
47937  else
47938    ALSA_FOUND=no
47939
47940    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
47941      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
47942    fi
47943
47944    if test "x${with_alsa}" != x; then
47945      ALSA_LIBS="-L${with_alsa}/lib -lasound"
47946      ALSA_CFLAGS="-I${with_alsa}/include"
47947      ALSA_FOUND=yes
47948    fi
47949    if test "x${with_alsa_include}" != x; then
47950      ALSA_CFLAGS="-I${with_alsa_include}"
47951      ALSA_FOUND=yes
47952    fi
47953    if test "x${with_alsa_lib}" != x; then
47954      ALSA_LIBS="-L${with_alsa_lib} -lasound"
47955      ALSA_FOUND=yes
47956    fi
47957    if test "x$ALSA_FOUND" = xno; then
47958
47959
47960  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
47961    # Source the builddeps file again, to make sure it uses the latest variables!
47962    . $builddepsfile
47963    # Look for a target and build machine specific resource!
47964    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
47965    if test "x$resource" = x; then
47966      # Ok, lets instead look for a target specific resource
47967      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
47968    fi
47969    if test "x$resource" = x; then
47970      # Ok, lets instead look for a build specific resource
47971      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
47972    fi
47973    if test "x$resource" = x; then
47974      # Ok, lets instead look for a generic resource
47975      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
47976      resource=${builddep_alsa}
47977    fi
47978    if test "x$resource" != x; then
47979      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
47980$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
47981      # If the resource in the builddeps.conf file is an existing directory,
47982      # for example /java/linux/cups
47983      if test -d ${resource}; then
47984        depdir=${resource}
47985      else
47986
47987  # alsa is for example mymodule
47988  # $resource is for example libs/general/libmymod_1_2_3.zip
47989  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
47990  # $with_builddeps_dir is for example /localhome/builddeps
47991  # depdir is the name of the variable into which we store the depdir, eg MYMOD
47992  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
47993  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
47994  filename=`basename $resource`
47995  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
47996  filebase=${filename%%.*}
47997  extension=${filename#*.}
47998  installdir=$with_builddeps_dir/$filebase
47999  if test ! -f $installdir/$filename.unpacked; then
48000    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48001$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48002    if test ! -d $installdir; then
48003      mkdir -p $installdir
48004    fi
48005    if test ! -d $installdir; then
48006      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48007    fi
48008    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48009    touch $tmpfile
48010    if test ! -f $tmpfile; then
48011      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48012    fi
48013
48014  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48015  # $tmpfile is the local file name for the downloaded file.
48016  VALID_TOOL=no
48017  if test "x$BDEPS_FTP" = xwget; then
48018    VALID_TOOL=yes
48019    wget -O $tmpfile $with_builddeps_server/$resource
48020  fi
48021  if test "x$BDEPS_FTP" = xlftp; then
48022    VALID_TOOL=yes
48023    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48024  fi
48025  if test "x$BDEPS_FTP" = xftp; then
48026    VALID_TOOL=yes
48027    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48028    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48029    FTPUSERPWD=${FTPSERVER%%@*}
48030    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48031      FTPUSER=${userpwd%%:*}
48032      FTPPWD=${userpwd#*@}
48033      FTPSERVER=${FTPSERVER#*@}
48034    else
48035      FTPUSER=ftp
48036      FTPPWD=ftp
48037    fi
48038    # the "pass" command does not work on some
48039    # ftp clients (read ftp.exe) but if it works,
48040    # passive mode is better!
48041    ( \
48042        echo "user $FTPUSER $FTPPWD"        ; \
48043        echo "pass"                         ; \
48044        echo "bin"                          ; \
48045        echo "get $FTPPATH $tmpfile"              ; \
48046    ) | ftp -in $FTPSERVER
48047  fi
48048  if test "x$VALID_TOOL" != xyes; then
48049    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48050  fi
48051
48052    mv $tmpfile $installdir/$filename
48053    if test ! -s $installdir/$filename; then
48054      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48055    fi
48056    case "$extension" in
48057      zip)  echo "Unzipping $installdir/$filename..."
48058        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48059        ;;
48060      tar.gz) echo "Untaring $installdir/$filename..."
48061        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48062        ;;
48063      tgz) echo "Untaring $installdir/$filename..."
48064        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48065        ;;
48066      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48067        ;;
48068    esac
48069  fi
48070  if test -f $installdir/$filename.unpacked; then
48071    depdir=$installdir
48072  fi
48073
48074      fi
48075      # Source the builddeps file again, because in the previous command, the depdir
48076      # was updated to point at the current build dependency install directory.
48077      . $builddepsfile
48078      # Now extract variables from the builddeps.conf files.
48079      theroot=${builddep_alsa_ROOT}
48080      thecflags=${builddep_alsa_CFLAGS}
48081      thelibs=${builddep_alsa_LIBS}
48082      if test "x$depdir" = x; then
48083        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48084      fi
48085      ALSA=$depdir
48086      if test "x$theroot" != x; then
48087        ALSA="$theroot"
48088      fi
48089      if test "x$thecflags" != x; then
48090        ALSA_CFLAGS="$thecflags"
48091      fi
48092      if test "x$thelibs" != x; then
48093        ALSA_LIBS="$thelibs"
48094      fi
48095      ALSA_FOUND=yes
48096      else ALSA_FOUND=no
48097
48098    fi
48099    else ALSA_FOUND=no
48100
48101  fi
48102
48103    fi
48104    # Do not try pkg-config if we have a sysroot set.
48105    if test "x$SYSROOT" = x; then
48106      if test "x$ALSA_FOUND" = xno; then
48107
48108pkg_failed=no
48109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48110$as_echo_n "checking for ALSA... " >&6; }
48111
48112if test -n "$ALSA_CFLAGS"; then
48113    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48114 elif test -n "$PKG_CONFIG"; then
48115    if test -n "$PKG_CONFIG" && \
48116    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48117  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48118  ac_status=$?
48119  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48120  test $ac_status = 0; }; then
48121  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48122else
48123  pkg_failed=yes
48124fi
48125 else
48126    pkg_failed=untried
48127fi
48128if test -n "$ALSA_LIBS"; then
48129    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48130 elif test -n "$PKG_CONFIG"; then
48131    if test -n "$PKG_CONFIG" && \
48132    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48133  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48134  ac_status=$?
48135  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48136  test $ac_status = 0; }; then
48137  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48138else
48139  pkg_failed=yes
48140fi
48141 else
48142    pkg_failed=untried
48143fi
48144
48145
48146
48147if test $pkg_failed = yes; then
48148
48149if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48150        _pkg_short_errors_supported=yes
48151else
48152        _pkg_short_errors_supported=no
48153fi
48154        if test $_pkg_short_errors_supported = yes; then
48155	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48156        else
48157	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48158        fi
48159	# Put the nasty error message in config.log where it belongs
48160	echo "$ALSA_PKG_ERRORS" >&5
48161
48162	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48163$as_echo "no" >&6; }
48164                ALSA_FOUND=no
48165elif test $pkg_failed = untried; then
48166	ALSA_FOUND=no
48167else
48168	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48169	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48171$as_echo "yes" >&6; }
48172	ALSA_FOUND=yes
48173fi
48174      fi
48175    fi
48176    if test "x$ALSA_FOUND" = xno; then
48177      for ac_header in alsa/asoundlib.h
48178do :
48179  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48180if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48181  cat >>confdefs.h <<_ACEOF
48182#define HAVE_ALSA_ASOUNDLIB_H 1
48183_ACEOF
48184
48185            ALSA_FOUND=yes
48186            ALSA_CFLAGS=-Iignoreme
48187            ALSA_LIBS=-lasound
48188            DEFAULT_ALSA=yes
48189
48190else
48191  ALSA_FOUND=no
48192fi
48193
48194done
48195
48196    fi
48197    if test "x$ALSA_FOUND" = xno; then
48198
48199  # Print a helpful message on how to acquire the necessary build dependency.
48200  # alsa is the help tag: freetype, cups, pulse, alsa etc
48201  MISSING_DEPENDENCY=alsa
48202
48203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48204    cygwin_help $MISSING_DEPENDENCY
48205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48206    msys_help $MISSING_DEPENDENCY
48207  else
48208    PKGHANDLER_COMMAND=
48209
48210    case $PKGHANDLER in
48211      apt-get)
48212        apt_help     $MISSING_DEPENDENCY ;;
48213      yum)
48214        yum_help     $MISSING_DEPENDENCY ;;
48215      port)
48216        port_help    $MISSING_DEPENDENCY ;;
48217      pkgutil)
48218        pkgutil_help $MISSING_DEPENDENCY ;;
48219      pkgadd)
48220        pkgadd_help  $MISSING_DEPENDENCY ;;
48221    esac
48222
48223    if test "x$PKGHANDLER_COMMAND" != x; then
48224      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48225    fi
48226  fi
48227
48228      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48229    fi
48230  fi
48231
48232
48233
48234
48235
48236
48237  ###############################################################################
48238  #
48239  # Check for the jpeg library
48240  #
48241
48242
48243# Check whether --with-libjpeg was given.
48244if test "${with_libjpeg+set}" = set; then :
48245  withval=$with_libjpeg;
48246fi
48247
48248
48249  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48250$as_echo_n "checking for which libjpeg to use... " >&6; }
48251
48252  # default is bundled
48253  DEFAULT_LIBJPEG=bundled
48254
48255  #
48256  # if user didn't specify, use DEFAULT_LIBJPEG
48257  #
48258  if test "x${with_libjpeg}" = "x"; then
48259    with_libjpeg=${DEFAULT_LIBJPEG}
48260  fi
48261
48262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48263$as_echo "${with_libjpeg}" >&6; }
48264
48265  if test "x${with_libjpeg}" = "xbundled"; then
48266    USE_EXTERNAL_LIBJPEG=false
48267  elif test "x${with_libjpeg}" = "xsystem"; then
48268    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48269if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48270
48271else
48272   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48273fi
48274
48275
48276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48277$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48278if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48279  $as_echo_n "(cached) " >&6
48280else
48281  ac_check_lib_save_LIBS=$LIBS
48282LIBS="-ljpeg  $LIBS"
48283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48284/* end confdefs.h.  */
48285
48286/* Override any GCC internal prototype to avoid an error.
48287   Use char because int might match the return type of a GCC
48288   builtin and then its argument prototype would still apply.  */
48289#ifdef __cplusplus
48290extern "C"
48291#endif
48292char jpeg_CreateDecompress ();
48293int
48294main ()
48295{
48296return jpeg_CreateDecompress ();
48297  ;
48298  return 0;
48299}
48300_ACEOF
48301if ac_fn_cxx_try_link "$LINENO"; then :
48302  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48303else
48304  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48305fi
48306rm -f core conftest.err conftest.$ac_objext \
48307    conftest$ac_exeext conftest.$ac_ext
48308LIBS=$ac_check_lib_save_LIBS
48309fi
48310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48311$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48312if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48313  cat >>confdefs.h <<_ACEOF
48314#define HAVE_LIBJPEG 1
48315_ACEOF
48316
48317  LIBS="-ljpeg $LIBS"
48318
48319else
48320   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48321fi
48322
48323
48324    USE_EXTERNAL_LIBJPEG=true
48325  else
48326    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48327  fi
48328
48329
48330
48331  ###############################################################################
48332  #
48333  # Check for the gif library
48334  #
48335
48336
48337# Check whether --with-giflib was given.
48338if test "${with_giflib+set}" = set; then :
48339  withval=$with_giflib;
48340fi
48341
48342
48343
48344  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48345$as_echo_n "checking for which giflib to use... " >&6; }
48346
48347  # default is bundled
48348  DEFAULT_GIFLIB=bundled
48349
48350  #
48351  # if user didn't specify, use DEFAULT_GIFLIB
48352  #
48353  if test "x${with_giflib}" = "x"; then
48354    with_giflib=${DEFAULT_GIFLIB}
48355  fi
48356
48357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48358$as_echo "${with_giflib}" >&6; }
48359
48360  if test "x${with_giflib}" = "xbundled"; then
48361    USE_EXTERNAL_LIBGIF=false
48362  elif test "x${with_giflib}" = "xsystem"; then
48363    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48364if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48365
48366else
48367   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48368fi
48369
48370
48371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48372$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48373if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48374  $as_echo_n "(cached) " >&6
48375else
48376  ac_check_lib_save_LIBS=$LIBS
48377LIBS="-lgif  $LIBS"
48378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48379/* end confdefs.h.  */
48380
48381/* Override any GCC internal prototype to avoid an error.
48382   Use char because int might match the return type of a GCC
48383   builtin and then its argument prototype would still apply.  */
48384#ifdef __cplusplus
48385extern "C"
48386#endif
48387char DGifGetCode ();
48388int
48389main ()
48390{
48391return DGifGetCode ();
48392  ;
48393  return 0;
48394}
48395_ACEOF
48396if ac_fn_cxx_try_link "$LINENO"; then :
48397  ac_cv_lib_gif_DGifGetCode=yes
48398else
48399  ac_cv_lib_gif_DGifGetCode=no
48400fi
48401rm -f core conftest.err conftest.$ac_objext \
48402    conftest$ac_exeext conftest.$ac_ext
48403LIBS=$ac_check_lib_save_LIBS
48404fi
48405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48406$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48407if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48408  cat >>confdefs.h <<_ACEOF
48409#define HAVE_LIBGIF 1
48410_ACEOF
48411
48412  LIBS="-lgif $LIBS"
48413
48414else
48415   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48416fi
48417
48418
48419    USE_EXTERNAL_LIBGIF=true
48420  else
48421    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48422  fi
48423
48424
48425  ###############################################################################
48426  #
48427  # Check for the lcms2 library
48428  #
48429
48430
48431# Check whether --with-lcms was given.
48432if test "${with_lcms+set}" = set; then :
48433  withval=$with_lcms;
48434fi
48435
48436
48437  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48438$as_echo_n "checking for which lcms to use... " >&6; }
48439
48440  DEFAULT_LCMS=bundled
48441
48442  #
48443  # If user didn't specify, use DEFAULT_LCMS
48444  #
48445  if test "x${with_lcms}" = "x"; then
48446      with_lcms=${DEFAULT_LCMS}
48447  fi
48448
48449  if test "x${with_lcms}" = "xbundled"; then
48450    USE_EXTERNAL_LCMS=false
48451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48452$as_echo "bundled" >&6; }
48453  elif test "x${with_lcms}" = "xsystem"; then
48454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48455$as_echo "system" >&6; }
48456
48457pkg_failed=no
48458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48459$as_echo_n "checking for LCMS... " >&6; }
48460
48461if test -n "$LCMS_CFLAGS"; then
48462    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48463 elif test -n "$PKG_CONFIG"; then
48464    if test -n "$PKG_CONFIG" && \
48465    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48466  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48467  ac_status=$?
48468  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48469  test $ac_status = 0; }; then
48470  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48471else
48472  pkg_failed=yes
48473fi
48474 else
48475    pkg_failed=untried
48476fi
48477if test -n "$LCMS_LIBS"; then
48478    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48479 elif test -n "$PKG_CONFIG"; then
48480    if test -n "$PKG_CONFIG" && \
48481    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48482  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48483  ac_status=$?
48484  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48485  test $ac_status = 0; }; then
48486  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48487else
48488  pkg_failed=yes
48489fi
48490 else
48491    pkg_failed=untried
48492fi
48493
48494
48495
48496if test $pkg_failed = yes; then
48497
48498if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48499        _pkg_short_errors_supported=yes
48500else
48501        _pkg_short_errors_supported=no
48502fi
48503        if test $_pkg_short_errors_supported = yes; then
48504	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48505        else
48506	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48507        fi
48508	# Put the nasty error message in config.log where it belongs
48509	echo "$LCMS_PKG_ERRORS" >&5
48510
48511	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48512$as_echo "no" >&6; }
48513                LCMS_FOUND=no
48514elif test $pkg_failed = untried; then
48515	LCMS_FOUND=no
48516else
48517	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48518	LCMS_LIBS=$pkg_cv_LCMS_LIBS
48519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48520$as_echo "yes" >&6; }
48521	LCMS_FOUND=yes
48522fi
48523    if test "x${LCMS_FOUND}" = "xyes"; then
48524      USE_EXTERNAL_LCMS=true
48525    else
48526      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48527    fi
48528  else
48529    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48530  fi
48531
48532
48533
48534  ###############################################################################
48535  #
48536  # Check for the png library
48537  #
48538
48539
48540# Check whether --with-libpng was given.
48541if test "${with_libpng+set}" = set; then :
48542  withval=$with_libpng;
48543fi
48544
48545
48546
48547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48548$as_echo_n "checking for which libpng to use... " >&6; }
48549
48550  # default is bundled
48551  DEFAULT_LIBPNG=bundled
48552
48553  #
48554  # if user didn't specify, use DEFAULT_LIBPNG
48555  #
48556  if test "x${with_libpng}" = "x"; then
48557      with_libpng=${DEFAULT_LIBPNG}
48558  fi
48559
48560  if test "x${with_libpng}" = "xbundled"; then
48561      USE_EXTERNAL_LIBPNG=false
48562      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48563$as_echo "bundled" >&6; }
48564  elif test "x${with_libpng}" = "xsystem"; then
48565
48566pkg_failed=no
48567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48568$as_echo_n "checking for PNG... " >&6; }
48569
48570if test -n "$PNG_CFLAGS"; then
48571    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48572 elif test -n "$PKG_CONFIG"; then
48573    if test -n "$PKG_CONFIG" && \
48574    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48575  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48576  ac_status=$?
48577  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48578  test $ac_status = 0; }; then
48579  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48580else
48581  pkg_failed=yes
48582fi
48583 else
48584    pkg_failed=untried
48585fi
48586if test -n "$PNG_LIBS"; then
48587    pkg_cv_PNG_LIBS="$PNG_LIBS"
48588 elif test -n "$PKG_CONFIG"; then
48589    if test -n "$PKG_CONFIG" && \
48590    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48591  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48592  ac_status=$?
48593  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48594  test $ac_status = 0; }; then
48595  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48596else
48597  pkg_failed=yes
48598fi
48599 else
48600    pkg_failed=untried
48601fi
48602
48603
48604
48605if test $pkg_failed = yes; then
48606
48607if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48608        _pkg_short_errors_supported=yes
48609else
48610        _pkg_short_errors_supported=no
48611fi
48612        if test $_pkg_short_errors_supported = yes; then
48613	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48614        else
48615	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48616        fi
48617	# Put the nasty error message in config.log where it belongs
48618	echo "$PNG_PKG_ERRORS" >&5
48619
48620	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48621$as_echo "no" >&6; }
48622                 LIBPNG_FOUND=no
48623elif test $pkg_failed = untried; then
48624	 LIBPNG_FOUND=no
48625else
48626	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48627	PNG_LIBS=$pkg_cv_PNG_LIBS
48628        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48629$as_echo "yes" >&6; }
48630	 LIBPNG_FOUND=yes
48631fi
48632      if test "x${LIBPNG_FOUND}" = "xyes"; then
48633          USE_EXTERNAL_LIBPNG=true
48634          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48635$as_echo "system" >&6; }
48636      else
48637          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48638$as_echo "system not found" >&6; }
48639          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48640      fi
48641  else
48642      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48643  fi
48644
48645
48646  ###############################################################################
48647  #
48648  # Check for the zlib library
48649  #
48650
48651
48652# Check whether --with-zlib was given.
48653if test "${with_zlib+set}" = set; then :
48654  withval=$with_zlib;
48655fi
48656
48657
48658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48659$as_echo_n "checking for compress in -lz... " >&6; }
48660if ${ac_cv_lib_z_compress+:} false; then :
48661  $as_echo_n "(cached) " >&6
48662else
48663  ac_check_lib_save_LIBS=$LIBS
48664LIBS="-lz  $LIBS"
48665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48666/* end confdefs.h.  */
48667
48668/* Override any GCC internal prototype to avoid an error.
48669   Use char because int might match the return type of a GCC
48670   builtin and then its argument prototype would still apply.  */
48671#ifdef __cplusplus
48672extern "C"
48673#endif
48674char compress ();
48675int
48676main ()
48677{
48678return compress ();
48679  ;
48680  return 0;
48681}
48682_ACEOF
48683if ac_fn_cxx_try_link "$LINENO"; then :
48684  ac_cv_lib_z_compress=yes
48685else
48686  ac_cv_lib_z_compress=no
48687fi
48688rm -f core conftest.err conftest.$ac_objext \
48689    conftest$ac_exeext conftest.$ac_ext
48690LIBS=$ac_check_lib_save_LIBS
48691fi
48692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
48693$as_echo "$ac_cv_lib_z_compress" >&6; }
48694if test "x$ac_cv_lib_z_compress" = xyes; then :
48695   ZLIB_FOUND=yes
48696else
48697   ZLIB_FOUND=no
48698fi
48699
48700
48701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
48702$as_echo_n "checking for which zlib to use... " >&6; }
48703
48704  DEFAULT_ZLIB=bundled
48705  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48706    #
48707    # On macosx default is system...on others default is
48708    #
48709    DEFAULT_ZLIB=system
48710  fi
48711
48712  if test "x${ZLIB_FOUND}" != "xyes"; then
48713    #
48714    # If we don't find any system...set default to bundled
48715    #
48716    DEFAULT_ZLIB=bundled
48717  fi
48718
48719  #
48720  # If user didn't specify, use DEFAULT_ZLIB
48721  #
48722  if test "x${with_zlib}" = "x"; then
48723    with_zlib=${DEFAULT_ZLIB}
48724  fi
48725
48726  if test "x${with_zlib}" = "xbundled"; then
48727    USE_EXTERNAL_LIBZ=false
48728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48729$as_echo "bundled" >&6; }
48730  elif test "x${with_zlib}" = "xsystem"; then
48731    if test "x${ZLIB_FOUND}" = "xyes"; then
48732      USE_EXTERNAL_LIBZ=true
48733      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48734$as_echo "system" >&6; }
48735    else
48736      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48737$as_echo "system not found" >&6; }
48738      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
48739    fi
48740  else
48741    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
48742  fi
48743
48744
48745
48746  ###############################################################################
48747  LIBZIP_CAN_USE_MMAP=true
48748
48749
48750
48751  ###############################################################################
48752  #
48753  # Check if altzone exists in time.h
48754  #
48755
48756  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48757/* end confdefs.h.  */
48758#include <time.h>
48759int
48760main ()
48761{
48762return (int)altzone;
48763  ;
48764  return 0;
48765}
48766_ACEOF
48767if ac_fn_cxx_try_link "$LINENO"; then :
48768  has_altzone=yes
48769else
48770  has_altzone=no
48771fi
48772rm -f core conftest.err conftest.$ac_objext \
48773    conftest$ac_exeext conftest.$ac_ext
48774  if test "x$has_altzone" = xyes; then
48775
48776$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
48777
48778  fi
48779
48780  ###############################################################################
48781  #
48782  # Check the maths library
48783  #
48784
48785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
48786$as_echo_n "checking for cos in -lm... " >&6; }
48787if ${ac_cv_lib_m_cos+:} false; then :
48788  $as_echo_n "(cached) " >&6
48789else
48790  ac_check_lib_save_LIBS=$LIBS
48791LIBS="-lm  $LIBS"
48792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48793/* end confdefs.h.  */
48794
48795/* Override any GCC internal prototype to avoid an error.
48796   Use char because int might match the return type of a GCC
48797   builtin and then its argument prototype would still apply.  */
48798#ifdef __cplusplus
48799extern "C"
48800#endif
48801char cos ();
48802int
48803main ()
48804{
48805return cos ();
48806  ;
48807  return 0;
48808}
48809_ACEOF
48810if ac_fn_cxx_try_link "$LINENO"; then :
48811  ac_cv_lib_m_cos=yes
48812else
48813  ac_cv_lib_m_cos=no
48814fi
48815rm -f core conftest.err conftest.$ac_objext \
48816    conftest$ac_exeext conftest.$ac_ext
48817LIBS=$ac_check_lib_save_LIBS
48818fi
48819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
48820$as_echo "$ac_cv_lib_m_cos" >&6; }
48821if test "x$ac_cv_lib_m_cos" = xyes; then :
48822  cat >>confdefs.h <<_ACEOF
48823#define HAVE_LIBM 1
48824_ACEOF
48825
48826  LIBS="-lm $LIBS"
48827
48828else
48829
48830        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
48831$as_echo "$as_me: Maths library was not found" >&6;}
48832
48833
48834fi
48835
48836
48837
48838  ###############################################################################
48839  #
48840  # Check for libdl.so
48841
48842  save_LIBS="$LIBS"
48843  LIBS=""
48844  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
48845$as_echo_n "checking for dlopen in -ldl... " >&6; }
48846if ${ac_cv_lib_dl_dlopen+:} false; then :
48847  $as_echo_n "(cached) " >&6
48848else
48849  ac_check_lib_save_LIBS=$LIBS
48850LIBS="-ldl  $LIBS"
48851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48852/* end confdefs.h.  */
48853
48854/* Override any GCC internal prototype to avoid an error.
48855   Use char because int might match the return type of a GCC
48856   builtin and then its argument prototype would still apply.  */
48857#ifdef __cplusplus
48858extern "C"
48859#endif
48860char dlopen ();
48861int
48862main ()
48863{
48864return dlopen ();
48865  ;
48866  return 0;
48867}
48868_ACEOF
48869if ac_fn_cxx_try_link "$LINENO"; then :
48870  ac_cv_lib_dl_dlopen=yes
48871else
48872  ac_cv_lib_dl_dlopen=no
48873fi
48874rm -f core conftest.err conftest.$ac_objext \
48875    conftest$ac_exeext conftest.$ac_ext
48876LIBS=$ac_check_lib_save_LIBS
48877fi
48878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
48879$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
48880if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
48881  cat >>confdefs.h <<_ACEOF
48882#define HAVE_LIBDL 1
48883_ACEOF
48884
48885  LIBS="-ldl $LIBS"
48886
48887fi
48888
48889  LIBDL="$LIBS"
48890
48891  LIBS="$save_LIBS"
48892
48893
48894  ###############################################################################
48895  #
48896  # statically link libstdc++ before C++ ABI is stablized on Linux unless
48897  # dynamic build is configured on command line.
48898  #
48899
48900# Check whether --with-stdc++lib was given.
48901if test "${with_stdc__lib+set}" = set; then :
48902  withval=$with_stdc__lib;
48903        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
48904                && test "x$with_stdc__lib" != xdefault; then
48905          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
48906        fi
48907
48908else
48909  with_stdc__lib=default
48910
48911fi
48912
48913
48914  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48915    # Test if -lstdc++ works.
48916    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
48917$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
48918    ac_ext=cpp
48919ac_cpp='$CXXCPP $CPPFLAGS'
48920ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48921ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48922ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48923
48924    OLD_CXXFLAGS="$CXXFLAGS"
48925    CXXFLAGS="$CXXFLAGS -lstdc++"
48926    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48927/* end confdefs.h.  */
48928
48929int
48930main ()
48931{
48932return 0;
48933  ;
48934  return 0;
48935}
48936_ACEOF
48937if ac_fn_cxx_try_link "$LINENO"; then :
48938  has_dynamic_libstdcxx=yes
48939else
48940  has_dynamic_libstdcxx=no
48941fi
48942rm -f core conftest.err conftest.$ac_objext \
48943    conftest$ac_exeext conftest.$ac_ext
48944    CXXFLAGS="$OLD_CXXFLAGS"
48945    ac_ext=cpp
48946ac_cpp='$CXXCPP $CPPFLAGS'
48947ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48948ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48949ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48950
48951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
48952$as_echo "$has_dynamic_libstdcxx" >&6; }
48953
48954    # Test if stdc++ can be linked statically.
48955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
48956$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
48957    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
48958    ac_ext=cpp
48959ac_cpp='$CXXCPP $CPPFLAGS'
48960ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48961ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48962ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48963
48964    OLD_LIBS="$LIBS"
48965    OLD_CXX="$CXX"
48966    LIBS="$STATIC_STDCXX_FLAGS"
48967    CXX="$CC"
48968    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48969/* end confdefs.h.  */
48970
48971int
48972main ()
48973{
48974return 0;
48975  ;
48976  return 0;
48977}
48978_ACEOF
48979if ac_fn_cxx_try_link "$LINENO"; then :
48980  has_static_libstdcxx=yes
48981else
48982  has_static_libstdcxx=no
48983fi
48984rm -f core conftest.err conftest.$ac_objext \
48985    conftest$ac_exeext conftest.$ac_ext
48986    LIBS="$OLD_LIBS"
48987    CXX="$OLD_CXX"
48988    ac_ext=cpp
48989ac_cpp='$CXXCPP $CPPFLAGS'
48990ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48991ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48992ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48993
48994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
48995$as_echo "$has_static_libstdcxx" >&6; }
48996
48997    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
48998      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
48999    fi
49000
49001    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49002      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49003    fi
49004
49005    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49006      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49007    fi
49008
49009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49010$as_echo_n "checking how to link with libstdc++... " >&6; }
49011    # If dynamic was requested, it's available since it would fail above otherwise.
49012    # If dynamic wasn't requested, go with static unless it isn't available.
49013    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49014      LIBCXX="$LIBCXX -lstdc++"
49015      LDCXX="$CXX"
49016      STATIC_CXX_SETTING="STATIC_CXX=false"
49017      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49018$as_echo "dynamic" >&6; }
49019    else
49020      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49021      LDCXX="$CC"
49022      STATIC_CXX_SETTING="STATIC_CXX=true"
49023      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49024$as_echo "static" >&6; }
49025    fi
49026  fi
49027
49028
49029  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49030    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49031
49032pkg_failed=no
49033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49034$as_echo_n "checking for LIBFFI... " >&6; }
49035
49036if test -n "$LIBFFI_CFLAGS"; then
49037    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49038 elif test -n "$PKG_CONFIG"; then
49039    if test -n "$PKG_CONFIG" && \
49040    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49041  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49042  ac_status=$?
49043  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49044  test $ac_status = 0; }; then
49045  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49046else
49047  pkg_failed=yes
49048fi
49049 else
49050    pkg_failed=untried
49051fi
49052if test -n "$LIBFFI_LIBS"; then
49053    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49054 elif test -n "$PKG_CONFIG"; then
49055    if test -n "$PKG_CONFIG" && \
49056    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49057  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49058  ac_status=$?
49059  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49060  test $ac_status = 0; }; then
49061  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49062else
49063  pkg_failed=yes
49064fi
49065 else
49066    pkg_failed=untried
49067fi
49068
49069
49070
49071if test $pkg_failed = yes; then
49072
49073if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49074        _pkg_short_errors_supported=yes
49075else
49076        _pkg_short_errors_supported=no
49077fi
49078        if test $_pkg_short_errors_supported = yes; then
49079	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49080        else
49081	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49082        fi
49083	# Put the nasty error message in config.log where it belongs
49084	echo "$LIBFFI_PKG_ERRORS" >&5
49085
49086	as_fn_error $? "Package requirements (libffi) were not met:
49087
49088$LIBFFI_PKG_ERRORS
49089
49090Consider adjusting the PKG_CONFIG_PATH environment variable if you
49091installed software in a non-standard prefix.
49092
49093Alternatively, you may set the environment variables LIBFFI_CFLAGS
49094and LIBFFI_LIBS to avoid the need to call pkg-config.
49095See the pkg-config man page for more details.
49096" "$LINENO" 5
49097elif test $pkg_failed = untried; then
49098	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49099$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49100as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49101is in your PATH or set the PKG_CONFIG environment variable to the full
49102path to pkg-config.
49103
49104Alternatively, you may set the environment variables LIBFFI_CFLAGS
49105and LIBFFI_LIBS to avoid the need to call pkg-config.
49106See the pkg-config man page for more details.
49107
49108To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49109See \`config.log' for more details" "$LINENO" 5; }
49110else
49111	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49112	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49114$as_echo "yes" >&6; }
49115	:
49116fi
49117
49118  fi
49119
49120  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49121    # Extract the first word of "llvm-config", so it can be a program name with args.
49122set dummy llvm-config; ac_word=$2
49123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49124$as_echo_n "checking for $ac_word... " >&6; }
49125if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49126  $as_echo_n "(cached) " >&6
49127else
49128  if test -n "$LLVM_CONFIG"; then
49129  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49130else
49131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49132for as_dir in $PATH
49133do
49134  IFS=$as_save_IFS
49135  test -z "$as_dir" && as_dir=.
49136    for ac_exec_ext in '' $ac_executable_extensions; do
49137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49138    ac_cv_prog_LLVM_CONFIG="llvm-config"
49139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49140    break 2
49141  fi
49142done
49143  done
49144IFS=$as_save_IFS
49145
49146fi
49147fi
49148LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49149if test -n "$LLVM_CONFIG"; then
49150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49151$as_echo "$LLVM_CONFIG" >&6; }
49152else
49153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49154$as_echo "no" >&6; }
49155fi
49156
49157
49158
49159    if test "x$LLVM_CONFIG" != xllvm-config; then
49160      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49161    fi
49162
49163    llvm_components="jit mcjit engine nativecodegen native"
49164    unset LLVM_CFLAGS
49165    for flag in $("$LLVM_CONFIG" --cxxflags); do
49166      if echo "${flag}" | grep -q '^-[ID]'; then
49167        if test "${flag}" != "-D_DEBUG" ; then
49168          if test "${LLVM_CFLAGS}" != "" ; then
49169            LLVM_CFLAGS="${LLVM_CFLAGS} "
49170          fi
49171          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49172        fi
49173      fi
49174    done
49175    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49176    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49177
49178    unset LLVM_LDFLAGS
49179    for flag in $("${LLVM_CONFIG}" --ldflags); do
49180      if echo "${flag}" | grep -q '^-L'; then
49181        if test "${LLVM_LDFLAGS}" != ""; then
49182          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49183        fi
49184        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49185      fi
49186    done
49187
49188    unset LLVM_LIBS
49189    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49190      if echo "${flag}" | grep -q '^-l'; then
49191        if test "${LLVM_LIBS}" != ""; then
49192          LLVM_LIBS="${LLVM_LIBS} "
49193        fi
49194        LLVM_LIBS="${LLVM_LIBS}${flag}"
49195      fi
49196    done
49197
49198
49199
49200
49201  fi
49202
49203  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49204  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49205    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49206  fi
49207
49208  # TODO better (platform agnostic) test
49209  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49210    LIBCXX="-lstdc++"
49211  fi
49212
49213
49214
49215
49216  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49217
49218
49219# Check whether --with-msvcr-dll was given.
49220if test "${with_msvcr_dll+set}" = set; then :
49221  withval=$with_msvcr_dll;
49222fi
49223
49224
49225  if test "x$with_msvcr_dll" != x; then
49226    # If given explicitely by user, do not probe. If not present, fail directly.
49227
49228  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
49229  METHOD="--with-msvcr-dll"
49230  if test -e "$POSSIBLE_MSVCR_DLL"; then
49231    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49232$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49233
49234    # Need to check if the found msvcr is correct architecture
49235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49236$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49237    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49239      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49240      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49241      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49242        CORRECT_MSVCR_ARCH="PE32 executable"
49243      else
49244        CORRECT_MSVCR_ARCH="PE32+ executable"
49245      fi
49246    else
49247      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49248        CORRECT_MSVCR_ARCH=386
49249      else
49250        CORRECT_MSVCR_ARCH=x86-64
49251      fi
49252    fi
49253    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49254      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49255$as_echo "ok" >&6; }
49256      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49257      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49258$as_echo_n "checking for msvcr100.dll... " >&6; }
49259      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49260$as_echo "$MSVCR_DLL" >&6; }
49261    else
49262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49263$as_echo "incorrect, ignoring" >&6; }
49264      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49265$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49266    fi
49267  fi
49268
49269    if test "x$MSVCR_DLL" = x; then
49270      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
49271    fi
49272  fi
49273
49274  if test "x$MSVCR_DLL" = x; then
49275    # Probe: Using well-known location from Visual Studio 10.0
49276    if test "x$VCINSTALLDIR" != x; then
49277      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49278
49279  windows_path="$CYGWIN_VC_INSTALL_DIR"
49280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49281    unix_path=`$CYGPATH -u "$windows_path"`
49282    CYGWIN_VC_INSTALL_DIR="$unix_path"
49283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49285    CYGWIN_VC_INSTALL_DIR="$unix_path"
49286  fi
49287
49288      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49289        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
49290      else
49291        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
49292      fi
49293
49294  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49295  METHOD="well-known location in VCINSTALLDIR"
49296  if test -e "$POSSIBLE_MSVCR_DLL"; then
49297    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49298$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49299
49300    # Need to check if the found msvcr is correct architecture
49301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49302$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49303    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49304    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49305      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49306      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49307      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49308        CORRECT_MSVCR_ARCH="PE32 executable"
49309      else
49310        CORRECT_MSVCR_ARCH="PE32+ executable"
49311      fi
49312    else
49313      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49314        CORRECT_MSVCR_ARCH=386
49315      else
49316        CORRECT_MSVCR_ARCH=x86-64
49317      fi
49318    fi
49319    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49320      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49321$as_echo "ok" >&6; }
49322      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49323      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49324$as_echo_n "checking for msvcr100.dll... " >&6; }
49325      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49326$as_echo "$MSVCR_DLL" >&6; }
49327    else
49328      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49329$as_echo "incorrect, ignoring" >&6; }
49330      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49331$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49332    fi
49333  fi
49334
49335    fi
49336  fi
49337
49338  if test "x$MSVCR_DLL" = x; then
49339    # Probe: Check in the Boot JDK directory.
49340    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
49341
49342  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49343  METHOD="well-known location in Boot JDK"
49344  if test -e "$POSSIBLE_MSVCR_DLL"; then
49345    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49346$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49347
49348    # Need to check if the found msvcr is correct architecture
49349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49350$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49351    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49352    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49353      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49354      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49355      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49356        CORRECT_MSVCR_ARCH="PE32 executable"
49357      else
49358        CORRECT_MSVCR_ARCH="PE32+ executable"
49359      fi
49360    else
49361      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49362        CORRECT_MSVCR_ARCH=386
49363      else
49364        CORRECT_MSVCR_ARCH=x86-64
49365      fi
49366    fi
49367    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49368      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49369$as_echo "ok" >&6; }
49370      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49371      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49372$as_echo_n "checking for msvcr100.dll... " >&6; }
49373      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49374$as_echo "$MSVCR_DLL" >&6; }
49375    else
49376      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49377$as_echo "incorrect, ignoring" >&6; }
49378      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49379$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49380    fi
49381  fi
49382
49383  fi
49384
49385  if test "x$MSVCR_DLL" = x; then
49386    # Probe: Look in the Windows system32 directory
49387    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49388
49389  windows_path="$CYGWIN_SYSTEMROOT"
49390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49391    unix_path=`$CYGPATH -u "$windows_path"`
49392    CYGWIN_SYSTEMROOT="$unix_path"
49393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49395    CYGWIN_SYSTEMROOT="$unix_path"
49396  fi
49397
49398    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
49399
49400  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49401  METHOD="well-known location in SYSTEMROOT"
49402  if test -e "$POSSIBLE_MSVCR_DLL"; then
49403    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49404$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49405
49406    # Need to check if the found msvcr is correct architecture
49407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49408$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49409    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49410    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49411      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49412      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49413      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49414        CORRECT_MSVCR_ARCH="PE32 executable"
49415      else
49416        CORRECT_MSVCR_ARCH="PE32+ executable"
49417      fi
49418    else
49419      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49420        CORRECT_MSVCR_ARCH=386
49421      else
49422        CORRECT_MSVCR_ARCH=x86-64
49423      fi
49424    fi
49425    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49427$as_echo "ok" >&6; }
49428      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49429      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49430$as_echo_n "checking for msvcr100.dll... " >&6; }
49431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49432$as_echo "$MSVCR_DLL" >&6; }
49433    else
49434      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49435$as_echo "incorrect, ignoring" >&6; }
49436      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49437$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49438    fi
49439  fi
49440
49441  fi
49442
49443  if test "x$MSVCR_DLL" = x; then
49444    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49445    if test "x$VS100COMNTOOLS" != x; then
49446      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49447
49448  windows_path="$CYGWIN_VS_TOOLS_DIR"
49449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49450    unix_path=`$CYGPATH -u "$windows_path"`
49451    CYGWIN_VS_TOOLS_DIR="$unix_path"
49452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49454    CYGWIN_VS_TOOLS_DIR="$unix_path"
49455  fi
49456
49457      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49458        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
49459      else
49460        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
49461      fi
49462
49463  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49464  METHOD="search of VS100COMNTOOLS"
49465  if test -e "$POSSIBLE_MSVCR_DLL"; then
49466    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49467$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49468
49469    # Need to check if the found msvcr is correct architecture
49470    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49471$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49472    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49473    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49474      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49475      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49476      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49477        CORRECT_MSVCR_ARCH="PE32 executable"
49478      else
49479        CORRECT_MSVCR_ARCH="PE32+ executable"
49480      fi
49481    else
49482      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49483        CORRECT_MSVCR_ARCH=386
49484      else
49485        CORRECT_MSVCR_ARCH=x86-64
49486      fi
49487    fi
49488    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49489      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49490$as_echo "ok" >&6; }
49491      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49492      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49493$as_echo_n "checking for msvcr100.dll... " >&6; }
49494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49495$as_echo "$MSVCR_DLL" >&6; }
49496    else
49497      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49498$as_echo "incorrect, ignoring" >&6; }
49499      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49500$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49501    fi
49502  fi
49503
49504    fi
49505  fi
49506
49507  if test "x$MSVCR_DLL" = x; then
49508    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49509    # (This was the original behaviour; kept since it might turn up something)
49510    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49511      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49512        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
49513      else
49514        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49515        if test "x$POSSIBLE_MSVCR_DLL" = x; then
49516          # We're grasping at straws now...
49517          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
49518        fi
49519      fi
49520
49521
49522  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49523  METHOD="search of VCINSTALLDIR"
49524  if test -e "$POSSIBLE_MSVCR_DLL"; then
49525    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49526$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49527
49528    # Need to check if the found msvcr is correct architecture
49529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49530$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49531    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49533      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49534      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49535      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49536        CORRECT_MSVCR_ARCH="PE32 executable"
49537      else
49538        CORRECT_MSVCR_ARCH="PE32+ executable"
49539      fi
49540    else
49541      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49542        CORRECT_MSVCR_ARCH=386
49543      else
49544        CORRECT_MSVCR_ARCH=x86-64
49545      fi
49546    fi
49547    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49549$as_echo "ok" >&6; }
49550      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49551      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49552$as_echo_n "checking for msvcr100.dll... " >&6; }
49553      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49554$as_echo "$MSVCR_DLL" >&6; }
49555    else
49556      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49557$as_echo "incorrect, ignoring" >&6; }
49558      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49559$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49560    fi
49561  fi
49562
49563    fi
49564  fi
49565
49566  if test "x$MSVCR_DLL" = x; then
49567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49568$as_echo_n "checking for msvcr100.dll... " >&6; }
49569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49570$as_echo "no" >&6; }
49571    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
49572  fi
49573
49574
49575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49576
49577  # Input might be given as Windows format, start by converting to
49578  # unix format.
49579  path="$MSVCR_DLL"
49580  new_path=`$CYGPATH -u "$path"`
49581
49582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49585  # "foo.exe" is OK but "foo" is an error.
49586  #
49587  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49588  # It is also a way to make sure we got the proper file name for the real test later on.
49589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49590  if test "x$test_shortpath" = x; then
49591    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49592$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49593    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
49594  fi
49595
49596  # Call helper function which possibly converts this using DOS-style short mode.
49597  # If so, the updated path is stored in $new_path.
49598
49599  input_path="$new_path"
49600  # Check if we need to convert this using DOS-style short mode. If the path
49601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49602  # take no chances and rewrite it.
49603  # Note: m4 eats our [], so we need to use [ and ] instead.
49604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49605  if test "x$has_forbidden_chars" != x; then
49606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49610      # Going to short mode and back again did indeed matter. Since short mode is
49611      # case insensitive, let's make it lowercase to improve readability.
49612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49613      # Now convert it back to Unix-stile (cygpath)
49614      input_path=`$CYGPATH -u "$shortmode_path"`
49615      new_path="$input_path"
49616    fi
49617  fi
49618
49619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49620  if test "x$test_cygdrive_prefix" = x; then
49621    # As a simple fix, exclude /usr/bin since it's not a real path.
49622    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49624      # a path prefixed by /cygdrive for fixpath to work.
49625      new_path="$CYGWIN_ROOT_PATH$input_path"
49626    fi
49627  fi
49628
49629
49630  if test "x$path" != "x$new_path"; then
49631    MSVCR_DLL="$new_path"
49632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49633$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49634  fi
49635
49636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49637
49638  path="$MSVCR_DLL"
49639  has_colon=`$ECHO $path | $GREP ^.:`
49640  new_path="$path"
49641  if test "x$has_colon" = x; then
49642    # Not in mixed or Windows style, start by that.
49643    new_path=`cmd //c echo $path`
49644  fi
49645
49646
49647  input_path="$new_path"
49648  # Check if we need to convert this using DOS-style short mode. If the path
49649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49650  # take no chances and rewrite it.
49651  # Note: m4 eats our [], so we need to use [ and ] instead.
49652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49653  if test "x$has_forbidden_chars" != x; then
49654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49656  fi
49657
49658
49659  windows_path="$new_path"
49660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49661    unix_path=`$CYGPATH -u "$windows_path"`
49662    new_path="$unix_path"
49663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49665    new_path="$unix_path"
49666  fi
49667
49668  if test "x$path" != "x$new_path"; then
49669    MSVCR_DLL="$new_path"
49670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49671$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49672  fi
49673
49674  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49675  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49676
49677  else
49678    # We're on a posix platform. Hooray! :)
49679    path="$MSVCR_DLL"
49680    has_space=`$ECHO "$path" | $GREP " "`
49681    if test "x$has_space" != x; then
49682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49683$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49684      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49685    fi
49686
49687    # Use eval to expand a potential ~
49688    eval path="$path"
49689    if test ! -f "$path" && test ! -d "$path"; then
49690      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49691    fi
49692
49693    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
49694  fi
49695
49696
49697
49698
49699# Check whether --with-dxsdk was given.
49700if test "${with_dxsdk+set}" = set; then :
49701  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
49702$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
49703fi
49704
49705
49706
49707
49708# Check whether --with-dxsdk-lib was given.
49709if test "${with_dxsdk_lib+set}" = set; then :
49710  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
49711$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
49712fi
49713
49714
49715
49716
49717# Check whether --with-dxsdk-include was given.
49718if test "${with_dxsdk_include+set}" = set; then :
49719  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
49720$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
49721fi
49722
49723
49724  fi
49725
49726
49727
49728###############################################################################
49729#
49730# We need to do some final tweaking, when everything else is done.
49731#
49732###############################################################################
49733
49734
49735  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
49736
49737
49738  # The name of the Service Agent jar.
49739  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
49740  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49741    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
49742  fi
49743
49744
49745
49746    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
49747$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
49748
49749    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
49750      ENABLE_INTREE_EC=yes
49751      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49752$as_echo "yes" >&6; }
49753    else
49754      ENABLE_INTREE_EC=no
49755      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49756$as_echo "no" >&6; }
49757    fi
49758
49759
49760
49761
49762###############################################################################
49763#
49764# Configure parts of the build that only affect the build performance,
49765# not the result.
49766#
49767###############################################################################
49768
49769
49770  # How many cores do we have on this build system?
49771
49772# Check whether --with-num-cores was given.
49773if test "${with_num_cores+set}" = set; then :
49774  withval=$with_num_cores;
49775fi
49776
49777  if test "x$with_num_cores" = x; then
49778    # The number of cores were not specified, try to probe them.
49779
49780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
49781$as_echo_n "checking for number of cores... " >&6; }
49782  NUM_CORES=1
49783  FOUND_CORES=no
49784
49785  if test -f /proc/cpuinfo; then
49786    # Looks like a Linux (or cygwin) system
49787    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
49788    FOUND_CORES=yes
49789  elif test -x /usr/sbin/psrinfo; then
49790    # Looks like a Solaris system
49791    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
49792    FOUND_CORES=yes
49793  elif test -x /usr/sbin/system_profiler; then
49794    # Looks like a MacOSX system
49795    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
49796    FOUND_CORES=yes
49797  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
49798    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
49799    FOUND_CORES=yes
49800  elif test -n "$NUMBER_OF_PROCESSORS"; then
49801    # On windows, look in the env
49802    NUM_CORES=$NUMBER_OF_PROCESSORS
49803    FOUND_CORES=yes
49804  fi
49805
49806  if test "x$FOUND_CORES" = xyes; then
49807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
49808$as_echo "$NUM_CORES" >&6; }
49809  else
49810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
49811$as_echo "could not detect number of cores, defaulting to 1" >&6; }
49812    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
49813$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
49814  fi
49815
49816  else
49817    NUM_CORES=$with_num_cores
49818  fi
49819
49820
49821
49822  # How much memory do we have on this build system?
49823
49824# Check whether --with-memory-size was given.
49825if test "${with_memory_size+set}" = set; then :
49826  withval=$with_memory_size;
49827fi
49828
49829  if test "x$with_memory_size" = x; then
49830    # The memory size was not specified, try to probe it.
49831
49832  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
49833$as_echo_n "checking for memory size... " >&6; }
49834  # Default to 1024 MB
49835  MEMORY_SIZE=1024
49836  FOUND_MEM=no
49837
49838  if test -f /proc/meminfo; then
49839    # Looks like a Linux (or cygwin) system
49840    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
49841    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
49842    FOUND_MEM=yes
49843  elif test -x /usr/sbin/prtconf; then
49844    # Looks like a Solaris or AIX system
49845    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
49846    FOUND_MEM=yes
49847  elif test -x /usr/sbin/system_profiler; then
49848    # Looks like a MacOSX system
49849    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
49850    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
49851    FOUND_MEM=yes
49852  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
49853    # Windows, but without cygwin
49854    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
49855    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
49856    FOUND_MEM=yes
49857  fi
49858
49859  if test "x$FOUND_MEM" = xyes; then
49860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
49861$as_echo "$MEMORY_SIZE MB" >&6; }
49862  else
49863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
49864$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
49865    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
49866$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
49867  fi
49868
49869  else
49870    MEMORY_SIZE=$with_memory_size
49871  fi
49872
49873
49874
49875  # Provide a decent default number of parallel jobs for make depending on
49876  # number of cores, amount of memory and machine architecture.
49877
49878# Check whether --with-jobs was given.
49879if test "${with_jobs+set}" = set; then :
49880  withval=$with_jobs;
49881fi
49882
49883  if test "x$with_jobs" = x; then
49884    # Number of jobs was not specified, calculate.
49885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
49886$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
49887    # Approximate memory in GB, rounding up a bit.
49888    memory_gb=`expr $MEMORY_SIZE / 1100`
49889    # Pick the lowest of memory in gb and number of cores.
49890    if test "$memory_gb" -lt "$NUM_CORES"; then
49891      JOBS="$memory_gb"
49892    else
49893      JOBS="$NUM_CORES"
49894      # On bigger machines, leave some room for other processes to run
49895      if test "$JOBS" -gt "4"; then
49896        JOBS=`expr $JOBS '*' 90 / 100`
49897      fi
49898    fi
49899    # Cap number of jobs to 16
49900    if test "$JOBS" -gt "16"; then
49901      JOBS=16
49902    fi
49903    if test "$JOBS" -eq "0"; then
49904      JOBS=1
49905    fi
49906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
49907$as_echo "$JOBS" >&6; }
49908  else
49909    JOBS=$with_jobs
49910  fi
49911
49912
49913
49914# Setup smart javac (after cores and memory have been setup)
49915
49916
49917# Check whether --with-sjavac-server-java was given.
49918if test "${with_sjavac_server_java+set}" = set; then :
49919  withval=$with_sjavac_server_java;
49920fi
49921
49922
49923  if test "x$with_sjavac_server_java" != x; then
49924    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
49925    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
49926    if test "x$FOUND_VERSION" = x; then
49927      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
49928    fi
49929  else
49930    SJAVAC_SERVER_JAVA=""
49931    # Hotspot specific options.
49932
49933  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
49934  $ECHO "Command: $JAVA -verbosegc -version" >&5
49935  OUTPUT=`$JAVA -verbosegc -version 2>&1`
49936  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49937  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49938  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49939    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
49940    JVM_ARG_OK=true
49941  else
49942    $ECHO "Arg failed:" >&5
49943    $ECHO "$OUTPUT" >&5
49944    JVM_ARG_OK=false
49945  fi
49946
49947    # JRockit specific options.
49948
49949  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
49950  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
49951  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
49952  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49953  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49954  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49955    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
49956    JVM_ARG_OK=true
49957  else
49958    $ECHO "Arg failed:" >&5
49959    $ECHO "$OUTPUT" >&5
49960    JVM_ARG_OK=false
49961  fi
49962
49963    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
49964  fi
49965
49966
49967  if test "$MEMORY_SIZE" -gt "2500"; then
49968
49969  $ECHO "Check if jvm arg is ok: -d64" >&5
49970  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
49971  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
49972  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49973  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49974  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49975    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
49976    JVM_ARG_OK=true
49977  else
49978    $ECHO "Arg failed:" >&5
49979    $ECHO "$OUTPUT" >&5
49980    JVM_ARG_OK=false
49981  fi
49982
49983    if test "$JVM_ARG_OK" = true; then
49984      JVM_64BIT=true
49985      JVM_ARG_OK=false
49986    fi
49987  fi
49988
49989  if test "$JVM_64BIT" = true; then
49990    if test "$MEMORY_SIZE" -gt "17000"; then
49991
49992  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
49993  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
49994  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
49995  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49996  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49997  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49998    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
49999    JVM_ARG_OK=true
50000  else
50001    $ECHO "Arg failed:" >&5
50002    $ECHO "$OUTPUT" >&5
50003    JVM_ARG_OK=false
50004  fi
50005
50006    fi
50007    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
50008
50009  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
50010  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
50011  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
50012  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50013  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50014  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50015    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
50016    JVM_ARG_OK=true
50017  else
50018    $ECHO "Arg failed:" >&5
50019    $ECHO "$OUTPUT" >&5
50020    JVM_ARG_OK=false
50021  fi
50022
50023    fi
50024    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
50025
50026  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
50027  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
50028  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
50029  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50030  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50031  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50032    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
50033    JVM_ARG_OK=true
50034  else
50035    $ECHO "Arg failed:" >&5
50036    $ECHO "$OUTPUT" >&5
50037    JVM_ARG_OK=false
50038  fi
50039
50040    fi
50041    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
50042
50043  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
50044  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
50045  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
50046  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50047  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50048  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50049    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
50050    JVM_ARG_OK=true
50051  else
50052    $ECHO "Arg failed:" >&5
50053    $ECHO "$OUTPUT" >&5
50054    JVM_ARG_OK=false
50055  fi
50056
50057    fi
50058  fi
50059  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
50060
50061  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
50062  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
50063  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
50064  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50065  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50066  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50067    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
50068    JVM_ARG_OK=true
50069  else
50070    $ECHO "Arg failed:" >&5
50071    $ECHO "$OUTPUT" >&5
50072    JVM_ARG_OK=false
50073  fi
50074
50075  fi
50076  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
50077
50078  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
50079  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
50080  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
50081  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50082  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50083  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50084    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
50085    JVM_ARG_OK=true
50086  else
50087    $ECHO "Arg failed:" >&5
50088    $ECHO "$OUTPUT" >&5
50089    JVM_ARG_OK=false
50090  fi
50091
50092  fi
50093  if test "$JVM_ARG_OK" = false; then
50094
50095  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
50096  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
50097  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
50098  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50099  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50100  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50101    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
50102    JVM_ARG_OK=true
50103  else
50104    $ECHO "Arg failed:" >&5
50105    $ECHO "$OUTPUT" >&5
50106    JVM_ARG_OK=false
50107  fi
50108
50109  fi
50110
50111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
50112$as_echo_n "checking whether to use sjavac... " >&6; }
50113  # Check whether --enable-sjavac was given.
50114if test "${enable_sjavac+set}" = set; then :
50115  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
50116else
50117  ENABLE_SJAVAC='no'
50118fi
50119
50120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
50121$as_echo "$ENABLE_SJAVAC" >&6; }
50122
50123
50124  if test "x$ENABLE_SJAVAC" = xyes; then
50125    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
50126  else
50127    SJAVAC_SERVER_DIR=
50128  fi
50129
50130
50131
50132# Can the C/C++ compiler use precompiled headers?
50133
50134
50135  ###############################################################################
50136  #
50137  # Can the C/C++ compiler use precompiled headers?
50138  #
50139  # Check whether --enable-precompiled-headers was given.
50140if test "${enable_precompiled_headers+set}" = set; then :
50141  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
50142else
50143  ENABLE_PRECOMPH=yes
50144fi
50145
50146
50147  USE_PRECOMPILED_HEADER=1
50148  if test "x$ENABLE_PRECOMPH" = xno; then
50149    USE_PRECOMPILED_HEADER=0
50150  fi
50151
50152  if test "x$ENABLE_PRECOMPH" = xyes; then
50153    # Check that the compiler actually supports precomp headers.
50154    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50155      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
50156$as_echo_n "checking that precompiled headers work... " >&6; }
50157      echo "int alfa();" > conftest.h
50158      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
50159      if test ! -f conftest.hpp.gch; then
50160        USE_PRECOMPILED_HEADER=0
50161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50162$as_echo "no" >&6; }
50163      else
50164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50165$as_echo "yes" >&6; }
50166      fi
50167      rm -f conftest.h conftest.hpp.gch
50168    fi
50169  fi
50170
50171
50172
50173
50174# Setup use of ccache, if available
50175
50176  # Check whether --enable-ccache was given.
50177if test "${enable_ccache+set}" = set; then :
50178  enableval=$enable_ccache;
50179fi
50180
50181
50182  CCACHE=
50183  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
50184$as_echo_n "checking is ccache enabled... " >&6; }
50185  ENABLE_CCACHE=$enable_ccache
50186  if test "x$enable_ccache" = xyes; then
50187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50188$as_echo "yes" >&6; }
50189    OLD_PATH="$PATH"
50190    if test "x$TOOLCHAIN_PATH" != x; then
50191      PATH=$TOOLCHAIN_PATH:$PATH
50192    fi
50193
50194
50195
50196  # Publish this variable in the help.
50197
50198
50199  if test "x$CCACHE" = x; then
50200    # The variable is not set by user, try to locate tool using the code snippet
50201    for ac_prog in ccache
50202do
50203  # Extract the first word of "$ac_prog", so it can be a program name with args.
50204set dummy $ac_prog; ac_word=$2
50205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50206$as_echo_n "checking for $ac_word... " >&6; }
50207if ${ac_cv_path_CCACHE+:} false; then :
50208  $as_echo_n "(cached) " >&6
50209else
50210  case $CCACHE in
50211  [\\/]* | ?:[\\/]*)
50212  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50213  ;;
50214  *)
50215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50216for as_dir in $PATH
50217do
50218  IFS=$as_save_IFS
50219  test -z "$as_dir" && as_dir=.
50220    for ac_exec_ext in '' $ac_executable_extensions; do
50221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50222    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50224    break 2
50225  fi
50226done
50227  done
50228IFS=$as_save_IFS
50229
50230  ;;
50231esac
50232fi
50233CCACHE=$ac_cv_path_CCACHE
50234if test -n "$CCACHE"; then
50235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50236$as_echo "$CCACHE" >&6; }
50237else
50238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50239$as_echo "no" >&6; }
50240fi
50241
50242
50243  test -n "$CCACHE" && break
50244done
50245
50246  else
50247    # The variable is set, but is it from the command line or the environment?
50248
50249    # Try to remove the string !CCACHE! from our list.
50250    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
50251    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
50252      # If it failed, the variable was not from the command line. Ignore it,
50253      # but warn the user (except for BASH, which is always set by the calling BASH).
50254      if test "xCCACHE" != xBASH; then
50255        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
50256$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
50257      fi
50258      # Try to locate tool using the code snippet
50259      for ac_prog in ccache
50260do
50261  # Extract the first word of "$ac_prog", so it can be a program name with args.
50262set dummy $ac_prog; ac_word=$2
50263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50264$as_echo_n "checking for $ac_word... " >&6; }
50265if ${ac_cv_path_CCACHE+:} false; then :
50266  $as_echo_n "(cached) " >&6
50267else
50268  case $CCACHE in
50269  [\\/]* | ?:[\\/]*)
50270  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50271  ;;
50272  *)
50273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50274for as_dir in $PATH
50275do
50276  IFS=$as_save_IFS
50277  test -z "$as_dir" && as_dir=.
50278    for ac_exec_ext in '' $ac_executable_extensions; do
50279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50280    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50282    break 2
50283  fi
50284done
50285  done
50286IFS=$as_save_IFS
50287
50288  ;;
50289esac
50290fi
50291CCACHE=$ac_cv_path_CCACHE
50292if test -n "$CCACHE"; then
50293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50294$as_echo "$CCACHE" >&6; }
50295else
50296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50297$as_echo "no" >&6; }
50298fi
50299
50300
50301  test -n "$CCACHE" && break
50302done
50303
50304    else
50305      # If it succeeded, then it was overridden by the user. We will use it
50306      # for the tool.
50307
50308      # First remove it from the list of overridden variables, so we can test
50309      # for unknown variables in the end.
50310      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
50311
50312      # Check if the provided tool contains a complete path.
50313      tool_specified="$CCACHE"
50314      tool_basename="${tool_specified##*/}"
50315      if test "x$tool_basename" = "x$tool_specified"; then
50316        # A command without a complete path is provided, search $PATH.
50317        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
50318$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
50319        # Extract the first word of "$tool_basename", so it can be a program name with args.
50320set dummy $tool_basename; ac_word=$2
50321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50322$as_echo_n "checking for $ac_word... " >&6; }
50323if ${ac_cv_path_CCACHE+:} false; then :
50324  $as_echo_n "(cached) " >&6
50325else
50326  case $CCACHE in
50327  [\\/]* | ?:[\\/]*)
50328  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50329  ;;
50330  *)
50331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50332for as_dir in $PATH
50333do
50334  IFS=$as_save_IFS
50335  test -z "$as_dir" && as_dir=.
50336    for ac_exec_ext in '' $ac_executable_extensions; do
50337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50338    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50340    break 2
50341  fi
50342done
50343  done
50344IFS=$as_save_IFS
50345
50346  ;;
50347esac
50348fi
50349CCACHE=$ac_cv_path_CCACHE
50350if test -n "$CCACHE"; then
50351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50352$as_echo "$CCACHE" >&6; }
50353else
50354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50355$as_echo "no" >&6; }
50356fi
50357
50358
50359        if test "x$CCACHE" = x; then
50360          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
50361        fi
50362      else
50363        # Otherwise we believe it is a complete path. Use it as it is.
50364        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
50365$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
50366        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
50367$as_echo_n "checking for CCACHE... " >&6; }
50368        if test ! -x "$tool_specified"; then
50369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
50370$as_echo "not found" >&6; }
50371          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
50372        fi
50373        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
50374$as_echo "$tool_specified" >&6; }
50375      fi
50376    fi
50377  fi
50378
50379
50380
50381  if test "x$CCACHE" = x; then
50382    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
50383  fi
50384
50385
50386    CCACHE_STATUS="enabled"
50387    PATH="$OLD_PATH"
50388  elif test "x$enable_ccache" = xno; then
50389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
50390$as_echo "no, explicitly disabled" >&6; }
50391  elif test "x$enable_ccache" = x; then
50392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50393$as_echo "no" >&6; }
50394  else
50395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
50396$as_echo "unknown" >&6; }
50397    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
50398  fi
50399
50400
50401
50402# Check whether --with-ccache-dir was given.
50403if test "${with_ccache_dir+set}" = set; then :
50404  withval=$with_ccache_dir;
50405fi
50406
50407
50408  if test "x$with_ccache_dir" != x; then
50409    # When using a non home ccache directory, assume the use is to share ccache files
50410    # with other users. Thus change the umask.
50411    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
50412    if test "x$CCACHE" = x; then
50413      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
50414$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
50415    fi
50416  fi
50417
50418  if test "x$CCACHE" != x; then
50419
50420  if test "x$CCACHE" != x; then
50421    # Only use ccache if it is 3.1.4 or later, which supports
50422    # precompiled headers.
50423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
50424$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
50425    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
50426    if test "x$HAS_GOOD_CCACHE" = x; then
50427      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
50428$as_echo "no, disabling ccache" >&6; }
50429      CCACHE=
50430      CCACHE_STATUS="disabled"
50431    else
50432      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50433$as_echo "yes" >&6; }
50434      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
50435$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
50436      PUSHED_FLAGS="$CXXFLAGS"
50437      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
50438      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50439/* end confdefs.h.  */
50440
50441int
50442main ()
50443{
50444
50445  ;
50446  return 0;
50447}
50448_ACEOF
50449if ac_fn_cxx_try_compile "$LINENO"; then :
50450  CC_KNOWS_CCACHE_TRICK=yes
50451else
50452  CC_KNOWS_CCACHE_TRICK=no
50453fi
50454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50455      CXXFLAGS="$PUSHED_FLAGS"
50456      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
50457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50458$as_echo "yes" >&6; }
50459      else
50460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
50461$as_echo "no, disabling ccaching of precompiled headers" >&6; }
50462        CCACHE=
50463        CCACHE_STATUS="disabled"
50464      fi
50465    fi
50466  fi
50467
50468  if test "x$CCACHE" != x; then
50469    CCACHE_SLOPPINESS=time_macros
50470    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
50471    CCACHE_FLAGS=-fpch-preprocess
50472
50473    if test "x$SET_CCACHE_DIR" != x; then
50474      mkdir -p $CCACHE_DIR > /dev/null 2>&1
50475      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
50476    fi
50477  fi
50478
50479  fi
50480
50481
50482###############################################################################
50483#
50484# And now the finish...
50485#
50486###############################################################################
50487
50488# Check for some common pitfalls
50489
50490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50491    file_to_test="$SRC_ROOT/LICENSE"
50492    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
50493      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
50494    fi
50495  fi
50496
50497
50498  # Did user specify any unknown variables?
50499
50500  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
50501    # Replace the separating ! with spaces before presenting for end user.
50502    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
50503    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
50504$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
50505  fi
50506
50507
50508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
50509$as_echo_n "checking if build directory is on local disk... " >&6; }
50510
50511  # df -l lists only local disks; if the given directory is not found then
50512  # a non-zero exit code is given
50513  if test "x$DF" = x; then
50514    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50515      # msys does not have df; use Windows "net use" instead.
50516      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
50517      if test "x$IS_NETWORK_DISK" = x; then
50518        OUTPUT_DIR_IS_LOCAL="yes"
50519      else
50520        OUTPUT_DIR_IS_LOCAL="no"
50521      fi
50522    else
50523      # No df here, say it's local
50524      OUTPUT_DIR_IS_LOCAL="yes"
50525    fi
50526  else
50527    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
50528      OUTPUT_DIR_IS_LOCAL="yes"
50529    else
50530      OUTPUT_DIR_IS_LOCAL="no"
50531    fi
50532  fi
50533
50534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
50535$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
50536
50537
50538
50539  # Check if the user has any old-style ALT_ variables set.
50540  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
50541
50542  # Before generating output files, test if they exist. If they do, this is a reconfigure.
50543  # Since we can't properly handle the dependencies for this, warn the user about the situation
50544  if test -e $OUTPUT_ROOT/spec.gmk; then
50545    IS_RECONFIGURE=yes
50546  else
50547    IS_RECONFIGURE=no
50548  fi
50549
50550
50551# At the end, call the custom hook. (Dummy macro if no custom sources available)
50552
50553
50554# We're messing a bit with internal autoconf variables to put the config.status
50555# in the output directory instead of the current directory.
50556CONFIG_STATUS="$OUTPUT_ROOT/config.status"
50557
50558# Create the actual output files. Now the main work of configure is done.
50559cat >confcache <<\_ACEOF
50560# This file is a shell script that caches the results of configure
50561# tests run on this system so they can be shared between configure
50562# scripts and configure runs, see configure's option --config-cache.
50563# It is not useful on other systems.  If it contains results you don't
50564# want to keep, you may remove or edit it.
50565#
50566# config.status only pays attention to the cache file if you give it
50567# the --recheck option to rerun configure.
50568#
50569# `ac_cv_env_foo' variables (set or unset) will be overridden when
50570# loading this file, other *unset* `ac_cv_foo' will be assigned the
50571# following values.
50572
50573_ACEOF
50574
50575# The following way of writing the cache mishandles newlines in values,
50576# but we know of no workaround that is simple, portable, and efficient.
50577# So, we kill variables containing newlines.
50578# Ultrix sh set writes to stderr and can't be redirected directly,
50579# and sets the high bit in the cache file unless we assign to the vars.
50580(
50581  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
50582    eval ac_val=\$$ac_var
50583    case $ac_val in #(
50584    *${as_nl}*)
50585      case $ac_var in #(
50586      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
50587$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
50588      esac
50589      case $ac_var in #(
50590      _ | IFS | as_nl) ;; #(
50591      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
50592      *) { eval $ac_var=; unset $ac_var;} ;;
50593      esac ;;
50594    esac
50595  done
50596
50597  (set) 2>&1 |
50598    case $as_nl`(ac_space=' '; set) 2>&1` in #(
50599    *${as_nl}ac_space=\ *)
50600      # `set' does not quote correctly, so add quotes: double-quote
50601      # substitution turns \\\\ into \\, and sed turns \\ into \.
50602      sed -n \
50603	"s/'/'\\\\''/g;
50604	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
50605      ;; #(
50606    *)
50607      # `set' quotes correctly as required by POSIX, so do not add quotes.
50608      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
50609      ;;
50610    esac |
50611    sort
50612) |
50613  sed '
50614     /^ac_cv_env_/b end
50615     t clear
50616     :clear
50617     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
50618     t end
50619     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
50620     :end' >>confcache
50621if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
50622  if test -w "$cache_file"; then
50623    if test "x$cache_file" != "x/dev/null"; then
50624      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
50625$as_echo "$as_me: updating cache $cache_file" >&6;}
50626      if test ! -f "$cache_file" || test -h "$cache_file"; then
50627	cat confcache >"$cache_file"
50628      else
50629        case $cache_file in #(
50630        */* | ?:*)
50631	  mv -f confcache "$cache_file"$$ &&
50632	  mv -f "$cache_file"$$ "$cache_file" ;; #(
50633        *)
50634	  mv -f confcache "$cache_file" ;;
50635	esac
50636      fi
50637    fi
50638  else
50639    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
50640$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
50641  fi
50642fi
50643rm -f confcache
50644
50645test "x$prefix" = xNONE && prefix=$ac_default_prefix
50646# Let make expand exec_prefix.
50647test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
50648
50649DEFS=-DHAVE_CONFIG_H
50650
50651ac_libobjs=
50652ac_ltlibobjs=
50653U=
50654for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
50655  # 1. Remove the extension, and $U if already installed.
50656  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
50657  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
50658  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
50659  #    will be set to the directory where LIBOBJS objects are built.
50660  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
50661  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
50662done
50663LIBOBJS=$ac_libobjs
50664
50665LTLIBOBJS=$ac_ltlibobjs
50666
50667
50668
50669: "${CONFIG_STATUS=./config.status}"
50670ac_write_fail=0
50671ac_clean_files_save=$ac_clean_files
50672ac_clean_files="$ac_clean_files $CONFIG_STATUS"
50673{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
50674$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
50675as_write_fail=0
50676cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
50677#! $SHELL
50678# Generated by $as_me.
50679# Run this file to recreate the current configuration.
50680# Compiler output produced by configure, useful for debugging
50681# configure, is in config.log if it exists.
50682
50683debug=false
50684ac_cs_recheck=false
50685ac_cs_silent=false
50686
50687SHELL=\${CONFIG_SHELL-$SHELL}
50688export SHELL
50689_ASEOF
50690cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
50691## -------------------- ##
50692## M4sh Initialization. ##
50693## -------------------- ##
50694
50695# Be more Bourne compatible
50696DUALCASE=1; export DUALCASE # for MKS sh
50697if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
50698  emulate sh
50699  NULLCMD=:
50700  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
50701  # is contrary to our usage.  Disable this feature.
50702  alias -g '${1+"$@"}'='"$@"'
50703  setopt NO_GLOB_SUBST
50704else
50705  case `(set -o) 2>/dev/null` in #(
50706  *posix*) :
50707    set -o posix ;; #(
50708  *) :
50709     ;;
50710esac
50711fi
50712
50713
50714as_nl='
50715'
50716export as_nl
50717# Printing a long string crashes Solaris 7 /usr/bin/printf.
50718as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
50719as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
50720as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
50721# Prefer a ksh shell builtin over an external printf program on Solaris,
50722# but without wasting forks for bash or zsh.
50723if test -z "$BASH_VERSION$ZSH_VERSION" \
50724    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50725  as_echo='print -r --'
50726  as_echo_n='print -rn --'
50727elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50728  as_echo='printf %s\n'
50729  as_echo_n='printf %s'
50730else
50731  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
50732    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
50733    as_echo_n='/usr/ucb/echo -n'
50734  else
50735    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
50736    as_echo_n_body='eval
50737      arg=$1;
50738      case $arg in #(
50739      *"$as_nl"*)
50740	expr "X$arg" : "X\\(.*\\)$as_nl";
50741	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
50742      esac;
50743      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
50744    '
50745    export as_echo_n_body
50746    as_echo_n='sh -c $as_echo_n_body as_echo'
50747  fi
50748  export as_echo_body
50749  as_echo='sh -c $as_echo_body as_echo'
50750fi
50751
50752# The user is always right.
50753if test "${PATH_SEPARATOR+set}" != set; then
50754  PATH_SEPARATOR=:
50755  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
50756    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
50757      PATH_SEPARATOR=';'
50758  }
50759fi
50760
50761
50762# IFS
50763# We need space, tab and new line, in precisely that order.  Quoting is
50764# there to prevent editors from complaining about space-tab.
50765# (If _AS_PATH_WALK were called with IFS unset, it would disable word
50766# splitting by setting IFS to empty value.)
50767IFS=" ""	$as_nl"
50768
50769# Find who we are.  Look in the path if we contain no directory separator.
50770as_myself=
50771case $0 in #((
50772  *[\\/]* ) as_myself=$0 ;;
50773  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50774for as_dir in $PATH
50775do
50776  IFS=$as_save_IFS
50777  test -z "$as_dir" && as_dir=.
50778    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
50779  done
50780IFS=$as_save_IFS
50781
50782     ;;
50783esac
50784# We did not find ourselves, most probably we were run as `sh COMMAND'
50785# in which case we are not to be found in the path.
50786if test "x$as_myself" = x; then
50787  as_myself=$0
50788fi
50789if test ! -f "$as_myself"; then
50790  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
50791  exit 1
50792fi
50793
50794# Unset variables that we do not need and which cause bugs (e.g. in
50795# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
50796# suppresses any "Segmentation fault" message there.  '((' could
50797# trigger a bug in pdksh 5.2.14.
50798for as_var in BASH_ENV ENV MAIL MAILPATH
50799do eval test x\${$as_var+set} = xset \
50800  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
50801done
50802PS1='$ '
50803PS2='> '
50804PS4='+ '
50805
50806# NLS nuisances.
50807LC_ALL=C
50808export LC_ALL
50809LANGUAGE=C
50810export LANGUAGE
50811
50812# CDPATH.
50813(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
50814
50815
50816# as_fn_error STATUS ERROR [LINENO LOG_FD]
50817# ----------------------------------------
50818# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
50819# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
50820# script with STATUS, using 1 if that was 0.
50821as_fn_error ()
50822{
50823  as_status=$1; test $as_status -eq 0 && as_status=1
50824  if test "$4"; then
50825    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
50826    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
50827  fi
50828  $as_echo "$as_me: error: $2" >&2
50829  as_fn_exit $as_status
50830} # as_fn_error
50831
50832
50833# as_fn_set_status STATUS
50834# -----------------------
50835# Set $? to STATUS, without forking.
50836as_fn_set_status ()
50837{
50838  return $1
50839} # as_fn_set_status
50840
50841# as_fn_exit STATUS
50842# -----------------
50843# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
50844as_fn_exit ()
50845{
50846  set +e
50847  as_fn_set_status $1
50848  exit $1
50849} # as_fn_exit
50850
50851# as_fn_unset VAR
50852# ---------------
50853# Portably unset VAR.
50854as_fn_unset ()
50855{
50856  { eval $1=; unset $1;}
50857}
50858as_unset=as_fn_unset
50859# as_fn_append VAR VALUE
50860# ----------------------
50861# Append the text in VALUE to the end of the definition contained in VAR. Take
50862# advantage of any shell optimizations that allow amortized linear growth over
50863# repeated appends, instead of the typical quadratic growth present in naive
50864# implementations.
50865if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
50866  eval 'as_fn_append ()
50867  {
50868    eval $1+=\$2
50869  }'
50870else
50871  as_fn_append ()
50872  {
50873    eval $1=\$$1\$2
50874  }
50875fi # as_fn_append
50876
50877# as_fn_arith ARG...
50878# ------------------
50879# Perform arithmetic evaluation on the ARGs, and store the result in the
50880# global $as_val. Take advantage of shells that can avoid forks. The arguments
50881# must be portable across $(()) and expr.
50882if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
50883  eval 'as_fn_arith ()
50884  {
50885    as_val=$(( $* ))
50886  }'
50887else
50888  as_fn_arith ()
50889  {
50890    as_val=`expr "$@" || test $? -eq 1`
50891  }
50892fi # as_fn_arith
50893
50894
50895if expr a : '\(a\)' >/dev/null 2>&1 &&
50896   test "X`expr 00001 : '.*\(...\)'`" = X001; then
50897  as_expr=expr
50898else
50899  as_expr=false
50900fi
50901
50902if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
50903  as_basename=basename
50904else
50905  as_basename=false
50906fi
50907
50908if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
50909  as_dirname=dirname
50910else
50911  as_dirname=false
50912fi
50913
50914as_me=`$as_basename -- "$0" ||
50915$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
50916	 X"$0" : 'X\(//\)$' \| \
50917	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
50918$as_echo X/"$0" |
50919    sed '/^.*\/\([^/][^/]*\)\/*$/{
50920	    s//\1/
50921	    q
50922	  }
50923	  /^X\/\(\/\/\)$/{
50924	    s//\1/
50925	    q
50926	  }
50927	  /^X\/\(\/\).*/{
50928	    s//\1/
50929	    q
50930	  }
50931	  s/.*/./; q'`
50932
50933# Avoid depending upon Character Ranges.
50934as_cr_letters='abcdefghijklmnopqrstuvwxyz'
50935as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
50936as_cr_Letters=$as_cr_letters$as_cr_LETTERS
50937as_cr_digits='0123456789'
50938as_cr_alnum=$as_cr_Letters$as_cr_digits
50939
50940ECHO_C= ECHO_N= ECHO_T=
50941case `echo -n x` in #(((((
50942-n*)
50943  case `echo 'xy\c'` in
50944  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
50945  xy)  ECHO_C='\c';;
50946  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
50947       ECHO_T='	';;
50948  esac;;
50949*)
50950  ECHO_N='-n';;
50951esac
50952
50953rm -f conf$$ conf$$.exe conf$$.file
50954if test -d conf$$.dir; then
50955  rm -f conf$$.dir/conf$$.file
50956else
50957  rm -f conf$$.dir
50958  mkdir conf$$.dir 2>/dev/null
50959fi
50960if (echo >conf$$.file) 2>/dev/null; then
50961  if ln -s conf$$.file conf$$ 2>/dev/null; then
50962    as_ln_s='ln -s'
50963    # ... but there are two gotchas:
50964    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
50965    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
50966    # In both cases, we have to default to `cp -pR'.
50967    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
50968      as_ln_s='cp -pR'
50969  elif ln conf$$.file conf$$ 2>/dev/null; then
50970    as_ln_s=ln
50971  else
50972    as_ln_s='cp -pR'
50973  fi
50974else
50975  as_ln_s='cp -pR'
50976fi
50977rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
50978rmdir conf$$.dir 2>/dev/null
50979
50980
50981# as_fn_mkdir_p
50982# -------------
50983# Create "$as_dir" as a directory, including parents if necessary.
50984as_fn_mkdir_p ()
50985{
50986
50987  case $as_dir in #(
50988  -*) as_dir=./$as_dir;;
50989  esac
50990  test -d "$as_dir" || eval $as_mkdir_p || {
50991    as_dirs=
50992    while :; do
50993      case $as_dir in #(
50994      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
50995      *) as_qdir=$as_dir;;
50996      esac
50997      as_dirs="'$as_qdir' $as_dirs"
50998      as_dir=`$as_dirname -- "$as_dir" ||
50999$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51000	 X"$as_dir" : 'X\(//\)[^/]' \| \
51001	 X"$as_dir" : 'X\(//\)$' \| \
51002	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
51003$as_echo X"$as_dir" |
51004    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51005	    s//\1/
51006	    q
51007	  }
51008	  /^X\(\/\/\)[^/].*/{
51009	    s//\1/
51010	    q
51011	  }
51012	  /^X\(\/\/\)$/{
51013	    s//\1/
51014	    q
51015	  }
51016	  /^X\(\/\).*/{
51017	    s//\1/
51018	    q
51019	  }
51020	  s/.*/./; q'`
51021      test -d "$as_dir" && break
51022    done
51023    test -z "$as_dirs" || eval "mkdir $as_dirs"
51024  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
51025
51026
51027} # as_fn_mkdir_p
51028if mkdir -p . 2>/dev/null; then
51029  as_mkdir_p='mkdir -p "$as_dir"'
51030else
51031  test -d ./-p && rmdir ./-p
51032  as_mkdir_p=false
51033fi
51034
51035
51036# as_fn_executable_p FILE
51037# -----------------------
51038# Test if FILE is an executable regular file.
51039as_fn_executable_p ()
51040{
51041  test -f "$1" && test -x "$1"
51042} # as_fn_executable_p
51043as_test_x='test -x'
51044as_executable_p=as_fn_executable_p
51045
51046# Sed expression to map a string onto a valid CPP name.
51047as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
51048
51049# Sed expression to map a string onto a valid variable name.
51050as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
51051
51052
51053exec 6>&1
51054## ----------------------------------- ##
51055## Main body of $CONFIG_STATUS script. ##
51056## ----------------------------------- ##
51057_ASEOF
51058test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
51059
51060cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51061# Save the log message, to keep $0 and so on meaningful, and to
51062# report actual input values of CONFIG_FILES etc. instead of their
51063# values after options handling.
51064ac_log="
51065This file was extended by OpenJDK $as_me jdk9, which was
51066generated by GNU Autoconf 2.69.  Invocation command line was
51067
51068  CONFIG_FILES    = $CONFIG_FILES
51069  CONFIG_HEADERS  = $CONFIG_HEADERS
51070  CONFIG_LINKS    = $CONFIG_LINKS
51071  CONFIG_COMMANDS = $CONFIG_COMMANDS
51072  $ $0 $@
51073
51074on `(hostname || uname -n) 2>/dev/null | sed 1q`
51075"
51076
51077_ACEOF
51078
51079case $ac_config_files in *"
51080"*) set x $ac_config_files; shift; ac_config_files=$*;;
51081esac
51082
51083case $ac_config_headers in *"
51084"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
51085esac
51086
51087
51088cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51089# Files that config.status was made for.
51090config_files="$ac_config_files"
51091config_headers="$ac_config_headers"
51092
51093_ACEOF
51094
51095cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51096ac_cs_usage="\
51097\`$as_me' instantiates files and other configuration actions
51098from templates according to the current configuration.  Unless the files
51099and actions are specified as TAGs, all are instantiated by default.
51100
51101Usage: $0 [OPTION]... [TAG]...
51102
51103  -h, --help       print this help, then exit
51104  -V, --version    print version number and configuration settings, then exit
51105      --config     print configuration, then exit
51106  -q, --quiet, --silent
51107                   do not print progress messages
51108  -d, --debug      don't remove temporary files
51109      --recheck    update $as_me by reconfiguring in the same conditions
51110      --file=FILE[:TEMPLATE]
51111                   instantiate the configuration file FILE
51112      --header=FILE[:TEMPLATE]
51113                   instantiate the configuration header FILE
51114
51115Configuration files:
51116$config_files
51117
51118Configuration headers:
51119$config_headers
51120
51121Report bugs to <build-dev@openjdk.java.net>.
51122OpenJDK home page: <http://openjdk.java.net>."
51123
51124_ACEOF
51125cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51126ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51127ac_cs_version="\\
51128OpenJDK config.status jdk9
51129configured by $0, generated by GNU Autoconf 2.69,
51130  with options \\"\$ac_cs_config\\"
51131
51132Copyright (C) 2012 Free Software Foundation, Inc.
51133This config.status script is free software; the Free Software Foundation
51134gives unlimited permission to copy, distribute and modify it."
51135
51136ac_pwd='$ac_pwd'
51137srcdir='$srcdir'
51138AWK='$AWK'
51139test -n "\$AWK" || AWK=awk
51140_ACEOF
51141
51142cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51143# The default lists apply if the user does not specify any file.
51144ac_need_defaults=:
51145while test $# != 0
51146do
51147  case $1 in
51148  --*=?*)
51149    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51150    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
51151    ac_shift=:
51152    ;;
51153  --*=)
51154    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51155    ac_optarg=
51156    ac_shift=:
51157    ;;
51158  *)
51159    ac_option=$1
51160    ac_optarg=$2
51161    ac_shift=shift
51162    ;;
51163  esac
51164
51165  case $ac_option in
51166  # Handling of the options.
51167  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
51168    ac_cs_recheck=: ;;
51169  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
51170    $as_echo "$ac_cs_version"; exit ;;
51171  --config | --confi | --conf | --con | --co | --c )
51172    $as_echo "$ac_cs_config"; exit ;;
51173  --debug | --debu | --deb | --de | --d | -d )
51174    debug=: ;;
51175  --file | --fil | --fi | --f )
51176    $ac_shift
51177    case $ac_optarg in
51178    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51179    '') as_fn_error $? "missing file argument" ;;
51180    esac
51181    as_fn_append CONFIG_FILES " '$ac_optarg'"
51182    ac_need_defaults=false;;
51183  --header | --heade | --head | --hea )
51184    $ac_shift
51185    case $ac_optarg in
51186    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51187    esac
51188    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
51189    ac_need_defaults=false;;
51190  --he | --h)
51191    # Conflict between --help and --header
51192    as_fn_error $? "ambiguous option: \`$1'
51193Try \`$0 --help' for more information.";;
51194  --help | --hel | -h )
51195    $as_echo "$ac_cs_usage"; exit ;;
51196  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
51197  | -silent | --silent | --silen | --sile | --sil | --si | --s)
51198    ac_cs_silent=: ;;
51199
51200  # This is an error.
51201  -*) as_fn_error $? "unrecognized option: \`$1'
51202Try \`$0 --help' for more information." ;;
51203
51204  *) as_fn_append ac_config_targets " $1"
51205     ac_need_defaults=false ;;
51206
51207  esac
51208  shift
51209done
51210
51211ac_configure_extra_args=
51212
51213if $ac_cs_silent; then
51214  exec 6>/dev/null
51215  ac_configure_extra_args="$ac_configure_extra_args --silent"
51216fi
51217
51218_ACEOF
51219cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51220if \$ac_cs_recheck; then
51221  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
51222  shift
51223  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
51224  CONFIG_SHELL='$SHELL'
51225  export CONFIG_SHELL
51226  exec "\$@"
51227fi
51228
51229_ACEOF
51230cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51231exec 5>>config.log
51232{
51233  echo
51234  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
51235## Running $as_me. ##
51236_ASBOX
51237  $as_echo "$ac_log"
51238} >&5
51239
51240_ACEOF
51241cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51242_ACEOF
51243
51244cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51245
51246# Handling of arguments.
51247for ac_config_target in $ac_config_targets
51248do
51249  case $ac_config_target in
51250    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
51251    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
51252    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
51253    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
51254    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
51255    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
51256    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
51257
51258  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
51259  esac
51260done
51261
51262
51263# If the user did not use the arguments to specify the items to instantiate,
51264# then the envvar interface is used.  Set only those that are not.
51265# We use the long form for the default assignment because of an extremely
51266# bizarre bug on SunOS 4.1.3.
51267if $ac_need_defaults; then
51268  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
51269  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
51270fi
51271
51272# Have a temporary directory for convenience.  Make it in the build tree
51273# simply because there is no reason against having it here, and in addition,
51274# creating and moving files from /tmp can sometimes cause problems.
51275# Hook for its removal unless debugging.
51276# Note that there is a small window in which the directory will not be cleaned:
51277# after its creation but before its name has been assigned to `$tmp'.
51278$debug ||
51279{
51280  tmp= ac_tmp=
51281  trap 'exit_status=$?
51282  : "${ac_tmp:=$tmp}"
51283  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
51284' 0
51285  trap 'as_fn_exit 1' 1 2 13 15
51286}
51287# Create a (secure) tmp directory for tmp files.
51288
51289{
51290  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
51291  test -d "$tmp"
51292}  ||
51293{
51294  tmp=./conf$$-$RANDOM
51295  (umask 077 && mkdir "$tmp")
51296} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
51297ac_tmp=$tmp
51298
51299# Set up the scripts for CONFIG_FILES section.
51300# No need to generate them if there are no CONFIG_FILES.
51301# This happens for instance with `./config.status config.h'.
51302if test -n "$CONFIG_FILES"; then
51303
51304
51305ac_cr=`echo X | tr X '\015'`
51306# On cygwin, bash can eat \r inside `` if the user requested igncr.
51307# But we know of no other shell where ac_cr would be empty at this
51308# point, so we can use a bashism as a fallback.
51309if test "x$ac_cr" = x; then
51310  eval ac_cr=\$\'\\r\'
51311fi
51312ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
51313if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
51314  ac_cs_awk_cr='\\r'
51315else
51316  ac_cs_awk_cr=$ac_cr
51317fi
51318
51319echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
51320_ACEOF
51321
51322
51323{
51324  echo "cat >conf$$subs.awk <<_ACEOF" &&
51325  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
51326  echo "_ACEOF"
51327} >conf$$subs.sh ||
51328  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51329ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
51330ac_delim='%!_!# '
51331for ac_last_try in false false false false false :; do
51332  . ./conf$$subs.sh ||
51333    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51334
51335  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
51336  if test $ac_delim_n = $ac_delim_num; then
51337    break
51338  elif $ac_last_try; then
51339    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51340  else
51341    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51342  fi
51343done
51344rm -f conf$$subs.sh
51345
51346cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51347cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
51348_ACEOF
51349sed -n '
51350h
51351s/^/S["/; s/!.*/"]=/
51352p
51353g
51354s/^[^!]*!//
51355:repl
51356t repl
51357s/'"$ac_delim"'$//
51358t delim
51359:nl
51360h
51361s/\(.\{148\}\)..*/\1/
51362t more1
51363s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
51364p
51365n
51366b repl
51367:more1
51368s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51369p
51370g
51371s/.\{148\}//
51372t nl
51373:delim
51374h
51375s/\(.\{148\}\)..*/\1/
51376t more2
51377s/["\\]/\\&/g; s/^/"/; s/$/"/
51378p
51379b
51380:more2
51381s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51382p
51383g
51384s/.\{148\}//
51385t delim
51386' <conf$$subs.awk | sed '
51387/^[^""]/{
51388  N
51389  s/\n//
51390}
51391' >>$CONFIG_STATUS || ac_write_fail=1
51392rm -f conf$$subs.awk
51393cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51394_ACAWK
51395cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
51396  for (key in S) S_is_set[key] = 1
51397  FS = ""
51398
51399}
51400{
51401  line = $ 0
51402  nfields = split(line, field, "@")
51403  substed = 0
51404  len = length(field[1])
51405  for (i = 2; i < nfields; i++) {
51406    key = field[i]
51407    keylen = length(key)
51408    if (S_is_set[key]) {
51409      value = S[key]
51410      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
51411      len += length(value) + length(field[++i])
51412      substed = 1
51413    } else
51414      len += 1 + keylen
51415  }
51416
51417  print line
51418}
51419
51420_ACAWK
51421_ACEOF
51422cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51423if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
51424  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
51425else
51426  cat
51427fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
51428  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
51429_ACEOF
51430
51431# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
51432# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
51433# trailing colons and then remove the whole line if VPATH becomes empty
51434# (actually we leave an empty line to preserve line numbers).
51435if test "x$srcdir" = x.; then
51436  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
51437h
51438s///
51439s/^/:/
51440s/[	 ]*$/:/
51441s/:\$(srcdir):/:/g
51442s/:\${srcdir}:/:/g
51443s/:@srcdir@:/:/g
51444s/^:*//
51445s/:*$//
51446x
51447s/\(=[	 ]*\).*/\1/
51448G
51449s/\n//
51450s/^[^=]*=[	 ]*$//
51451}'
51452fi
51453
51454cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51455fi # test -n "$CONFIG_FILES"
51456
51457# Set up the scripts for CONFIG_HEADERS section.
51458# No need to generate them if there are no CONFIG_HEADERS.
51459# This happens for instance with `./config.status Makefile'.
51460if test -n "$CONFIG_HEADERS"; then
51461cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
51462BEGIN {
51463_ACEOF
51464
51465# Transform confdefs.h into an awk script `defines.awk', embedded as
51466# here-document in config.status, that substitutes the proper values into
51467# config.h.in to produce config.h.
51468
51469# Create a delimiter string that does not exist in confdefs.h, to ease
51470# handling of long lines.
51471ac_delim='%!_!# '
51472for ac_last_try in false false :; do
51473  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
51474  if test -z "$ac_tt"; then
51475    break
51476  elif $ac_last_try; then
51477    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
51478  else
51479    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51480  fi
51481done
51482
51483# For the awk script, D is an array of macro values keyed by name,
51484# likewise P contains macro parameters if any.  Preserve backslash
51485# newline sequences.
51486
51487ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
51488sed -n '
51489s/.\{148\}/&'"$ac_delim"'/g
51490t rset
51491:rset
51492s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
51493t def
51494d
51495:def
51496s/\\$//
51497t bsnl
51498s/["\\]/\\&/g
51499s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
51500D["\1"]=" \3"/p
51501s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
51502d
51503:bsnl
51504s/["\\]/\\&/g
51505s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
51506D["\1"]=" \3\\\\\\n"\\/p
51507t cont
51508s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
51509t cont
51510d
51511:cont
51512n
51513s/.\{148\}/&'"$ac_delim"'/g
51514t clear
51515:clear
51516s/\\$//
51517t bsnlc
51518s/["\\]/\\&/g; s/^/"/; s/$/"/p
51519d
51520:bsnlc
51521s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
51522b cont
51523' <confdefs.h | sed '
51524s/'"$ac_delim"'/"\\\
51525"/g' >>$CONFIG_STATUS || ac_write_fail=1
51526
51527cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51528  for (key in D) D_is_set[key] = 1
51529  FS = ""
51530}
51531/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
51532  line = \$ 0
51533  split(line, arg, " ")
51534  if (arg[1] == "#") {
51535    defundef = arg[2]
51536    mac1 = arg[3]
51537  } else {
51538    defundef = substr(arg[1], 2)
51539    mac1 = arg[2]
51540  }
51541  split(mac1, mac2, "(") #)
51542  macro = mac2[1]
51543  prefix = substr(line, 1, index(line, defundef) - 1)
51544  if (D_is_set[macro]) {
51545    # Preserve the white space surrounding the "#".
51546    print prefix "define", macro P[macro] D[macro]
51547    next
51548  } else {
51549    # Replace #undef with comments.  This is necessary, for example,
51550    # in the case of _POSIX_SOURCE, which is predefined and required
51551    # on some systems where configure will not decide to define it.
51552    if (defundef == "undef") {
51553      print "/*", prefix defundef, macro, "*/"
51554      next
51555    }
51556  }
51557}
51558{ print }
51559_ACAWK
51560_ACEOF
51561cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51562  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
51563fi # test -n "$CONFIG_HEADERS"
51564
51565
51566eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
51567shift
51568for ac_tag
51569do
51570  case $ac_tag in
51571  :[FHLC]) ac_mode=$ac_tag; continue;;
51572  esac
51573  case $ac_mode$ac_tag in
51574  :[FHL]*:*);;
51575  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
51576  :[FH]-) ac_tag=-:-;;
51577  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
51578  esac
51579  ac_save_IFS=$IFS
51580  IFS=:
51581  set x $ac_tag
51582  IFS=$ac_save_IFS
51583  shift
51584  ac_file=$1
51585  shift
51586
51587  case $ac_mode in
51588  :L) ac_source=$1;;
51589  :[FH])
51590    ac_file_inputs=
51591    for ac_f
51592    do
51593      case $ac_f in
51594      -) ac_f="$ac_tmp/stdin";;
51595      *) # Look for the file first in the build tree, then in the source tree
51596	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
51597	 # because $ac_f cannot contain `:'.
51598	 test -f "$ac_f" ||
51599	   case $ac_f in
51600	   [\\/$]*) false;;
51601	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
51602	   esac ||
51603	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
51604      esac
51605      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
51606      as_fn_append ac_file_inputs " '$ac_f'"
51607    done
51608
51609    # Let's still pretend it is `configure' which instantiates (i.e., don't
51610    # use $as_me), people would be surprised to read:
51611    #    /* config.h.  Generated by config.status.  */
51612    configure_input='Generated from '`
51613	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
51614	`' by configure.'
51615    if test x"$ac_file" != x-; then
51616      configure_input="$ac_file.  $configure_input"
51617      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
51618$as_echo "$as_me: creating $ac_file" >&6;}
51619    fi
51620    # Neutralize special characters interpreted by sed in replacement strings.
51621    case $configure_input in #(
51622    *\&* | *\|* | *\\* )
51623       ac_sed_conf_input=`$as_echo "$configure_input" |
51624       sed 's/[\\\\&|]/\\\\&/g'`;; #(
51625    *) ac_sed_conf_input=$configure_input;;
51626    esac
51627
51628    case $ac_tag in
51629    *:-:* | *:-) cat >"$ac_tmp/stdin" \
51630      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
51631    esac
51632    ;;
51633  esac
51634
51635  ac_dir=`$as_dirname -- "$ac_file" ||
51636$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51637	 X"$ac_file" : 'X\(//\)[^/]' \| \
51638	 X"$ac_file" : 'X\(//\)$' \| \
51639	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
51640$as_echo X"$ac_file" |
51641    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51642	    s//\1/
51643	    q
51644	  }
51645	  /^X\(\/\/\)[^/].*/{
51646	    s//\1/
51647	    q
51648	  }
51649	  /^X\(\/\/\)$/{
51650	    s//\1/
51651	    q
51652	  }
51653	  /^X\(\/\).*/{
51654	    s//\1/
51655	    q
51656	  }
51657	  s/.*/./; q'`
51658  as_dir="$ac_dir"; as_fn_mkdir_p
51659  ac_builddir=.
51660
51661case "$ac_dir" in
51662.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
51663*)
51664  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
51665  # A ".." for each directory in $ac_dir_suffix.
51666  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
51667  case $ac_top_builddir_sub in
51668  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
51669  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
51670  esac ;;
51671esac
51672ac_abs_top_builddir=$ac_pwd
51673ac_abs_builddir=$ac_pwd$ac_dir_suffix
51674# for backward compatibility:
51675ac_top_builddir=$ac_top_build_prefix
51676
51677case $srcdir in
51678  .)  # We are building in place.
51679    ac_srcdir=.
51680    ac_top_srcdir=$ac_top_builddir_sub
51681    ac_abs_top_srcdir=$ac_pwd ;;
51682  [\\/]* | ?:[\\/]* )  # Absolute name.
51683    ac_srcdir=$srcdir$ac_dir_suffix;
51684    ac_top_srcdir=$srcdir
51685    ac_abs_top_srcdir=$srcdir ;;
51686  *) # Relative name.
51687    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
51688    ac_top_srcdir=$ac_top_build_prefix$srcdir
51689    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
51690esac
51691ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
51692
51693
51694  case $ac_mode in
51695  :F)
51696  #
51697  # CONFIG_FILE
51698  #
51699
51700_ACEOF
51701
51702cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51703# If the template does not know about datarootdir, expand it.
51704# FIXME: This hack should be removed a few years after 2.60.
51705ac_datarootdir_hack=; ac_datarootdir_seen=
51706ac_sed_dataroot='
51707/datarootdir/ {
51708  p
51709  q
51710}
51711/@datadir@/p
51712/@docdir@/p
51713/@infodir@/p
51714/@localedir@/p
51715/@mandir@/p'
51716case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
51717*datarootdir*) ac_datarootdir_seen=yes;;
51718*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
51719  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
51720$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
51721_ACEOF
51722cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51723  ac_datarootdir_hack='
51724  s&@datadir@&$datadir&g
51725  s&@docdir@&$docdir&g
51726  s&@infodir@&$infodir&g
51727  s&@localedir@&$localedir&g
51728  s&@mandir@&$mandir&g
51729  s&\\\${datarootdir}&$datarootdir&g' ;;
51730esac
51731_ACEOF
51732
51733# Neutralize VPATH when `$srcdir' = `.'.
51734# Shell code in configure.ac might set extrasub.
51735# FIXME: do we really want to maintain this feature?
51736cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51737ac_sed_extra="$ac_vpsub
51738$extrasub
51739_ACEOF
51740cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51741:t
51742/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
51743s|@configure_input@|$ac_sed_conf_input|;t t
51744s&@top_builddir@&$ac_top_builddir_sub&;t t
51745s&@top_build_prefix@&$ac_top_build_prefix&;t t
51746s&@srcdir@&$ac_srcdir&;t t
51747s&@abs_srcdir@&$ac_abs_srcdir&;t t
51748s&@top_srcdir@&$ac_top_srcdir&;t t
51749s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
51750s&@builddir@&$ac_builddir&;t t
51751s&@abs_builddir@&$ac_abs_builddir&;t t
51752s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
51753$ac_datarootdir_hack
51754"
51755eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
51756  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51757
51758test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
51759  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
51760  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
51761      "$ac_tmp/out"`; test -z "$ac_out"; } &&
51762  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
51763which seems to be undefined.  Please make sure it is defined" >&5
51764$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
51765which seems to be undefined.  Please make sure it is defined" >&2;}
51766
51767  rm -f "$ac_tmp/stdin"
51768  case $ac_file in
51769  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
51770  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
51771  esac \
51772  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51773 ;;
51774  :H)
51775  #
51776  # CONFIG_HEADER
51777  #
51778  if test x"$ac_file" != x-; then
51779    {
51780      $as_echo "/* $configure_input  */" \
51781      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
51782    } >"$ac_tmp/config.h" \
51783      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51784    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
51785      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
51786$as_echo "$as_me: $ac_file is unchanged" >&6;}
51787    else
51788      rm -f "$ac_file"
51789      mv "$ac_tmp/config.h" "$ac_file" \
51790	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
51791    fi
51792  else
51793    $as_echo "/* $configure_input  */" \
51794      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
51795      || as_fn_error $? "could not create -" "$LINENO" 5
51796  fi
51797 ;;
51798
51799
51800  esac
51801
51802done # for ac_tag
51803
51804
51805as_fn_exit 0
51806_ACEOF
51807ac_clean_files=$ac_clean_files_save
51808
51809test $ac_write_fail = 0 ||
51810  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
51811
51812
51813# configure is writing to config.log, and then calls config.status.
51814# config.status does its own redirection, appending to config.log.
51815# Unfortunately, on DOS this fails, as config.log is still kept open
51816# by configure, so config.status won't be able to write to it; its
51817# output is simply discarded.  So we exec the FD to /dev/null,
51818# effectively closing config.log, so it can be properly (re)opened and
51819# appended to by config.status.  When coming back to configure, we
51820# need to make the FD available again.
51821if test "$no_create" != yes; then
51822  ac_cs_success=:
51823  ac_config_status_args=
51824  test "$silent" = yes &&
51825    ac_config_status_args="$ac_config_status_args --quiet"
51826  exec 5>/dev/null
51827  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
51828  exec 5>>config.log
51829  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
51830  # would make configure fail if this is the last instruction.
51831  $ac_cs_success || as_fn_exit 1
51832fi
51833if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
51834  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
51835$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
51836fi
51837
51838
51839# Try to move the config.log file to the output directory.
51840if test -e ./config.log; then
51841  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
51842fi
51843
51844# Make the compare script executable
51845$CHMOD +x $OUTPUT_ROOT/compare.sh
51846
51847# Finally output some useful information to the user
51848
51849  # Finally output some useful information to the user
51850
51851  printf "\n"
51852  printf "====================================================\n"
51853  if test "x$no_create" != "xyes"; then
51854    if test "x$IS_RECONFIGURE" != "xyes"; then
51855      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
51856    else
51857      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
51858    fi
51859  else
51860    if test "x$IS_RECONFIGURE" != "xyes"; then
51861      printf "A configuration has been successfully checked but not created\n"
51862    else
51863      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
51864    fi
51865  fi
51866  if test "x$CONFIGURE_COMMAND_LINE" != x; then
51867    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
51868  else
51869    printf "using default settings.\n"
51870  fi
51871
51872  printf "\n"
51873  printf "Configuration summary:\n"
51874  printf "* Debug level:    $DEBUG_LEVEL\n"
51875  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
51876  printf "* JDK variant:    $JDK_VARIANT\n"
51877  printf "* JVM variants:   $with_jvm_variants\n"
51878  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
51879
51880  printf "\n"
51881  printf "Tools summary:\n"
51882  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
51883    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
51884  fi
51885  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
51886  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
51887  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
51888  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
51889
51890  printf "\n"
51891  printf "Build performance summary:\n"
51892  printf "* Cores to use:   $JOBS\n"
51893  printf "* Memory limit:   $MEMORY_SIZE MB\n"
51894  if test "x$CCACHE_STATUS" != "x"; then
51895    printf "* ccache status:  $CCACHE_STATUS\n"
51896  fi
51897  printf "\n"
51898
51899  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
51900    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
51901    printf "will result in longer build times.\n"
51902    printf "\n"
51903  fi
51904
51905  if test "x$FOUND_ALT_VARIABLES" != "x"; then
51906    printf "WARNING: You have old-style ALT_ environment variables set.\n"
51907    printf "These are not respected, and will be ignored. It is recommended\n"
51908    printf "that you clean your environment. The following variables are set:\n"
51909    printf "$FOUND_ALT_VARIABLES\n"
51910    printf "\n"
51911  fi
51912
51913  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
51914    printf "WARNING: Your build output directory is not on a local disk.\n"
51915    printf "This will severely degrade build performance!\n"
51916    printf "It is recommended that you create an output directory on a local disk,\n"
51917    printf "and run the configure script again from that directory.\n"
51918    printf "\n"
51919  fi
51920
51921  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
51922    printf "WARNING: The result of this configuration has overridden an older\n"
51923    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
51924    printf "proper build. Failure to do so might result in strange build problems.\n"
51925    printf "\n"
51926  fi
51927
51928  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
51929    printf "WARNING: The result of this configuration was not saved.\n"
51930    printf "You should run without '--no-create | -n' to create the configuration.\n"
51931    printf "\n"
51932  fi
51933
51934