generated-configure.sh revision 1120:ba5645f2735b
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_API
924OPENJDK_TARGET_OS
925OPENJDK_BUILD_CPU_ENDIAN
926OPENJDK_BUILD_CPU_BITS
927OPENJDK_BUILD_CPU_ARCH
928OPENJDK_BUILD_CPU
929OPENJDK_BUILD_OS_API
930OPENJDK_BUILD_OS
931OPENJDK_BUILD_AUTOCONF_NAME
932OPENJDK_TARGET_AUTOCONF_NAME
933target_os
934target_vendor
935target_cpu
936target
937host_os
938host_vendor
939host_cpu
940host
941build_os
942build_vendor
943build_cpu
944build
945SETFILE
946DF
947READLINK
948CYGPATH
949SED
950FGREP
951EGREP
952GREP
953AWK
954XARGS
955WHICH
956WC
957UNIQ
958UNAME
959TR
960TOUCH
961TEE
962TAR
963TAIL
964SORT
965SH
966RM
967PRINTF
968NAWK
969MV
970MKTEMP
971MKDIR
972LS
973LN
974HEAD
975FIND
976FILE
977EXPR
978ECHO
979DIRNAME
980DIFF
981DATE
982CUT
983CPIO
984CP
985COMM
986CMP
987CHMOD
988CAT
989BASH
990BASENAME
991DATE_WHEN_CONFIGURED
992CONFIGURE_COMMAND_LINE
993target_alias
994host_alias
995build_alias
996LIBS
997ECHO_T
998ECHO_N
999ECHO_C
1000DEFS
1001mandir
1002localedir
1003libdir
1004psdir
1005pdfdir
1006dvidir
1007htmldir
1008infodir
1009docdir
1010oldincludedir
1011includedir
1012localstatedir
1013sharedstatedir
1014sysconfdir
1015datadir
1016datarootdir
1017libexecdir
1018sbindir
1019bindir
1020program_transform_name
1021prefix
1022exec_prefix
1023PACKAGE_URL
1024PACKAGE_BUGREPORT
1025PACKAGE_STRING
1026PACKAGE_VERSION
1027PACKAGE_TARNAME
1028PACKAGE_NAME
1029PATH_SEPARATOR
1030SHELL'
1031ac_subst_files=''
1032ac_user_opts='
1033enable_option_checking
1034with_target_bits
1035enable_openjdk_only
1036with_custom_make_dir
1037with_jdk_variant
1038with_jvm_interpreter
1039with_jvm_variants
1040enable_debug
1041with_debug_level
1042with_devkit
1043with_sys_root
1044with_sysroot
1045with_tools_dir
1046with_toolchain_path
1047with_extra_path
1048with_sdk_name
1049with_conf_name
1050with_output_sync
1051with_builddeps_conf
1052with_builddeps_server
1053with_builddeps_dir
1054with_builddeps_group
1055enable_headful
1056enable_hotspot_test_in_build
1057with_cacerts_file
1058enable_unlimited_crypto
1059enable_rmiconnector_iiop
1060with_milestone
1061with_update_version
1062with_user_release_suffix
1063with_build_number
1064with_boot_jdk
1065with_boot_jdk_jvmargs
1066with_add_source_root
1067with_override_source_root
1068with_adds_and_overrides
1069with_override_langtools
1070with_override_corba
1071with_override_jaxp
1072with_override_jaxws
1073with_override_hotspot
1074with_override_nashorn
1075with_override_jdk
1076with_import_hotspot
1077with_toolchain_type
1078with_jtreg
1079with_extra_cflags
1080with_extra_cxxflags
1081with_extra_ldflags
1082enable_debug_symbols
1083enable_zip_debug_info
1084with_x
1085with_cups
1086with_cups_include
1087with_freetype
1088with_freetype_include
1089with_freetype_lib
1090enable_freetype_bundling
1091with_alsa
1092with_alsa_include
1093with_alsa_lib
1094with_libjpeg
1095with_giflib
1096with_lcms
1097with_libpng
1098with_zlib
1099with_stdc__lib
1100with_msvcr_dll
1101with_dxsdk
1102with_dxsdk_lib
1103with_dxsdk_include
1104with_num_cores
1105with_memory_size
1106with_jobs
1107with_sjavac_server_java
1108enable_sjavac
1109enable_precompiled_headers
1110enable_ccache
1111with_ccache_dir
1112'
1113      ac_precious_vars='build_alias
1114host_alias
1115target_alias
1116BASENAME
1117BASH
1118CAT
1119CHMOD
1120CMP
1121COMM
1122CP
1123CPIO
1124CUT
1125DATE
1126DIFF
1127DIRNAME
1128ECHO
1129EXPR
1130FILE
1131FIND
1132HEAD
1133LN
1134LS
1135MKDIR
1136MKTEMP
1137MV
1138NAWK
1139PRINTF
1140RM
1141SH
1142SORT
1143TAIL
1144TAR
1145TEE
1146TOUCH
1147TR
1148UNAME
1149UNIQ
1150WC
1151WHICH
1152XARGS
1153AWK
1154GREP
1155EGREP
1156FGREP
1157SED
1158CYGPATH
1159READLINK
1160DF
1161SETFILE
1162UNZIP
1163ZIP
1164LDD
1165OTOOL
1166READELF
1167HG
1168STAT
1169TIME
1170DSYMUTIL
1171XATTR
1172CODESIGN
1173PKG_CONFIG
1174JAVA
1175JAVAC
1176JAVAH
1177JAR
1178NATIVE2ASCII
1179JARSIGNER
1180CC
1181CFLAGS
1182LDFLAGS
1183LIBS
1184CPPFLAGS
1185CXX
1186CXXFLAGS
1187CCC
1188CPP
1189CXXCPP
1190AS
1191AR
1192OBJC
1193OBJCFLAGS
1194LIPO
1195STRIP
1196NM
1197GNM
1198MCS
1199OBJCOPY
1200OBJDUMP
1201BUILD_CC
1202BUILD_CXX
1203BUILD_LD
1204JTREGEXE
1205XMKMF
1206FREETYPE_CFLAGS
1207FREETYPE_LIBS
1208ALSA_CFLAGS
1209ALSA_LIBS
1210LCMS_CFLAGS
1211LCMS_LIBS
1212PNG_CFLAGS
1213PNG_LIBS
1214LIBFFI_CFLAGS
1215LIBFFI_LIBS
1216CCACHE'
1217
1218
1219# Initialize some variables set by options.
1220ac_init_help=
1221ac_init_version=false
1222ac_unrecognized_opts=
1223ac_unrecognized_sep=
1224# The variables have the same names as the options, with
1225# dashes changed to underlines.
1226cache_file=/dev/null
1227exec_prefix=NONE
1228no_create=
1229no_recursion=
1230prefix=NONE
1231program_prefix=NONE
1232program_suffix=NONE
1233program_transform_name=s,x,x,
1234silent=
1235site=
1236srcdir=
1237verbose=
1238x_includes=NONE
1239x_libraries=NONE
1240
1241# Installation directory options.
1242# These are left unexpanded so users can "make install exec_prefix=/foo"
1243# and all the variables that are supposed to be based on exec_prefix
1244# by default will actually change.
1245# Use braces instead of parens because sh, perl, etc. also accept them.
1246# (The list follows the same order as the GNU Coding Standards.)
1247bindir='${exec_prefix}/bin'
1248sbindir='${exec_prefix}/sbin'
1249libexecdir='${exec_prefix}/libexec'
1250datarootdir='${prefix}/share'
1251datadir='${datarootdir}'
1252sysconfdir='${prefix}/etc'
1253sharedstatedir='${prefix}/com'
1254localstatedir='${prefix}/var'
1255includedir='${prefix}/include'
1256oldincludedir='/usr/include'
1257docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1258infodir='${datarootdir}/info'
1259htmldir='${docdir}'
1260dvidir='${docdir}'
1261pdfdir='${docdir}'
1262psdir='${docdir}'
1263libdir='${exec_prefix}/lib'
1264localedir='${datarootdir}/locale'
1265mandir='${datarootdir}/man'
1266
1267ac_prev=
1268ac_dashdash=
1269for ac_option
1270do
1271  # If the previous option needs an argument, assign it.
1272  if test -n "$ac_prev"; then
1273    eval $ac_prev=\$ac_option
1274    ac_prev=
1275    continue
1276  fi
1277
1278  case $ac_option in
1279  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1280  *=)   ac_optarg= ;;
1281  *)    ac_optarg=yes ;;
1282  esac
1283
1284  # Accept the important Cygnus configure options, so we can diagnose typos.
1285
1286  case $ac_dashdash$ac_option in
1287  --)
1288    ac_dashdash=yes ;;
1289
1290  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1291    ac_prev=bindir ;;
1292  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1293    bindir=$ac_optarg ;;
1294
1295  -build | --build | --buil | --bui | --bu)
1296    ac_prev=build_alias ;;
1297  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1298    build_alias=$ac_optarg ;;
1299
1300  -cache-file | --cache-file | --cache-fil | --cache-fi \
1301  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1302    ac_prev=cache_file ;;
1303  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1304  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1305    cache_file=$ac_optarg ;;
1306
1307  --config-cache | -C)
1308    cache_file=config.cache ;;
1309
1310  -datadir | --datadir | --datadi | --datad)
1311    ac_prev=datadir ;;
1312  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1313    datadir=$ac_optarg ;;
1314
1315  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1316  | --dataroo | --dataro | --datar)
1317    ac_prev=datarootdir ;;
1318  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1319  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1320    datarootdir=$ac_optarg ;;
1321
1322  -disable-* | --disable-*)
1323    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1324    # Reject names that are not valid shell variable names.
1325    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1326      as_fn_error $? "invalid feature name: $ac_useropt"
1327    ac_useropt_orig=$ac_useropt
1328    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1329    case $ac_user_opts in
1330      *"
1331"enable_$ac_useropt"
1332"*) ;;
1333      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1334	 ac_unrecognized_sep=', ';;
1335    esac
1336    eval enable_$ac_useropt=no ;;
1337
1338  -docdir | --docdir | --docdi | --doc | --do)
1339    ac_prev=docdir ;;
1340  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1341    docdir=$ac_optarg ;;
1342
1343  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1344    ac_prev=dvidir ;;
1345  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1346    dvidir=$ac_optarg ;;
1347
1348  -enable-* | --enable-*)
1349    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1350    # Reject names that are not valid shell variable names.
1351    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1352      as_fn_error $? "invalid feature name: $ac_useropt"
1353    ac_useropt_orig=$ac_useropt
1354    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1355    case $ac_user_opts in
1356      *"
1357"enable_$ac_useropt"
1358"*) ;;
1359      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1360	 ac_unrecognized_sep=', ';;
1361    esac
1362    eval enable_$ac_useropt=\$ac_optarg ;;
1363
1364  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1365  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1366  | --exec | --exe | --ex)
1367    ac_prev=exec_prefix ;;
1368  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1369  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1370  | --exec=* | --exe=* | --ex=*)
1371    exec_prefix=$ac_optarg ;;
1372
1373  -gas | --gas | --ga | --g)
1374    # Obsolete; use --with-gas.
1375    with_gas=yes ;;
1376
1377  -help | --help | --hel | --he | -h)
1378    ac_init_help=long ;;
1379  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1380    ac_init_help=recursive ;;
1381  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1382    ac_init_help=short ;;
1383
1384  -host | --host | --hos | --ho)
1385    ac_prev=host_alias ;;
1386  -host=* | --host=* | --hos=* | --ho=*)
1387    host_alias=$ac_optarg ;;
1388
1389  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1390    ac_prev=htmldir ;;
1391  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1392  | --ht=*)
1393    htmldir=$ac_optarg ;;
1394
1395  -includedir | --includedir | --includedi | --included | --include \
1396  | --includ | --inclu | --incl | --inc)
1397    ac_prev=includedir ;;
1398  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1399  | --includ=* | --inclu=* | --incl=* | --inc=*)
1400    includedir=$ac_optarg ;;
1401
1402  -infodir | --infodir | --infodi | --infod | --info | --inf)
1403    ac_prev=infodir ;;
1404  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1405    infodir=$ac_optarg ;;
1406
1407  -libdir | --libdir | --libdi | --libd)
1408    ac_prev=libdir ;;
1409  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1410    libdir=$ac_optarg ;;
1411
1412  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1413  | --libexe | --libex | --libe)
1414    ac_prev=libexecdir ;;
1415  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1416  | --libexe=* | --libex=* | --libe=*)
1417    libexecdir=$ac_optarg ;;
1418
1419  -localedir | --localedir | --localedi | --localed | --locale)
1420    ac_prev=localedir ;;
1421  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1422    localedir=$ac_optarg ;;
1423
1424  -localstatedir | --localstatedir | --localstatedi | --localstated \
1425  | --localstate | --localstat | --localsta | --localst | --locals)
1426    ac_prev=localstatedir ;;
1427  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1428  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1429    localstatedir=$ac_optarg ;;
1430
1431  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1432    ac_prev=mandir ;;
1433  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1434    mandir=$ac_optarg ;;
1435
1436  -nfp | --nfp | --nf)
1437    # Obsolete; use --without-fp.
1438    with_fp=no ;;
1439
1440  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1441  | --no-cr | --no-c | -n)
1442    no_create=yes ;;
1443
1444  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1445  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1446    no_recursion=yes ;;
1447
1448  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1449  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1450  | --oldin | --oldi | --old | --ol | --o)
1451    ac_prev=oldincludedir ;;
1452  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1453  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1454  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1455    oldincludedir=$ac_optarg ;;
1456
1457  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1458    ac_prev=prefix ;;
1459  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1460    prefix=$ac_optarg ;;
1461
1462  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1463  | --program-pre | --program-pr | --program-p)
1464    ac_prev=program_prefix ;;
1465  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1466  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1467    program_prefix=$ac_optarg ;;
1468
1469  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1470  | --program-suf | --program-su | --program-s)
1471    ac_prev=program_suffix ;;
1472  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1473  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1474    program_suffix=$ac_optarg ;;
1475
1476  -program-transform-name | --program-transform-name \
1477  | --program-transform-nam | --program-transform-na \
1478  | --program-transform-n | --program-transform- \
1479  | --program-transform | --program-transfor \
1480  | --program-transfo | --program-transf \
1481  | --program-trans | --program-tran \
1482  | --progr-tra | --program-tr | --program-t)
1483    ac_prev=program_transform_name ;;
1484  -program-transform-name=* | --program-transform-name=* \
1485  | --program-transform-nam=* | --program-transform-na=* \
1486  | --program-transform-n=* | --program-transform-=* \
1487  | --program-transform=* | --program-transfor=* \
1488  | --program-transfo=* | --program-transf=* \
1489  | --program-trans=* | --program-tran=* \
1490  | --progr-tra=* | --program-tr=* | --program-t=*)
1491    program_transform_name=$ac_optarg ;;
1492
1493  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1494    ac_prev=pdfdir ;;
1495  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1496    pdfdir=$ac_optarg ;;
1497
1498  -psdir | --psdir | --psdi | --psd | --ps)
1499    ac_prev=psdir ;;
1500  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1501    psdir=$ac_optarg ;;
1502
1503  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1504  | -silent | --silent | --silen | --sile | --sil)
1505    silent=yes ;;
1506
1507  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1508    ac_prev=sbindir ;;
1509  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1510  | --sbi=* | --sb=*)
1511    sbindir=$ac_optarg ;;
1512
1513  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1514  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1515  | --sharedst | --shareds | --shared | --share | --shar \
1516  | --sha | --sh)
1517    ac_prev=sharedstatedir ;;
1518  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1519  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1520  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1521  | --sha=* | --sh=*)
1522    sharedstatedir=$ac_optarg ;;
1523
1524  -site | --site | --sit)
1525    ac_prev=site ;;
1526  -site=* | --site=* | --sit=*)
1527    site=$ac_optarg ;;
1528
1529  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1530    ac_prev=srcdir ;;
1531  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1532    srcdir=$ac_optarg ;;
1533
1534  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1535  | --syscon | --sysco | --sysc | --sys | --sy)
1536    ac_prev=sysconfdir ;;
1537  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1538  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1539    sysconfdir=$ac_optarg ;;
1540
1541  -target | --target | --targe | --targ | --tar | --ta | --t)
1542    ac_prev=target_alias ;;
1543  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1544    target_alias=$ac_optarg ;;
1545
1546  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1547    verbose=yes ;;
1548
1549  -version | --version | --versio | --versi | --vers | -V)
1550    ac_init_version=: ;;
1551
1552  -with-* | --with-*)
1553    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1554    # Reject names that are not valid shell variable names.
1555    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1556      as_fn_error $? "invalid package name: $ac_useropt"
1557    ac_useropt_orig=$ac_useropt
1558    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1559    case $ac_user_opts in
1560      *"
1561"with_$ac_useropt"
1562"*) ;;
1563      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1564	 ac_unrecognized_sep=', ';;
1565    esac
1566    eval with_$ac_useropt=\$ac_optarg ;;
1567
1568  -without-* | --without-*)
1569    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1570    # Reject names that are not valid shell variable names.
1571    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1572      as_fn_error $? "invalid package name: $ac_useropt"
1573    ac_useropt_orig=$ac_useropt
1574    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1575    case $ac_user_opts in
1576      *"
1577"with_$ac_useropt"
1578"*) ;;
1579      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1580	 ac_unrecognized_sep=', ';;
1581    esac
1582    eval with_$ac_useropt=no ;;
1583
1584  --x)
1585    # Obsolete; use --with-x.
1586    with_x=yes ;;
1587
1588  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1589  | --x-incl | --x-inc | --x-in | --x-i)
1590    ac_prev=x_includes ;;
1591  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1592  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1593    x_includes=$ac_optarg ;;
1594
1595  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1596  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1597    ac_prev=x_libraries ;;
1598  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1599  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1600    x_libraries=$ac_optarg ;;
1601
1602  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1603Try \`$0 --help' for more information"
1604    ;;
1605
1606  *=*)
1607    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1608    # Reject names that are not valid shell variable names.
1609    case $ac_envvar in #(
1610      '' | [0-9]* | *[!_$as_cr_alnum]* )
1611      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1612    esac
1613    eval $ac_envvar=\$ac_optarg
1614    export $ac_envvar ;;
1615
1616  *)
1617    # FIXME: should be removed in autoconf 3.0.
1618    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1619    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1620      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1621    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1622    ;;
1623
1624  esac
1625done
1626
1627if test -n "$ac_prev"; then
1628  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1629  as_fn_error $? "missing argument to $ac_option"
1630fi
1631
1632if test -n "$ac_unrecognized_opts"; then
1633  case $enable_option_checking in
1634    no) ;;
1635    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1636    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1637  esac
1638fi
1639
1640# Check all directory arguments for consistency.
1641for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1642		datadir sysconfdir sharedstatedir localstatedir includedir \
1643		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1644		libdir localedir mandir
1645do
1646  eval ac_val=\$$ac_var
1647  # Remove trailing slashes.
1648  case $ac_val in
1649    */ )
1650      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1651      eval $ac_var=\$ac_val;;
1652  esac
1653  # Be sure to have absolute directory names.
1654  case $ac_val in
1655    [\\/$]* | ?:[\\/]* )  continue;;
1656    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1657  esac
1658  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1659done
1660
1661# There might be people who depend on the old broken behavior: `$host'
1662# used to hold the argument of --host etc.
1663# FIXME: To remove some day.
1664build=$build_alias
1665host=$host_alias
1666target=$target_alias
1667
1668# FIXME: To remove some day.
1669if test "x$host_alias" != x; then
1670  if test "x$build_alias" = x; then
1671    cross_compiling=maybe
1672  elif test "x$build_alias" != "x$host_alias"; then
1673    cross_compiling=yes
1674  fi
1675fi
1676
1677ac_tool_prefix=
1678test -n "$host_alias" && ac_tool_prefix=$host_alias-
1679
1680test "$silent" = yes && exec 6>/dev/null
1681
1682
1683ac_pwd=`pwd` && test -n "$ac_pwd" &&
1684ac_ls_di=`ls -di .` &&
1685ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1686  as_fn_error $? "working directory cannot be determined"
1687test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1688  as_fn_error $? "pwd does not report name of working directory"
1689
1690
1691# Find the source files, if location was not specified.
1692if test -z "$srcdir"; then
1693  ac_srcdir_defaulted=yes
1694  # Try the directory containing this script, then the parent directory.
1695  ac_confdir=`$as_dirname -- "$as_myself" ||
1696$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1697	 X"$as_myself" : 'X\(//\)[^/]' \| \
1698	 X"$as_myself" : 'X\(//\)$' \| \
1699	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1700$as_echo X"$as_myself" |
1701    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1702	    s//\1/
1703	    q
1704	  }
1705	  /^X\(\/\/\)[^/].*/{
1706	    s//\1/
1707	    q
1708	  }
1709	  /^X\(\/\/\)$/{
1710	    s//\1/
1711	    q
1712	  }
1713	  /^X\(\/\).*/{
1714	    s//\1/
1715	    q
1716	  }
1717	  s/.*/./; q'`
1718  srcdir=$ac_confdir
1719  if test ! -r "$srcdir/$ac_unique_file"; then
1720    srcdir=..
1721  fi
1722else
1723  ac_srcdir_defaulted=no
1724fi
1725if test ! -r "$srcdir/$ac_unique_file"; then
1726  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1727  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1728fi
1729ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1730ac_abs_confdir=`(
1731	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1732	pwd)`
1733# When building in place, set srcdir=.
1734if test "$ac_abs_confdir" = "$ac_pwd"; then
1735  srcdir=.
1736fi
1737# Remove unnecessary trailing slashes from srcdir.
1738# Double slashes in file names in object file debugging info
1739# mess up M-x gdb in Emacs.
1740case $srcdir in
1741*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1742esac
1743for ac_var in $ac_precious_vars; do
1744  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1745  eval ac_env_${ac_var}_value=\$${ac_var}
1746  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1747  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1748done
1749
1750#
1751# Report the --help message.
1752#
1753if test "$ac_init_help" = "long"; then
1754  # Omit some internal or obsolete options to make the list less imposing.
1755  # This message is too long to be a string in the A/UX 3.1 sh.
1756  cat <<_ACEOF
1757\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1758
1759Usage: $0 [OPTION]... [VAR=VALUE]...
1760
1761To assign environment variables (e.g., CC, CFLAGS...), specify them as
1762VAR=VALUE.  See below for descriptions of some of the useful variables.
1763
1764Defaults for the options are specified in brackets.
1765
1766Configuration:
1767  -h, --help              display this help and exit
1768      --help=short        display options specific to this package
1769      --help=recursive    display the short help of all the included packages
1770  -V, --version           display version information and exit
1771  -q, --quiet, --silent   do not print \`checking ...' messages
1772      --cache-file=FILE   cache test results in FILE [disabled]
1773  -C, --config-cache      alias for \`--cache-file=config.cache'
1774  -n, --no-create         do not create output files
1775      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1776
1777Installation directories:
1778  --prefix=PREFIX         install architecture-independent files in PREFIX
1779                          [$ac_default_prefix]
1780  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1781                          [PREFIX]
1782
1783By default, \`make install' will install all the files in
1784\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1785an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1786for instance \`--prefix=\$HOME'.
1787
1788For better control, use the options below.
1789
1790Fine tuning of the installation directories:
1791  --bindir=DIR            user executables [EPREFIX/bin]
1792  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1793  --libexecdir=DIR        program executables [EPREFIX/libexec]
1794  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1795  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1796  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1797  --libdir=DIR            object code libraries [EPREFIX/lib]
1798  --includedir=DIR        C header files [PREFIX/include]
1799  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1800  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1801  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1802  --infodir=DIR           info documentation [DATAROOTDIR/info]
1803  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1804  --mandir=DIR            man documentation [DATAROOTDIR/man]
1805  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1806  --htmldir=DIR           html documentation [DOCDIR]
1807  --dvidir=DIR            dvi documentation [DOCDIR]
1808  --pdfdir=DIR            pdf documentation [DOCDIR]
1809  --psdir=DIR             ps documentation [DOCDIR]
1810_ACEOF
1811
1812  cat <<\_ACEOF
1813
1814X features:
1815  --x-includes=DIR    X include files are in DIR
1816  --x-libraries=DIR   X library files are in DIR
1817
1818System types:
1819  --build=BUILD     configure for building on BUILD [guessed]
1820  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1821  --target=TARGET   configure for building compilers for TARGET [HOST]
1822_ACEOF
1823fi
1824
1825if test -n "$ac_init_help"; then
1826  case $ac_init_help in
1827     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1828   esac
1829  cat <<\_ACEOF
1830
1831Optional Features:
1832  --disable-option-checking  ignore unrecognized --enable/--with options
1833  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1834  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1835  --enable-openjdk-only   suppress building custom source even if present
1836                          [disabled]
1837  --enable-debug          set the debug level to fastdebug (shorthand for
1838                          --with-debug-level=fastdebug) [disabled]
1839  --disable-headful       disable building headful support (graphical UI
1840                          support) [enabled]
1841  --enable-hotspot-test-in-build
1842                          run the Queens test after Hotspot build [disabled]
1843  --enable-unlimited-crypto
1844                          Enable unlimited crypto policy [disabled]
1845  --enable-rmiconnector-iiop
1846                          enable the JMX RMIConnector iiop transport
1847                          [disabled]
1848  --disable-debug-symbols disable generation of debug symbols [enabled]
1849  --disable-zip-debug-info
1850                          disable zipping of debug-info files [enabled]
1851  --disable-freetype-bundling
1852                          disable bundling of the freetype library with the
1853                          build result [enabled on Windows or when using
1854                          --with-freetype, disabled otherwise]
1855  --enable-sjavac         use sjavac to do fast incremental compiles
1856                          [disabled]
1857  --disable-precompiled-headers
1858                          disable using precompiled headers when compiling C++
1859                          [enabled]
1860  --enable-ccache         enable using ccache to speed up recompilations
1861                          [disabled]
1862
1863Optional Packages:
1864  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1865  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1866  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1867                          support it), e.g. --with-target-bits=32 [guessed]
1868  --with-custom-make-dir  Deprecated. Option is kept for backwards
1869                          compatibility and is ignored
1870  --with-jdk-variant      JDK variant to build (normal) [normal]
1871  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1872  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1873                          client, minimal1, kernel, zero, zeroshark, core)
1874                          [server]
1875  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1876                          optimized (HotSpot build only)) [release]
1877  --with-devkit           use this devkit for compilers, tools and resources
1878  --with-sys-root         alias for --with-sysroot for backwards compatability
1879  --with-sysroot          use this directory as sysroot
1880  --with-tools-dir        alias for --with-toolchain-path for backwards
1881                          compatibility
1882  --with-toolchain-path   prepend these directories when searching for
1883                          toolchain binaries (compilers etc)
1884  --with-extra-path       prepend these directories to the default path
1885  --with-sdk-name         use the platform SDK of the given name. [macosx]
1886  --with-conf-name        use this as the name of the configuration [generated
1887                          from important configuration options]
1888  --with-output-sync      set make output sync type if supported by make.
1889                          [recurse]
1890  --with-builddeps-conf   use this configuration file for the builddeps
1891  --with-builddeps-server download and use build dependencies from this server
1892                          url
1893  --with-builddeps-dir    store downloaded build dependencies here
1894                          [/localhome/builddeps]
1895  --with-builddeps-group  chgrp the downloaded build dependencies to this
1896                          group
1897  --with-cacerts-file     specify alternative cacerts file
1898  --with-milestone        Set milestone value for build [internal]
1899  --with-update-version   Set update version value for build [b00]
1900  --with-user-release-suffix
1901                          Add a custom string to the version string if build
1902                          number is not set.[username_builddateb00]
1903  --with-build-number     Set build number value for build [b00]
1904  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1905  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1906                          invocations of boot JDK, overriding the default
1907                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1908                          -enableassertions"
1909  --with-add-source-root  for each and every source directory, look in this
1910                          additional source root for the same directory; if it
1911                          exists and have files in it, include it in the build
1912  --with-override-source-root
1913                          for each and every source directory, look in this
1914                          override source root for the same directory; if it
1915                          exists, use that directory instead and ignore the
1916                          directory in the original source root
1917  --with-adds-and-overrides
1918                          use the subdirs 'adds' and 'overrides' in the
1919                          specified directory as add-source-root and
1920                          override-source-root
1921  --with-override-langtools
1922                          use this langtools dir for the build
1923  --with-override-corba   use this corba dir for the build
1924  --with-override-jaxp    use this jaxp dir for the build
1925  --with-override-jaxws   use this jaxws dir for the build
1926  --with-override-hotspot use this hotspot dir for the build
1927  --with-override-nashorn use this nashorn dir for the build
1928  --with-override-jdk     use this jdk dir for the build
1929  --with-import-hotspot   import hotspot binaries from this jdk image or
1930                          hotspot build dist dir instead of building from
1931                          source
1932  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1933                          to show possible values [platform dependent]
1934  --with-jtreg            Regression Test Harness [probed]
1935  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1936  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1937  --with-extra-ldflags    extra flags to be used when linking jdk
1938  --with-x                use the X Window System
1939  --with-cups             specify prefix directory for the cups package
1940                          (expecting the headers under PATH/include)
1941  --with-cups-include     specify directory for the cups include files
1942  --with-freetype         specify prefix directory for the freetype package
1943                          (expecting the libraries under PATH/lib and the
1944                          headers under PATH/include)
1945  --with-freetype-include specify directory for the freetype include files
1946  --with-freetype-lib     specify directory for the freetype library
1947  --with-alsa             specify prefix directory for the alsa package
1948                          (expecting the libraries under PATH/lib and the
1949                          headers under PATH/include)
1950  --with-alsa-include     specify directory for the alsa include files
1951  --with-alsa-lib         specify directory for the alsa library
1952  --with-libjpeg          use libjpeg from build system or OpenJDK source
1953                          (system, bundled) [bundled]
1954  --with-giflib           use giflib from build system or OpenJDK source
1955                          (system, bundled) [bundled]
1956  --with-lcms             use lcms2 from build system or OpenJDK source
1957                          (system, bundled) [bundled]
1958  --with-libpng           use libpng from build system or OpenJDK source
1959                          (system, bundled) [bundled]
1960  --with-zlib             use zlib from build system or OpenJDK source
1961                          (system, bundled) [bundled]
1962  --with-stdc++lib=<static>,<dynamic>,<default>
1963                          force linking of the C++ runtime on Linux to either
1964                          static or dynamic, default is static with dynamic as
1965                          fallback
1966  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1967                          only) [probed]
1968  --with-dxsdk            Deprecated. Option is kept for backwards
1969                          compatibility and is ignored
1970  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1971                          compatibility and is ignored
1972  --with-dxsdk-include    Deprecated. Option is kept for backwards
1973                          compatibility and is ignored
1974  --with-num-cores        number of cores in the build system, e.g.
1975                          --with-num-cores=8 [probed]
1976  --with-memory-size      memory (in MB) available in the build system, e.g.
1977                          --with-memory-size=1024 [probed]
1978  --with-jobs             number of parallel jobs to let make run [calculated
1979                          based on cores and memory]
1980  --with-sjavac-server-java
1981                          use this java binary for running the sjavac
1982                          background server [Boot JDK java]
1983  --with-ccache-dir       where to store ccache files [~/.ccache]
1984
1985Some influential environment variables:
1986  BASENAME    Override default value for BASENAME
1987  BASH        Override default value for BASH
1988  CAT         Override default value for CAT
1989  CHMOD       Override default value for CHMOD
1990  CMP         Override default value for CMP
1991  COMM        Override default value for COMM
1992  CP          Override default value for CP
1993  CPIO        Override default value for CPIO
1994  CUT         Override default value for CUT
1995  DATE        Override default value for DATE
1996  DIFF        Override default value for DIFF
1997  DIRNAME     Override default value for DIRNAME
1998  ECHO        Override default value for ECHO
1999  EXPR        Override default value for EXPR
2000  FILE        Override default value for FILE
2001  FIND        Override default value for FIND
2002  HEAD        Override default value for HEAD
2003  LN          Override default value for LN
2004  LS          Override default value for LS
2005  MKDIR       Override default value for MKDIR
2006  MKTEMP      Override default value for MKTEMP
2007  MV          Override default value for MV
2008  NAWK        Override default value for NAWK
2009  PRINTF      Override default value for PRINTF
2010  RM          Override default value for RM
2011  SH          Override default value for SH
2012  SORT        Override default value for SORT
2013  TAIL        Override default value for TAIL
2014  TAR         Override default value for TAR
2015  TEE         Override default value for TEE
2016  TOUCH       Override default value for TOUCH
2017  TR          Override default value for TR
2018  UNAME       Override default value for UNAME
2019  UNIQ        Override default value for UNIQ
2020  WC          Override default value for WC
2021  WHICH       Override default value for WHICH
2022  XARGS       Override default value for XARGS
2023  AWK         Override default value for AWK
2024  GREP        Override default value for GREP
2025  EGREP       Override default value for EGREP
2026  FGREP       Override default value for FGREP
2027  SED         Override default value for SED
2028  CYGPATH     Override default value for CYGPATH
2029  READLINK    Override default value for READLINK
2030  DF          Override default value for DF
2031  SETFILE     Override default value for SETFILE
2032  UNZIP       Override default value for UNZIP
2033  ZIP         Override default value for ZIP
2034  LDD         Override default value for LDD
2035  OTOOL       Override default value for OTOOL
2036  READELF     Override default value for READELF
2037  HG          Override default value for HG
2038  STAT        Override default value for STAT
2039  TIME        Override default value for TIME
2040  DSYMUTIL    Override default value for DSYMUTIL
2041  XATTR       Override default value for XATTR
2042  CODESIGN    Override default value for CODESIGN
2043  PKG_CONFIG  path to pkg-config utility
2044  JAVA        Override default value for JAVA
2045  JAVAC       Override default value for JAVAC
2046  JAVAH       Override default value for JAVAH
2047  JAR         Override default value for JAR
2048  NATIVE2ASCII
2049              Override default value for NATIVE2ASCII
2050  JARSIGNER   Override default value for JARSIGNER
2051  CC          C compiler command
2052  CFLAGS      C compiler flags
2053  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2054              nonstandard directory <lib dir>
2055  LIBS        libraries to pass to the linker, e.g. -l<library>
2056  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2057              you have headers in a nonstandard directory <include dir>
2058  CXX         C++ compiler command
2059  CXXFLAGS    C++ compiler flags
2060  CPP         C preprocessor
2061  CXXCPP      C++ preprocessor
2062  AS          Override default value for AS
2063  AR          Override default value for AR
2064  OBJC        Objective C compiler command
2065  OBJCFLAGS   Objective C compiler flags
2066  LIPO        Override default value for LIPO
2067  STRIP       Override default value for STRIP
2068  NM          Override default value for NM
2069  GNM         Override default value for GNM
2070  MCS         Override default value for MCS
2071  OBJCOPY     Override default value for OBJCOPY
2072  OBJDUMP     Override default value for OBJDUMP
2073  BUILD_CC    Override default value for BUILD_CC
2074  BUILD_CXX   Override default value for BUILD_CXX
2075  BUILD_LD    Override default value for BUILD_LD
2076  JTREGEXE    Override default value for JTREGEXE
2077  XMKMF       Path to xmkmf, Makefile generator for X Window System
2078  FREETYPE_CFLAGS
2079              C compiler flags for FREETYPE, overriding pkg-config
2080  FREETYPE_LIBS
2081              linker flags for FREETYPE, overriding pkg-config
2082  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2083  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2084  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2085  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2086  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2087  PNG_LIBS    linker flags for PNG, overriding pkg-config
2088  LIBFFI_CFLAGS
2089              C compiler flags for LIBFFI, overriding pkg-config
2090  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2091  CCACHE      Override default value for CCACHE
2092
2093Use these variables to override the choices made by `configure' or to help
2094it to find libraries and programs with nonstandard names/locations.
2095
2096Report bugs to <build-dev@openjdk.java.net>.
2097OpenJDK home page: <http://openjdk.java.net>.
2098_ACEOF
2099ac_status=$?
2100fi
2101
2102if test "$ac_init_help" = "recursive"; then
2103  # If there are subdirs, report their specific --help.
2104  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2105    test -d "$ac_dir" ||
2106      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2107      continue
2108    ac_builddir=.
2109
2110case "$ac_dir" in
2111.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2112*)
2113  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2114  # A ".." for each directory in $ac_dir_suffix.
2115  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2116  case $ac_top_builddir_sub in
2117  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2118  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2119  esac ;;
2120esac
2121ac_abs_top_builddir=$ac_pwd
2122ac_abs_builddir=$ac_pwd$ac_dir_suffix
2123# for backward compatibility:
2124ac_top_builddir=$ac_top_build_prefix
2125
2126case $srcdir in
2127  .)  # We are building in place.
2128    ac_srcdir=.
2129    ac_top_srcdir=$ac_top_builddir_sub
2130    ac_abs_top_srcdir=$ac_pwd ;;
2131  [\\/]* | ?:[\\/]* )  # Absolute name.
2132    ac_srcdir=$srcdir$ac_dir_suffix;
2133    ac_top_srcdir=$srcdir
2134    ac_abs_top_srcdir=$srcdir ;;
2135  *) # Relative name.
2136    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2137    ac_top_srcdir=$ac_top_build_prefix$srcdir
2138    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2139esac
2140ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2141
2142    cd "$ac_dir" || { ac_status=$?; continue; }
2143    # Check for guested configure.
2144    if test -f "$ac_srcdir/configure.gnu"; then
2145      echo &&
2146      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2147    elif test -f "$ac_srcdir/configure"; then
2148      echo &&
2149      $SHELL "$ac_srcdir/configure" --help=recursive
2150    else
2151      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2152    fi || ac_status=$?
2153    cd "$ac_pwd" || { ac_status=$?; break; }
2154  done
2155fi
2156
2157test -n "$ac_init_help" && exit $ac_status
2158if $ac_init_version; then
2159  cat <<\_ACEOF
2160OpenJDK configure jdk9
2161generated by GNU Autoconf 2.69
2162
2163Copyright (C) 2012 Free Software Foundation, Inc.
2164This configure script is free software; the Free Software Foundation
2165gives unlimited permission to copy, distribute and modify it.
2166_ACEOF
2167  exit
2168fi
2169
2170## ------------------------ ##
2171## Autoconf initialization. ##
2172## ------------------------ ##
2173
2174# ac_fn_c_try_compile LINENO
2175# --------------------------
2176# Try to compile conftest.$ac_ext, and return whether this succeeded.
2177ac_fn_c_try_compile ()
2178{
2179  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2180  rm -f conftest.$ac_objext
2181  if { { ac_try="$ac_compile"
2182case "(($ac_try" in
2183  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2184  *) ac_try_echo=$ac_try;;
2185esac
2186eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2187$as_echo "$ac_try_echo"; } >&5
2188  (eval "$ac_compile") 2>conftest.err
2189  ac_status=$?
2190  if test -s conftest.err; then
2191    grep -v '^ *+' conftest.err >conftest.er1
2192    cat conftest.er1 >&5
2193    mv -f conftest.er1 conftest.err
2194  fi
2195  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2196  test $ac_status = 0; } && {
2197	 test -z "$ac_c_werror_flag" ||
2198	 test ! -s conftest.err
2199       } && test -s conftest.$ac_objext; then :
2200  ac_retval=0
2201else
2202  $as_echo "$as_me: failed program was:" >&5
2203sed 's/^/| /' conftest.$ac_ext >&5
2204
2205	ac_retval=1
2206fi
2207  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2208  as_fn_set_status $ac_retval
2209
2210} # ac_fn_c_try_compile
2211
2212# ac_fn_cxx_try_compile LINENO
2213# ----------------------------
2214# Try to compile conftest.$ac_ext, and return whether this succeeded.
2215ac_fn_cxx_try_compile ()
2216{
2217  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2218  rm -f conftest.$ac_objext
2219  if { { ac_try="$ac_compile"
2220case "(($ac_try" in
2221  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2222  *) ac_try_echo=$ac_try;;
2223esac
2224eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2225$as_echo "$ac_try_echo"; } >&5
2226  (eval "$ac_compile") 2>conftest.err
2227  ac_status=$?
2228  if test -s conftest.err; then
2229    grep -v '^ *+' conftest.err >conftest.er1
2230    cat conftest.er1 >&5
2231    mv -f conftest.er1 conftest.err
2232  fi
2233  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2234  test $ac_status = 0; } && {
2235	 test -z "$ac_cxx_werror_flag" ||
2236	 test ! -s conftest.err
2237       } && test -s conftest.$ac_objext; then :
2238  ac_retval=0
2239else
2240  $as_echo "$as_me: failed program was:" >&5
2241sed 's/^/| /' conftest.$ac_ext >&5
2242
2243	ac_retval=1
2244fi
2245  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2246  as_fn_set_status $ac_retval
2247
2248} # ac_fn_cxx_try_compile
2249
2250# ac_fn_c_try_cpp LINENO
2251# ----------------------
2252# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2253ac_fn_c_try_cpp ()
2254{
2255  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256  if { { ac_try="$ac_cpp conftest.$ac_ext"
2257case "(($ac_try" in
2258  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2259  *) ac_try_echo=$ac_try;;
2260esac
2261eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2262$as_echo "$ac_try_echo"; } >&5
2263  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2264  ac_status=$?
2265  if test -s conftest.err; then
2266    grep -v '^ *+' conftest.err >conftest.er1
2267    cat conftest.er1 >&5
2268    mv -f conftest.er1 conftest.err
2269  fi
2270  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2271  test $ac_status = 0; } > conftest.i && {
2272	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2273	 test ! -s conftest.err
2274       }; then :
2275  ac_retval=0
2276else
2277  $as_echo "$as_me: failed program was:" >&5
2278sed 's/^/| /' conftest.$ac_ext >&5
2279
2280    ac_retval=1
2281fi
2282  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2283  as_fn_set_status $ac_retval
2284
2285} # ac_fn_c_try_cpp
2286
2287# ac_fn_cxx_try_cpp LINENO
2288# ------------------------
2289# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2290ac_fn_cxx_try_cpp ()
2291{
2292  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2293  if { { ac_try="$ac_cpp conftest.$ac_ext"
2294case "(($ac_try" in
2295  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2296  *) ac_try_echo=$ac_try;;
2297esac
2298eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2299$as_echo "$ac_try_echo"; } >&5
2300  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2301  ac_status=$?
2302  if test -s conftest.err; then
2303    grep -v '^ *+' conftest.err >conftest.er1
2304    cat conftest.er1 >&5
2305    mv -f conftest.er1 conftest.err
2306  fi
2307  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2308  test $ac_status = 0; } > conftest.i && {
2309	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2310	 test ! -s conftest.err
2311       }; then :
2312  ac_retval=0
2313else
2314  $as_echo "$as_me: failed program was:" >&5
2315sed 's/^/| /' conftest.$ac_ext >&5
2316
2317    ac_retval=1
2318fi
2319  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2320  as_fn_set_status $ac_retval
2321
2322} # ac_fn_cxx_try_cpp
2323
2324# ac_fn_objc_try_compile LINENO
2325# -----------------------------
2326# Try to compile conftest.$ac_ext, and return whether this succeeded.
2327ac_fn_objc_try_compile ()
2328{
2329  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2330  rm -f conftest.$ac_objext
2331  if { { ac_try="$ac_compile"
2332case "(($ac_try" in
2333  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2334  *) ac_try_echo=$ac_try;;
2335esac
2336eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2337$as_echo "$ac_try_echo"; } >&5
2338  (eval "$ac_compile") 2>conftest.err
2339  ac_status=$?
2340  if test -s conftest.err; then
2341    grep -v '^ *+' conftest.err >conftest.er1
2342    cat conftest.er1 >&5
2343    mv -f conftest.er1 conftest.err
2344  fi
2345  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2346  test $ac_status = 0; } && {
2347	 test -z "$ac_objc_werror_flag" ||
2348	 test ! -s conftest.err
2349       } && test -s conftest.$ac_objext; then :
2350  ac_retval=0
2351else
2352  $as_echo "$as_me: failed program was:" >&5
2353sed 's/^/| /' conftest.$ac_ext >&5
2354
2355	ac_retval=1
2356fi
2357  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2358  as_fn_set_status $ac_retval
2359
2360} # ac_fn_objc_try_compile
2361
2362# ac_fn_c_try_link LINENO
2363# -----------------------
2364# Try to link conftest.$ac_ext, and return whether this succeeded.
2365ac_fn_c_try_link ()
2366{
2367  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2368  rm -f conftest.$ac_objext conftest$ac_exeext
2369  if { { ac_try="$ac_link"
2370case "(($ac_try" in
2371  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2372  *) ac_try_echo=$ac_try;;
2373esac
2374eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2375$as_echo "$ac_try_echo"; } >&5
2376  (eval "$ac_link") 2>conftest.err
2377  ac_status=$?
2378  if test -s conftest.err; then
2379    grep -v '^ *+' conftest.err >conftest.er1
2380    cat conftest.er1 >&5
2381    mv -f conftest.er1 conftest.err
2382  fi
2383  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2384  test $ac_status = 0; } && {
2385	 test -z "$ac_c_werror_flag" ||
2386	 test ! -s conftest.err
2387       } && test -s conftest$ac_exeext && {
2388	 test "$cross_compiling" = yes ||
2389	 test -x conftest$ac_exeext
2390       }; then :
2391  ac_retval=0
2392else
2393  $as_echo "$as_me: failed program was:" >&5
2394sed 's/^/| /' conftest.$ac_ext >&5
2395
2396	ac_retval=1
2397fi
2398  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2399  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2400  # interfere with the next link command; also delete a directory that is
2401  # left behind by Apple's compiler.  We do this before executing the actions.
2402  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2403  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2404  as_fn_set_status $ac_retval
2405
2406} # ac_fn_c_try_link
2407
2408# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2409# ---------------------------------------------------------
2410# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2411# the include files in INCLUDES and setting the cache variable VAR
2412# accordingly.
2413ac_fn_cxx_check_header_mongrel ()
2414{
2415  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2416  if eval \${$3+:} false; then :
2417  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2418$as_echo_n "checking for $2... " >&6; }
2419if eval \${$3+:} false; then :
2420  $as_echo_n "(cached) " >&6
2421fi
2422eval ac_res=\$$3
2423	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2424$as_echo "$ac_res" >&6; }
2425else
2426  # Is the header compilable?
2427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2428$as_echo_n "checking $2 usability... " >&6; }
2429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2430/* end confdefs.h.  */
2431$4
2432#include <$2>
2433_ACEOF
2434if ac_fn_cxx_try_compile "$LINENO"; then :
2435  ac_header_compiler=yes
2436else
2437  ac_header_compiler=no
2438fi
2439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2441$as_echo "$ac_header_compiler" >&6; }
2442
2443# Is the header present?
2444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2445$as_echo_n "checking $2 presence... " >&6; }
2446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2447/* end confdefs.h.  */
2448#include <$2>
2449_ACEOF
2450if ac_fn_cxx_try_cpp "$LINENO"; then :
2451  ac_header_preproc=yes
2452else
2453  ac_header_preproc=no
2454fi
2455rm -f conftest.err conftest.i conftest.$ac_ext
2456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2457$as_echo "$ac_header_preproc" >&6; }
2458
2459# So?  What about this header?
2460case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2461  yes:no: )
2462    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2463$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2464    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2465$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2466    ;;
2467  no:yes:* )
2468    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2469$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2470    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2471$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2472    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2473$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2474    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2475$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2476    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2477$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2478( $as_echo "## ----------------------------------------- ##
2479## Report this to build-dev@openjdk.java.net ##
2480## ----------------------------------------- ##"
2481     ) | sed "s/^/$as_me: WARNING:     /" >&2
2482    ;;
2483esac
2484  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2485$as_echo_n "checking for $2... " >&6; }
2486if eval \${$3+:} false; then :
2487  $as_echo_n "(cached) " >&6
2488else
2489  eval "$3=\$ac_header_compiler"
2490fi
2491eval ac_res=\$$3
2492	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2493$as_echo "$ac_res" >&6; }
2494fi
2495  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2496
2497} # ac_fn_cxx_check_header_mongrel
2498
2499# ac_fn_cxx_try_run LINENO
2500# ------------------------
2501# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2502# that executables *can* be run.
2503ac_fn_cxx_try_run ()
2504{
2505  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2506  if { { ac_try="$ac_link"
2507case "(($ac_try" in
2508  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2509  *) ac_try_echo=$ac_try;;
2510esac
2511eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2512$as_echo "$ac_try_echo"; } >&5
2513  (eval "$ac_link") 2>&5
2514  ac_status=$?
2515  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2516  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2517  { { case "(($ac_try" in
2518  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2519  *) ac_try_echo=$ac_try;;
2520esac
2521eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2522$as_echo "$ac_try_echo"; } >&5
2523  (eval "$ac_try") 2>&5
2524  ac_status=$?
2525  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2526  test $ac_status = 0; }; }; then :
2527  ac_retval=0
2528else
2529  $as_echo "$as_me: program exited with status $ac_status" >&5
2530       $as_echo "$as_me: failed program was:" >&5
2531sed 's/^/| /' conftest.$ac_ext >&5
2532
2533       ac_retval=$ac_status
2534fi
2535  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2536  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2537  as_fn_set_status $ac_retval
2538
2539} # ac_fn_cxx_try_run
2540
2541# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2542# ---------------------------------------------------------
2543# Tests whether HEADER exists and can be compiled using the include files in
2544# INCLUDES, setting the cache variable VAR accordingly.
2545ac_fn_cxx_check_header_compile ()
2546{
2547  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2549$as_echo_n "checking for $2... " >&6; }
2550if eval \${$3+:} false; then :
2551  $as_echo_n "(cached) " >&6
2552else
2553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2554/* end confdefs.h.  */
2555$4
2556#include <$2>
2557_ACEOF
2558if ac_fn_cxx_try_compile "$LINENO"; then :
2559  eval "$3=yes"
2560else
2561  eval "$3=no"
2562fi
2563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2564fi
2565eval ac_res=\$$3
2566	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2567$as_echo "$ac_res" >&6; }
2568  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2569
2570} # ac_fn_cxx_check_header_compile
2571
2572# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2573# ----------------------------------------------
2574# Tries to find the compile-time value of EXPR in a program that includes
2575# INCLUDES, setting VAR accordingly. Returns whether the value could be
2576# computed
2577ac_fn_cxx_compute_int ()
2578{
2579  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2580  if test "$cross_compiling" = yes; then
2581    # Depending upon the size, compute the lo and hi bounds.
2582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2583/* end confdefs.h.  */
2584$4
2585int
2586main ()
2587{
2588static int test_array [1 - 2 * !(($2) >= 0)];
2589test_array [0] = 0;
2590return test_array [0];
2591
2592  ;
2593  return 0;
2594}
2595_ACEOF
2596if ac_fn_cxx_try_compile "$LINENO"; then :
2597  ac_lo=0 ac_mid=0
2598  while :; do
2599    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2600/* end confdefs.h.  */
2601$4
2602int
2603main ()
2604{
2605static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2606test_array [0] = 0;
2607return test_array [0];
2608
2609  ;
2610  return 0;
2611}
2612_ACEOF
2613if ac_fn_cxx_try_compile "$LINENO"; then :
2614  ac_hi=$ac_mid; break
2615else
2616  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2617			if test $ac_lo -le $ac_mid; then
2618			  ac_lo= ac_hi=
2619			  break
2620			fi
2621			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2622fi
2623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2624  done
2625else
2626  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2627/* end confdefs.h.  */
2628$4
2629int
2630main ()
2631{
2632static int test_array [1 - 2 * !(($2) < 0)];
2633test_array [0] = 0;
2634return test_array [0];
2635
2636  ;
2637  return 0;
2638}
2639_ACEOF
2640if ac_fn_cxx_try_compile "$LINENO"; then :
2641  ac_hi=-1 ac_mid=-1
2642  while :; do
2643    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2644/* end confdefs.h.  */
2645$4
2646int
2647main ()
2648{
2649static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2650test_array [0] = 0;
2651return test_array [0];
2652
2653  ;
2654  return 0;
2655}
2656_ACEOF
2657if ac_fn_cxx_try_compile "$LINENO"; then :
2658  ac_lo=$ac_mid; break
2659else
2660  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2661			if test $ac_mid -le $ac_hi; then
2662			  ac_lo= ac_hi=
2663			  break
2664			fi
2665			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2666fi
2667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2668  done
2669else
2670  ac_lo= ac_hi=
2671fi
2672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2673fi
2674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2675# Binary search between lo and hi bounds.
2676while test "x$ac_lo" != "x$ac_hi"; do
2677  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2678  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2679/* end confdefs.h.  */
2680$4
2681int
2682main ()
2683{
2684static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2685test_array [0] = 0;
2686return test_array [0];
2687
2688  ;
2689  return 0;
2690}
2691_ACEOF
2692if ac_fn_cxx_try_compile "$LINENO"; then :
2693  ac_hi=$ac_mid
2694else
2695  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2696fi
2697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2698done
2699case $ac_lo in #((
2700?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2701'') ac_retval=1 ;;
2702esac
2703  else
2704    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2705/* end confdefs.h.  */
2706$4
2707static long int longval () { return $2; }
2708static unsigned long int ulongval () { return $2; }
2709#include <stdio.h>
2710#include <stdlib.h>
2711int
2712main ()
2713{
2714
2715  FILE *f = fopen ("conftest.val", "w");
2716  if (! f)
2717    return 1;
2718  if (($2) < 0)
2719    {
2720      long int i = longval ();
2721      if (i != ($2))
2722	return 1;
2723      fprintf (f, "%ld", i);
2724    }
2725  else
2726    {
2727      unsigned long int i = ulongval ();
2728      if (i != ($2))
2729	return 1;
2730      fprintf (f, "%lu", i);
2731    }
2732  /* Do not output a trailing newline, as this causes \r\n confusion
2733     on some platforms.  */
2734  return ferror (f) || fclose (f) != 0;
2735
2736  ;
2737  return 0;
2738}
2739_ACEOF
2740if ac_fn_cxx_try_run "$LINENO"; then :
2741  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2742else
2743  ac_retval=1
2744fi
2745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2746  conftest.$ac_objext conftest.beam conftest.$ac_ext
2747rm -f conftest.val
2748
2749  fi
2750  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2751  as_fn_set_status $ac_retval
2752
2753} # ac_fn_cxx_compute_int
2754
2755# ac_fn_cxx_try_link LINENO
2756# -------------------------
2757# Try to link conftest.$ac_ext, and return whether this succeeded.
2758ac_fn_cxx_try_link ()
2759{
2760  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2761  rm -f conftest.$ac_objext conftest$ac_exeext
2762  if { { ac_try="$ac_link"
2763case "(($ac_try" in
2764  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2765  *) ac_try_echo=$ac_try;;
2766esac
2767eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2768$as_echo "$ac_try_echo"; } >&5
2769  (eval "$ac_link") 2>conftest.err
2770  ac_status=$?
2771  if test -s conftest.err; then
2772    grep -v '^ *+' conftest.err >conftest.er1
2773    cat conftest.er1 >&5
2774    mv -f conftest.er1 conftest.err
2775  fi
2776  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2777  test $ac_status = 0; } && {
2778	 test -z "$ac_cxx_werror_flag" ||
2779	 test ! -s conftest.err
2780       } && test -s conftest$ac_exeext && {
2781	 test "$cross_compiling" = yes ||
2782	 test -x conftest$ac_exeext
2783       }; then :
2784  ac_retval=0
2785else
2786  $as_echo "$as_me: failed program was:" >&5
2787sed 's/^/| /' conftest.$ac_ext >&5
2788
2789	ac_retval=1
2790fi
2791  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2792  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2793  # interfere with the next link command; also delete a directory that is
2794  # left behind by Apple's compiler.  We do this before executing the actions.
2795  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2796  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2797  as_fn_set_status $ac_retval
2798
2799} # ac_fn_cxx_try_link
2800
2801# ac_fn_cxx_check_func LINENO FUNC VAR
2802# ------------------------------------
2803# Tests whether FUNC exists, setting the cache variable VAR accordingly
2804ac_fn_cxx_check_func ()
2805{
2806  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2807  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2808$as_echo_n "checking for $2... " >&6; }
2809if eval \${$3+:} false; then :
2810  $as_echo_n "(cached) " >&6
2811else
2812  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2813/* end confdefs.h.  */
2814/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2815   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2816#define $2 innocuous_$2
2817
2818/* System header to define __stub macros and hopefully few prototypes,
2819    which can conflict with char $2 (); below.
2820    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2821    <limits.h> exists even on freestanding compilers.  */
2822
2823#ifdef __STDC__
2824# include <limits.h>
2825#else
2826# include <assert.h>
2827#endif
2828
2829#undef $2
2830
2831/* Override any GCC internal prototype to avoid an error.
2832   Use char because int might match the return type of a GCC
2833   builtin and then its argument prototype would still apply.  */
2834#ifdef __cplusplus
2835extern "C"
2836#endif
2837char $2 ();
2838/* The GNU C library defines this for functions which it implements
2839    to always fail with ENOSYS.  Some functions are actually named
2840    something starting with __ and the normal name is an alias.  */
2841#if defined __stub_$2 || defined __stub___$2
2842choke me
2843#endif
2844
2845int
2846main ()
2847{
2848return $2 ();
2849  ;
2850  return 0;
2851}
2852_ACEOF
2853if ac_fn_cxx_try_link "$LINENO"; then :
2854  eval "$3=yes"
2855else
2856  eval "$3=no"
2857fi
2858rm -f core conftest.err conftest.$ac_objext \
2859    conftest$ac_exeext conftest.$ac_ext
2860fi
2861eval ac_res=\$$3
2862	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2863$as_echo "$ac_res" >&6; }
2864  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2865
2866} # ac_fn_cxx_check_func
2867
2868# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2869# -------------------------------------------------------
2870# Tests whether HEADER exists and can be compiled using the include files in
2871# INCLUDES, setting the cache variable VAR accordingly.
2872ac_fn_c_check_header_compile ()
2873{
2874  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2876$as_echo_n "checking for $2... " >&6; }
2877if eval \${$3+:} false; then :
2878  $as_echo_n "(cached) " >&6
2879else
2880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2881/* end confdefs.h.  */
2882$4
2883#include <$2>
2884_ACEOF
2885if ac_fn_c_try_compile "$LINENO"; then :
2886  eval "$3=yes"
2887else
2888  eval "$3=no"
2889fi
2890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2891fi
2892eval ac_res=\$$3
2893	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2894$as_echo "$ac_res" >&6; }
2895  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2896
2897} # ac_fn_c_check_header_compile
2898cat >config.log <<_ACEOF
2899This file contains any messages produced by compilers while
2900running configure, to aid debugging if configure makes a mistake.
2901
2902It was created by OpenJDK $as_me jdk9, which was
2903generated by GNU Autoconf 2.69.  Invocation command line was
2904
2905  $ $0 $@
2906
2907_ACEOF
2908exec 5>>config.log
2909{
2910cat <<_ASUNAME
2911## --------- ##
2912## Platform. ##
2913## --------- ##
2914
2915hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2916uname -m = `(uname -m) 2>/dev/null || echo unknown`
2917uname -r = `(uname -r) 2>/dev/null || echo unknown`
2918uname -s = `(uname -s) 2>/dev/null || echo unknown`
2919uname -v = `(uname -v) 2>/dev/null || echo unknown`
2920
2921/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2922/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2923
2924/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2925/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2926/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2927/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2928/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2929/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2930/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2931
2932_ASUNAME
2933
2934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2935for as_dir in $PATH
2936do
2937  IFS=$as_save_IFS
2938  test -z "$as_dir" && as_dir=.
2939    $as_echo "PATH: $as_dir"
2940  done
2941IFS=$as_save_IFS
2942
2943} >&5
2944
2945cat >&5 <<_ACEOF
2946
2947
2948## ----------- ##
2949## Core tests. ##
2950## ----------- ##
2951
2952_ACEOF
2953
2954
2955# Keep a trace of the command line.
2956# Strip out --no-create and --no-recursion so they do not pile up.
2957# Strip out --silent because we don't want to record it for future runs.
2958# Also quote any args containing shell meta-characters.
2959# Make two passes to allow for proper duplicate-argument suppression.
2960ac_configure_args=
2961ac_configure_args0=
2962ac_configure_args1=
2963ac_must_keep_next=false
2964for ac_pass in 1 2
2965do
2966  for ac_arg
2967  do
2968    case $ac_arg in
2969    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2970    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2971    | -silent | --silent | --silen | --sile | --sil)
2972      continue ;;
2973    *\'*)
2974      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2975    esac
2976    case $ac_pass in
2977    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2978    2)
2979      as_fn_append ac_configure_args1 " '$ac_arg'"
2980      if test $ac_must_keep_next = true; then
2981	ac_must_keep_next=false # Got value, back to normal.
2982      else
2983	case $ac_arg in
2984	  *=* | --config-cache | -C | -disable-* | --disable-* \
2985	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2986	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2987	  | -with-* | --with-* | -without-* | --without-* | --x)
2988	    case "$ac_configure_args0 " in
2989	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2990	    esac
2991	    ;;
2992	  -* ) ac_must_keep_next=true ;;
2993	esac
2994      fi
2995      as_fn_append ac_configure_args " '$ac_arg'"
2996      ;;
2997    esac
2998  done
2999done
3000{ ac_configure_args0=; unset ac_configure_args0;}
3001{ ac_configure_args1=; unset ac_configure_args1;}
3002
3003# When interrupted or exit'd, cleanup temporary files, and complete
3004# config.log.  We remove comments because anyway the quotes in there
3005# would cause problems or look ugly.
3006# WARNING: Use '\'' to represent an apostrophe within the trap.
3007# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3008trap 'exit_status=$?
3009  # Save into config.log some information that might help in debugging.
3010  {
3011    echo
3012
3013    $as_echo "## ---------------- ##
3014## Cache variables. ##
3015## ---------------- ##"
3016    echo
3017    # The following way of writing the cache mishandles newlines in values,
3018(
3019  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3020    eval ac_val=\$$ac_var
3021    case $ac_val in #(
3022    *${as_nl}*)
3023      case $ac_var in #(
3024      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3025$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3026      esac
3027      case $ac_var in #(
3028      _ | IFS | as_nl) ;; #(
3029      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3030      *) { eval $ac_var=; unset $ac_var;} ;;
3031      esac ;;
3032    esac
3033  done
3034  (set) 2>&1 |
3035    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3036    *${as_nl}ac_space=\ *)
3037      sed -n \
3038	"s/'\''/'\''\\\\'\'''\''/g;
3039	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3040      ;; #(
3041    *)
3042      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3043      ;;
3044    esac |
3045    sort
3046)
3047    echo
3048
3049    $as_echo "## ----------------- ##
3050## Output variables. ##
3051## ----------------- ##"
3052    echo
3053    for ac_var in $ac_subst_vars
3054    do
3055      eval ac_val=\$$ac_var
3056      case $ac_val in
3057      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3058      esac
3059      $as_echo "$ac_var='\''$ac_val'\''"
3060    done | sort
3061    echo
3062
3063    if test -n "$ac_subst_files"; then
3064      $as_echo "## ------------------- ##
3065## File substitutions. ##
3066## ------------------- ##"
3067      echo
3068      for ac_var in $ac_subst_files
3069      do
3070	eval ac_val=\$$ac_var
3071	case $ac_val in
3072	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3073	esac
3074	$as_echo "$ac_var='\''$ac_val'\''"
3075      done | sort
3076      echo
3077    fi
3078
3079    if test -s confdefs.h; then
3080      $as_echo "## ----------- ##
3081## confdefs.h. ##
3082## ----------- ##"
3083      echo
3084      cat confdefs.h
3085      echo
3086    fi
3087    test "$ac_signal" != 0 &&
3088      $as_echo "$as_me: caught signal $ac_signal"
3089    $as_echo "$as_me: exit $exit_status"
3090  } >&5
3091  rm -f core *.core core.conftest.* &&
3092    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3093    exit $exit_status
3094' 0
3095for ac_signal in 1 2 13 15; do
3096  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3097done
3098ac_signal=0
3099
3100# confdefs.h avoids OS command line length limits that DEFS can exceed.
3101rm -f -r conftest* confdefs.h
3102
3103$as_echo "/* confdefs.h */" > confdefs.h
3104
3105# Predefined preprocessor variables.
3106
3107cat >>confdefs.h <<_ACEOF
3108#define PACKAGE_NAME "$PACKAGE_NAME"
3109_ACEOF
3110
3111cat >>confdefs.h <<_ACEOF
3112#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3113_ACEOF
3114
3115cat >>confdefs.h <<_ACEOF
3116#define PACKAGE_VERSION "$PACKAGE_VERSION"
3117_ACEOF
3118
3119cat >>confdefs.h <<_ACEOF
3120#define PACKAGE_STRING "$PACKAGE_STRING"
3121_ACEOF
3122
3123cat >>confdefs.h <<_ACEOF
3124#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3125_ACEOF
3126
3127cat >>confdefs.h <<_ACEOF
3128#define PACKAGE_URL "$PACKAGE_URL"
3129_ACEOF
3130
3131
3132# Let the site file select an alternate cache file if it wants to.
3133# Prefer an explicitly selected file to automatically selected ones.
3134ac_site_file1=NONE
3135ac_site_file2=NONE
3136if test -n "$CONFIG_SITE"; then
3137  # We do not want a PATH search for config.site.
3138  case $CONFIG_SITE in #((
3139    -*)  ac_site_file1=./$CONFIG_SITE;;
3140    */*) ac_site_file1=$CONFIG_SITE;;
3141    *)   ac_site_file1=./$CONFIG_SITE;;
3142  esac
3143elif test "x$prefix" != xNONE; then
3144  ac_site_file1=$prefix/share/config.site
3145  ac_site_file2=$prefix/etc/config.site
3146else
3147  ac_site_file1=$ac_default_prefix/share/config.site
3148  ac_site_file2=$ac_default_prefix/etc/config.site
3149fi
3150for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3151do
3152  test "x$ac_site_file" = xNONE && continue
3153  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3154    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3155$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3156    sed 's/^/| /' "$ac_site_file" >&5
3157    . "$ac_site_file" \
3158      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3159$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3160as_fn_error $? "failed to load site script $ac_site_file
3161See \`config.log' for more details" "$LINENO" 5; }
3162  fi
3163done
3164
3165if test -r "$cache_file"; then
3166  # Some versions of bash will fail to source /dev/null (special files
3167  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3168  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3169    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3170$as_echo "$as_me: loading cache $cache_file" >&6;}
3171    case $cache_file in
3172      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3173      *)                      . "./$cache_file";;
3174    esac
3175  fi
3176else
3177  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3178$as_echo "$as_me: creating cache $cache_file" >&6;}
3179  >$cache_file
3180fi
3181
3182# Check that the precious variables saved in the cache have kept the same
3183# value.
3184ac_cache_corrupted=false
3185for ac_var in $ac_precious_vars; do
3186  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3187  eval ac_new_set=\$ac_env_${ac_var}_set
3188  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3189  eval ac_new_val=\$ac_env_${ac_var}_value
3190  case $ac_old_set,$ac_new_set in
3191    set,)
3192      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3193$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3194      ac_cache_corrupted=: ;;
3195    ,set)
3196      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3197$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3198      ac_cache_corrupted=: ;;
3199    ,);;
3200    *)
3201      if test "x$ac_old_val" != "x$ac_new_val"; then
3202	# differences in whitespace do not lead to failure.
3203	ac_old_val_w=`echo x $ac_old_val`
3204	ac_new_val_w=`echo x $ac_new_val`
3205	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3206	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3207$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3208	  ac_cache_corrupted=:
3209	else
3210	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3211$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3212	  eval $ac_var=\$ac_old_val
3213	fi
3214	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3215$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3216	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3217$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3218      fi;;
3219  esac
3220  # Pass precious variables to config.status.
3221  if test "$ac_new_set" = set; then
3222    case $ac_new_val in
3223    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3224    *) ac_arg=$ac_var=$ac_new_val ;;
3225    esac
3226    case " $ac_configure_args " in
3227      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3228      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3229    esac
3230  fi
3231done
3232if $ac_cache_corrupted; then
3233  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3234$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3235  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3236$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3237  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3238fi
3239## -------------------- ##
3240## Main body of script. ##
3241## -------------------- ##
3242
3243ac_ext=c
3244ac_cpp='$CPP $CPPFLAGS'
3245ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3246ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3247ac_compiler_gnu=$ac_cv_c_compiler_gnu
3248
3249
3250
3251ac_aux_dir=
3252for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3253  if test -f "$ac_dir/install-sh"; then
3254    ac_aux_dir=$ac_dir
3255    ac_install_sh="$ac_aux_dir/install-sh -c"
3256    break
3257  elif test -f "$ac_dir/install.sh"; then
3258    ac_aux_dir=$ac_dir
3259    ac_install_sh="$ac_aux_dir/install.sh -c"
3260    break
3261  elif test -f "$ac_dir/shtool"; then
3262    ac_aux_dir=$ac_dir
3263    ac_install_sh="$ac_aux_dir/shtool install -c"
3264    break
3265  fi
3266done
3267if test -z "$ac_aux_dir"; then
3268  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
3269fi
3270
3271# These three variables are undocumented and unsupported,
3272# and are intended to be withdrawn in a future Autoconf release.
3273# They can cause serious problems if a builder's source tree is in a directory
3274# whose full name contains unusual characters.
3275ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3276ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3277ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3278
3279
3280# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3281
3282#
3283# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3284# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3285#
3286# This code is free software; you can redistribute it and/or modify it
3287# under the terms of the GNU General Public License version 2 only, as
3288# published by the Free Software Foundation.  Oracle designates this
3289# particular file as subject to the "Classpath" exception as provided
3290# by Oracle in the LICENSE file that accompanied this code.
3291#
3292# This code is distributed in the hope that it will be useful, but WITHOUT
3293# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3294# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3295# version 2 for more details (a copy is included in the LICENSE file that
3296# accompanied this code).
3297#
3298# You should have received a copy of the GNU General Public License version
3299# 2 along with this work; if not, write to the Free Software Foundation,
3300# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3301#
3302# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3303# or visit www.oracle.com if you need additional information or have any
3304# questions.
3305#
3306
3307#
3308# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3309#
3310# This program is free software; you can redistribute it and/or modify
3311# it under the terms of the GNU General Public License as published by
3312# the Free Software Foundation; either version 2 of the License, or
3313# (at your option) any later version.
3314#
3315# This program is distributed in the hope that it will be useful, but
3316# WITHOUT ANY WARRANTY; without even the implied warranty of
3317# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3318# General Public License for more details.
3319#
3320# You should have received a copy of the GNU General Public License
3321# along with this program; if not, write to the Free Software
3322# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3323#
3324# As a special exception to the GNU General Public License, if you
3325# distribute this file as part of a program that contains a
3326# configuration script generated by Autoconf, you may include it under
3327# the same distribution terms that you use for the rest of that program.
3328
3329# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3330# ----------------------------------
3331# PKG_PROG_PKG_CONFIG
3332
3333# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3334#
3335# Check to see whether a particular set of modules exists.  Similar
3336# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3337#
3338#
3339# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3340# this or PKG_CHECK_MODULES is called, or make sure to call
3341# PKG_CHECK_EXISTS manually
3342# --------------------------------------------------------------
3343
3344
3345
3346# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3347# ---------------------------------------------
3348# _PKG_CONFIG
3349
3350# _PKG_SHORT_ERRORS_SUPPORTED
3351# -----------------------------
3352# _PKG_SHORT_ERRORS_SUPPORTED
3353
3354
3355# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3356# [ACTION-IF-NOT-FOUND])
3357#
3358#
3359# Note that if there is a possibility the first call to
3360# PKG_CHECK_MODULES might not happen, you should be sure to include an
3361# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3362#
3363#
3364# --------------------------------------------------------------
3365# PKG_CHECK_MODULES
3366
3367
3368# Include these first...
3369#
3370# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3371# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3372#
3373# This code is free software; you can redistribute it and/or modify it
3374# under the terms of the GNU General Public License version 2 only, as
3375# published by the Free Software Foundation.  Oracle designates this
3376# particular file as subject to the "Classpath" exception as provided
3377# by Oracle in the LICENSE file that accompanied this code.
3378#
3379# This code is distributed in the hope that it will be useful, but WITHOUT
3380# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3381# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3382# version 2 for more details (a copy is included in the LICENSE file that
3383# accompanied this code).
3384#
3385# You should have received a copy of the GNU General Public License version
3386# 2 along with this work; if not, write to the Free Software Foundation,
3387# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3388#
3389# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3390# or visit www.oracle.com if you need additional information or have any
3391# questions.
3392#
3393
3394# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3395# If so, then append $1 to $2 \
3396# Also set JVM_ARG_OK to true/false depending on outcome.
3397
3398
3399# Appends a string to a path variable, only adding the : when needed.
3400
3401
3402# Prepends a string to a path variable, only adding the : when needed.
3403
3404
3405# This will make sure the given variable points to a full and proper
3406# path. This means:
3407# 1) There will be no spaces in the path. On posix platforms,
3408#    spaces in the path will result in an error. On Windows,
3409#    the path will be rewritten using short-style to be space-free.
3410# 2) The path will be absolute, and it will be in unix-style (on
3411#     cygwin).
3412# $1: The name of the variable to fix
3413
3414
3415# This will make sure the given variable points to a executable
3416# with a full and proper path. This means:
3417# 1) There will be no spaces in the path. On posix platforms,
3418#    spaces in the path will result in an error. On Windows,
3419#    the path will be rewritten using short-style to be space-free.
3420# 2) The path will be absolute, and it will be in unix-style (on
3421#     cygwin).
3422# Any arguments given to the executable is preserved.
3423# If the input variable does not have a directory specification, then
3424# it need to be in the PATH.
3425# $1: The name of the variable to fix
3426
3427
3428
3429
3430# Register a --with argument but mark it as deprecated
3431# $1: The name of the with argument to deprecate, not including --with-
3432
3433
3434# Register a --enable argument but mark it as deprecated
3435# $1: The name of the with argument to deprecate, not including --enable-
3436# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3437
3438
3439
3440
3441# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3442# $1: variable to check
3443
3444
3445# Check that there are no unprocessed overridden variables left.
3446# If so, they are an incorrect argument and we will exit with an error.
3447
3448
3449# Setup a tool for the given variable. If correctly specified by the user,
3450# use that value, otherwise search for the tool using the supplied code snippet.
3451# $1: variable to set
3452# $2: code snippet to call to look for the tool
3453
3454
3455# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3456# $1: variable to set
3457# $2: executable name (or list of names) to look for
3458
3459
3460# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3461# $1: variable to set
3462# $2: executable name (or list of names) to look for
3463
3464
3465# Like BASIC_PATH_PROGS but fails if no tool was found.
3466# $1: variable to set
3467# $2: executable name (or list of names) to look for
3468
3469
3470# Like BASIC_SETUP_TOOL but fails if no tool was found.
3471# $1: variable to set
3472# $2: autoconf macro to call to look for the special tool
3473
3474
3475# Setup the most fundamental tools that relies on not much else to set up,
3476# but is used by much of the early bootstrap code.
3477
3478
3479# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489#%%% Simple tools %%%
3490
3491# Check if we have found a usable version of make
3492# $1: the path to a potential make binary (or empty)
3493# $2: the description on how we found this
3494
3495
3496
3497
3498# Goes looking for a usable version of GNU make.
3499
3500
3501
3502
3503
3504
3505# Check if build directory is on local disk. If not possible to determine,
3506# we prefer to claim it's local.
3507# Argument 1: directory to test
3508# Argument 2: what to do if it is on local disk
3509# Argument 3: what to do otherwise (remote disk or failure)
3510
3511
3512# Check that source files have basic read permissions set. This might
3513# not be the case in cygwin in certain conditions.
3514
3515
3516
3517
3518#
3519# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3520# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3521#
3522# This code is free software; you can redistribute it and/or modify it
3523# under the terms of the GNU General Public License version 2 only, as
3524# published by the Free Software Foundation.  Oracle designates this
3525# particular file as subject to the "Classpath" exception as provided
3526# by Oracle in the LICENSE file that accompanied this code.
3527#
3528# This code is distributed in the hope that it will be useful, but WITHOUT
3529# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3530# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3531# version 2 for more details (a copy is included in the LICENSE file that
3532# accompanied this code).
3533#
3534# You should have received a copy of the GNU General Public License version
3535# 2 along with this work; if not, write to the Free Software Foundation,
3536# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3537#
3538# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3539# or visit www.oracle.com if you need additional information or have any
3540# questions.
3541#
3542
3543
3544
3545
3546
3547# Helper function which possibly converts a path using DOS-style short mode.
3548# If so, the updated path is stored in $new_path.
3549# $1: The path to check
3550
3551
3552# Helper function which possibly converts a path using DOS-style short mode.
3553# If so, the updated path is stored in $new_path.
3554# $1: The path to check
3555
3556
3557# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3558# and could probably be heavily simplified. However, all changes in this
3559# area tend to need lot of testing in different scenarios, and in lack of
3560# proper unit testing, cleaning this up has not been deemed worth the effort
3561# at the moment.
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3572
3573
3574
3575
3576#
3577# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3578# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3579#
3580# This code is free software; you can redistribute it and/or modify it
3581# under the terms of the GNU General Public License version 2 only, as
3582# published by the Free Software Foundation.  Oracle designates this
3583# particular file as subject to the "Classpath" exception as provided
3584# by Oracle in the LICENSE file that accompanied this code.
3585#
3586# This code is distributed in the hope that it will be useful, but WITHOUT
3587# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3588# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3589# version 2 for more details (a copy is included in the LICENSE file that
3590# accompanied this code).
3591#
3592# You should have received a copy of the GNU General Public License version
3593# 2 along with this work; if not, write to the Free Software Foundation,
3594# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3595#
3596# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3597# or visit www.oracle.com if you need additional information or have any
3598# questions.
3599#
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611# ... then the rest
3612#
3613# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3614# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3615#
3616# This code is free software; you can redistribute it and/or modify it
3617# under the terms of the GNU General Public License version 2 only, as
3618# published by the Free Software Foundation.  Oracle designates this
3619# particular file as subject to the "Classpath" exception as provided
3620# by Oracle in the LICENSE file that accompanied this code.
3621#
3622# This code is distributed in the hope that it will be useful, but WITHOUT
3623# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3624# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3625# version 2 for more details (a copy is included in the LICENSE file that
3626# accompanied this code).
3627#
3628# You should have received a copy of the GNU General Public License version
3629# 2 along with this work; if not, write to the Free Software Foundation,
3630# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3631#
3632# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3633# or visit www.oracle.com if you need additional information or have any
3634# questions.
3635#
3636
3637########################################################################
3638# This file handles detection of the Boot JDK. The Boot JDK detection
3639# process has been developed as a response to solve a complex real-world
3640# problem. Initially, it was simple, but it has grown as platform after
3641# platform, idiosyncracy after idiosyncracy has been supported.
3642#
3643# The basic idea is this:
3644# 1) You need an acceptable *) JDK to use as a Boot JDK
3645# 2) There are several ways to locate a JDK, that are mostly platform
3646#    dependent **)
3647# 3) You can have multiple JDKs installed
3648# 4) If possible, configure should try to dig out an acceptable JDK
3649#    automatically, without having to resort to command-line options
3650#
3651# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3652#     javac) and not a JRE, etc.
3653#
3654# **) On Windows we typically use a well-known path.
3655#     On MacOSX we typically use the tool java_home.
3656#     On Linux we typically find javac in the $PATH, and then follow a
3657#     chain of symlinks that often ends up in a real JDK.
3658#
3659# This leads to the code where we check in different ways to locate a
3660# JDK, and if one is found, check if it is acceptable. If not, we print
3661# our reasons for rejecting it (useful when debugging non-working
3662# configure situations) and continue checking the next one.
3663########################################################################
3664
3665# Execute the check given as argument, and verify the result
3666# If the Boot JDK was previously found, do nothing
3667# $1 A command line (typically autoconf macro) to execute
3668
3669
3670# Test: Is bootjdk explicitely set by command line arguments?
3671
3672
3673# Test: Is bootjdk available from builddeps?
3674
3675
3676# Test: Is $JAVA_HOME set?
3677
3678
3679# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3680
3681
3682# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3683# $1: Argument to the java_home binary (optional)
3684
3685
3686# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3687
3688
3689# Look for a jdk in the given path. If there are multiple, try to select the newest.
3690# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3691# $1 = Path to directory containing jdk installations.
3692# $2 = String to append to the found JDK directory to get the proper JDK home
3693
3694
3695# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3696# environmental variable as base for where to look.
3697# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3698
3699
3700# Test: Is there a JDK installed in default, well-known locations?
3701
3702
3703# Check that a command-line tool in the Boot JDK is correct
3704# $1 = name of variable to assign
3705# $2 = name of binary
3706
3707
3708###############################################################################
3709#
3710# We need a Boot JDK to bootstrap the build.
3711#
3712
3713
3714
3715
3716
3717#
3718# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3719# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3720#
3721# This code is free software; you can redistribute it and/or modify it
3722# under the terms of the GNU General Public License version 2 only, as
3723# published by the Free Software Foundation.  Oracle designates this
3724# particular file as subject to the "Classpath" exception as provided
3725# by Oracle in the LICENSE file that accompanied this code.
3726#
3727# This code is distributed in the hope that it will be useful, but WITHOUT
3728# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3729# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3730# version 2 for more details (a copy is included in the LICENSE file that
3731# accompanied this code).
3732#
3733# You should have received a copy of the GNU General Public License version
3734# 2 along with this work; if not, write to the Free Software Foundation,
3735# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3736#
3737# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3738# or visit www.oracle.com if you need additional information or have any
3739# questions.
3740#
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761#
3762# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3763# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3764#
3765# This code is free software; you can redistribute it and/or modify it
3766# under the terms of the GNU General Public License version 2 only, as
3767# published by the Free Software Foundation.  Oracle designates this
3768# particular file as subject to the "Classpath" exception as provided
3769# by Oracle in the LICENSE file that accompanied this code.
3770#
3771# This code is distributed in the hope that it will be useful, but WITHOUT
3772# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3773# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3774# version 2 for more details (a copy is included in the LICENSE file that
3775# accompanied this code).
3776#
3777# You should have received a copy of the GNU General Public License version
3778# 2 along with this work; if not, write to the Free Software Foundation,
3779# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3780#
3781# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3782# or visit www.oracle.com if you need additional information or have any
3783# questions.
3784#
3785
3786
3787
3788
3789
3790# Documentation on common flags used for solstudio in HIGHEST.
3791#
3792# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3793#          done with care, there are some assumptions below that need to
3794#          be understood about the use of pointers, and IEEE behavior.
3795#
3796# -fns: Use non-standard floating point mode (not IEEE 754)
3797# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3798# -fsingle: Use single precision floating point with 'float'
3799# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3800#   (Source with excessing pointer casting and data access with mixed
3801#    pointer types are not recommended)
3802# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3803#   (If you expect perfect errno behavior, do not use this)
3804# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3805# -xrestrict: Pointer parameters to functions do not overlap
3806#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3807#    If you pass in multiple pointers to the same data, do not use this)
3808# -xlibmil: Inline some library routines
3809#   (If you expect perfect errno behavior, do not use this)
3810# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3811#   (If you expect perfect errno behavior, do not use this)
3812#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3813
3814    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3815    # Bug?
3816    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3817    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3818    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3819    #fi
3820
3821
3822
3823
3824
3825# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3826#                                   [RUN-IF-FALSE])
3827# ------------------------------------------------------------
3828# Check that the c and c++ compilers support an argument
3829
3830
3831# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3832#                                    [RUN-IF-FALSE])
3833# ------------------------------------------------------------
3834# Check that the linker support an argument
3835
3836
3837
3838
3839#
3840# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3841# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3842#
3843# This code is free software; you can redistribute it and/or modify it
3844# under the terms of the GNU General Public License version 2 only, as
3845# published by the Free Software Foundation.  Oracle designates this
3846# particular file as subject to the "Classpath" exception as provided
3847# by Oracle in the LICENSE file that accompanied this code.
3848#
3849# This code is distributed in the hope that it will be useful, but WITHOUT
3850# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3851# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3852# version 2 for more details (a copy is included in the LICENSE file that
3853# accompanied this code).
3854#
3855# You should have received a copy of the GNU General Public License version
3856# 2 along with this work; if not, write to the Free Software Foundation,
3857# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3858#
3859# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3860# or visit www.oracle.com if you need additional information or have any
3861# questions.
3862#
3863
3864
3865
3866
3867
3868cygwin_help() {
3869  case $1 in
3870    unzip)
3871      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3872      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3873      ;;
3874    zip)
3875      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3876      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3877      ;;
3878    make)
3879      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3880      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3881      ;;
3882    freetype)
3883      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3884        HELP_MSG="To install freetype, run:
3885wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3886chmod +x /tmp/freetype-setup.exe
3887/tmp/freetype-setup.exe
3888Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3889After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3890      else
3891        HELP_MSG="You need to build a 64-bit version of freetype.
3892This is not readily available.
3893You can find source code and build instructions on
3894http://www.freetype.org/
3895If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3896      fi
3897      ;;
3898  esac
3899}
3900
3901msys_help() {
3902  PKGHANDLER_COMMAND=""
3903}
3904
3905apt_help() {
3906  case $1 in
3907    devkit)
3908      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3909    openjdk)
3910      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3911    alsa)
3912      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3913    cups)
3914      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3915    freetype)
3916      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3917    pulse)
3918      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3919    x11)
3920      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3921    ccache)
3922      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3923  esac
3924}
3925
3926yum_help() {
3927  case $1 in
3928    devkit)
3929      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3930    openjdk)
3931      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3932    alsa)
3933      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3934    cups)
3935      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3936    freetype)
3937      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3938    pulse)
3939      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3940    x11)
3941      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3942    ccache)
3943      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3944  esac
3945}
3946
3947port_help() {
3948  PKGHANDLER_COMMAND=""
3949}
3950
3951pkgutil_help() {
3952  PKGHANDLER_COMMAND=""
3953}
3954
3955pkgadd_help() {
3956  PKGHANDLER_COMMAND=""
3957}
3958
3959# This function will check if we're called from the "configure" wrapper while
3960# printing --help. If so, we will print out additional information that can
3961# only be extracted within the autoconf script, and then exit. This must be
3962# called at the very beginning in configure.ac.
3963
3964
3965
3966
3967#
3968# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3969# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3970#
3971# This code is free software; you can redistribute it and/or modify it
3972# under the terms of the GNU General Public License version 2 only, as
3973# published by the Free Software Foundation.  Oracle designates this
3974# particular file as subject to the "Classpath" exception as provided
3975# by Oracle in the LICENSE file that accompanied this code.
3976#
3977# This code is distributed in the hope that it will be useful, but WITHOUT
3978# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3979# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3980# version 2 for more details (a copy is included in the LICENSE file that
3981# accompanied this code).
3982#
3983# You should have received a copy of the GNU General Public License version
3984# 2 along with this work; if not, write to the Free Software Foundation,
3985# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3986#
3987# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3988# or visit www.oracle.com if you need additional information or have any
3989# questions.
3990#
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001###############################################################################
4002#
4003# Should we build only OpenJDK even if closed sources are present?
4004#
4005
4006
4007
4008
4009###############################################################################
4010#
4011# Setup version numbers
4012#
4013
4014
4015
4016
4017
4018
4019#
4020# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4021# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4022#
4023# This code is free software; you can redistribute it and/or modify it
4024# under the terms of the GNU General Public License version 2 only, as
4025# published by the Free Software Foundation.  Oracle designates this
4026# particular file as subject to the "Classpath" exception as provided
4027# by Oracle in the LICENSE file that accompanied this code.
4028#
4029# This code is distributed in the hope that it will be useful, but WITHOUT
4030# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4031# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4032# version 2 for more details (a copy is included in the LICENSE file that
4033# accompanied this code).
4034#
4035# You should have received a copy of the GNU General Public License version
4036# 2 along with this work; if not, write to the Free Software Foundation,
4037# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4038#
4039# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4040# or visit www.oracle.com if you need additional information or have any
4041# questions.
4042#
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062#
4063# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4064# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4065#
4066# This code is free software; you can redistribute it and/or modify it
4067# under the terms of the GNU General Public License version 2 only, as
4068# published by the Free Software Foundation.  Oracle designates this
4069# particular file as subject to the "Classpath" exception as provided
4070# by Oracle in the LICENSE file that accompanied this code.
4071#
4072# This code is distributed in the hope that it will be useful, but WITHOUT
4073# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4074# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4075# version 2 for more details (a copy is included in the LICENSE file that
4076# accompanied this code).
4077#
4078# You should have received a copy of the GNU General Public License version
4079# 2 along with this work; if not, write to the Free Software Foundation,
4080# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4081#
4082# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4083# or visit www.oracle.com if you need additional information or have any
4084# questions.
4085#
4086
4087# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4088# Converts autoconf style CPU name to OpenJDK style, into
4089# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4090
4091
4092# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4093# Converts autoconf style OS name to OpenJDK style, into
4094# VAR_OS and VAR_OS_API.
4095
4096
4097# Expects $host_os $host_cpu $build_os and $build_cpu
4098# and $with_target_bits to have been setup!
4099#
4100# Translate the standard triplet(quadruplet) definition
4101# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4102# OPENJDK_BUILD_OS, etc.
4103
4104
4105# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4106# accordingly. Must be done after setting up build and target system, but before
4107# doing anything else with these values.
4108
4109
4110# Setup the legacy variables, for controlling the old makefiles.
4111#
4112
4113
4114
4115
4116#%%% Build and target systems %%%
4117
4118
4119
4120
4121# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4122# Add -mX to various FLAGS variables.
4123
4124
4125
4126
4127
4128
4129#
4130# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4131# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4132#
4133# This code is free software; you can redistribute it and/or modify it
4134# under the terms of the GNU General Public License version 2 only, as
4135# published by the Free Software Foundation.  Oracle designates this
4136# particular file as subject to the "Classpath" exception as provided
4137# by Oracle in the LICENSE file that accompanied this code.
4138#
4139# This code is distributed in the hope that it will be useful, but WITHOUT
4140# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4141# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4142# version 2 for more details (a copy is included in the LICENSE file that
4143# accompanied this code).
4144#
4145# You should have received a copy of the GNU General Public License version
4146# 2 along with this work; if not, write to the Free Software Foundation,
4147# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4148#
4149# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4150# or visit www.oracle.com if you need additional information or have any
4151# questions.
4152#
4153
4154
4155
4156
4157
4158
4159
4160
4161#
4162# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4163# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4164#
4165# This code is free software; you can redistribute it and/or modify it
4166# under the terms of the GNU General Public License version 2 only, as
4167# published by the Free Software Foundation.  Oracle designates this
4168# particular file as subject to the "Classpath" exception as provided
4169# by Oracle in the LICENSE file that accompanied this code.
4170#
4171# This code is distributed in the hope that it will be useful, but WITHOUT
4172# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4173# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4174# version 2 for more details (a copy is included in the LICENSE file that
4175# accompanied this code).
4176#
4177# You should have received a copy of the GNU General Public License version
4178# 2 along with this work; if not, write to the Free Software Foundation,
4179# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4180#
4181# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4182# or visit www.oracle.com if you need additional information or have any
4183# questions.
4184#
4185
4186########################################################################
4187# This file is responsible for detecting, verifying and setting up the
4188# toolchain, i.e. the compiler, linker and related utilities. It will setup
4189# proper paths to the binaries, but it will not setup any flags.
4190#
4191# The binaries used is determined by the toolchain type, which is the family of
4192# compilers and related tools that are used.
4193########################################################################
4194
4195
4196# All valid toolchains, regardless of platform (used by help.m4)
4197VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4198
4199# These toolchains are valid on different platforms
4200VALID_TOOLCHAINS_linux="gcc clang"
4201VALID_TOOLCHAINS_solaris="solstudio"
4202VALID_TOOLCHAINS_macosx="gcc clang"
4203VALID_TOOLCHAINS_aix="xlc"
4204VALID_TOOLCHAINS_windows="microsoft"
4205
4206# Toolchain descriptions
4207TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4208TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4209TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4210TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4211TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4212
4213# Setup a number of variables describing how native output files are
4214# named on this platform/toolchain.
4215
4216
4217# Determine which toolchain type to use, and make sure it is valid for this
4218# platform. Setup various information about the selected toolchain.
4219
4220
4221# Before we start detecting the toolchain executables, we might need some
4222# special setup, e.g. additional paths etc.
4223
4224
4225# Restore path, etc
4226
4227
4228# Check if a compiler is of the toolchain type we expect, and save the version
4229# information from it. If the compiler does not match the expected type,
4230# this function will abort using AC_MSG_ERROR. If it matches, the version will
4231# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4232# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4233#
4234# $1 = compiler to test (CC or CXX)
4235# $2 = human readable name of compiler (C or C++)
4236
4237
4238# Try to locate the given C or C++ compiler in the path, or otherwise.
4239#
4240# $1 = compiler to test (CC or CXX)
4241# $2 = human readable name of compiler (C or C++)
4242# $3 = list of compiler names to search for
4243
4244
4245# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4246# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4247# archiver (AR). Verify that the compilers are correct according to the
4248# toolchain type.
4249
4250
4251# Setup additional tools that is considered a part of the toolchain, but not the
4252# core part. Many of these are highly platform-specific and do not exist,
4253# and/or are not needed on all platforms.
4254
4255
4256# Setup the build tools (i.e, the compiler and linker used to build programs
4257# that should be run on the build platform, not the target platform, as a build
4258# helper). Since the non-cross-compile case uses the normal, target compilers
4259# for this, we can only do this after these have been setup.
4260
4261
4262# Setup legacy variables that are still needed as alternative ways to refer to
4263# parts of the toolchain.
4264
4265
4266# Do some additional checks on the detected tools.
4267
4268
4269# Setup the JTReg Regression Test Harness.
4270
4271
4272#
4273# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4274# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4275#
4276# This code is free software; you can redistribute it and/or modify it
4277# under the terms of the GNU General Public License version 2 only, as
4278# published by the Free Software Foundation.  Oracle designates this
4279# particular file as subject to the "Classpath" exception as provided
4280# by Oracle in the LICENSE file that accompanied this code.
4281#
4282# This code is distributed in the hope that it will be useful, but WITHOUT
4283# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4284# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4285# version 2 for more details (a copy is included in the LICENSE file that
4286# accompanied this code).
4287#
4288# You should have received a copy of the GNU General Public License version
4289# 2 along with this work; if not, write to the Free Software Foundation,
4290# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4291#
4292# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4293# or visit www.oracle.com if you need additional information or have any
4294# questions.
4295#
4296
4297
4298
4299
4300
4301
4302
4303# Check if the VS env variables were setup prior to running configure.
4304# If not, then find vcvarsall.bat and run it automatically, and integrate
4305# the set env variables into the spec file.
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316# This line needs to be here, verbatim, after all includes and the dummy hook
4317# definitions. It is replaced with custom functionality when building
4318# custom sources.
4319#CUSTOM_AUTOCONF_INCLUDE
4320
4321# Do not change or remove the following line, it is needed for consistency checks:
4322DATE_WHEN_GENERATED=1407143049
4323
4324###############################################################################
4325#
4326# Initialization / Boot-strapping
4327#
4328# The bootstrapping process needs to solve the "chicken or the egg" problem,
4329# thus it jumps back and forth, each time gaining something needed later on.
4330#
4331###############################################################################
4332
4333# If we are requested to print additional help, do that and then exit.
4334# This must be the very first call.
4335
4336  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4337    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4338    $PRINTF "Which are valid to use depends on the build platform.\n"
4339    for toolchain in $VALID_TOOLCHAINS_all; do
4340      # Use indirect variable referencing
4341      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4342      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4343      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4344    done
4345
4346    # And now exit directly
4347    exit 0
4348  fi
4349
4350
4351# Basic initialization that must happen first of all in the normal process.
4352
4353  # Save the original command line. This is passed to us by the wrapper configure script.
4354
4355  DATE_WHEN_CONFIGURED=`LANG=C date`
4356
4357  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4358$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4359  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4360$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4361
4362
4363  # Start with tools that do not need have cross compilation support
4364  # and can be expected to be found in the default PATH. These tools are
4365  # used by configure. Nor are these tools expected to be found in the
4366  # devkit from the builddeps server either, since they are
4367  # needed to download the devkit.
4368
4369  # First are all the simple required tools.
4370
4371
4372
4373  # Publish this variable in the help.
4374
4375
4376  if test "x$BASENAME" = x; then
4377    # The variable is not set by user, try to locate tool using the code snippet
4378    for ac_prog in basename
4379do
4380  # Extract the first word of "$ac_prog", so it can be a program name with args.
4381set dummy $ac_prog; ac_word=$2
4382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4383$as_echo_n "checking for $ac_word... " >&6; }
4384if ${ac_cv_path_BASENAME+:} false; then :
4385  $as_echo_n "(cached) " >&6
4386else
4387  case $BASENAME in
4388  [\\/]* | ?:[\\/]*)
4389  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4390  ;;
4391  *)
4392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4393for as_dir in $PATH
4394do
4395  IFS=$as_save_IFS
4396  test -z "$as_dir" && as_dir=.
4397    for ac_exec_ext in '' $ac_executable_extensions; do
4398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4399    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4401    break 2
4402  fi
4403done
4404  done
4405IFS=$as_save_IFS
4406
4407  ;;
4408esac
4409fi
4410BASENAME=$ac_cv_path_BASENAME
4411if test -n "$BASENAME"; then
4412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4413$as_echo "$BASENAME" >&6; }
4414else
4415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4416$as_echo "no" >&6; }
4417fi
4418
4419
4420  test -n "$BASENAME" && break
4421done
4422
4423  else
4424    # The variable is set, but is it from the command line or the environment?
4425
4426    # Try to remove the string !BASENAME! from our list.
4427    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4428    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4429      # If it failed, the variable was not from the command line. Ignore it,
4430      # but warn the user (except for BASH, which is always set by the calling BASH).
4431      if test "xBASENAME" != xBASH; then
4432        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4433$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4434      fi
4435      # Try to locate tool using the code snippet
4436      for ac_prog in basename
4437do
4438  # Extract the first word of "$ac_prog", so it can be a program name with args.
4439set dummy $ac_prog; ac_word=$2
4440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4441$as_echo_n "checking for $ac_word... " >&6; }
4442if ${ac_cv_path_BASENAME+:} false; then :
4443  $as_echo_n "(cached) " >&6
4444else
4445  case $BASENAME in
4446  [\\/]* | ?:[\\/]*)
4447  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4448  ;;
4449  *)
4450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4451for as_dir in $PATH
4452do
4453  IFS=$as_save_IFS
4454  test -z "$as_dir" && as_dir=.
4455    for ac_exec_ext in '' $ac_executable_extensions; do
4456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4457    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4459    break 2
4460  fi
4461done
4462  done
4463IFS=$as_save_IFS
4464
4465  ;;
4466esac
4467fi
4468BASENAME=$ac_cv_path_BASENAME
4469if test -n "$BASENAME"; then
4470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4471$as_echo "$BASENAME" >&6; }
4472else
4473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4474$as_echo "no" >&6; }
4475fi
4476
4477
4478  test -n "$BASENAME" && break
4479done
4480
4481    else
4482      # If it succeeded, then it was overridden by the user. We will use it
4483      # for the tool.
4484
4485      # First remove it from the list of overridden variables, so we can test
4486      # for unknown variables in the end.
4487      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4488
4489      # Check if the provided tool contains a complete path.
4490      tool_specified="$BASENAME"
4491      tool_basename="${tool_specified##*/}"
4492      if test "x$tool_basename" = "x$tool_specified"; then
4493        # A command without a complete path is provided, search $PATH.
4494        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4495$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4496        # Extract the first word of "$tool_basename", so it can be a program name with args.
4497set dummy $tool_basename; ac_word=$2
4498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4499$as_echo_n "checking for $ac_word... " >&6; }
4500if ${ac_cv_path_BASENAME+:} false; then :
4501  $as_echo_n "(cached) " >&6
4502else
4503  case $BASENAME in
4504  [\\/]* | ?:[\\/]*)
4505  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4506  ;;
4507  *)
4508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4509for as_dir in $PATH
4510do
4511  IFS=$as_save_IFS
4512  test -z "$as_dir" && as_dir=.
4513    for ac_exec_ext in '' $ac_executable_extensions; do
4514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4515    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4517    break 2
4518  fi
4519done
4520  done
4521IFS=$as_save_IFS
4522
4523  ;;
4524esac
4525fi
4526BASENAME=$ac_cv_path_BASENAME
4527if test -n "$BASENAME"; then
4528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4529$as_echo "$BASENAME" >&6; }
4530else
4531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4532$as_echo "no" >&6; }
4533fi
4534
4535
4536        if test "x$BASENAME" = x; then
4537          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4538        fi
4539      else
4540        # Otherwise we believe it is a complete path. Use it as it is.
4541        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4542$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4544$as_echo_n "checking for BASENAME... " >&6; }
4545        if test ! -x "$tool_specified"; then
4546          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4547$as_echo "not found" >&6; }
4548          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4549        fi
4550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4551$as_echo "$tool_specified" >&6; }
4552      fi
4553    fi
4554  fi
4555
4556
4557
4558  if test "x$BASENAME" = x; then
4559    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4560  fi
4561
4562
4563
4564
4565
4566  # Publish this variable in the help.
4567
4568
4569  if test "x$BASH" = x; then
4570    # The variable is not set by user, try to locate tool using the code snippet
4571    for ac_prog in bash
4572do
4573  # Extract the first word of "$ac_prog", so it can be a program name with args.
4574set dummy $ac_prog; ac_word=$2
4575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4576$as_echo_n "checking for $ac_word... " >&6; }
4577if ${ac_cv_path_BASH+:} false; then :
4578  $as_echo_n "(cached) " >&6
4579else
4580  case $BASH in
4581  [\\/]* | ?:[\\/]*)
4582  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4583  ;;
4584  *)
4585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4586for as_dir in $PATH
4587do
4588  IFS=$as_save_IFS
4589  test -z "$as_dir" && as_dir=.
4590    for ac_exec_ext in '' $ac_executable_extensions; do
4591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4592    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4594    break 2
4595  fi
4596done
4597  done
4598IFS=$as_save_IFS
4599
4600  ;;
4601esac
4602fi
4603BASH=$ac_cv_path_BASH
4604if test -n "$BASH"; then
4605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4606$as_echo "$BASH" >&6; }
4607else
4608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4609$as_echo "no" >&6; }
4610fi
4611
4612
4613  test -n "$BASH" && break
4614done
4615
4616  else
4617    # The variable is set, but is it from the command line or the environment?
4618
4619    # Try to remove the string !BASH! from our list.
4620    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4621    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4622      # If it failed, the variable was not from the command line. Ignore it,
4623      # but warn the user (except for BASH, which is always set by the calling BASH).
4624      if test "xBASH" != xBASH; then
4625        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4626$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4627      fi
4628      # Try to locate tool using the code snippet
4629      for ac_prog in bash
4630do
4631  # Extract the first word of "$ac_prog", so it can be a program name with args.
4632set dummy $ac_prog; ac_word=$2
4633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4634$as_echo_n "checking for $ac_word... " >&6; }
4635if ${ac_cv_path_BASH+:} false; then :
4636  $as_echo_n "(cached) " >&6
4637else
4638  case $BASH in
4639  [\\/]* | ?:[\\/]*)
4640  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4641  ;;
4642  *)
4643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4644for as_dir in $PATH
4645do
4646  IFS=$as_save_IFS
4647  test -z "$as_dir" && as_dir=.
4648    for ac_exec_ext in '' $ac_executable_extensions; do
4649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4650    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4652    break 2
4653  fi
4654done
4655  done
4656IFS=$as_save_IFS
4657
4658  ;;
4659esac
4660fi
4661BASH=$ac_cv_path_BASH
4662if test -n "$BASH"; then
4663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4664$as_echo "$BASH" >&6; }
4665else
4666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4667$as_echo "no" >&6; }
4668fi
4669
4670
4671  test -n "$BASH" && break
4672done
4673
4674    else
4675      # If it succeeded, then it was overridden by the user. We will use it
4676      # for the tool.
4677
4678      # First remove it from the list of overridden variables, so we can test
4679      # for unknown variables in the end.
4680      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4681
4682      # Check if the provided tool contains a complete path.
4683      tool_specified="$BASH"
4684      tool_basename="${tool_specified##*/}"
4685      if test "x$tool_basename" = "x$tool_specified"; then
4686        # A command without a complete path is provided, search $PATH.
4687        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4688$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4689        # Extract the first word of "$tool_basename", so it can be a program name with args.
4690set dummy $tool_basename; ac_word=$2
4691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4692$as_echo_n "checking for $ac_word... " >&6; }
4693if ${ac_cv_path_BASH+:} false; then :
4694  $as_echo_n "(cached) " >&6
4695else
4696  case $BASH in
4697  [\\/]* | ?:[\\/]*)
4698  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4699  ;;
4700  *)
4701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4702for as_dir in $PATH
4703do
4704  IFS=$as_save_IFS
4705  test -z "$as_dir" && as_dir=.
4706    for ac_exec_ext in '' $ac_executable_extensions; do
4707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4708    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4710    break 2
4711  fi
4712done
4713  done
4714IFS=$as_save_IFS
4715
4716  ;;
4717esac
4718fi
4719BASH=$ac_cv_path_BASH
4720if test -n "$BASH"; then
4721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4722$as_echo "$BASH" >&6; }
4723else
4724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4725$as_echo "no" >&6; }
4726fi
4727
4728
4729        if test "x$BASH" = x; then
4730          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4731        fi
4732      else
4733        # Otherwise we believe it is a complete path. Use it as it is.
4734        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4735$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4736        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4737$as_echo_n "checking for BASH... " >&6; }
4738        if test ! -x "$tool_specified"; then
4739          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4740$as_echo "not found" >&6; }
4741          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4742        fi
4743        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4744$as_echo "$tool_specified" >&6; }
4745      fi
4746    fi
4747  fi
4748
4749
4750
4751  if test "x$BASH" = x; then
4752    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4753  fi
4754
4755
4756
4757
4758
4759  # Publish this variable in the help.
4760
4761
4762  if test "x$CAT" = x; then
4763    # The variable is not set by user, try to locate tool using the code snippet
4764    for ac_prog in cat
4765do
4766  # Extract the first word of "$ac_prog", so it can be a program name with args.
4767set dummy $ac_prog; ac_word=$2
4768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4769$as_echo_n "checking for $ac_word... " >&6; }
4770if ${ac_cv_path_CAT+:} false; then :
4771  $as_echo_n "(cached) " >&6
4772else
4773  case $CAT in
4774  [\\/]* | ?:[\\/]*)
4775  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4776  ;;
4777  *)
4778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4779for as_dir in $PATH
4780do
4781  IFS=$as_save_IFS
4782  test -z "$as_dir" && as_dir=.
4783    for ac_exec_ext in '' $ac_executable_extensions; do
4784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4785    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4787    break 2
4788  fi
4789done
4790  done
4791IFS=$as_save_IFS
4792
4793  ;;
4794esac
4795fi
4796CAT=$ac_cv_path_CAT
4797if test -n "$CAT"; then
4798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4799$as_echo "$CAT" >&6; }
4800else
4801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4802$as_echo "no" >&6; }
4803fi
4804
4805
4806  test -n "$CAT" && break
4807done
4808
4809  else
4810    # The variable is set, but is it from the command line or the environment?
4811
4812    # Try to remove the string !CAT! from our list.
4813    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4814    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4815      # If it failed, the variable was not from the command line. Ignore it,
4816      # but warn the user (except for BASH, which is always set by the calling BASH).
4817      if test "xCAT" != xBASH; then
4818        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4819$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4820      fi
4821      # Try to locate tool using the code snippet
4822      for ac_prog in cat
4823do
4824  # Extract the first word of "$ac_prog", so it can be a program name with args.
4825set dummy $ac_prog; ac_word=$2
4826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4827$as_echo_n "checking for $ac_word... " >&6; }
4828if ${ac_cv_path_CAT+:} false; then :
4829  $as_echo_n "(cached) " >&6
4830else
4831  case $CAT in
4832  [\\/]* | ?:[\\/]*)
4833  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4834  ;;
4835  *)
4836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4837for as_dir in $PATH
4838do
4839  IFS=$as_save_IFS
4840  test -z "$as_dir" && as_dir=.
4841    for ac_exec_ext in '' $ac_executable_extensions; do
4842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4843    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4845    break 2
4846  fi
4847done
4848  done
4849IFS=$as_save_IFS
4850
4851  ;;
4852esac
4853fi
4854CAT=$ac_cv_path_CAT
4855if test -n "$CAT"; then
4856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4857$as_echo "$CAT" >&6; }
4858else
4859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4860$as_echo "no" >&6; }
4861fi
4862
4863
4864  test -n "$CAT" && break
4865done
4866
4867    else
4868      # If it succeeded, then it was overridden by the user. We will use it
4869      # for the tool.
4870
4871      # First remove it from the list of overridden variables, so we can test
4872      # for unknown variables in the end.
4873      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4874
4875      # Check if the provided tool contains a complete path.
4876      tool_specified="$CAT"
4877      tool_basename="${tool_specified##*/}"
4878      if test "x$tool_basename" = "x$tool_specified"; then
4879        # A command without a complete path is provided, search $PATH.
4880        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4881$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4882        # Extract the first word of "$tool_basename", so it can be a program name with args.
4883set dummy $tool_basename; ac_word=$2
4884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4885$as_echo_n "checking for $ac_word... " >&6; }
4886if ${ac_cv_path_CAT+:} false; then :
4887  $as_echo_n "(cached) " >&6
4888else
4889  case $CAT in
4890  [\\/]* | ?:[\\/]*)
4891  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4892  ;;
4893  *)
4894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4895for as_dir in $PATH
4896do
4897  IFS=$as_save_IFS
4898  test -z "$as_dir" && as_dir=.
4899    for ac_exec_ext in '' $ac_executable_extensions; do
4900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4901    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4903    break 2
4904  fi
4905done
4906  done
4907IFS=$as_save_IFS
4908
4909  ;;
4910esac
4911fi
4912CAT=$ac_cv_path_CAT
4913if test -n "$CAT"; then
4914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4915$as_echo "$CAT" >&6; }
4916else
4917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4918$as_echo "no" >&6; }
4919fi
4920
4921
4922        if test "x$CAT" = x; then
4923          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4924        fi
4925      else
4926        # Otherwise we believe it is a complete path. Use it as it is.
4927        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4928$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4929        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4930$as_echo_n "checking for CAT... " >&6; }
4931        if test ! -x "$tool_specified"; then
4932          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4933$as_echo "not found" >&6; }
4934          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4935        fi
4936        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4937$as_echo "$tool_specified" >&6; }
4938      fi
4939    fi
4940  fi
4941
4942
4943
4944  if test "x$CAT" = x; then
4945    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4946  fi
4947
4948
4949
4950
4951
4952  # Publish this variable in the help.
4953
4954
4955  if test "x$CHMOD" = x; then
4956    # The variable is not set by user, try to locate tool using the code snippet
4957    for ac_prog in chmod
4958do
4959  # Extract the first word of "$ac_prog", so it can be a program name with args.
4960set dummy $ac_prog; ac_word=$2
4961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4962$as_echo_n "checking for $ac_word... " >&6; }
4963if ${ac_cv_path_CHMOD+:} false; then :
4964  $as_echo_n "(cached) " >&6
4965else
4966  case $CHMOD in
4967  [\\/]* | ?:[\\/]*)
4968  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4969  ;;
4970  *)
4971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4972for as_dir in $PATH
4973do
4974  IFS=$as_save_IFS
4975  test -z "$as_dir" && as_dir=.
4976    for ac_exec_ext in '' $ac_executable_extensions; do
4977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4978    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4980    break 2
4981  fi
4982done
4983  done
4984IFS=$as_save_IFS
4985
4986  ;;
4987esac
4988fi
4989CHMOD=$ac_cv_path_CHMOD
4990if test -n "$CHMOD"; then
4991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4992$as_echo "$CHMOD" >&6; }
4993else
4994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995$as_echo "no" >&6; }
4996fi
4997
4998
4999  test -n "$CHMOD" && break
5000done
5001
5002  else
5003    # The variable is set, but is it from the command line or the environment?
5004
5005    # Try to remove the string !CHMOD! from our list.
5006    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5007    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5008      # If it failed, the variable was not from the command line. Ignore it,
5009      # but warn the user (except for BASH, which is always set by the calling BASH).
5010      if test "xCHMOD" != xBASH; then
5011        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5012$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5013      fi
5014      # Try to locate tool using the code snippet
5015      for ac_prog in chmod
5016do
5017  # Extract the first word of "$ac_prog", so it can be a program name with args.
5018set dummy $ac_prog; ac_word=$2
5019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5020$as_echo_n "checking for $ac_word... " >&6; }
5021if ${ac_cv_path_CHMOD+:} false; then :
5022  $as_echo_n "(cached) " >&6
5023else
5024  case $CHMOD in
5025  [\\/]* | ?:[\\/]*)
5026  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5027  ;;
5028  *)
5029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5030for as_dir in $PATH
5031do
5032  IFS=$as_save_IFS
5033  test -z "$as_dir" && as_dir=.
5034    for ac_exec_ext in '' $ac_executable_extensions; do
5035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5036    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5038    break 2
5039  fi
5040done
5041  done
5042IFS=$as_save_IFS
5043
5044  ;;
5045esac
5046fi
5047CHMOD=$ac_cv_path_CHMOD
5048if test -n "$CHMOD"; then
5049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5050$as_echo "$CHMOD" >&6; }
5051else
5052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5053$as_echo "no" >&6; }
5054fi
5055
5056
5057  test -n "$CHMOD" && break
5058done
5059
5060    else
5061      # If it succeeded, then it was overridden by the user. We will use it
5062      # for the tool.
5063
5064      # First remove it from the list of overridden variables, so we can test
5065      # for unknown variables in the end.
5066      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5067
5068      # Check if the provided tool contains a complete path.
5069      tool_specified="$CHMOD"
5070      tool_basename="${tool_specified##*/}"
5071      if test "x$tool_basename" = "x$tool_specified"; then
5072        # A command without a complete path is provided, search $PATH.
5073        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5074$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5075        # Extract the first word of "$tool_basename", so it can be a program name with args.
5076set dummy $tool_basename; ac_word=$2
5077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5078$as_echo_n "checking for $ac_word... " >&6; }
5079if ${ac_cv_path_CHMOD+:} false; then :
5080  $as_echo_n "(cached) " >&6
5081else
5082  case $CHMOD in
5083  [\\/]* | ?:[\\/]*)
5084  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5085  ;;
5086  *)
5087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5088for as_dir in $PATH
5089do
5090  IFS=$as_save_IFS
5091  test -z "$as_dir" && as_dir=.
5092    for ac_exec_ext in '' $ac_executable_extensions; do
5093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5094    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5096    break 2
5097  fi
5098done
5099  done
5100IFS=$as_save_IFS
5101
5102  ;;
5103esac
5104fi
5105CHMOD=$ac_cv_path_CHMOD
5106if test -n "$CHMOD"; then
5107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5108$as_echo "$CHMOD" >&6; }
5109else
5110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5111$as_echo "no" >&6; }
5112fi
5113
5114
5115        if test "x$CHMOD" = x; then
5116          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5117        fi
5118      else
5119        # Otherwise we believe it is a complete path. Use it as it is.
5120        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5121$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5122        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5123$as_echo_n "checking for CHMOD... " >&6; }
5124        if test ! -x "$tool_specified"; then
5125          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5126$as_echo "not found" >&6; }
5127          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5128        fi
5129        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5130$as_echo "$tool_specified" >&6; }
5131      fi
5132    fi
5133  fi
5134
5135
5136
5137  if test "x$CHMOD" = x; then
5138    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5139  fi
5140
5141
5142
5143
5144
5145  # Publish this variable in the help.
5146
5147
5148  if test "x$CMP" = x; then
5149    # The variable is not set by user, try to locate tool using the code snippet
5150    for ac_prog in cmp
5151do
5152  # Extract the first word of "$ac_prog", so it can be a program name with args.
5153set dummy $ac_prog; ac_word=$2
5154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5155$as_echo_n "checking for $ac_word... " >&6; }
5156if ${ac_cv_path_CMP+:} false; then :
5157  $as_echo_n "(cached) " >&6
5158else
5159  case $CMP in
5160  [\\/]* | ?:[\\/]*)
5161  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5162  ;;
5163  *)
5164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5165for as_dir in $PATH
5166do
5167  IFS=$as_save_IFS
5168  test -z "$as_dir" && as_dir=.
5169    for ac_exec_ext in '' $ac_executable_extensions; do
5170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5171    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5173    break 2
5174  fi
5175done
5176  done
5177IFS=$as_save_IFS
5178
5179  ;;
5180esac
5181fi
5182CMP=$ac_cv_path_CMP
5183if test -n "$CMP"; then
5184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5185$as_echo "$CMP" >&6; }
5186else
5187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5188$as_echo "no" >&6; }
5189fi
5190
5191
5192  test -n "$CMP" && break
5193done
5194
5195  else
5196    # The variable is set, but is it from the command line or the environment?
5197
5198    # Try to remove the string !CMP! from our list.
5199    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5200    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5201      # If it failed, the variable was not from the command line. Ignore it,
5202      # but warn the user (except for BASH, which is always set by the calling BASH).
5203      if test "xCMP" != xBASH; then
5204        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5205$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5206      fi
5207      # Try to locate tool using the code snippet
5208      for ac_prog in cmp
5209do
5210  # Extract the first word of "$ac_prog", so it can be a program name with args.
5211set dummy $ac_prog; ac_word=$2
5212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5213$as_echo_n "checking for $ac_word... " >&6; }
5214if ${ac_cv_path_CMP+:} false; then :
5215  $as_echo_n "(cached) " >&6
5216else
5217  case $CMP in
5218  [\\/]* | ?:[\\/]*)
5219  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5220  ;;
5221  *)
5222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5223for as_dir in $PATH
5224do
5225  IFS=$as_save_IFS
5226  test -z "$as_dir" && as_dir=.
5227    for ac_exec_ext in '' $ac_executable_extensions; do
5228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5229    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5231    break 2
5232  fi
5233done
5234  done
5235IFS=$as_save_IFS
5236
5237  ;;
5238esac
5239fi
5240CMP=$ac_cv_path_CMP
5241if test -n "$CMP"; then
5242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5243$as_echo "$CMP" >&6; }
5244else
5245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5246$as_echo "no" >&6; }
5247fi
5248
5249
5250  test -n "$CMP" && break
5251done
5252
5253    else
5254      # If it succeeded, then it was overridden by the user. We will use it
5255      # for the tool.
5256
5257      # First remove it from the list of overridden variables, so we can test
5258      # for unknown variables in the end.
5259      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5260
5261      # Check if the provided tool contains a complete path.
5262      tool_specified="$CMP"
5263      tool_basename="${tool_specified##*/}"
5264      if test "x$tool_basename" = "x$tool_specified"; then
5265        # A command without a complete path is provided, search $PATH.
5266        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5267$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5268        # Extract the first word of "$tool_basename", so it can be a program name with args.
5269set dummy $tool_basename; ac_word=$2
5270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5271$as_echo_n "checking for $ac_word... " >&6; }
5272if ${ac_cv_path_CMP+:} false; then :
5273  $as_echo_n "(cached) " >&6
5274else
5275  case $CMP in
5276  [\\/]* | ?:[\\/]*)
5277  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5278  ;;
5279  *)
5280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5281for as_dir in $PATH
5282do
5283  IFS=$as_save_IFS
5284  test -z "$as_dir" && as_dir=.
5285    for ac_exec_ext in '' $ac_executable_extensions; do
5286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5287    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5289    break 2
5290  fi
5291done
5292  done
5293IFS=$as_save_IFS
5294
5295  ;;
5296esac
5297fi
5298CMP=$ac_cv_path_CMP
5299if test -n "$CMP"; then
5300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5301$as_echo "$CMP" >&6; }
5302else
5303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5304$as_echo "no" >&6; }
5305fi
5306
5307
5308        if test "x$CMP" = x; then
5309          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5310        fi
5311      else
5312        # Otherwise we believe it is a complete path. Use it as it is.
5313        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5314$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5316$as_echo_n "checking for CMP... " >&6; }
5317        if test ! -x "$tool_specified"; then
5318          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5319$as_echo "not found" >&6; }
5320          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5321        fi
5322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5323$as_echo "$tool_specified" >&6; }
5324      fi
5325    fi
5326  fi
5327
5328
5329
5330  if test "x$CMP" = x; then
5331    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5332  fi
5333
5334
5335
5336
5337
5338  # Publish this variable in the help.
5339
5340
5341  if test "x$COMM" = x; then
5342    # The variable is not set by user, try to locate tool using the code snippet
5343    for ac_prog in comm
5344do
5345  # Extract the first word of "$ac_prog", so it can be a program name with args.
5346set dummy $ac_prog; ac_word=$2
5347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5348$as_echo_n "checking for $ac_word... " >&6; }
5349if ${ac_cv_path_COMM+:} false; then :
5350  $as_echo_n "(cached) " >&6
5351else
5352  case $COMM in
5353  [\\/]* | ?:[\\/]*)
5354  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5355  ;;
5356  *)
5357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5358for as_dir in $PATH
5359do
5360  IFS=$as_save_IFS
5361  test -z "$as_dir" && as_dir=.
5362    for ac_exec_ext in '' $ac_executable_extensions; do
5363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5364    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5366    break 2
5367  fi
5368done
5369  done
5370IFS=$as_save_IFS
5371
5372  ;;
5373esac
5374fi
5375COMM=$ac_cv_path_COMM
5376if test -n "$COMM"; then
5377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5378$as_echo "$COMM" >&6; }
5379else
5380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5381$as_echo "no" >&6; }
5382fi
5383
5384
5385  test -n "$COMM" && break
5386done
5387
5388  else
5389    # The variable is set, but is it from the command line or the environment?
5390
5391    # Try to remove the string !COMM! from our list.
5392    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5393    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5394      # If it failed, the variable was not from the command line. Ignore it,
5395      # but warn the user (except for BASH, which is always set by the calling BASH).
5396      if test "xCOMM" != xBASH; then
5397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5398$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5399      fi
5400      # Try to locate tool using the code snippet
5401      for ac_prog in comm
5402do
5403  # Extract the first word of "$ac_prog", so it can be a program name with args.
5404set dummy $ac_prog; ac_word=$2
5405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5406$as_echo_n "checking for $ac_word... " >&6; }
5407if ${ac_cv_path_COMM+:} false; then :
5408  $as_echo_n "(cached) " >&6
5409else
5410  case $COMM in
5411  [\\/]* | ?:[\\/]*)
5412  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5413  ;;
5414  *)
5415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5416for as_dir in $PATH
5417do
5418  IFS=$as_save_IFS
5419  test -z "$as_dir" && as_dir=.
5420    for ac_exec_ext in '' $ac_executable_extensions; do
5421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5422    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5424    break 2
5425  fi
5426done
5427  done
5428IFS=$as_save_IFS
5429
5430  ;;
5431esac
5432fi
5433COMM=$ac_cv_path_COMM
5434if test -n "$COMM"; then
5435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5436$as_echo "$COMM" >&6; }
5437else
5438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5439$as_echo "no" >&6; }
5440fi
5441
5442
5443  test -n "$COMM" && break
5444done
5445
5446    else
5447      # If it succeeded, then it was overridden by the user. We will use it
5448      # for the tool.
5449
5450      # First remove it from the list of overridden variables, so we can test
5451      # for unknown variables in the end.
5452      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5453
5454      # Check if the provided tool contains a complete path.
5455      tool_specified="$COMM"
5456      tool_basename="${tool_specified##*/}"
5457      if test "x$tool_basename" = "x$tool_specified"; then
5458        # A command without a complete path is provided, search $PATH.
5459        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5460$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5461        # Extract the first word of "$tool_basename", so it can be a program name with args.
5462set dummy $tool_basename; ac_word=$2
5463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5464$as_echo_n "checking for $ac_word... " >&6; }
5465if ${ac_cv_path_COMM+:} false; then :
5466  $as_echo_n "(cached) " >&6
5467else
5468  case $COMM in
5469  [\\/]* | ?:[\\/]*)
5470  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5471  ;;
5472  *)
5473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5474for as_dir in $PATH
5475do
5476  IFS=$as_save_IFS
5477  test -z "$as_dir" && as_dir=.
5478    for ac_exec_ext in '' $ac_executable_extensions; do
5479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5480    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5482    break 2
5483  fi
5484done
5485  done
5486IFS=$as_save_IFS
5487
5488  ;;
5489esac
5490fi
5491COMM=$ac_cv_path_COMM
5492if test -n "$COMM"; then
5493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5494$as_echo "$COMM" >&6; }
5495else
5496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5497$as_echo "no" >&6; }
5498fi
5499
5500
5501        if test "x$COMM" = x; then
5502          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5503        fi
5504      else
5505        # Otherwise we believe it is a complete path. Use it as it is.
5506        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5507$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5508        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5509$as_echo_n "checking for COMM... " >&6; }
5510        if test ! -x "$tool_specified"; then
5511          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5512$as_echo "not found" >&6; }
5513          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5514        fi
5515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5516$as_echo "$tool_specified" >&6; }
5517      fi
5518    fi
5519  fi
5520
5521
5522
5523  if test "x$COMM" = x; then
5524    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5525  fi
5526
5527
5528
5529
5530
5531  # Publish this variable in the help.
5532
5533
5534  if test "x$CP" = x; then
5535    # The variable is not set by user, try to locate tool using the code snippet
5536    for ac_prog in cp
5537do
5538  # Extract the first word of "$ac_prog", so it can be a program name with args.
5539set dummy $ac_prog; ac_word=$2
5540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5541$as_echo_n "checking for $ac_word... " >&6; }
5542if ${ac_cv_path_CP+:} false; then :
5543  $as_echo_n "(cached) " >&6
5544else
5545  case $CP in
5546  [\\/]* | ?:[\\/]*)
5547  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5548  ;;
5549  *)
5550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5551for as_dir in $PATH
5552do
5553  IFS=$as_save_IFS
5554  test -z "$as_dir" && as_dir=.
5555    for ac_exec_ext in '' $ac_executable_extensions; do
5556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5557    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5559    break 2
5560  fi
5561done
5562  done
5563IFS=$as_save_IFS
5564
5565  ;;
5566esac
5567fi
5568CP=$ac_cv_path_CP
5569if test -n "$CP"; then
5570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5571$as_echo "$CP" >&6; }
5572else
5573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5574$as_echo "no" >&6; }
5575fi
5576
5577
5578  test -n "$CP" && break
5579done
5580
5581  else
5582    # The variable is set, but is it from the command line or the environment?
5583
5584    # Try to remove the string !CP! from our list.
5585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5587      # If it failed, the variable was not from the command line. Ignore it,
5588      # but warn the user (except for BASH, which is always set by the calling BASH).
5589      if test "xCP" != xBASH; then
5590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5591$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5592      fi
5593      # Try to locate tool using the code snippet
5594      for ac_prog in cp
5595do
5596  # Extract the first word of "$ac_prog", so it can be a program name with args.
5597set dummy $ac_prog; ac_word=$2
5598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5599$as_echo_n "checking for $ac_word... " >&6; }
5600if ${ac_cv_path_CP+:} false; then :
5601  $as_echo_n "(cached) " >&6
5602else
5603  case $CP in
5604  [\\/]* | ?:[\\/]*)
5605  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5606  ;;
5607  *)
5608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5609for as_dir in $PATH
5610do
5611  IFS=$as_save_IFS
5612  test -z "$as_dir" && as_dir=.
5613    for ac_exec_ext in '' $ac_executable_extensions; do
5614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5615    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5617    break 2
5618  fi
5619done
5620  done
5621IFS=$as_save_IFS
5622
5623  ;;
5624esac
5625fi
5626CP=$ac_cv_path_CP
5627if test -n "$CP"; then
5628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5629$as_echo "$CP" >&6; }
5630else
5631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5632$as_echo "no" >&6; }
5633fi
5634
5635
5636  test -n "$CP" && break
5637done
5638
5639    else
5640      # If it succeeded, then it was overridden by the user. We will use it
5641      # for the tool.
5642
5643      # First remove it from the list of overridden variables, so we can test
5644      # for unknown variables in the end.
5645      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5646
5647      # Check if the provided tool contains a complete path.
5648      tool_specified="$CP"
5649      tool_basename="${tool_specified##*/}"
5650      if test "x$tool_basename" = "x$tool_specified"; then
5651        # A command without a complete path is provided, search $PATH.
5652        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5653$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5654        # Extract the first word of "$tool_basename", so it can be a program name with args.
5655set dummy $tool_basename; ac_word=$2
5656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5657$as_echo_n "checking for $ac_word... " >&6; }
5658if ${ac_cv_path_CP+:} false; then :
5659  $as_echo_n "(cached) " >&6
5660else
5661  case $CP in
5662  [\\/]* | ?:[\\/]*)
5663  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5664  ;;
5665  *)
5666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5667for as_dir in $PATH
5668do
5669  IFS=$as_save_IFS
5670  test -z "$as_dir" && as_dir=.
5671    for ac_exec_ext in '' $ac_executable_extensions; do
5672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5673    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5675    break 2
5676  fi
5677done
5678  done
5679IFS=$as_save_IFS
5680
5681  ;;
5682esac
5683fi
5684CP=$ac_cv_path_CP
5685if test -n "$CP"; then
5686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5687$as_echo "$CP" >&6; }
5688else
5689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5690$as_echo "no" >&6; }
5691fi
5692
5693
5694        if test "x$CP" = x; then
5695          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5696        fi
5697      else
5698        # Otherwise we believe it is a complete path. Use it as it is.
5699        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5700$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5701        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5702$as_echo_n "checking for CP... " >&6; }
5703        if test ! -x "$tool_specified"; then
5704          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5705$as_echo "not found" >&6; }
5706          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5707        fi
5708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5709$as_echo "$tool_specified" >&6; }
5710      fi
5711    fi
5712  fi
5713
5714
5715
5716  if test "x$CP" = x; then
5717    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5718  fi
5719
5720
5721
5722
5723
5724  # Publish this variable in the help.
5725
5726
5727  if test "x$CPIO" = x; then
5728    # The variable is not set by user, try to locate tool using the code snippet
5729    for ac_prog in cpio
5730do
5731  # Extract the first word of "$ac_prog", so it can be a program name with args.
5732set dummy $ac_prog; ac_word=$2
5733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5734$as_echo_n "checking for $ac_word... " >&6; }
5735if ${ac_cv_path_CPIO+:} false; then :
5736  $as_echo_n "(cached) " >&6
5737else
5738  case $CPIO in
5739  [\\/]* | ?:[\\/]*)
5740  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5741  ;;
5742  *)
5743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5744for as_dir in $PATH
5745do
5746  IFS=$as_save_IFS
5747  test -z "$as_dir" && as_dir=.
5748    for ac_exec_ext in '' $ac_executable_extensions; do
5749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5750    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5752    break 2
5753  fi
5754done
5755  done
5756IFS=$as_save_IFS
5757
5758  ;;
5759esac
5760fi
5761CPIO=$ac_cv_path_CPIO
5762if test -n "$CPIO"; then
5763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5764$as_echo "$CPIO" >&6; }
5765else
5766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5767$as_echo "no" >&6; }
5768fi
5769
5770
5771  test -n "$CPIO" && break
5772done
5773
5774  else
5775    # The variable is set, but is it from the command line or the environment?
5776
5777    # Try to remove the string !CPIO! from our list.
5778    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5779    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5780      # If it failed, the variable was not from the command line. Ignore it,
5781      # but warn the user (except for BASH, which is always set by the calling BASH).
5782      if test "xCPIO" != xBASH; then
5783        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5784$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5785      fi
5786      # Try to locate tool using the code snippet
5787      for ac_prog in cpio
5788do
5789  # Extract the first word of "$ac_prog", so it can be a program name with args.
5790set dummy $ac_prog; ac_word=$2
5791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5792$as_echo_n "checking for $ac_word... " >&6; }
5793if ${ac_cv_path_CPIO+:} false; then :
5794  $as_echo_n "(cached) " >&6
5795else
5796  case $CPIO in
5797  [\\/]* | ?:[\\/]*)
5798  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5799  ;;
5800  *)
5801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5802for as_dir in $PATH
5803do
5804  IFS=$as_save_IFS
5805  test -z "$as_dir" && as_dir=.
5806    for ac_exec_ext in '' $ac_executable_extensions; do
5807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5808    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5810    break 2
5811  fi
5812done
5813  done
5814IFS=$as_save_IFS
5815
5816  ;;
5817esac
5818fi
5819CPIO=$ac_cv_path_CPIO
5820if test -n "$CPIO"; then
5821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5822$as_echo "$CPIO" >&6; }
5823else
5824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5825$as_echo "no" >&6; }
5826fi
5827
5828
5829  test -n "$CPIO" && break
5830done
5831
5832    else
5833      # If it succeeded, then it was overridden by the user. We will use it
5834      # for the tool.
5835
5836      # First remove it from the list of overridden variables, so we can test
5837      # for unknown variables in the end.
5838      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5839
5840      # Check if the provided tool contains a complete path.
5841      tool_specified="$CPIO"
5842      tool_basename="${tool_specified##*/}"
5843      if test "x$tool_basename" = "x$tool_specified"; then
5844        # A command without a complete path is provided, search $PATH.
5845        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5846$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5847        # Extract the first word of "$tool_basename", so it can be a program name with args.
5848set dummy $tool_basename; ac_word=$2
5849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5850$as_echo_n "checking for $ac_word... " >&6; }
5851if ${ac_cv_path_CPIO+:} false; then :
5852  $as_echo_n "(cached) " >&6
5853else
5854  case $CPIO in
5855  [\\/]* | ?:[\\/]*)
5856  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5857  ;;
5858  *)
5859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5860for as_dir in $PATH
5861do
5862  IFS=$as_save_IFS
5863  test -z "$as_dir" && as_dir=.
5864    for ac_exec_ext in '' $ac_executable_extensions; do
5865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5866    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5868    break 2
5869  fi
5870done
5871  done
5872IFS=$as_save_IFS
5873
5874  ;;
5875esac
5876fi
5877CPIO=$ac_cv_path_CPIO
5878if test -n "$CPIO"; then
5879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5880$as_echo "$CPIO" >&6; }
5881else
5882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5883$as_echo "no" >&6; }
5884fi
5885
5886
5887        if test "x$CPIO" = x; then
5888          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5889        fi
5890      else
5891        # Otherwise we believe it is a complete path. Use it as it is.
5892        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5893$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5895$as_echo_n "checking for CPIO... " >&6; }
5896        if test ! -x "$tool_specified"; then
5897          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5898$as_echo "not found" >&6; }
5899          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5900        fi
5901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5902$as_echo "$tool_specified" >&6; }
5903      fi
5904    fi
5905  fi
5906
5907
5908
5909  if test "x$CPIO" = x; then
5910    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5911  fi
5912
5913
5914
5915
5916
5917  # Publish this variable in the help.
5918
5919
5920  if test "x$CUT" = x; then
5921    # The variable is not set by user, try to locate tool using the code snippet
5922    for ac_prog in cut
5923do
5924  # Extract the first word of "$ac_prog", so it can be a program name with args.
5925set dummy $ac_prog; ac_word=$2
5926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5927$as_echo_n "checking for $ac_word... " >&6; }
5928if ${ac_cv_path_CUT+:} false; then :
5929  $as_echo_n "(cached) " >&6
5930else
5931  case $CUT in
5932  [\\/]* | ?:[\\/]*)
5933  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5934  ;;
5935  *)
5936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5937for as_dir in $PATH
5938do
5939  IFS=$as_save_IFS
5940  test -z "$as_dir" && as_dir=.
5941    for ac_exec_ext in '' $ac_executable_extensions; do
5942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5943    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5945    break 2
5946  fi
5947done
5948  done
5949IFS=$as_save_IFS
5950
5951  ;;
5952esac
5953fi
5954CUT=$ac_cv_path_CUT
5955if test -n "$CUT"; then
5956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5957$as_echo "$CUT" >&6; }
5958else
5959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960$as_echo "no" >&6; }
5961fi
5962
5963
5964  test -n "$CUT" && break
5965done
5966
5967  else
5968    # The variable is set, but is it from the command line or the environment?
5969
5970    # Try to remove the string !CUT! from our list.
5971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5973      # If it failed, the variable was not from the command line. Ignore it,
5974      # but warn the user (except for BASH, which is always set by the calling BASH).
5975      if test "xCUT" != xBASH; then
5976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5977$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5978      fi
5979      # Try to locate tool using the code snippet
5980      for ac_prog in cut
5981do
5982  # Extract the first word of "$ac_prog", so it can be a program name with args.
5983set dummy $ac_prog; ac_word=$2
5984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5985$as_echo_n "checking for $ac_word... " >&6; }
5986if ${ac_cv_path_CUT+:} false; then :
5987  $as_echo_n "(cached) " >&6
5988else
5989  case $CUT in
5990  [\\/]* | ?:[\\/]*)
5991  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5992  ;;
5993  *)
5994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995for as_dir in $PATH
5996do
5997  IFS=$as_save_IFS
5998  test -z "$as_dir" && as_dir=.
5999    for ac_exec_ext in '' $ac_executable_extensions; do
6000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6001    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6003    break 2
6004  fi
6005done
6006  done
6007IFS=$as_save_IFS
6008
6009  ;;
6010esac
6011fi
6012CUT=$ac_cv_path_CUT
6013if test -n "$CUT"; then
6014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6015$as_echo "$CUT" >&6; }
6016else
6017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6018$as_echo "no" >&6; }
6019fi
6020
6021
6022  test -n "$CUT" && break
6023done
6024
6025    else
6026      # If it succeeded, then it was overridden by the user. We will use it
6027      # for the tool.
6028
6029      # First remove it from the list of overridden variables, so we can test
6030      # for unknown variables in the end.
6031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6032
6033      # Check if the provided tool contains a complete path.
6034      tool_specified="$CUT"
6035      tool_basename="${tool_specified##*/}"
6036      if test "x$tool_basename" = "x$tool_specified"; then
6037        # A command without a complete path is provided, search $PATH.
6038        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6039$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6040        # Extract the first word of "$tool_basename", so it can be a program name with args.
6041set dummy $tool_basename; ac_word=$2
6042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6043$as_echo_n "checking for $ac_word... " >&6; }
6044if ${ac_cv_path_CUT+:} false; then :
6045  $as_echo_n "(cached) " >&6
6046else
6047  case $CUT in
6048  [\\/]* | ?:[\\/]*)
6049  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6050  ;;
6051  *)
6052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6053for as_dir in $PATH
6054do
6055  IFS=$as_save_IFS
6056  test -z "$as_dir" && as_dir=.
6057    for ac_exec_ext in '' $ac_executable_extensions; do
6058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6059    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6061    break 2
6062  fi
6063done
6064  done
6065IFS=$as_save_IFS
6066
6067  ;;
6068esac
6069fi
6070CUT=$ac_cv_path_CUT
6071if test -n "$CUT"; then
6072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6073$as_echo "$CUT" >&6; }
6074else
6075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6076$as_echo "no" >&6; }
6077fi
6078
6079
6080        if test "x$CUT" = x; then
6081          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6082        fi
6083      else
6084        # Otherwise we believe it is a complete path. Use it as it is.
6085        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6086$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6087        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6088$as_echo_n "checking for CUT... " >&6; }
6089        if test ! -x "$tool_specified"; then
6090          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6091$as_echo "not found" >&6; }
6092          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6093        fi
6094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6095$as_echo "$tool_specified" >&6; }
6096      fi
6097    fi
6098  fi
6099
6100
6101
6102  if test "x$CUT" = x; then
6103    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6104  fi
6105
6106
6107
6108
6109
6110  # Publish this variable in the help.
6111
6112
6113  if test "x$DATE" = x; then
6114    # The variable is not set by user, try to locate tool using the code snippet
6115    for ac_prog in date
6116do
6117  # Extract the first word of "$ac_prog", so it can be a program name with args.
6118set dummy $ac_prog; ac_word=$2
6119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6120$as_echo_n "checking for $ac_word... " >&6; }
6121if ${ac_cv_path_DATE+:} false; then :
6122  $as_echo_n "(cached) " >&6
6123else
6124  case $DATE in
6125  [\\/]* | ?:[\\/]*)
6126  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6127  ;;
6128  *)
6129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6130for as_dir in $PATH
6131do
6132  IFS=$as_save_IFS
6133  test -z "$as_dir" && as_dir=.
6134    for ac_exec_ext in '' $ac_executable_extensions; do
6135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6136    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6138    break 2
6139  fi
6140done
6141  done
6142IFS=$as_save_IFS
6143
6144  ;;
6145esac
6146fi
6147DATE=$ac_cv_path_DATE
6148if test -n "$DATE"; then
6149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6150$as_echo "$DATE" >&6; }
6151else
6152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6153$as_echo "no" >&6; }
6154fi
6155
6156
6157  test -n "$DATE" && break
6158done
6159
6160  else
6161    # The variable is set, but is it from the command line or the environment?
6162
6163    # Try to remove the string !DATE! from our list.
6164    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6165    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6166      # If it failed, the variable was not from the command line. Ignore it,
6167      # but warn the user (except for BASH, which is always set by the calling BASH).
6168      if test "xDATE" != xBASH; then
6169        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6170$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6171      fi
6172      # Try to locate tool using the code snippet
6173      for ac_prog in date
6174do
6175  # Extract the first word of "$ac_prog", so it can be a program name with args.
6176set dummy $ac_prog; ac_word=$2
6177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6178$as_echo_n "checking for $ac_word... " >&6; }
6179if ${ac_cv_path_DATE+:} false; then :
6180  $as_echo_n "(cached) " >&6
6181else
6182  case $DATE in
6183  [\\/]* | ?:[\\/]*)
6184  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6185  ;;
6186  *)
6187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6188for as_dir in $PATH
6189do
6190  IFS=$as_save_IFS
6191  test -z "$as_dir" && as_dir=.
6192    for ac_exec_ext in '' $ac_executable_extensions; do
6193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6194    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6196    break 2
6197  fi
6198done
6199  done
6200IFS=$as_save_IFS
6201
6202  ;;
6203esac
6204fi
6205DATE=$ac_cv_path_DATE
6206if test -n "$DATE"; then
6207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6208$as_echo "$DATE" >&6; }
6209else
6210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6211$as_echo "no" >&6; }
6212fi
6213
6214
6215  test -n "$DATE" && break
6216done
6217
6218    else
6219      # If it succeeded, then it was overridden by the user. We will use it
6220      # for the tool.
6221
6222      # First remove it from the list of overridden variables, so we can test
6223      # for unknown variables in the end.
6224      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6225
6226      # Check if the provided tool contains a complete path.
6227      tool_specified="$DATE"
6228      tool_basename="${tool_specified##*/}"
6229      if test "x$tool_basename" = "x$tool_specified"; then
6230        # A command without a complete path is provided, search $PATH.
6231        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6232$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6233        # Extract the first word of "$tool_basename", so it can be a program name with args.
6234set dummy $tool_basename; ac_word=$2
6235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6236$as_echo_n "checking for $ac_word... " >&6; }
6237if ${ac_cv_path_DATE+:} false; then :
6238  $as_echo_n "(cached) " >&6
6239else
6240  case $DATE in
6241  [\\/]* | ?:[\\/]*)
6242  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6243  ;;
6244  *)
6245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6246for as_dir in $PATH
6247do
6248  IFS=$as_save_IFS
6249  test -z "$as_dir" && as_dir=.
6250    for ac_exec_ext in '' $ac_executable_extensions; do
6251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6252    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6254    break 2
6255  fi
6256done
6257  done
6258IFS=$as_save_IFS
6259
6260  ;;
6261esac
6262fi
6263DATE=$ac_cv_path_DATE
6264if test -n "$DATE"; then
6265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6266$as_echo "$DATE" >&6; }
6267else
6268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6269$as_echo "no" >&6; }
6270fi
6271
6272
6273        if test "x$DATE" = x; then
6274          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6275        fi
6276      else
6277        # Otherwise we believe it is a complete path. Use it as it is.
6278        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6279$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6281$as_echo_n "checking for DATE... " >&6; }
6282        if test ! -x "$tool_specified"; then
6283          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6284$as_echo "not found" >&6; }
6285          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6286        fi
6287        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6288$as_echo "$tool_specified" >&6; }
6289      fi
6290    fi
6291  fi
6292
6293
6294
6295  if test "x$DATE" = x; then
6296    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6297  fi
6298
6299
6300
6301
6302
6303  # Publish this variable in the help.
6304
6305
6306  if test "x$DIFF" = x; then
6307    # The variable is not set by user, try to locate tool using the code snippet
6308    for ac_prog in gdiff diff
6309do
6310  # Extract the first word of "$ac_prog", so it can be a program name with args.
6311set dummy $ac_prog; ac_word=$2
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6313$as_echo_n "checking for $ac_word... " >&6; }
6314if ${ac_cv_path_DIFF+:} false; then :
6315  $as_echo_n "(cached) " >&6
6316else
6317  case $DIFF in
6318  [\\/]* | ?:[\\/]*)
6319  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6320  ;;
6321  *)
6322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6323for as_dir in $PATH
6324do
6325  IFS=$as_save_IFS
6326  test -z "$as_dir" && as_dir=.
6327    for ac_exec_ext in '' $ac_executable_extensions; do
6328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6329    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6331    break 2
6332  fi
6333done
6334  done
6335IFS=$as_save_IFS
6336
6337  ;;
6338esac
6339fi
6340DIFF=$ac_cv_path_DIFF
6341if test -n "$DIFF"; then
6342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6343$as_echo "$DIFF" >&6; }
6344else
6345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6346$as_echo "no" >&6; }
6347fi
6348
6349
6350  test -n "$DIFF" && break
6351done
6352
6353  else
6354    # The variable is set, but is it from the command line or the environment?
6355
6356    # Try to remove the string !DIFF! from our list.
6357    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6358    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6359      # If it failed, the variable was not from the command line. Ignore it,
6360      # but warn the user (except for BASH, which is always set by the calling BASH).
6361      if test "xDIFF" != xBASH; then
6362        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6363$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6364      fi
6365      # Try to locate tool using the code snippet
6366      for ac_prog in gdiff diff
6367do
6368  # Extract the first word of "$ac_prog", so it can be a program name with args.
6369set dummy $ac_prog; ac_word=$2
6370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6371$as_echo_n "checking for $ac_word... " >&6; }
6372if ${ac_cv_path_DIFF+:} false; then :
6373  $as_echo_n "(cached) " >&6
6374else
6375  case $DIFF in
6376  [\\/]* | ?:[\\/]*)
6377  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6378  ;;
6379  *)
6380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6381for as_dir in $PATH
6382do
6383  IFS=$as_save_IFS
6384  test -z "$as_dir" && as_dir=.
6385    for ac_exec_ext in '' $ac_executable_extensions; do
6386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6387    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6389    break 2
6390  fi
6391done
6392  done
6393IFS=$as_save_IFS
6394
6395  ;;
6396esac
6397fi
6398DIFF=$ac_cv_path_DIFF
6399if test -n "$DIFF"; then
6400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6401$as_echo "$DIFF" >&6; }
6402else
6403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6404$as_echo "no" >&6; }
6405fi
6406
6407
6408  test -n "$DIFF" && break
6409done
6410
6411    else
6412      # If it succeeded, then it was overridden by the user. We will use it
6413      # for the tool.
6414
6415      # First remove it from the list of overridden variables, so we can test
6416      # for unknown variables in the end.
6417      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6418
6419      # Check if the provided tool contains a complete path.
6420      tool_specified="$DIFF"
6421      tool_basename="${tool_specified##*/}"
6422      if test "x$tool_basename" = "x$tool_specified"; then
6423        # A command without a complete path is provided, search $PATH.
6424        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6425$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6426        # Extract the first word of "$tool_basename", so it can be a program name with args.
6427set dummy $tool_basename; ac_word=$2
6428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6429$as_echo_n "checking for $ac_word... " >&6; }
6430if ${ac_cv_path_DIFF+:} false; then :
6431  $as_echo_n "(cached) " >&6
6432else
6433  case $DIFF in
6434  [\\/]* | ?:[\\/]*)
6435  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6436  ;;
6437  *)
6438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6439for as_dir in $PATH
6440do
6441  IFS=$as_save_IFS
6442  test -z "$as_dir" && as_dir=.
6443    for ac_exec_ext in '' $ac_executable_extensions; do
6444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6445    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6447    break 2
6448  fi
6449done
6450  done
6451IFS=$as_save_IFS
6452
6453  ;;
6454esac
6455fi
6456DIFF=$ac_cv_path_DIFF
6457if test -n "$DIFF"; then
6458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6459$as_echo "$DIFF" >&6; }
6460else
6461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6462$as_echo "no" >&6; }
6463fi
6464
6465
6466        if test "x$DIFF" = x; then
6467          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6468        fi
6469      else
6470        # Otherwise we believe it is a complete path. Use it as it is.
6471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6472$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6473        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6474$as_echo_n "checking for DIFF... " >&6; }
6475        if test ! -x "$tool_specified"; then
6476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6477$as_echo "not found" >&6; }
6478          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6479        fi
6480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6481$as_echo "$tool_specified" >&6; }
6482      fi
6483    fi
6484  fi
6485
6486
6487
6488  if test "x$DIFF" = x; then
6489    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6490  fi
6491
6492
6493
6494
6495
6496  # Publish this variable in the help.
6497
6498
6499  if test "x$DIRNAME" = x; then
6500    # The variable is not set by user, try to locate tool using the code snippet
6501    for ac_prog in dirname
6502do
6503  # Extract the first word of "$ac_prog", so it can be a program name with args.
6504set dummy $ac_prog; ac_word=$2
6505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6506$as_echo_n "checking for $ac_word... " >&6; }
6507if ${ac_cv_path_DIRNAME+:} false; then :
6508  $as_echo_n "(cached) " >&6
6509else
6510  case $DIRNAME in
6511  [\\/]* | ?:[\\/]*)
6512  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6513  ;;
6514  *)
6515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6516for as_dir in $PATH
6517do
6518  IFS=$as_save_IFS
6519  test -z "$as_dir" && as_dir=.
6520    for ac_exec_ext in '' $ac_executable_extensions; do
6521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6522    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6524    break 2
6525  fi
6526done
6527  done
6528IFS=$as_save_IFS
6529
6530  ;;
6531esac
6532fi
6533DIRNAME=$ac_cv_path_DIRNAME
6534if test -n "$DIRNAME"; then
6535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6536$as_echo "$DIRNAME" >&6; }
6537else
6538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6539$as_echo "no" >&6; }
6540fi
6541
6542
6543  test -n "$DIRNAME" && break
6544done
6545
6546  else
6547    # The variable is set, but is it from the command line or the environment?
6548
6549    # Try to remove the string !DIRNAME! from our list.
6550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6552      # If it failed, the variable was not from the command line. Ignore it,
6553      # but warn the user (except for BASH, which is always set by the calling BASH).
6554      if test "xDIRNAME" != xBASH; then
6555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6556$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6557      fi
6558      # Try to locate tool using the code snippet
6559      for ac_prog in dirname
6560do
6561  # Extract the first word of "$ac_prog", so it can be a program name with args.
6562set dummy $ac_prog; ac_word=$2
6563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6564$as_echo_n "checking for $ac_word... " >&6; }
6565if ${ac_cv_path_DIRNAME+:} false; then :
6566  $as_echo_n "(cached) " >&6
6567else
6568  case $DIRNAME in
6569  [\\/]* | ?:[\\/]*)
6570  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6571  ;;
6572  *)
6573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6574for as_dir in $PATH
6575do
6576  IFS=$as_save_IFS
6577  test -z "$as_dir" && as_dir=.
6578    for ac_exec_ext in '' $ac_executable_extensions; do
6579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6580    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6582    break 2
6583  fi
6584done
6585  done
6586IFS=$as_save_IFS
6587
6588  ;;
6589esac
6590fi
6591DIRNAME=$ac_cv_path_DIRNAME
6592if test -n "$DIRNAME"; then
6593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6594$as_echo "$DIRNAME" >&6; }
6595else
6596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6597$as_echo "no" >&6; }
6598fi
6599
6600
6601  test -n "$DIRNAME" && break
6602done
6603
6604    else
6605      # If it succeeded, then it was overridden by the user. We will use it
6606      # for the tool.
6607
6608      # First remove it from the list of overridden variables, so we can test
6609      # for unknown variables in the end.
6610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6611
6612      # Check if the provided tool contains a complete path.
6613      tool_specified="$DIRNAME"
6614      tool_basename="${tool_specified##*/}"
6615      if test "x$tool_basename" = "x$tool_specified"; then
6616        # A command without a complete path is provided, search $PATH.
6617        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6618$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6619        # Extract the first word of "$tool_basename", so it can be a program name with args.
6620set dummy $tool_basename; ac_word=$2
6621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6622$as_echo_n "checking for $ac_word... " >&6; }
6623if ${ac_cv_path_DIRNAME+:} false; then :
6624  $as_echo_n "(cached) " >&6
6625else
6626  case $DIRNAME in
6627  [\\/]* | ?:[\\/]*)
6628  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6629  ;;
6630  *)
6631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6632for as_dir in $PATH
6633do
6634  IFS=$as_save_IFS
6635  test -z "$as_dir" && as_dir=.
6636    for ac_exec_ext in '' $ac_executable_extensions; do
6637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6638    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6640    break 2
6641  fi
6642done
6643  done
6644IFS=$as_save_IFS
6645
6646  ;;
6647esac
6648fi
6649DIRNAME=$ac_cv_path_DIRNAME
6650if test -n "$DIRNAME"; then
6651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6652$as_echo "$DIRNAME" >&6; }
6653else
6654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6655$as_echo "no" >&6; }
6656fi
6657
6658
6659        if test "x$DIRNAME" = x; then
6660          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6661        fi
6662      else
6663        # Otherwise we believe it is a complete path. Use it as it is.
6664        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6665$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6667$as_echo_n "checking for DIRNAME... " >&6; }
6668        if test ! -x "$tool_specified"; then
6669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6670$as_echo "not found" >&6; }
6671          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6672        fi
6673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6674$as_echo "$tool_specified" >&6; }
6675      fi
6676    fi
6677  fi
6678
6679
6680
6681  if test "x$DIRNAME" = x; then
6682    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6683  fi
6684
6685
6686
6687
6688
6689  # Publish this variable in the help.
6690
6691
6692  if test "x$ECHO" = x; then
6693    # The variable is not set by user, try to locate tool using the code snippet
6694    for ac_prog in echo
6695do
6696  # Extract the first word of "$ac_prog", so it can be a program name with args.
6697set dummy $ac_prog; ac_word=$2
6698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6699$as_echo_n "checking for $ac_word... " >&6; }
6700if ${ac_cv_path_ECHO+:} false; then :
6701  $as_echo_n "(cached) " >&6
6702else
6703  case $ECHO in
6704  [\\/]* | ?:[\\/]*)
6705  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6706  ;;
6707  *)
6708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6709for as_dir in $PATH
6710do
6711  IFS=$as_save_IFS
6712  test -z "$as_dir" && as_dir=.
6713    for ac_exec_ext in '' $ac_executable_extensions; do
6714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6715    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6717    break 2
6718  fi
6719done
6720  done
6721IFS=$as_save_IFS
6722
6723  ;;
6724esac
6725fi
6726ECHO=$ac_cv_path_ECHO
6727if test -n "$ECHO"; then
6728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6729$as_echo "$ECHO" >&6; }
6730else
6731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6732$as_echo "no" >&6; }
6733fi
6734
6735
6736  test -n "$ECHO" && break
6737done
6738
6739  else
6740    # The variable is set, but is it from the command line or the environment?
6741
6742    # Try to remove the string !ECHO! from our list.
6743    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6744    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6745      # If it failed, the variable was not from the command line. Ignore it,
6746      # but warn the user (except for BASH, which is always set by the calling BASH).
6747      if test "xECHO" != xBASH; then
6748        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6749$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6750      fi
6751      # Try to locate tool using the code snippet
6752      for ac_prog in echo
6753do
6754  # Extract the first word of "$ac_prog", so it can be a program name with args.
6755set dummy $ac_prog; ac_word=$2
6756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6757$as_echo_n "checking for $ac_word... " >&6; }
6758if ${ac_cv_path_ECHO+:} false; then :
6759  $as_echo_n "(cached) " >&6
6760else
6761  case $ECHO in
6762  [\\/]* | ?:[\\/]*)
6763  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6764  ;;
6765  *)
6766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6767for as_dir in $PATH
6768do
6769  IFS=$as_save_IFS
6770  test -z "$as_dir" && as_dir=.
6771    for ac_exec_ext in '' $ac_executable_extensions; do
6772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6773    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6775    break 2
6776  fi
6777done
6778  done
6779IFS=$as_save_IFS
6780
6781  ;;
6782esac
6783fi
6784ECHO=$ac_cv_path_ECHO
6785if test -n "$ECHO"; then
6786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6787$as_echo "$ECHO" >&6; }
6788else
6789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6790$as_echo "no" >&6; }
6791fi
6792
6793
6794  test -n "$ECHO" && break
6795done
6796
6797    else
6798      # If it succeeded, then it was overridden by the user. We will use it
6799      # for the tool.
6800
6801      # First remove it from the list of overridden variables, so we can test
6802      # for unknown variables in the end.
6803      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6804
6805      # Check if the provided tool contains a complete path.
6806      tool_specified="$ECHO"
6807      tool_basename="${tool_specified##*/}"
6808      if test "x$tool_basename" = "x$tool_specified"; then
6809        # A command without a complete path is provided, search $PATH.
6810        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6811$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6812        # Extract the first word of "$tool_basename", so it can be a program name with args.
6813set dummy $tool_basename; ac_word=$2
6814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6815$as_echo_n "checking for $ac_word... " >&6; }
6816if ${ac_cv_path_ECHO+:} false; then :
6817  $as_echo_n "(cached) " >&6
6818else
6819  case $ECHO in
6820  [\\/]* | ?:[\\/]*)
6821  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6822  ;;
6823  *)
6824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6825for as_dir in $PATH
6826do
6827  IFS=$as_save_IFS
6828  test -z "$as_dir" && as_dir=.
6829    for ac_exec_ext in '' $ac_executable_extensions; do
6830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6831    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6833    break 2
6834  fi
6835done
6836  done
6837IFS=$as_save_IFS
6838
6839  ;;
6840esac
6841fi
6842ECHO=$ac_cv_path_ECHO
6843if test -n "$ECHO"; then
6844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6845$as_echo "$ECHO" >&6; }
6846else
6847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6848$as_echo "no" >&6; }
6849fi
6850
6851
6852        if test "x$ECHO" = x; then
6853          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6854        fi
6855      else
6856        # Otherwise we believe it is a complete path. Use it as it is.
6857        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6858$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6859        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6860$as_echo_n "checking for ECHO... " >&6; }
6861        if test ! -x "$tool_specified"; then
6862          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6863$as_echo "not found" >&6; }
6864          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6865        fi
6866        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6867$as_echo "$tool_specified" >&6; }
6868      fi
6869    fi
6870  fi
6871
6872
6873
6874  if test "x$ECHO" = x; then
6875    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6876  fi
6877
6878
6879
6880
6881
6882  # Publish this variable in the help.
6883
6884
6885  if test "x$EXPR" = x; then
6886    # The variable is not set by user, try to locate tool using the code snippet
6887    for ac_prog in expr
6888do
6889  # Extract the first word of "$ac_prog", so it can be a program name with args.
6890set dummy $ac_prog; ac_word=$2
6891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6892$as_echo_n "checking for $ac_word... " >&6; }
6893if ${ac_cv_path_EXPR+:} false; then :
6894  $as_echo_n "(cached) " >&6
6895else
6896  case $EXPR in
6897  [\\/]* | ?:[\\/]*)
6898  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6899  ;;
6900  *)
6901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6902for as_dir in $PATH
6903do
6904  IFS=$as_save_IFS
6905  test -z "$as_dir" && as_dir=.
6906    for ac_exec_ext in '' $ac_executable_extensions; do
6907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6908    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6910    break 2
6911  fi
6912done
6913  done
6914IFS=$as_save_IFS
6915
6916  ;;
6917esac
6918fi
6919EXPR=$ac_cv_path_EXPR
6920if test -n "$EXPR"; then
6921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6922$as_echo "$EXPR" >&6; }
6923else
6924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6925$as_echo "no" >&6; }
6926fi
6927
6928
6929  test -n "$EXPR" && break
6930done
6931
6932  else
6933    # The variable is set, but is it from the command line or the environment?
6934
6935    # Try to remove the string !EXPR! from our list.
6936    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6937    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6938      # If it failed, the variable was not from the command line. Ignore it,
6939      # but warn the user (except for BASH, which is always set by the calling BASH).
6940      if test "xEXPR" != xBASH; then
6941        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6942$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6943      fi
6944      # Try to locate tool using the code snippet
6945      for ac_prog in expr
6946do
6947  # Extract the first word of "$ac_prog", so it can be a program name with args.
6948set dummy $ac_prog; ac_word=$2
6949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6950$as_echo_n "checking for $ac_word... " >&6; }
6951if ${ac_cv_path_EXPR+:} false; then :
6952  $as_echo_n "(cached) " >&6
6953else
6954  case $EXPR in
6955  [\\/]* | ?:[\\/]*)
6956  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6957  ;;
6958  *)
6959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6960for as_dir in $PATH
6961do
6962  IFS=$as_save_IFS
6963  test -z "$as_dir" && as_dir=.
6964    for ac_exec_ext in '' $ac_executable_extensions; do
6965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6966    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6968    break 2
6969  fi
6970done
6971  done
6972IFS=$as_save_IFS
6973
6974  ;;
6975esac
6976fi
6977EXPR=$ac_cv_path_EXPR
6978if test -n "$EXPR"; then
6979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6980$as_echo "$EXPR" >&6; }
6981else
6982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6983$as_echo "no" >&6; }
6984fi
6985
6986
6987  test -n "$EXPR" && break
6988done
6989
6990    else
6991      # If it succeeded, then it was overridden by the user. We will use it
6992      # for the tool.
6993
6994      # First remove it from the list of overridden variables, so we can test
6995      # for unknown variables in the end.
6996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6997
6998      # Check if the provided tool contains a complete path.
6999      tool_specified="$EXPR"
7000      tool_basename="${tool_specified##*/}"
7001      if test "x$tool_basename" = "x$tool_specified"; then
7002        # A command without a complete path is provided, search $PATH.
7003        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7004$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7005        # Extract the first word of "$tool_basename", so it can be a program name with args.
7006set dummy $tool_basename; ac_word=$2
7007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7008$as_echo_n "checking for $ac_word... " >&6; }
7009if ${ac_cv_path_EXPR+:} false; then :
7010  $as_echo_n "(cached) " >&6
7011else
7012  case $EXPR in
7013  [\\/]* | ?:[\\/]*)
7014  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7015  ;;
7016  *)
7017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7018for as_dir in $PATH
7019do
7020  IFS=$as_save_IFS
7021  test -z "$as_dir" && as_dir=.
7022    for ac_exec_ext in '' $ac_executable_extensions; do
7023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7024    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7026    break 2
7027  fi
7028done
7029  done
7030IFS=$as_save_IFS
7031
7032  ;;
7033esac
7034fi
7035EXPR=$ac_cv_path_EXPR
7036if test -n "$EXPR"; then
7037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7038$as_echo "$EXPR" >&6; }
7039else
7040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7041$as_echo "no" >&6; }
7042fi
7043
7044
7045        if test "x$EXPR" = x; then
7046          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7047        fi
7048      else
7049        # Otherwise we believe it is a complete path. Use it as it is.
7050        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7051$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7052        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7053$as_echo_n "checking for EXPR... " >&6; }
7054        if test ! -x "$tool_specified"; then
7055          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7056$as_echo "not found" >&6; }
7057          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7058        fi
7059        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7060$as_echo "$tool_specified" >&6; }
7061      fi
7062    fi
7063  fi
7064
7065
7066
7067  if test "x$EXPR" = x; then
7068    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7069  fi
7070
7071
7072
7073
7074
7075  # Publish this variable in the help.
7076
7077
7078  if test "x$FILE" = x; then
7079    # The variable is not set by user, try to locate tool using the code snippet
7080    for ac_prog in file
7081do
7082  # Extract the first word of "$ac_prog", so it can be a program name with args.
7083set dummy $ac_prog; ac_word=$2
7084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7085$as_echo_n "checking for $ac_word... " >&6; }
7086if ${ac_cv_path_FILE+:} false; then :
7087  $as_echo_n "(cached) " >&6
7088else
7089  case $FILE in
7090  [\\/]* | ?:[\\/]*)
7091  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7092  ;;
7093  *)
7094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7095for as_dir in $PATH
7096do
7097  IFS=$as_save_IFS
7098  test -z "$as_dir" && as_dir=.
7099    for ac_exec_ext in '' $ac_executable_extensions; do
7100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7101    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7103    break 2
7104  fi
7105done
7106  done
7107IFS=$as_save_IFS
7108
7109  ;;
7110esac
7111fi
7112FILE=$ac_cv_path_FILE
7113if test -n "$FILE"; then
7114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7115$as_echo "$FILE" >&6; }
7116else
7117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7118$as_echo "no" >&6; }
7119fi
7120
7121
7122  test -n "$FILE" && break
7123done
7124
7125  else
7126    # The variable is set, but is it from the command line or the environment?
7127
7128    # Try to remove the string !FILE! from our list.
7129    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7130    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7131      # If it failed, the variable was not from the command line. Ignore it,
7132      # but warn the user (except for BASH, which is always set by the calling BASH).
7133      if test "xFILE" != xBASH; then
7134        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7135$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7136      fi
7137      # Try to locate tool using the code snippet
7138      for ac_prog in file
7139do
7140  # Extract the first word of "$ac_prog", so it can be a program name with args.
7141set dummy $ac_prog; ac_word=$2
7142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7143$as_echo_n "checking for $ac_word... " >&6; }
7144if ${ac_cv_path_FILE+:} false; then :
7145  $as_echo_n "(cached) " >&6
7146else
7147  case $FILE in
7148  [\\/]* | ?:[\\/]*)
7149  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7150  ;;
7151  *)
7152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7153for as_dir in $PATH
7154do
7155  IFS=$as_save_IFS
7156  test -z "$as_dir" && as_dir=.
7157    for ac_exec_ext in '' $ac_executable_extensions; do
7158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7159    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7161    break 2
7162  fi
7163done
7164  done
7165IFS=$as_save_IFS
7166
7167  ;;
7168esac
7169fi
7170FILE=$ac_cv_path_FILE
7171if test -n "$FILE"; then
7172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7173$as_echo "$FILE" >&6; }
7174else
7175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7176$as_echo "no" >&6; }
7177fi
7178
7179
7180  test -n "$FILE" && break
7181done
7182
7183    else
7184      # If it succeeded, then it was overridden by the user. We will use it
7185      # for the tool.
7186
7187      # First remove it from the list of overridden variables, so we can test
7188      # for unknown variables in the end.
7189      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7190
7191      # Check if the provided tool contains a complete path.
7192      tool_specified="$FILE"
7193      tool_basename="${tool_specified##*/}"
7194      if test "x$tool_basename" = "x$tool_specified"; then
7195        # A command without a complete path is provided, search $PATH.
7196        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7197$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7198        # Extract the first word of "$tool_basename", so it can be a program name with args.
7199set dummy $tool_basename; ac_word=$2
7200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7201$as_echo_n "checking for $ac_word... " >&6; }
7202if ${ac_cv_path_FILE+:} false; then :
7203  $as_echo_n "(cached) " >&6
7204else
7205  case $FILE in
7206  [\\/]* | ?:[\\/]*)
7207  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7208  ;;
7209  *)
7210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7211for as_dir in $PATH
7212do
7213  IFS=$as_save_IFS
7214  test -z "$as_dir" && as_dir=.
7215    for ac_exec_ext in '' $ac_executable_extensions; do
7216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7217    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7219    break 2
7220  fi
7221done
7222  done
7223IFS=$as_save_IFS
7224
7225  ;;
7226esac
7227fi
7228FILE=$ac_cv_path_FILE
7229if test -n "$FILE"; then
7230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7231$as_echo "$FILE" >&6; }
7232else
7233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7234$as_echo "no" >&6; }
7235fi
7236
7237
7238        if test "x$FILE" = x; then
7239          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7240        fi
7241      else
7242        # Otherwise we believe it is a complete path. Use it as it is.
7243        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7244$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7245        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7246$as_echo_n "checking for FILE... " >&6; }
7247        if test ! -x "$tool_specified"; then
7248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7249$as_echo "not found" >&6; }
7250          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7251        fi
7252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7253$as_echo "$tool_specified" >&6; }
7254      fi
7255    fi
7256  fi
7257
7258
7259
7260  if test "x$FILE" = x; then
7261    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7262  fi
7263
7264
7265
7266
7267
7268  # Publish this variable in the help.
7269
7270
7271  if test "x$FIND" = x; then
7272    # The variable is not set by user, try to locate tool using the code snippet
7273    for ac_prog in find
7274do
7275  # Extract the first word of "$ac_prog", so it can be a program name with args.
7276set dummy $ac_prog; ac_word=$2
7277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7278$as_echo_n "checking for $ac_word... " >&6; }
7279if ${ac_cv_path_FIND+:} false; then :
7280  $as_echo_n "(cached) " >&6
7281else
7282  case $FIND in
7283  [\\/]* | ?:[\\/]*)
7284  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7285  ;;
7286  *)
7287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7288for as_dir in $PATH
7289do
7290  IFS=$as_save_IFS
7291  test -z "$as_dir" && as_dir=.
7292    for ac_exec_ext in '' $ac_executable_extensions; do
7293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7294    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7296    break 2
7297  fi
7298done
7299  done
7300IFS=$as_save_IFS
7301
7302  ;;
7303esac
7304fi
7305FIND=$ac_cv_path_FIND
7306if test -n "$FIND"; then
7307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7308$as_echo "$FIND" >&6; }
7309else
7310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7311$as_echo "no" >&6; }
7312fi
7313
7314
7315  test -n "$FIND" && break
7316done
7317
7318  else
7319    # The variable is set, but is it from the command line or the environment?
7320
7321    # Try to remove the string !FIND! from our list.
7322    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7323    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7324      # If it failed, the variable was not from the command line. Ignore it,
7325      # but warn the user (except for BASH, which is always set by the calling BASH).
7326      if test "xFIND" != xBASH; then
7327        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7328$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7329      fi
7330      # Try to locate tool using the code snippet
7331      for ac_prog in find
7332do
7333  # Extract the first word of "$ac_prog", so it can be a program name with args.
7334set dummy $ac_prog; ac_word=$2
7335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7336$as_echo_n "checking for $ac_word... " >&6; }
7337if ${ac_cv_path_FIND+:} false; then :
7338  $as_echo_n "(cached) " >&6
7339else
7340  case $FIND in
7341  [\\/]* | ?:[\\/]*)
7342  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7343  ;;
7344  *)
7345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7346for as_dir in $PATH
7347do
7348  IFS=$as_save_IFS
7349  test -z "$as_dir" && as_dir=.
7350    for ac_exec_ext in '' $ac_executable_extensions; do
7351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7352    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7354    break 2
7355  fi
7356done
7357  done
7358IFS=$as_save_IFS
7359
7360  ;;
7361esac
7362fi
7363FIND=$ac_cv_path_FIND
7364if test -n "$FIND"; then
7365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7366$as_echo "$FIND" >&6; }
7367else
7368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7369$as_echo "no" >&6; }
7370fi
7371
7372
7373  test -n "$FIND" && break
7374done
7375
7376    else
7377      # If it succeeded, then it was overridden by the user. We will use it
7378      # for the tool.
7379
7380      # First remove it from the list of overridden variables, so we can test
7381      # for unknown variables in the end.
7382      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7383
7384      # Check if the provided tool contains a complete path.
7385      tool_specified="$FIND"
7386      tool_basename="${tool_specified##*/}"
7387      if test "x$tool_basename" = "x$tool_specified"; then
7388        # A command without a complete path is provided, search $PATH.
7389        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7390$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7391        # Extract the first word of "$tool_basename", so it can be a program name with args.
7392set dummy $tool_basename; ac_word=$2
7393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7394$as_echo_n "checking for $ac_word... " >&6; }
7395if ${ac_cv_path_FIND+:} false; then :
7396  $as_echo_n "(cached) " >&6
7397else
7398  case $FIND in
7399  [\\/]* | ?:[\\/]*)
7400  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7401  ;;
7402  *)
7403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7404for as_dir in $PATH
7405do
7406  IFS=$as_save_IFS
7407  test -z "$as_dir" && as_dir=.
7408    for ac_exec_ext in '' $ac_executable_extensions; do
7409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7410    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7412    break 2
7413  fi
7414done
7415  done
7416IFS=$as_save_IFS
7417
7418  ;;
7419esac
7420fi
7421FIND=$ac_cv_path_FIND
7422if test -n "$FIND"; then
7423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7424$as_echo "$FIND" >&6; }
7425else
7426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7427$as_echo "no" >&6; }
7428fi
7429
7430
7431        if test "x$FIND" = x; then
7432          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7433        fi
7434      else
7435        # Otherwise we believe it is a complete path. Use it as it is.
7436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7437$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7438        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7439$as_echo_n "checking for FIND... " >&6; }
7440        if test ! -x "$tool_specified"; then
7441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7442$as_echo "not found" >&6; }
7443          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7444        fi
7445        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7446$as_echo "$tool_specified" >&6; }
7447      fi
7448    fi
7449  fi
7450
7451
7452
7453  if test "x$FIND" = x; then
7454    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7455  fi
7456
7457
7458
7459
7460
7461  # Publish this variable in the help.
7462
7463
7464  if test "x$HEAD" = x; then
7465    # The variable is not set by user, try to locate tool using the code snippet
7466    for ac_prog in head
7467do
7468  # Extract the first word of "$ac_prog", so it can be a program name with args.
7469set dummy $ac_prog; ac_word=$2
7470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7471$as_echo_n "checking for $ac_word... " >&6; }
7472if ${ac_cv_path_HEAD+:} false; then :
7473  $as_echo_n "(cached) " >&6
7474else
7475  case $HEAD in
7476  [\\/]* | ?:[\\/]*)
7477  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7478  ;;
7479  *)
7480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7481for as_dir in $PATH
7482do
7483  IFS=$as_save_IFS
7484  test -z "$as_dir" && as_dir=.
7485    for ac_exec_ext in '' $ac_executable_extensions; do
7486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7487    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7489    break 2
7490  fi
7491done
7492  done
7493IFS=$as_save_IFS
7494
7495  ;;
7496esac
7497fi
7498HEAD=$ac_cv_path_HEAD
7499if test -n "$HEAD"; then
7500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7501$as_echo "$HEAD" >&6; }
7502else
7503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7504$as_echo "no" >&6; }
7505fi
7506
7507
7508  test -n "$HEAD" && break
7509done
7510
7511  else
7512    # The variable is set, but is it from the command line or the environment?
7513
7514    # Try to remove the string !HEAD! from our list.
7515    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7516    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7517      # If it failed, the variable was not from the command line. Ignore it,
7518      # but warn the user (except for BASH, which is always set by the calling BASH).
7519      if test "xHEAD" != xBASH; then
7520        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7521$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7522      fi
7523      # Try to locate tool using the code snippet
7524      for ac_prog in head
7525do
7526  # Extract the first word of "$ac_prog", so it can be a program name with args.
7527set dummy $ac_prog; ac_word=$2
7528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7529$as_echo_n "checking for $ac_word... " >&6; }
7530if ${ac_cv_path_HEAD+:} false; then :
7531  $as_echo_n "(cached) " >&6
7532else
7533  case $HEAD in
7534  [\\/]* | ?:[\\/]*)
7535  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7536  ;;
7537  *)
7538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7539for as_dir in $PATH
7540do
7541  IFS=$as_save_IFS
7542  test -z "$as_dir" && as_dir=.
7543    for ac_exec_ext in '' $ac_executable_extensions; do
7544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7545    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7547    break 2
7548  fi
7549done
7550  done
7551IFS=$as_save_IFS
7552
7553  ;;
7554esac
7555fi
7556HEAD=$ac_cv_path_HEAD
7557if test -n "$HEAD"; then
7558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7559$as_echo "$HEAD" >&6; }
7560else
7561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7562$as_echo "no" >&6; }
7563fi
7564
7565
7566  test -n "$HEAD" && break
7567done
7568
7569    else
7570      # If it succeeded, then it was overridden by the user. We will use it
7571      # for the tool.
7572
7573      # First remove it from the list of overridden variables, so we can test
7574      # for unknown variables in the end.
7575      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7576
7577      # Check if the provided tool contains a complete path.
7578      tool_specified="$HEAD"
7579      tool_basename="${tool_specified##*/}"
7580      if test "x$tool_basename" = "x$tool_specified"; then
7581        # A command without a complete path is provided, search $PATH.
7582        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7583$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7584        # Extract the first word of "$tool_basename", so it can be a program name with args.
7585set dummy $tool_basename; ac_word=$2
7586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7587$as_echo_n "checking for $ac_word... " >&6; }
7588if ${ac_cv_path_HEAD+:} false; then :
7589  $as_echo_n "(cached) " >&6
7590else
7591  case $HEAD in
7592  [\\/]* | ?:[\\/]*)
7593  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7594  ;;
7595  *)
7596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7597for as_dir in $PATH
7598do
7599  IFS=$as_save_IFS
7600  test -z "$as_dir" && as_dir=.
7601    for ac_exec_ext in '' $ac_executable_extensions; do
7602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7603    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7605    break 2
7606  fi
7607done
7608  done
7609IFS=$as_save_IFS
7610
7611  ;;
7612esac
7613fi
7614HEAD=$ac_cv_path_HEAD
7615if test -n "$HEAD"; then
7616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7617$as_echo "$HEAD" >&6; }
7618else
7619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7620$as_echo "no" >&6; }
7621fi
7622
7623
7624        if test "x$HEAD" = x; then
7625          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7626        fi
7627      else
7628        # Otherwise we believe it is a complete path. Use it as it is.
7629        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7630$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7631        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7632$as_echo_n "checking for HEAD... " >&6; }
7633        if test ! -x "$tool_specified"; then
7634          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7635$as_echo "not found" >&6; }
7636          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7637        fi
7638        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7639$as_echo "$tool_specified" >&6; }
7640      fi
7641    fi
7642  fi
7643
7644
7645
7646  if test "x$HEAD" = x; then
7647    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7648  fi
7649
7650
7651
7652
7653
7654  # Publish this variable in the help.
7655
7656
7657  if test "x$LN" = x; then
7658    # The variable is not set by user, try to locate tool using the code snippet
7659    for ac_prog in ln
7660do
7661  # Extract the first word of "$ac_prog", so it can be a program name with args.
7662set dummy $ac_prog; ac_word=$2
7663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7664$as_echo_n "checking for $ac_word... " >&6; }
7665if ${ac_cv_path_LN+:} false; then :
7666  $as_echo_n "(cached) " >&6
7667else
7668  case $LN in
7669  [\\/]* | ?:[\\/]*)
7670  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7671  ;;
7672  *)
7673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7674for as_dir in $PATH
7675do
7676  IFS=$as_save_IFS
7677  test -z "$as_dir" && as_dir=.
7678    for ac_exec_ext in '' $ac_executable_extensions; do
7679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7680    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7682    break 2
7683  fi
7684done
7685  done
7686IFS=$as_save_IFS
7687
7688  ;;
7689esac
7690fi
7691LN=$ac_cv_path_LN
7692if test -n "$LN"; then
7693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7694$as_echo "$LN" >&6; }
7695else
7696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7697$as_echo "no" >&6; }
7698fi
7699
7700
7701  test -n "$LN" && break
7702done
7703
7704  else
7705    # The variable is set, but is it from the command line or the environment?
7706
7707    # Try to remove the string !LN! from our list.
7708    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7709    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7710      # If it failed, the variable was not from the command line. Ignore it,
7711      # but warn the user (except for BASH, which is always set by the calling BASH).
7712      if test "xLN" != xBASH; then
7713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7714$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7715      fi
7716      # Try to locate tool using the code snippet
7717      for ac_prog in ln
7718do
7719  # Extract the first word of "$ac_prog", so it can be a program name with args.
7720set dummy $ac_prog; ac_word=$2
7721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7722$as_echo_n "checking for $ac_word... " >&6; }
7723if ${ac_cv_path_LN+:} false; then :
7724  $as_echo_n "(cached) " >&6
7725else
7726  case $LN in
7727  [\\/]* | ?:[\\/]*)
7728  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7729  ;;
7730  *)
7731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7732for as_dir in $PATH
7733do
7734  IFS=$as_save_IFS
7735  test -z "$as_dir" && as_dir=.
7736    for ac_exec_ext in '' $ac_executable_extensions; do
7737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7738    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7740    break 2
7741  fi
7742done
7743  done
7744IFS=$as_save_IFS
7745
7746  ;;
7747esac
7748fi
7749LN=$ac_cv_path_LN
7750if test -n "$LN"; then
7751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7752$as_echo "$LN" >&6; }
7753else
7754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7755$as_echo "no" >&6; }
7756fi
7757
7758
7759  test -n "$LN" && break
7760done
7761
7762    else
7763      # If it succeeded, then it was overridden by the user. We will use it
7764      # for the tool.
7765
7766      # First remove it from the list of overridden variables, so we can test
7767      # for unknown variables in the end.
7768      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7769
7770      # Check if the provided tool contains a complete path.
7771      tool_specified="$LN"
7772      tool_basename="${tool_specified##*/}"
7773      if test "x$tool_basename" = "x$tool_specified"; then
7774        # A command without a complete path is provided, search $PATH.
7775        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7776$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7777        # Extract the first word of "$tool_basename", so it can be a program name with args.
7778set dummy $tool_basename; ac_word=$2
7779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7780$as_echo_n "checking for $ac_word... " >&6; }
7781if ${ac_cv_path_LN+:} false; then :
7782  $as_echo_n "(cached) " >&6
7783else
7784  case $LN in
7785  [\\/]* | ?:[\\/]*)
7786  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7787  ;;
7788  *)
7789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7790for as_dir in $PATH
7791do
7792  IFS=$as_save_IFS
7793  test -z "$as_dir" && as_dir=.
7794    for ac_exec_ext in '' $ac_executable_extensions; do
7795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7796    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7798    break 2
7799  fi
7800done
7801  done
7802IFS=$as_save_IFS
7803
7804  ;;
7805esac
7806fi
7807LN=$ac_cv_path_LN
7808if test -n "$LN"; then
7809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7810$as_echo "$LN" >&6; }
7811else
7812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7813$as_echo "no" >&6; }
7814fi
7815
7816
7817        if test "x$LN" = x; then
7818          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7819        fi
7820      else
7821        # Otherwise we believe it is a complete path. Use it as it is.
7822        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7823$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7824        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7825$as_echo_n "checking for LN... " >&6; }
7826        if test ! -x "$tool_specified"; then
7827          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7828$as_echo "not found" >&6; }
7829          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7830        fi
7831        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7832$as_echo "$tool_specified" >&6; }
7833      fi
7834    fi
7835  fi
7836
7837
7838
7839  if test "x$LN" = x; then
7840    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7841  fi
7842
7843
7844
7845
7846
7847  # Publish this variable in the help.
7848
7849
7850  if test "x$LS" = x; then
7851    # The variable is not set by user, try to locate tool using the code snippet
7852    for ac_prog in ls
7853do
7854  # Extract the first word of "$ac_prog", so it can be a program name with args.
7855set dummy $ac_prog; ac_word=$2
7856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7857$as_echo_n "checking for $ac_word... " >&6; }
7858if ${ac_cv_path_LS+:} false; then :
7859  $as_echo_n "(cached) " >&6
7860else
7861  case $LS in
7862  [\\/]* | ?:[\\/]*)
7863  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7864  ;;
7865  *)
7866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7867for as_dir in $PATH
7868do
7869  IFS=$as_save_IFS
7870  test -z "$as_dir" && as_dir=.
7871    for ac_exec_ext in '' $ac_executable_extensions; do
7872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7873    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7875    break 2
7876  fi
7877done
7878  done
7879IFS=$as_save_IFS
7880
7881  ;;
7882esac
7883fi
7884LS=$ac_cv_path_LS
7885if test -n "$LS"; then
7886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7887$as_echo "$LS" >&6; }
7888else
7889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7890$as_echo "no" >&6; }
7891fi
7892
7893
7894  test -n "$LS" && break
7895done
7896
7897  else
7898    # The variable is set, but is it from the command line or the environment?
7899
7900    # Try to remove the string !LS! from our list.
7901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7903      # If it failed, the variable was not from the command line. Ignore it,
7904      # but warn the user (except for BASH, which is always set by the calling BASH).
7905      if test "xLS" != xBASH; then
7906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7907$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7908      fi
7909      # Try to locate tool using the code snippet
7910      for ac_prog in ls
7911do
7912  # Extract the first word of "$ac_prog", so it can be a program name with args.
7913set dummy $ac_prog; ac_word=$2
7914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7915$as_echo_n "checking for $ac_word... " >&6; }
7916if ${ac_cv_path_LS+:} false; then :
7917  $as_echo_n "(cached) " >&6
7918else
7919  case $LS in
7920  [\\/]* | ?:[\\/]*)
7921  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7922  ;;
7923  *)
7924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7925for as_dir in $PATH
7926do
7927  IFS=$as_save_IFS
7928  test -z "$as_dir" && as_dir=.
7929    for ac_exec_ext in '' $ac_executable_extensions; do
7930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7931    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7933    break 2
7934  fi
7935done
7936  done
7937IFS=$as_save_IFS
7938
7939  ;;
7940esac
7941fi
7942LS=$ac_cv_path_LS
7943if test -n "$LS"; then
7944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7945$as_echo "$LS" >&6; }
7946else
7947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7948$as_echo "no" >&6; }
7949fi
7950
7951
7952  test -n "$LS" && break
7953done
7954
7955    else
7956      # If it succeeded, then it was overridden by the user. We will use it
7957      # for the tool.
7958
7959      # First remove it from the list of overridden variables, so we can test
7960      # for unknown variables in the end.
7961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7962
7963      # Check if the provided tool contains a complete path.
7964      tool_specified="$LS"
7965      tool_basename="${tool_specified##*/}"
7966      if test "x$tool_basename" = "x$tool_specified"; then
7967        # A command without a complete path is provided, search $PATH.
7968        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7969$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7970        # Extract the first word of "$tool_basename", so it can be a program name with args.
7971set dummy $tool_basename; ac_word=$2
7972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7973$as_echo_n "checking for $ac_word... " >&6; }
7974if ${ac_cv_path_LS+:} false; then :
7975  $as_echo_n "(cached) " >&6
7976else
7977  case $LS in
7978  [\\/]* | ?:[\\/]*)
7979  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7980  ;;
7981  *)
7982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7983for as_dir in $PATH
7984do
7985  IFS=$as_save_IFS
7986  test -z "$as_dir" && as_dir=.
7987    for ac_exec_ext in '' $ac_executable_extensions; do
7988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7989    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7991    break 2
7992  fi
7993done
7994  done
7995IFS=$as_save_IFS
7996
7997  ;;
7998esac
7999fi
8000LS=$ac_cv_path_LS
8001if test -n "$LS"; then
8002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8003$as_echo "$LS" >&6; }
8004else
8005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8006$as_echo "no" >&6; }
8007fi
8008
8009
8010        if test "x$LS" = x; then
8011          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8012        fi
8013      else
8014        # Otherwise we believe it is a complete path. Use it as it is.
8015        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8016$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8017        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8018$as_echo_n "checking for LS... " >&6; }
8019        if test ! -x "$tool_specified"; then
8020          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8021$as_echo "not found" >&6; }
8022          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8023        fi
8024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8025$as_echo "$tool_specified" >&6; }
8026      fi
8027    fi
8028  fi
8029
8030
8031
8032  if test "x$LS" = x; then
8033    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8034  fi
8035
8036
8037
8038
8039
8040  # Publish this variable in the help.
8041
8042
8043  if test "x$MKDIR" = x; then
8044    # The variable is not set by user, try to locate tool using the code snippet
8045    for ac_prog in mkdir
8046do
8047  # Extract the first word of "$ac_prog", so it can be a program name with args.
8048set dummy $ac_prog; ac_word=$2
8049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8050$as_echo_n "checking for $ac_word... " >&6; }
8051if ${ac_cv_path_MKDIR+:} false; then :
8052  $as_echo_n "(cached) " >&6
8053else
8054  case $MKDIR in
8055  [\\/]* | ?:[\\/]*)
8056  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8057  ;;
8058  *)
8059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8060for as_dir in $PATH
8061do
8062  IFS=$as_save_IFS
8063  test -z "$as_dir" && as_dir=.
8064    for ac_exec_ext in '' $ac_executable_extensions; do
8065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8066    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8068    break 2
8069  fi
8070done
8071  done
8072IFS=$as_save_IFS
8073
8074  ;;
8075esac
8076fi
8077MKDIR=$ac_cv_path_MKDIR
8078if test -n "$MKDIR"; then
8079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8080$as_echo "$MKDIR" >&6; }
8081else
8082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8083$as_echo "no" >&6; }
8084fi
8085
8086
8087  test -n "$MKDIR" && break
8088done
8089
8090  else
8091    # The variable is set, but is it from the command line or the environment?
8092
8093    # Try to remove the string !MKDIR! from our list.
8094    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8095    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8096      # If it failed, the variable was not from the command line. Ignore it,
8097      # but warn the user (except for BASH, which is always set by the calling BASH).
8098      if test "xMKDIR" != xBASH; then
8099        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8100$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8101      fi
8102      # Try to locate tool using the code snippet
8103      for ac_prog in mkdir
8104do
8105  # Extract the first word of "$ac_prog", so it can be a program name with args.
8106set dummy $ac_prog; ac_word=$2
8107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8108$as_echo_n "checking for $ac_word... " >&6; }
8109if ${ac_cv_path_MKDIR+:} false; then :
8110  $as_echo_n "(cached) " >&6
8111else
8112  case $MKDIR in
8113  [\\/]* | ?:[\\/]*)
8114  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8115  ;;
8116  *)
8117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8118for as_dir in $PATH
8119do
8120  IFS=$as_save_IFS
8121  test -z "$as_dir" && as_dir=.
8122    for ac_exec_ext in '' $ac_executable_extensions; do
8123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8124    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8126    break 2
8127  fi
8128done
8129  done
8130IFS=$as_save_IFS
8131
8132  ;;
8133esac
8134fi
8135MKDIR=$ac_cv_path_MKDIR
8136if test -n "$MKDIR"; then
8137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8138$as_echo "$MKDIR" >&6; }
8139else
8140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8141$as_echo "no" >&6; }
8142fi
8143
8144
8145  test -n "$MKDIR" && break
8146done
8147
8148    else
8149      # If it succeeded, then it was overridden by the user. We will use it
8150      # for the tool.
8151
8152      # First remove it from the list of overridden variables, so we can test
8153      # for unknown variables in the end.
8154      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8155
8156      # Check if the provided tool contains a complete path.
8157      tool_specified="$MKDIR"
8158      tool_basename="${tool_specified##*/}"
8159      if test "x$tool_basename" = "x$tool_specified"; then
8160        # A command without a complete path is provided, search $PATH.
8161        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8162$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8163        # Extract the first word of "$tool_basename", so it can be a program name with args.
8164set dummy $tool_basename; ac_word=$2
8165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8166$as_echo_n "checking for $ac_word... " >&6; }
8167if ${ac_cv_path_MKDIR+:} false; then :
8168  $as_echo_n "(cached) " >&6
8169else
8170  case $MKDIR in
8171  [\\/]* | ?:[\\/]*)
8172  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8173  ;;
8174  *)
8175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8176for as_dir in $PATH
8177do
8178  IFS=$as_save_IFS
8179  test -z "$as_dir" && as_dir=.
8180    for ac_exec_ext in '' $ac_executable_extensions; do
8181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8182    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8184    break 2
8185  fi
8186done
8187  done
8188IFS=$as_save_IFS
8189
8190  ;;
8191esac
8192fi
8193MKDIR=$ac_cv_path_MKDIR
8194if test -n "$MKDIR"; then
8195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8196$as_echo "$MKDIR" >&6; }
8197else
8198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8199$as_echo "no" >&6; }
8200fi
8201
8202
8203        if test "x$MKDIR" = x; then
8204          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8205        fi
8206      else
8207        # Otherwise we believe it is a complete path. Use it as it is.
8208        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8209$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8210        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8211$as_echo_n "checking for MKDIR... " >&6; }
8212        if test ! -x "$tool_specified"; then
8213          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8214$as_echo "not found" >&6; }
8215          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8216        fi
8217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8218$as_echo "$tool_specified" >&6; }
8219      fi
8220    fi
8221  fi
8222
8223
8224
8225  if test "x$MKDIR" = x; then
8226    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8227  fi
8228
8229
8230
8231
8232
8233  # Publish this variable in the help.
8234
8235
8236  if test "x$MKTEMP" = x; then
8237    # The variable is not set by user, try to locate tool using the code snippet
8238    for ac_prog in mktemp
8239do
8240  # Extract the first word of "$ac_prog", so it can be a program name with args.
8241set dummy $ac_prog; ac_word=$2
8242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8243$as_echo_n "checking for $ac_word... " >&6; }
8244if ${ac_cv_path_MKTEMP+:} false; then :
8245  $as_echo_n "(cached) " >&6
8246else
8247  case $MKTEMP in
8248  [\\/]* | ?:[\\/]*)
8249  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8250  ;;
8251  *)
8252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8253for as_dir in $PATH
8254do
8255  IFS=$as_save_IFS
8256  test -z "$as_dir" && as_dir=.
8257    for ac_exec_ext in '' $ac_executable_extensions; do
8258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8259    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8261    break 2
8262  fi
8263done
8264  done
8265IFS=$as_save_IFS
8266
8267  ;;
8268esac
8269fi
8270MKTEMP=$ac_cv_path_MKTEMP
8271if test -n "$MKTEMP"; then
8272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8273$as_echo "$MKTEMP" >&6; }
8274else
8275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8276$as_echo "no" >&6; }
8277fi
8278
8279
8280  test -n "$MKTEMP" && break
8281done
8282
8283  else
8284    # The variable is set, but is it from the command line or the environment?
8285
8286    # Try to remove the string !MKTEMP! from our list.
8287    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8288    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8289      # If it failed, the variable was not from the command line. Ignore it,
8290      # but warn the user (except for BASH, which is always set by the calling BASH).
8291      if test "xMKTEMP" != xBASH; then
8292        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8293$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8294      fi
8295      # Try to locate tool using the code snippet
8296      for ac_prog in mktemp
8297do
8298  # Extract the first word of "$ac_prog", so it can be a program name with args.
8299set dummy $ac_prog; ac_word=$2
8300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8301$as_echo_n "checking for $ac_word... " >&6; }
8302if ${ac_cv_path_MKTEMP+:} false; then :
8303  $as_echo_n "(cached) " >&6
8304else
8305  case $MKTEMP in
8306  [\\/]* | ?:[\\/]*)
8307  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8308  ;;
8309  *)
8310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8311for as_dir in $PATH
8312do
8313  IFS=$as_save_IFS
8314  test -z "$as_dir" && as_dir=.
8315    for ac_exec_ext in '' $ac_executable_extensions; do
8316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8317    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8319    break 2
8320  fi
8321done
8322  done
8323IFS=$as_save_IFS
8324
8325  ;;
8326esac
8327fi
8328MKTEMP=$ac_cv_path_MKTEMP
8329if test -n "$MKTEMP"; then
8330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8331$as_echo "$MKTEMP" >&6; }
8332else
8333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8334$as_echo "no" >&6; }
8335fi
8336
8337
8338  test -n "$MKTEMP" && break
8339done
8340
8341    else
8342      # If it succeeded, then it was overridden by the user. We will use it
8343      # for the tool.
8344
8345      # First remove it from the list of overridden variables, so we can test
8346      # for unknown variables in the end.
8347      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8348
8349      # Check if the provided tool contains a complete path.
8350      tool_specified="$MKTEMP"
8351      tool_basename="${tool_specified##*/}"
8352      if test "x$tool_basename" = "x$tool_specified"; then
8353        # A command without a complete path is provided, search $PATH.
8354        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8355$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8356        # Extract the first word of "$tool_basename", so it can be a program name with args.
8357set dummy $tool_basename; ac_word=$2
8358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8359$as_echo_n "checking for $ac_word... " >&6; }
8360if ${ac_cv_path_MKTEMP+:} false; then :
8361  $as_echo_n "(cached) " >&6
8362else
8363  case $MKTEMP in
8364  [\\/]* | ?:[\\/]*)
8365  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8366  ;;
8367  *)
8368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8369for as_dir in $PATH
8370do
8371  IFS=$as_save_IFS
8372  test -z "$as_dir" && as_dir=.
8373    for ac_exec_ext in '' $ac_executable_extensions; do
8374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8375    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8377    break 2
8378  fi
8379done
8380  done
8381IFS=$as_save_IFS
8382
8383  ;;
8384esac
8385fi
8386MKTEMP=$ac_cv_path_MKTEMP
8387if test -n "$MKTEMP"; then
8388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8389$as_echo "$MKTEMP" >&6; }
8390else
8391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8392$as_echo "no" >&6; }
8393fi
8394
8395
8396        if test "x$MKTEMP" = x; then
8397          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8398        fi
8399      else
8400        # Otherwise we believe it is a complete path. Use it as it is.
8401        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8402$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8403        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8404$as_echo_n "checking for MKTEMP... " >&6; }
8405        if test ! -x "$tool_specified"; then
8406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8407$as_echo "not found" >&6; }
8408          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8409        fi
8410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8411$as_echo "$tool_specified" >&6; }
8412      fi
8413    fi
8414  fi
8415
8416
8417
8418  if test "x$MKTEMP" = x; then
8419    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8420  fi
8421
8422
8423
8424
8425
8426  # Publish this variable in the help.
8427
8428
8429  if test "x$MV" = x; then
8430    # The variable is not set by user, try to locate tool using the code snippet
8431    for ac_prog in mv
8432do
8433  # Extract the first word of "$ac_prog", so it can be a program name with args.
8434set dummy $ac_prog; ac_word=$2
8435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8436$as_echo_n "checking for $ac_word... " >&6; }
8437if ${ac_cv_path_MV+:} false; then :
8438  $as_echo_n "(cached) " >&6
8439else
8440  case $MV in
8441  [\\/]* | ?:[\\/]*)
8442  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8443  ;;
8444  *)
8445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8446for as_dir in $PATH
8447do
8448  IFS=$as_save_IFS
8449  test -z "$as_dir" && as_dir=.
8450    for ac_exec_ext in '' $ac_executable_extensions; do
8451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8452    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8454    break 2
8455  fi
8456done
8457  done
8458IFS=$as_save_IFS
8459
8460  ;;
8461esac
8462fi
8463MV=$ac_cv_path_MV
8464if test -n "$MV"; then
8465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8466$as_echo "$MV" >&6; }
8467else
8468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8469$as_echo "no" >&6; }
8470fi
8471
8472
8473  test -n "$MV" && break
8474done
8475
8476  else
8477    # The variable is set, but is it from the command line or the environment?
8478
8479    # Try to remove the string !MV! from our list.
8480    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8481    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8482      # If it failed, the variable was not from the command line. Ignore it,
8483      # but warn the user (except for BASH, which is always set by the calling BASH).
8484      if test "xMV" != xBASH; then
8485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8486$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8487      fi
8488      # Try to locate tool using the code snippet
8489      for ac_prog in mv
8490do
8491  # Extract the first word of "$ac_prog", so it can be a program name with args.
8492set dummy $ac_prog; ac_word=$2
8493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8494$as_echo_n "checking for $ac_word... " >&6; }
8495if ${ac_cv_path_MV+:} false; then :
8496  $as_echo_n "(cached) " >&6
8497else
8498  case $MV in
8499  [\\/]* | ?:[\\/]*)
8500  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8501  ;;
8502  *)
8503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8504for as_dir in $PATH
8505do
8506  IFS=$as_save_IFS
8507  test -z "$as_dir" && as_dir=.
8508    for ac_exec_ext in '' $ac_executable_extensions; do
8509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8510    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8512    break 2
8513  fi
8514done
8515  done
8516IFS=$as_save_IFS
8517
8518  ;;
8519esac
8520fi
8521MV=$ac_cv_path_MV
8522if test -n "$MV"; then
8523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8524$as_echo "$MV" >&6; }
8525else
8526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8527$as_echo "no" >&6; }
8528fi
8529
8530
8531  test -n "$MV" && break
8532done
8533
8534    else
8535      # If it succeeded, then it was overridden by the user. We will use it
8536      # for the tool.
8537
8538      # First remove it from the list of overridden variables, so we can test
8539      # for unknown variables in the end.
8540      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8541
8542      # Check if the provided tool contains a complete path.
8543      tool_specified="$MV"
8544      tool_basename="${tool_specified##*/}"
8545      if test "x$tool_basename" = "x$tool_specified"; then
8546        # A command without a complete path is provided, search $PATH.
8547        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8548$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8549        # Extract the first word of "$tool_basename", so it can be a program name with args.
8550set dummy $tool_basename; ac_word=$2
8551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8552$as_echo_n "checking for $ac_word... " >&6; }
8553if ${ac_cv_path_MV+:} false; then :
8554  $as_echo_n "(cached) " >&6
8555else
8556  case $MV in
8557  [\\/]* | ?:[\\/]*)
8558  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8559  ;;
8560  *)
8561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8562for as_dir in $PATH
8563do
8564  IFS=$as_save_IFS
8565  test -z "$as_dir" && as_dir=.
8566    for ac_exec_ext in '' $ac_executable_extensions; do
8567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8568    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8570    break 2
8571  fi
8572done
8573  done
8574IFS=$as_save_IFS
8575
8576  ;;
8577esac
8578fi
8579MV=$ac_cv_path_MV
8580if test -n "$MV"; then
8581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8582$as_echo "$MV" >&6; }
8583else
8584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8585$as_echo "no" >&6; }
8586fi
8587
8588
8589        if test "x$MV" = x; then
8590          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8591        fi
8592      else
8593        # Otherwise we believe it is a complete path. Use it as it is.
8594        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8595$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8596        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8597$as_echo_n "checking for MV... " >&6; }
8598        if test ! -x "$tool_specified"; then
8599          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8600$as_echo "not found" >&6; }
8601          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8602        fi
8603        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8604$as_echo "$tool_specified" >&6; }
8605      fi
8606    fi
8607  fi
8608
8609
8610
8611  if test "x$MV" = x; then
8612    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8613  fi
8614
8615
8616
8617
8618
8619  # Publish this variable in the help.
8620
8621
8622  if test "x$NAWK" = x; then
8623    # The variable is not set by user, try to locate tool using the code snippet
8624    for ac_prog in nawk gawk awk
8625do
8626  # Extract the first word of "$ac_prog", so it can be a program name with args.
8627set dummy $ac_prog; ac_word=$2
8628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8629$as_echo_n "checking for $ac_word... " >&6; }
8630if ${ac_cv_path_NAWK+:} false; then :
8631  $as_echo_n "(cached) " >&6
8632else
8633  case $NAWK in
8634  [\\/]* | ?:[\\/]*)
8635  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8636  ;;
8637  *)
8638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8639for as_dir in $PATH
8640do
8641  IFS=$as_save_IFS
8642  test -z "$as_dir" && as_dir=.
8643    for ac_exec_ext in '' $ac_executable_extensions; do
8644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8645    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8647    break 2
8648  fi
8649done
8650  done
8651IFS=$as_save_IFS
8652
8653  ;;
8654esac
8655fi
8656NAWK=$ac_cv_path_NAWK
8657if test -n "$NAWK"; then
8658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8659$as_echo "$NAWK" >&6; }
8660else
8661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8662$as_echo "no" >&6; }
8663fi
8664
8665
8666  test -n "$NAWK" && break
8667done
8668
8669  else
8670    # The variable is set, but is it from the command line or the environment?
8671
8672    # Try to remove the string !NAWK! from our list.
8673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8675      # If it failed, the variable was not from the command line. Ignore it,
8676      # but warn the user (except for BASH, which is always set by the calling BASH).
8677      if test "xNAWK" != xBASH; then
8678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8679$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8680      fi
8681      # Try to locate tool using the code snippet
8682      for ac_prog in nawk gawk awk
8683do
8684  # Extract the first word of "$ac_prog", so it can be a program name with args.
8685set dummy $ac_prog; ac_word=$2
8686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8687$as_echo_n "checking for $ac_word... " >&6; }
8688if ${ac_cv_path_NAWK+:} false; then :
8689  $as_echo_n "(cached) " >&6
8690else
8691  case $NAWK in
8692  [\\/]* | ?:[\\/]*)
8693  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8694  ;;
8695  *)
8696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8697for as_dir in $PATH
8698do
8699  IFS=$as_save_IFS
8700  test -z "$as_dir" && as_dir=.
8701    for ac_exec_ext in '' $ac_executable_extensions; do
8702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8703    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8705    break 2
8706  fi
8707done
8708  done
8709IFS=$as_save_IFS
8710
8711  ;;
8712esac
8713fi
8714NAWK=$ac_cv_path_NAWK
8715if test -n "$NAWK"; then
8716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8717$as_echo "$NAWK" >&6; }
8718else
8719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8720$as_echo "no" >&6; }
8721fi
8722
8723
8724  test -n "$NAWK" && break
8725done
8726
8727    else
8728      # If it succeeded, then it was overridden by the user. We will use it
8729      # for the tool.
8730
8731      # First remove it from the list of overridden variables, so we can test
8732      # for unknown variables in the end.
8733      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8734
8735      # Check if the provided tool contains a complete path.
8736      tool_specified="$NAWK"
8737      tool_basename="${tool_specified##*/}"
8738      if test "x$tool_basename" = "x$tool_specified"; then
8739        # A command without a complete path is provided, search $PATH.
8740        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8741$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8742        # Extract the first word of "$tool_basename", so it can be a program name with args.
8743set dummy $tool_basename; ac_word=$2
8744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8745$as_echo_n "checking for $ac_word... " >&6; }
8746if ${ac_cv_path_NAWK+:} false; then :
8747  $as_echo_n "(cached) " >&6
8748else
8749  case $NAWK in
8750  [\\/]* | ?:[\\/]*)
8751  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8752  ;;
8753  *)
8754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8755for as_dir in $PATH
8756do
8757  IFS=$as_save_IFS
8758  test -z "$as_dir" && as_dir=.
8759    for ac_exec_ext in '' $ac_executable_extensions; do
8760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8761    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8763    break 2
8764  fi
8765done
8766  done
8767IFS=$as_save_IFS
8768
8769  ;;
8770esac
8771fi
8772NAWK=$ac_cv_path_NAWK
8773if test -n "$NAWK"; then
8774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8775$as_echo "$NAWK" >&6; }
8776else
8777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8778$as_echo "no" >&6; }
8779fi
8780
8781
8782        if test "x$NAWK" = x; then
8783          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8784        fi
8785      else
8786        # Otherwise we believe it is a complete path. Use it as it is.
8787        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8788$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8789        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8790$as_echo_n "checking for NAWK... " >&6; }
8791        if test ! -x "$tool_specified"; then
8792          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8793$as_echo "not found" >&6; }
8794          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8795        fi
8796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8797$as_echo "$tool_specified" >&6; }
8798      fi
8799    fi
8800  fi
8801
8802
8803
8804  if test "x$NAWK" = x; then
8805    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8806  fi
8807
8808
8809
8810
8811
8812  # Publish this variable in the help.
8813
8814
8815  if test "x$PRINTF" = x; then
8816    # The variable is not set by user, try to locate tool using the code snippet
8817    for ac_prog in printf
8818do
8819  # Extract the first word of "$ac_prog", so it can be a program name with args.
8820set dummy $ac_prog; ac_word=$2
8821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8822$as_echo_n "checking for $ac_word... " >&6; }
8823if ${ac_cv_path_PRINTF+:} false; then :
8824  $as_echo_n "(cached) " >&6
8825else
8826  case $PRINTF in
8827  [\\/]* | ?:[\\/]*)
8828  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8829  ;;
8830  *)
8831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8832for as_dir in $PATH
8833do
8834  IFS=$as_save_IFS
8835  test -z "$as_dir" && as_dir=.
8836    for ac_exec_ext in '' $ac_executable_extensions; do
8837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8838    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8840    break 2
8841  fi
8842done
8843  done
8844IFS=$as_save_IFS
8845
8846  ;;
8847esac
8848fi
8849PRINTF=$ac_cv_path_PRINTF
8850if test -n "$PRINTF"; then
8851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8852$as_echo "$PRINTF" >&6; }
8853else
8854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8855$as_echo "no" >&6; }
8856fi
8857
8858
8859  test -n "$PRINTF" && break
8860done
8861
8862  else
8863    # The variable is set, but is it from the command line or the environment?
8864
8865    # Try to remove the string !PRINTF! from our list.
8866    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8867    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8868      # If it failed, the variable was not from the command line. Ignore it,
8869      # but warn the user (except for BASH, which is always set by the calling BASH).
8870      if test "xPRINTF" != xBASH; then
8871        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8872$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8873      fi
8874      # Try to locate tool using the code snippet
8875      for ac_prog in printf
8876do
8877  # Extract the first word of "$ac_prog", so it can be a program name with args.
8878set dummy $ac_prog; ac_word=$2
8879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8880$as_echo_n "checking for $ac_word... " >&6; }
8881if ${ac_cv_path_PRINTF+:} false; then :
8882  $as_echo_n "(cached) " >&6
8883else
8884  case $PRINTF in
8885  [\\/]* | ?:[\\/]*)
8886  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8887  ;;
8888  *)
8889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8890for as_dir in $PATH
8891do
8892  IFS=$as_save_IFS
8893  test -z "$as_dir" && as_dir=.
8894    for ac_exec_ext in '' $ac_executable_extensions; do
8895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8896    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8898    break 2
8899  fi
8900done
8901  done
8902IFS=$as_save_IFS
8903
8904  ;;
8905esac
8906fi
8907PRINTF=$ac_cv_path_PRINTF
8908if test -n "$PRINTF"; then
8909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8910$as_echo "$PRINTF" >&6; }
8911else
8912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8913$as_echo "no" >&6; }
8914fi
8915
8916
8917  test -n "$PRINTF" && break
8918done
8919
8920    else
8921      # If it succeeded, then it was overridden by the user. We will use it
8922      # for the tool.
8923
8924      # First remove it from the list of overridden variables, so we can test
8925      # for unknown variables in the end.
8926      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8927
8928      # Check if the provided tool contains a complete path.
8929      tool_specified="$PRINTF"
8930      tool_basename="${tool_specified##*/}"
8931      if test "x$tool_basename" = "x$tool_specified"; then
8932        # A command without a complete path is provided, search $PATH.
8933        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8934$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8935        # Extract the first word of "$tool_basename", so it can be a program name with args.
8936set dummy $tool_basename; ac_word=$2
8937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8938$as_echo_n "checking for $ac_word... " >&6; }
8939if ${ac_cv_path_PRINTF+:} false; then :
8940  $as_echo_n "(cached) " >&6
8941else
8942  case $PRINTF in
8943  [\\/]* | ?:[\\/]*)
8944  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8945  ;;
8946  *)
8947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8948for as_dir in $PATH
8949do
8950  IFS=$as_save_IFS
8951  test -z "$as_dir" && as_dir=.
8952    for ac_exec_ext in '' $ac_executable_extensions; do
8953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8954    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8956    break 2
8957  fi
8958done
8959  done
8960IFS=$as_save_IFS
8961
8962  ;;
8963esac
8964fi
8965PRINTF=$ac_cv_path_PRINTF
8966if test -n "$PRINTF"; then
8967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8968$as_echo "$PRINTF" >&6; }
8969else
8970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8971$as_echo "no" >&6; }
8972fi
8973
8974
8975        if test "x$PRINTF" = x; then
8976          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8977        fi
8978      else
8979        # Otherwise we believe it is a complete path. Use it as it is.
8980        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8981$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8982        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8983$as_echo_n "checking for PRINTF... " >&6; }
8984        if test ! -x "$tool_specified"; then
8985          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8986$as_echo "not found" >&6; }
8987          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8988        fi
8989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8990$as_echo "$tool_specified" >&6; }
8991      fi
8992    fi
8993  fi
8994
8995
8996
8997  if test "x$PRINTF" = x; then
8998    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8999  fi
9000
9001
9002
9003
9004
9005  # Publish this variable in the help.
9006
9007
9008  if test "x$RM" = x; then
9009    # The variable is not set by user, try to locate tool using the code snippet
9010    for ac_prog in rm
9011do
9012  # Extract the first word of "$ac_prog", so it can be a program name with args.
9013set dummy $ac_prog; ac_word=$2
9014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9015$as_echo_n "checking for $ac_word... " >&6; }
9016if ${ac_cv_path_RM+:} false; then :
9017  $as_echo_n "(cached) " >&6
9018else
9019  case $RM in
9020  [\\/]* | ?:[\\/]*)
9021  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9022  ;;
9023  *)
9024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9025for as_dir in $PATH
9026do
9027  IFS=$as_save_IFS
9028  test -z "$as_dir" && as_dir=.
9029    for ac_exec_ext in '' $ac_executable_extensions; do
9030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9031    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9033    break 2
9034  fi
9035done
9036  done
9037IFS=$as_save_IFS
9038
9039  ;;
9040esac
9041fi
9042RM=$ac_cv_path_RM
9043if test -n "$RM"; then
9044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9045$as_echo "$RM" >&6; }
9046else
9047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9048$as_echo "no" >&6; }
9049fi
9050
9051
9052  test -n "$RM" && break
9053done
9054
9055  else
9056    # The variable is set, but is it from the command line or the environment?
9057
9058    # Try to remove the string !RM! from our list.
9059    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9060    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9061      # If it failed, the variable was not from the command line. Ignore it,
9062      # but warn the user (except for BASH, which is always set by the calling BASH).
9063      if test "xRM" != xBASH; then
9064        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9065$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9066      fi
9067      # Try to locate tool using the code snippet
9068      for ac_prog in rm
9069do
9070  # Extract the first word of "$ac_prog", so it can be a program name with args.
9071set dummy $ac_prog; ac_word=$2
9072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9073$as_echo_n "checking for $ac_word... " >&6; }
9074if ${ac_cv_path_RM+:} false; then :
9075  $as_echo_n "(cached) " >&6
9076else
9077  case $RM in
9078  [\\/]* | ?:[\\/]*)
9079  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9080  ;;
9081  *)
9082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9083for as_dir in $PATH
9084do
9085  IFS=$as_save_IFS
9086  test -z "$as_dir" && as_dir=.
9087    for ac_exec_ext in '' $ac_executable_extensions; do
9088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9089    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9091    break 2
9092  fi
9093done
9094  done
9095IFS=$as_save_IFS
9096
9097  ;;
9098esac
9099fi
9100RM=$ac_cv_path_RM
9101if test -n "$RM"; then
9102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9103$as_echo "$RM" >&6; }
9104else
9105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9106$as_echo "no" >&6; }
9107fi
9108
9109
9110  test -n "$RM" && break
9111done
9112
9113    else
9114      # If it succeeded, then it was overridden by the user. We will use it
9115      # for the tool.
9116
9117      # First remove it from the list of overridden variables, so we can test
9118      # for unknown variables in the end.
9119      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9120
9121      # Check if the provided tool contains a complete path.
9122      tool_specified="$RM"
9123      tool_basename="${tool_specified##*/}"
9124      if test "x$tool_basename" = "x$tool_specified"; then
9125        # A command without a complete path is provided, search $PATH.
9126        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9127$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9128        # Extract the first word of "$tool_basename", so it can be a program name with args.
9129set dummy $tool_basename; ac_word=$2
9130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9131$as_echo_n "checking for $ac_word... " >&6; }
9132if ${ac_cv_path_RM+:} false; then :
9133  $as_echo_n "(cached) " >&6
9134else
9135  case $RM in
9136  [\\/]* | ?:[\\/]*)
9137  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9138  ;;
9139  *)
9140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9141for as_dir in $PATH
9142do
9143  IFS=$as_save_IFS
9144  test -z "$as_dir" && as_dir=.
9145    for ac_exec_ext in '' $ac_executable_extensions; do
9146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9147    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9149    break 2
9150  fi
9151done
9152  done
9153IFS=$as_save_IFS
9154
9155  ;;
9156esac
9157fi
9158RM=$ac_cv_path_RM
9159if test -n "$RM"; then
9160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9161$as_echo "$RM" >&6; }
9162else
9163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9164$as_echo "no" >&6; }
9165fi
9166
9167
9168        if test "x$RM" = x; then
9169          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9170        fi
9171      else
9172        # Otherwise we believe it is a complete path. Use it as it is.
9173        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9174$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9176$as_echo_n "checking for RM... " >&6; }
9177        if test ! -x "$tool_specified"; then
9178          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9179$as_echo "not found" >&6; }
9180          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9181        fi
9182        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9183$as_echo "$tool_specified" >&6; }
9184      fi
9185    fi
9186  fi
9187
9188
9189
9190  if test "x$RM" = x; then
9191    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9192  fi
9193
9194
9195
9196
9197
9198  # Publish this variable in the help.
9199
9200
9201  if test "x$SH" = x; then
9202    # The variable is not set by user, try to locate tool using the code snippet
9203    for ac_prog in sh
9204do
9205  # Extract the first word of "$ac_prog", so it can be a program name with args.
9206set dummy $ac_prog; ac_word=$2
9207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9208$as_echo_n "checking for $ac_word... " >&6; }
9209if ${ac_cv_path_SH+:} false; then :
9210  $as_echo_n "(cached) " >&6
9211else
9212  case $SH in
9213  [\\/]* | ?:[\\/]*)
9214  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9215  ;;
9216  *)
9217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9218for as_dir in $PATH
9219do
9220  IFS=$as_save_IFS
9221  test -z "$as_dir" && as_dir=.
9222    for ac_exec_ext in '' $ac_executable_extensions; do
9223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9224    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9226    break 2
9227  fi
9228done
9229  done
9230IFS=$as_save_IFS
9231
9232  ;;
9233esac
9234fi
9235SH=$ac_cv_path_SH
9236if test -n "$SH"; then
9237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9238$as_echo "$SH" >&6; }
9239else
9240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9241$as_echo "no" >&6; }
9242fi
9243
9244
9245  test -n "$SH" && break
9246done
9247
9248  else
9249    # The variable is set, but is it from the command line or the environment?
9250
9251    # Try to remove the string !SH! from our list.
9252    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9253    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9254      # If it failed, the variable was not from the command line. Ignore it,
9255      # but warn the user (except for BASH, which is always set by the calling BASH).
9256      if test "xSH" != xBASH; then
9257        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9258$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9259      fi
9260      # Try to locate tool using the code snippet
9261      for ac_prog in sh
9262do
9263  # Extract the first word of "$ac_prog", so it can be a program name with args.
9264set dummy $ac_prog; ac_word=$2
9265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9266$as_echo_n "checking for $ac_word... " >&6; }
9267if ${ac_cv_path_SH+:} false; then :
9268  $as_echo_n "(cached) " >&6
9269else
9270  case $SH in
9271  [\\/]* | ?:[\\/]*)
9272  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9273  ;;
9274  *)
9275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9276for as_dir in $PATH
9277do
9278  IFS=$as_save_IFS
9279  test -z "$as_dir" && as_dir=.
9280    for ac_exec_ext in '' $ac_executable_extensions; do
9281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9282    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9284    break 2
9285  fi
9286done
9287  done
9288IFS=$as_save_IFS
9289
9290  ;;
9291esac
9292fi
9293SH=$ac_cv_path_SH
9294if test -n "$SH"; then
9295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9296$as_echo "$SH" >&6; }
9297else
9298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9299$as_echo "no" >&6; }
9300fi
9301
9302
9303  test -n "$SH" && break
9304done
9305
9306    else
9307      # If it succeeded, then it was overridden by the user. We will use it
9308      # for the tool.
9309
9310      # First remove it from the list of overridden variables, so we can test
9311      # for unknown variables in the end.
9312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9313
9314      # Check if the provided tool contains a complete path.
9315      tool_specified="$SH"
9316      tool_basename="${tool_specified##*/}"
9317      if test "x$tool_basename" = "x$tool_specified"; then
9318        # A command without a complete path is provided, search $PATH.
9319        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9320$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9321        # Extract the first word of "$tool_basename", so it can be a program name with args.
9322set dummy $tool_basename; ac_word=$2
9323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9324$as_echo_n "checking for $ac_word... " >&6; }
9325if ${ac_cv_path_SH+:} false; then :
9326  $as_echo_n "(cached) " >&6
9327else
9328  case $SH in
9329  [\\/]* | ?:[\\/]*)
9330  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9331  ;;
9332  *)
9333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9334for as_dir in $PATH
9335do
9336  IFS=$as_save_IFS
9337  test -z "$as_dir" && as_dir=.
9338    for ac_exec_ext in '' $ac_executable_extensions; do
9339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9340    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9342    break 2
9343  fi
9344done
9345  done
9346IFS=$as_save_IFS
9347
9348  ;;
9349esac
9350fi
9351SH=$ac_cv_path_SH
9352if test -n "$SH"; then
9353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9354$as_echo "$SH" >&6; }
9355else
9356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9357$as_echo "no" >&6; }
9358fi
9359
9360
9361        if test "x$SH" = x; then
9362          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9363        fi
9364      else
9365        # Otherwise we believe it is a complete path. Use it as it is.
9366        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9367$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9369$as_echo_n "checking for SH... " >&6; }
9370        if test ! -x "$tool_specified"; then
9371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9372$as_echo "not found" >&6; }
9373          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9374        fi
9375        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9376$as_echo "$tool_specified" >&6; }
9377      fi
9378    fi
9379  fi
9380
9381
9382
9383  if test "x$SH" = x; then
9384    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9385  fi
9386
9387
9388
9389
9390
9391  # Publish this variable in the help.
9392
9393
9394  if test "x$SORT" = x; then
9395    # The variable is not set by user, try to locate tool using the code snippet
9396    for ac_prog in sort
9397do
9398  # Extract the first word of "$ac_prog", so it can be a program name with args.
9399set dummy $ac_prog; ac_word=$2
9400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9401$as_echo_n "checking for $ac_word... " >&6; }
9402if ${ac_cv_path_SORT+:} false; then :
9403  $as_echo_n "(cached) " >&6
9404else
9405  case $SORT in
9406  [\\/]* | ?:[\\/]*)
9407  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9408  ;;
9409  *)
9410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9411for as_dir in $PATH
9412do
9413  IFS=$as_save_IFS
9414  test -z "$as_dir" && as_dir=.
9415    for ac_exec_ext in '' $ac_executable_extensions; do
9416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9417    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9419    break 2
9420  fi
9421done
9422  done
9423IFS=$as_save_IFS
9424
9425  ;;
9426esac
9427fi
9428SORT=$ac_cv_path_SORT
9429if test -n "$SORT"; then
9430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9431$as_echo "$SORT" >&6; }
9432else
9433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9434$as_echo "no" >&6; }
9435fi
9436
9437
9438  test -n "$SORT" && break
9439done
9440
9441  else
9442    # The variable is set, but is it from the command line or the environment?
9443
9444    # Try to remove the string !SORT! from our list.
9445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9447      # If it failed, the variable was not from the command line. Ignore it,
9448      # but warn the user (except for BASH, which is always set by the calling BASH).
9449      if test "xSORT" != xBASH; then
9450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9451$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9452      fi
9453      # Try to locate tool using the code snippet
9454      for ac_prog in sort
9455do
9456  # Extract the first word of "$ac_prog", so it can be a program name with args.
9457set dummy $ac_prog; ac_word=$2
9458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9459$as_echo_n "checking for $ac_word... " >&6; }
9460if ${ac_cv_path_SORT+:} false; then :
9461  $as_echo_n "(cached) " >&6
9462else
9463  case $SORT in
9464  [\\/]* | ?:[\\/]*)
9465  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9466  ;;
9467  *)
9468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9469for as_dir in $PATH
9470do
9471  IFS=$as_save_IFS
9472  test -z "$as_dir" && as_dir=.
9473    for ac_exec_ext in '' $ac_executable_extensions; do
9474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9475    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9477    break 2
9478  fi
9479done
9480  done
9481IFS=$as_save_IFS
9482
9483  ;;
9484esac
9485fi
9486SORT=$ac_cv_path_SORT
9487if test -n "$SORT"; then
9488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9489$as_echo "$SORT" >&6; }
9490else
9491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9492$as_echo "no" >&6; }
9493fi
9494
9495
9496  test -n "$SORT" && break
9497done
9498
9499    else
9500      # If it succeeded, then it was overridden by the user. We will use it
9501      # for the tool.
9502
9503      # First remove it from the list of overridden variables, so we can test
9504      # for unknown variables in the end.
9505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9506
9507      # Check if the provided tool contains a complete path.
9508      tool_specified="$SORT"
9509      tool_basename="${tool_specified##*/}"
9510      if test "x$tool_basename" = "x$tool_specified"; then
9511        # A command without a complete path is provided, search $PATH.
9512        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9513$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9514        # Extract the first word of "$tool_basename", so it can be a program name with args.
9515set dummy $tool_basename; ac_word=$2
9516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9517$as_echo_n "checking for $ac_word... " >&6; }
9518if ${ac_cv_path_SORT+:} false; then :
9519  $as_echo_n "(cached) " >&6
9520else
9521  case $SORT in
9522  [\\/]* | ?:[\\/]*)
9523  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9524  ;;
9525  *)
9526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9527for as_dir in $PATH
9528do
9529  IFS=$as_save_IFS
9530  test -z "$as_dir" && as_dir=.
9531    for ac_exec_ext in '' $ac_executable_extensions; do
9532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9533    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9535    break 2
9536  fi
9537done
9538  done
9539IFS=$as_save_IFS
9540
9541  ;;
9542esac
9543fi
9544SORT=$ac_cv_path_SORT
9545if test -n "$SORT"; then
9546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9547$as_echo "$SORT" >&6; }
9548else
9549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9550$as_echo "no" >&6; }
9551fi
9552
9553
9554        if test "x$SORT" = x; then
9555          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9556        fi
9557      else
9558        # Otherwise we believe it is a complete path. Use it as it is.
9559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9560$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9562$as_echo_n "checking for SORT... " >&6; }
9563        if test ! -x "$tool_specified"; then
9564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9565$as_echo "not found" >&6; }
9566          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9567        fi
9568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9569$as_echo "$tool_specified" >&6; }
9570      fi
9571    fi
9572  fi
9573
9574
9575
9576  if test "x$SORT" = x; then
9577    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9578  fi
9579
9580
9581
9582
9583
9584  # Publish this variable in the help.
9585
9586
9587  if test "x$TAIL" = x; then
9588    # The variable is not set by user, try to locate tool using the code snippet
9589    for ac_prog in tail
9590do
9591  # Extract the first word of "$ac_prog", so it can be a program name with args.
9592set dummy $ac_prog; ac_word=$2
9593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9594$as_echo_n "checking for $ac_word... " >&6; }
9595if ${ac_cv_path_TAIL+:} false; then :
9596  $as_echo_n "(cached) " >&6
9597else
9598  case $TAIL in
9599  [\\/]* | ?:[\\/]*)
9600  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9601  ;;
9602  *)
9603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9604for as_dir in $PATH
9605do
9606  IFS=$as_save_IFS
9607  test -z "$as_dir" && as_dir=.
9608    for ac_exec_ext in '' $ac_executable_extensions; do
9609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9610    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9612    break 2
9613  fi
9614done
9615  done
9616IFS=$as_save_IFS
9617
9618  ;;
9619esac
9620fi
9621TAIL=$ac_cv_path_TAIL
9622if test -n "$TAIL"; then
9623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9624$as_echo "$TAIL" >&6; }
9625else
9626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9627$as_echo "no" >&6; }
9628fi
9629
9630
9631  test -n "$TAIL" && break
9632done
9633
9634  else
9635    # The variable is set, but is it from the command line or the environment?
9636
9637    # Try to remove the string !TAIL! from our list.
9638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9640      # If it failed, the variable was not from the command line. Ignore it,
9641      # but warn the user (except for BASH, which is always set by the calling BASH).
9642      if test "xTAIL" != xBASH; then
9643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9644$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9645      fi
9646      # Try to locate tool using the code snippet
9647      for ac_prog in tail
9648do
9649  # Extract the first word of "$ac_prog", so it can be a program name with args.
9650set dummy $ac_prog; ac_word=$2
9651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9652$as_echo_n "checking for $ac_word... " >&6; }
9653if ${ac_cv_path_TAIL+:} false; then :
9654  $as_echo_n "(cached) " >&6
9655else
9656  case $TAIL in
9657  [\\/]* | ?:[\\/]*)
9658  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9659  ;;
9660  *)
9661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9662for as_dir in $PATH
9663do
9664  IFS=$as_save_IFS
9665  test -z "$as_dir" && as_dir=.
9666    for ac_exec_ext in '' $ac_executable_extensions; do
9667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9668    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9670    break 2
9671  fi
9672done
9673  done
9674IFS=$as_save_IFS
9675
9676  ;;
9677esac
9678fi
9679TAIL=$ac_cv_path_TAIL
9680if test -n "$TAIL"; then
9681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9682$as_echo "$TAIL" >&6; }
9683else
9684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9685$as_echo "no" >&6; }
9686fi
9687
9688
9689  test -n "$TAIL" && break
9690done
9691
9692    else
9693      # If it succeeded, then it was overridden by the user. We will use it
9694      # for the tool.
9695
9696      # First remove it from the list of overridden variables, so we can test
9697      # for unknown variables in the end.
9698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9699
9700      # Check if the provided tool contains a complete path.
9701      tool_specified="$TAIL"
9702      tool_basename="${tool_specified##*/}"
9703      if test "x$tool_basename" = "x$tool_specified"; then
9704        # A command without a complete path is provided, search $PATH.
9705        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9706$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9707        # Extract the first word of "$tool_basename", so it can be a program name with args.
9708set dummy $tool_basename; ac_word=$2
9709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9710$as_echo_n "checking for $ac_word... " >&6; }
9711if ${ac_cv_path_TAIL+:} false; then :
9712  $as_echo_n "(cached) " >&6
9713else
9714  case $TAIL in
9715  [\\/]* | ?:[\\/]*)
9716  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9717  ;;
9718  *)
9719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9720for as_dir in $PATH
9721do
9722  IFS=$as_save_IFS
9723  test -z "$as_dir" && as_dir=.
9724    for ac_exec_ext in '' $ac_executable_extensions; do
9725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9726    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9728    break 2
9729  fi
9730done
9731  done
9732IFS=$as_save_IFS
9733
9734  ;;
9735esac
9736fi
9737TAIL=$ac_cv_path_TAIL
9738if test -n "$TAIL"; then
9739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9740$as_echo "$TAIL" >&6; }
9741else
9742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9743$as_echo "no" >&6; }
9744fi
9745
9746
9747        if test "x$TAIL" = x; then
9748          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9749        fi
9750      else
9751        # Otherwise we believe it is a complete path. Use it as it is.
9752        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9753$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9754        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9755$as_echo_n "checking for TAIL... " >&6; }
9756        if test ! -x "$tool_specified"; then
9757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9758$as_echo "not found" >&6; }
9759          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9760        fi
9761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9762$as_echo "$tool_specified" >&6; }
9763      fi
9764    fi
9765  fi
9766
9767
9768
9769  if test "x$TAIL" = x; then
9770    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9771  fi
9772
9773
9774
9775
9776
9777  # Publish this variable in the help.
9778
9779
9780  if test "x$TAR" = x; then
9781    # The variable is not set by user, try to locate tool using the code snippet
9782    for ac_prog in tar
9783do
9784  # Extract the first word of "$ac_prog", so it can be a program name with args.
9785set dummy $ac_prog; ac_word=$2
9786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9787$as_echo_n "checking for $ac_word... " >&6; }
9788if ${ac_cv_path_TAR+:} false; then :
9789  $as_echo_n "(cached) " >&6
9790else
9791  case $TAR in
9792  [\\/]* | ?:[\\/]*)
9793  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9794  ;;
9795  *)
9796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9797for as_dir in $PATH
9798do
9799  IFS=$as_save_IFS
9800  test -z "$as_dir" && as_dir=.
9801    for ac_exec_ext in '' $ac_executable_extensions; do
9802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9803    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9805    break 2
9806  fi
9807done
9808  done
9809IFS=$as_save_IFS
9810
9811  ;;
9812esac
9813fi
9814TAR=$ac_cv_path_TAR
9815if test -n "$TAR"; then
9816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9817$as_echo "$TAR" >&6; }
9818else
9819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9820$as_echo "no" >&6; }
9821fi
9822
9823
9824  test -n "$TAR" && break
9825done
9826
9827  else
9828    # The variable is set, but is it from the command line or the environment?
9829
9830    # Try to remove the string !TAR! from our list.
9831    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9832    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9833      # If it failed, the variable was not from the command line. Ignore it,
9834      # but warn the user (except for BASH, which is always set by the calling BASH).
9835      if test "xTAR" != xBASH; then
9836        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9837$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9838      fi
9839      # Try to locate tool using the code snippet
9840      for ac_prog in tar
9841do
9842  # Extract the first word of "$ac_prog", so it can be a program name with args.
9843set dummy $ac_prog; ac_word=$2
9844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9845$as_echo_n "checking for $ac_word... " >&6; }
9846if ${ac_cv_path_TAR+:} false; then :
9847  $as_echo_n "(cached) " >&6
9848else
9849  case $TAR in
9850  [\\/]* | ?:[\\/]*)
9851  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9852  ;;
9853  *)
9854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9855for as_dir in $PATH
9856do
9857  IFS=$as_save_IFS
9858  test -z "$as_dir" && as_dir=.
9859    for ac_exec_ext in '' $ac_executable_extensions; do
9860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9861    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9863    break 2
9864  fi
9865done
9866  done
9867IFS=$as_save_IFS
9868
9869  ;;
9870esac
9871fi
9872TAR=$ac_cv_path_TAR
9873if test -n "$TAR"; then
9874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9875$as_echo "$TAR" >&6; }
9876else
9877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9878$as_echo "no" >&6; }
9879fi
9880
9881
9882  test -n "$TAR" && break
9883done
9884
9885    else
9886      # If it succeeded, then it was overridden by the user. We will use it
9887      # for the tool.
9888
9889      # First remove it from the list of overridden variables, so we can test
9890      # for unknown variables in the end.
9891      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9892
9893      # Check if the provided tool contains a complete path.
9894      tool_specified="$TAR"
9895      tool_basename="${tool_specified##*/}"
9896      if test "x$tool_basename" = "x$tool_specified"; then
9897        # A command without a complete path is provided, search $PATH.
9898        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9899$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9900        # Extract the first word of "$tool_basename", so it can be a program name with args.
9901set dummy $tool_basename; ac_word=$2
9902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9903$as_echo_n "checking for $ac_word... " >&6; }
9904if ${ac_cv_path_TAR+:} false; then :
9905  $as_echo_n "(cached) " >&6
9906else
9907  case $TAR in
9908  [\\/]* | ?:[\\/]*)
9909  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9910  ;;
9911  *)
9912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9913for as_dir in $PATH
9914do
9915  IFS=$as_save_IFS
9916  test -z "$as_dir" && as_dir=.
9917    for ac_exec_ext in '' $ac_executable_extensions; do
9918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9919    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9921    break 2
9922  fi
9923done
9924  done
9925IFS=$as_save_IFS
9926
9927  ;;
9928esac
9929fi
9930TAR=$ac_cv_path_TAR
9931if test -n "$TAR"; then
9932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9933$as_echo "$TAR" >&6; }
9934else
9935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9936$as_echo "no" >&6; }
9937fi
9938
9939
9940        if test "x$TAR" = x; then
9941          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9942        fi
9943      else
9944        # Otherwise we believe it is a complete path. Use it as it is.
9945        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9946$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9948$as_echo_n "checking for TAR... " >&6; }
9949        if test ! -x "$tool_specified"; then
9950          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9951$as_echo "not found" >&6; }
9952          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9953        fi
9954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9955$as_echo "$tool_specified" >&6; }
9956      fi
9957    fi
9958  fi
9959
9960
9961
9962  if test "x$TAR" = x; then
9963    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9964  fi
9965
9966
9967
9968
9969
9970  # Publish this variable in the help.
9971
9972
9973  if test "x$TEE" = x; then
9974    # The variable is not set by user, try to locate tool using the code snippet
9975    for ac_prog in tee
9976do
9977  # Extract the first word of "$ac_prog", so it can be a program name with args.
9978set dummy $ac_prog; ac_word=$2
9979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9980$as_echo_n "checking for $ac_word... " >&6; }
9981if ${ac_cv_path_TEE+:} false; then :
9982  $as_echo_n "(cached) " >&6
9983else
9984  case $TEE in
9985  [\\/]* | ?:[\\/]*)
9986  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9987  ;;
9988  *)
9989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9990for as_dir in $PATH
9991do
9992  IFS=$as_save_IFS
9993  test -z "$as_dir" && as_dir=.
9994    for ac_exec_ext in '' $ac_executable_extensions; do
9995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9996    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9998    break 2
9999  fi
10000done
10001  done
10002IFS=$as_save_IFS
10003
10004  ;;
10005esac
10006fi
10007TEE=$ac_cv_path_TEE
10008if test -n "$TEE"; then
10009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10010$as_echo "$TEE" >&6; }
10011else
10012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10013$as_echo "no" >&6; }
10014fi
10015
10016
10017  test -n "$TEE" && break
10018done
10019
10020  else
10021    # The variable is set, but is it from the command line or the environment?
10022
10023    # Try to remove the string !TEE! from our list.
10024    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10025    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10026      # If it failed, the variable was not from the command line. Ignore it,
10027      # but warn the user (except for BASH, which is always set by the calling BASH).
10028      if test "xTEE" != xBASH; then
10029        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10030$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10031      fi
10032      # Try to locate tool using the code snippet
10033      for ac_prog in tee
10034do
10035  # Extract the first word of "$ac_prog", so it can be a program name with args.
10036set dummy $ac_prog; ac_word=$2
10037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10038$as_echo_n "checking for $ac_word... " >&6; }
10039if ${ac_cv_path_TEE+:} false; then :
10040  $as_echo_n "(cached) " >&6
10041else
10042  case $TEE in
10043  [\\/]* | ?:[\\/]*)
10044  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10045  ;;
10046  *)
10047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10048for as_dir in $PATH
10049do
10050  IFS=$as_save_IFS
10051  test -z "$as_dir" && as_dir=.
10052    for ac_exec_ext in '' $ac_executable_extensions; do
10053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10054    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10056    break 2
10057  fi
10058done
10059  done
10060IFS=$as_save_IFS
10061
10062  ;;
10063esac
10064fi
10065TEE=$ac_cv_path_TEE
10066if test -n "$TEE"; then
10067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10068$as_echo "$TEE" >&6; }
10069else
10070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10071$as_echo "no" >&6; }
10072fi
10073
10074
10075  test -n "$TEE" && break
10076done
10077
10078    else
10079      # If it succeeded, then it was overridden by the user. We will use it
10080      # for the tool.
10081
10082      # First remove it from the list of overridden variables, so we can test
10083      # for unknown variables in the end.
10084      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10085
10086      # Check if the provided tool contains a complete path.
10087      tool_specified="$TEE"
10088      tool_basename="${tool_specified##*/}"
10089      if test "x$tool_basename" = "x$tool_specified"; then
10090        # A command without a complete path is provided, search $PATH.
10091        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10092$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10093        # Extract the first word of "$tool_basename", so it can be a program name with args.
10094set dummy $tool_basename; ac_word=$2
10095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10096$as_echo_n "checking for $ac_word... " >&6; }
10097if ${ac_cv_path_TEE+:} false; then :
10098  $as_echo_n "(cached) " >&6
10099else
10100  case $TEE in
10101  [\\/]* | ?:[\\/]*)
10102  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10103  ;;
10104  *)
10105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10106for as_dir in $PATH
10107do
10108  IFS=$as_save_IFS
10109  test -z "$as_dir" && as_dir=.
10110    for ac_exec_ext in '' $ac_executable_extensions; do
10111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10112    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10114    break 2
10115  fi
10116done
10117  done
10118IFS=$as_save_IFS
10119
10120  ;;
10121esac
10122fi
10123TEE=$ac_cv_path_TEE
10124if test -n "$TEE"; then
10125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10126$as_echo "$TEE" >&6; }
10127else
10128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10129$as_echo "no" >&6; }
10130fi
10131
10132
10133        if test "x$TEE" = x; then
10134          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10135        fi
10136      else
10137        # Otherwise we believe it is a complete path. Use it as it is.
10138        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10139$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10140        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10141$as_echo_n "checking for TEE... " >&6; }
10142        if test ! -x "$tool_specified"; then
10143          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10144$as_echo "not found" >&6; }
10145          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10146        fi
10147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10148$as_echo "$tool_specified" >&6; }
10149      fi
10150    fi
10151  fi
10152
10153
10154
10155  if test "x$TEE" = x; then
10156    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10157  fi
10158
10159
10160
10161
10162
10163  # Publish this variable in the help.
10164
10165
10166  if test "x$TOUCH" = x; then
10167    # The variable is not set by user, try to locate tool using the code snippet
10168    for ac_prog in touch
10169do
10170  # Extract the first word of "$ac_prog", so it can be a program name with args.
10171set dummy $ac_prog; ac_word=$2
10172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10173$as_echo_n "checking for $ac_word... " >&6; }
10174if ${ac_cv_path_TOUCH+:} false; then :
10175  $as_echo_n "(cached) " >&6
10176else
10177  case $TOUCH in
10178  [\\/]* | ?:[\\/]*)
10179  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10180  ;;
10181  *)
10182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10183for as_dir in $PATH
10184do
10185  IFS=$as_save_IFS
10186  test -z "$as_dir" && as_dir=.
10187    for ac_exec_ext in '' $ac_executable_extensions; do
10188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10189    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10191    break 2
10192  fi
10193done
10194  done
10195IFS=$as_save_IFS
10196
10197  ;;
10198esac
10199fi
10200TOUCH=$ac_cv_path_TOUCH
10201if test -n "$TOUCH"; then
10202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10203$as_echo "$TOUCH" >&6; }
10204else
10205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10206$as_echo "no" >&6; }
10207fi
10208
10209
10210  test -n "$TOUCH" && break
10211done
10212
10213  else
10214    # The variable is set, but is it from the command line or the environment?
10215
10216    # Try to remove the string !TOUCH! from our list.
10217    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10218    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10219      # If it failed, the variable was not from the command line. Ignore it,
10220      # but warn the user (except for BASH, which is always set by the calling BASH).
10221      if test "xTOUCH" != xBASH; then
10222        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10223$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10224      fi
10225      # Try to locate tool using the code snippet
10226      for ac_prog in touch
10227do
10228  # Extract the first word of "$ac_prog", so it can be a program name with args.
10229set dummy $ac_prog; ac_word=$2
10230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10231$as_echo_n "checking for $ac_word... " >&6; }
10232if ${ac_cv_path_TOUCH+:} false; then :
10233  $as_echo_n "(cached) " >&6
10234else
10235  case $TOUCH in
10236  [\\/]* | ?:[\\/]*)
10237  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10238  ;;
10239  *)
10240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10241for as_dir in $PATH
10242do
10243  IFS=$as_save_IFS
10244  test -z "$as_dir" && as_dir=.
10245    for ac_exec_ext in '' $ac_executable_extensions; do
10246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10247    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10249    break 2
10250  fi
10251done
10252  done
10253IFS=$as_save_IFS
10254
10255  ;;
10256esac
10257fi
10258TOUCH=$ac_cv_path_TOUCH
10259if test -n "$TOUCH"; then
10260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10261$as_echo "$TOUCH" >&6; }
10262else
10263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10264$as_echo "no" >&6; }
10265fi
10266
10267
10268  test -n "$TOUCH" && break
10269done
10270
10271    else
10272      # If it succeeded, then it was overridden by the user. We will use it
10273      # for the tool.
10274
10275      # First remove it from the list of overridden variables, so we can test
10276      # for unknown variables in the end.
10277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10278
10279      # Check if the provided tool contains a complete path.
10280      tool_specified="$TOUCH"
10281      tool_basename="${tool_specified##*/}"
10282      if test "x$tool_basename" = "x$tool_specified"; then
10283        # A command without a complete path is provided, search $PATH.
10284        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10285$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10286        # Extract the first word of "$tool_basename", so it can be a program name with args.
10287set dummy $tool_basename; ac_word=$2
10288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10289$as_echo_n "checking for $ac_word... " >&6; }
10290if ${ac_cv_path_TOUCH+:} false; then :
10291  $as_echo_n "(cached) " >&6
10292else
10293  case $TOUCH in
10294  [\\/]* | ?:[\\/]*)
10295  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10296  ;;
10297  *)
10298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10299for as_dir in $PATH
10300do
10301  IFS=$as_save_IFS
10302  test -z "$as_dir" && as_dir=.
10303    for ac_exec_ext in '' $ac_executable_extensions; do
10304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10305    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10307    break 2
10308  fi
10309done
10310  done
10311IFS=$as_save_IFS
10312
10313  ;;
10314esac
10315fi
10316TOUCH=$ac_cv_path_TOUCH
10317if test -n "$TOUCH"; then
10318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10319$as_echo "$TOUCH" >&6; }
10320else
10321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10322$as_echo "no" >&6; }
10323fi
10324
10325
10326        if test "x$TOUCH" = x; then
10327          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10328        fi
10329      else
10330        # Otherwise we believe it is a complete path. Use it as it is.
10331        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10332$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10333        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10334$as_echo_n "checking for TOUCH... " >&6; }
10335        if test ! -x "$tool_specified"; then
10336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10337$as_echo "not found" >&6; }
10338          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10339        fi
10340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10341$as_echo "$tool_specified" >&6; }
10342      fi
10343    fi
10344  fi
10345
10346
10347
10348  if test "x$TOUCH" = x; then
10349    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10350  fi
10351
10352
10353
10354
10355
10356  # Publish this variable in the help.
10357
10358
10359  if test "x$TR" = x; then
10360    # The variable is not set by user, try to locate tool using the code snippet
10361    for ac_prog in tr
10362do
10363  # Extract the first word of "$ac_prog", so it can be a program name with args.
10364set dummy $ac_prog; ac_word=$2
10365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10366$as_echo_n "checking for $ac_word... " >&6; }
10367if ${ac_cv_path_TR+:} false; then :
10368  $as_echo_n "(cached) " >&6
10369else
10370  case $TR in
10371  [\\/]* | ?:[\\/]*)
10372  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10373  ;;
10374  *)
10375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10376for as_dir in $PATH
10377do
10378  IFS=$as_save_IFS
10379  test -z "$as_dir" && as_dir=.
10380    for ac_exec_ext in '' $ac_executable_extensions; do
10381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10382    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10384    break 2
10385  fi
10386done
10387  done
10388IFS=$as_save_IFS
10389
10390  ;;
10391esac
10392fi
10393TR=$ac_cv_path_TR
10394if test -n "$TR"; then
10395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10396$as_echo "$TR" >&6; }
10397else
10398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10399$as_echo "no" >&6; }
10400fi
10401
10402
10403  test -n "$TR" && break
10404done
10405
10406  else
10407    # The variable is set, but is it from the command line or the environment?
10408
10409    # Try to remove the string !TR! from our list.
10410    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10411    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10412      # If it failed, the variable was not from the command line. Ignore it,
10413      # but warn the user (except for BASH, which is always set by the calling BASH).
10414      if test "xTR" != xBASH; then
10415        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10416$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10417      fi
10418      # Try to locate tool using the code snippet
10419      for ac_prog in tr
10420do
10421  # Extract the first word of "$ac_prog", so it can be a program name with args.
10422set dummy $ac_prog; ac_word=$2
10423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10424$as_echo_n "checking for $ac_word... " >&6; }
10425if ${ac_cv_path_TR+:} false; then :
10426  $as_echo_n "(cached) " >&6
10427else
10428  case $TR in
10429  [\\/]* | ?:[\\/]*)
10430  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10431  ;;
10432  *)
10433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10434for as_dir in $PATH
10435do
10436  IFS=$as_save_IFS
10437  test -z "$as_dir" && as_dir=.
10438    for ac_exec_ext in '' $ac_executable_extensions; do
10439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10440    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10442    break 2
10443  fi
10444done
10445  done
10446IFS=$as_save_IFS
10447
10448  ;;
10449esac
10450fi
10451TR=$ac_cv_path_TR
10452if test -n "$TR"; then
10453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10454$as_echo "$TR" >&6; }
10455else
10456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10457$as_echo "no" >&6; }
10458fi
10459
10460
10461  test -n "$TR" && break
10462done
10463
10464    else
10465      # If it succeeded, then it was overridden by the user. We will use it
10466      # for the tool.
10467
10468      # First remove it from the list of overridden variables, so we can test
10469      # for unknown variables in the end.
10470      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10471
10472      # Check if the provided tool contains a complete path.
10473      tool_specified="$TR"
10474      tool_basename="${tool_specified##*/}"
10475      if test "x$tool_basename" = "x$tool_specified"; then
10476        # A command without a complete path is provided, search $PATH.
10477        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10478$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10479        # Extract the first word of "$tool_basename", so it can be a program name with args.
10480set dummy $tool_basename; ac_word=$2
10481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10482$as_echo_n "checking for $ac_word... " >&6; }
10483if ${ac_cv_path_TR+:} false; then :
10484  $as_echo_n "(cached) " >&6
10485else
10486  case $TR in
10487  [\\/]* | ?:[\\/]*)
10488  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10489  ;;
10490  *)
10491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10492for as_dir in $PATH
10493do
10494  IFS=$as_save_IFS
10495  test -z "$as_dir" && as_dir=.
10496    for ac_exec_ext in '' $ac_executable_extensions; do
10497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10498    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10500    break 2
10501  fi
10502done
10503  done
10504IFS=$as_save_IFS
10505
10506  ;;
10507esac
10508fi
10509TR=$ac_cv_path_TR
10510if test -n "$TR"; then
10511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10512$as_echo "$TR" >&6; }
10513else
10514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10515$as_echo "no" >&6; }
10516fi
10517
10518
10519        if test "x$TR" = x; then
10520          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10521        fi
10522      else
10523        # Otherwise we believe it is a complete path. Use it as it is.
10524        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10525$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10526        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10527$as_echo_n "checking for TR... " >&6; }
10528        if test ! -x "$tool_specified"; then
10529          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10530$as_echo "not found" >&6; }
10531          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10532        fi
10533        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10534$as_echo "$tool_specified" >&6; }
10535      fi
10536    fi
10537  fi
10538
10539
10540
10541  if test "x$TR" = x; then
10542    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10543  fi
10544
10545
10546
10547
10548
10549  # Publish this variable in the help.
10550
10551
10552  if test "x$UNAME" = x; then
10553    # The variable is not set by user, try to locate tool using the code snippet
10554    for ac_prog in uname
10555do
10556  # Extract the first word of "$ac_prog", so it can be a program name with args.
10557set dummy $ac_prog; ac_word=$2
10558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10559$as_echo_n "checking for $ac_word... " >&6; }
10560if ${ac_cv_path_UNAME+:} false; then :
10561  $as_echo_n "(cached) " >&6
10562else
10563  case $UNAME in
10564  [\\/]* | ?:[\\/]*)
10565  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10566  ;;
10567  *)
10568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10569for as_dir in $PATH
10570do
10571  IFS=$as_save_IFS
10572  test -z "$as_dir" && as_dir=.
10573    for ac_exec_ext in '' $ac_executable_extensions; do
10574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10575    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10577    break 2
10578  fi
10579done
10580  done
10581IFS=$as_save_IFS
10582
10583  ;;
10584esac
10585fi
10586UNAME=$ac_cv_path_UNAME
10587if test -n "$UNAME"; then
10588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10589$as_echo "$UNAME" >&6; }
10590else
10591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10592$as_echo "no" >&6; }
10593fi
10594
10595
10596  test -n "$UNAME" && break
10597done
10598
10599  else
10600    # The variable is set, but is it from the command line or the environment?
10601
10602    # Try to remove the string !UNAME! from our list.
10603    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10604    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10605      # If it failed, the variable was not from the command line. Ignore it,
10606      # but warn the user (except for BASH, which is always set by the calling BASH).
10607      if test "xUNAME" != xBASH; then
10608        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10609$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10610      fi
10611      # Try to locate tool using the code snippet
10612      for ac_prog in uname
10613do
10614  # Extract the first word of "$ac_prog", so it can be a program name with args.
10615set dummy $ac_prog; ac_word=$2
10616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10617$as_echo_n "checking for $ac_word... " >&6; }
10618if ${ac_cv_path_UNAME+:} false; then :
10619  $as_echo_n "(cached) " >&6
10620else
10621  case $UNAME in
10622  [\\/]* | ?:[\\/]*)
10623  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10624  ;;
10625  *)
10626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10627for as_dir in $PATH
10628do
10629  IFS=$as_save_IFS
10630  test -z "$as_dir" && as_dir=.
10631    for ac_exec_ext in '' $ac_executable_extensions; do
10632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10633    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10635    break 2
10636  fi
10637done
10638  done
10639IFS=$as_save_IFS
10640
10641  ;;
10642esac
10643fi
10644UNAME=$ac_cv_path_UNAME
10645if test -n "$UNAME"; then
10646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10647$as_echo "$UNAME" >&6; }
10648else
10649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10650$as_echo "no" >&6; }
10651fi
10652
10653
10654  test -n "$UNAME" && break
10655done
10656
10657    else
10658      # If it succeeded, then it was overridden by the user. We will use it
10659      # for the tool.
10660
10661      # First remove it from the list of overridden variables, so we can test
10662      # for unknown variables in the end.
10663      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10664
10665      # Check if the provided tool contains a complete path.
10666      tool_specified="$UNAME"
10667      tool_basename="${tool_specified##*/}"
10668      if test "x$tool_basename" = "x$tool_specified"; then
10669        # A command without a complete path is provided, search $PATH.
10670        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10671$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10672        # Extract the first word of "$tool_basename", so it can be a program name with args.
10673set dummy $tool_basename; ac_word=$2
10674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10675$as_echo_n "checking for $ac_word... " >&6; }
10676if ${ac_cv_path_UNAME+:} false; then :
10677  $as_echo_n "(cached) " >&6
10678else
10679  case $UNAME in
10680  [\\/]* | ?:[\\/]*)
10681  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10682  ;;
10683  *)
10684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10685for as_dir in $PATH
10686do
10687  IFS=$as_save_IFS
10688  test -z "$as_dir" && as_dir=.
10689    for ac_exec_ext in '' $ac_executable_extensions; do
10690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10691    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10693    break 2
10694  fi
10695done
10696  done
10697IFS=$as_save_IFS
10698
10699  ;;
10700esac
10701fi
10702UNAME=$ac_cv_path_UNAME
10703if test -n "$UNAME"; then
10704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10705$as_echo "$UNAME" >&6; }
10706else
10707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10708$as_echo "no" >&6; }
10709fi
10710
10711
10712        if test "x$UNAME" = x; then
10713          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10714        fi
10715      else
10716        # Otherwise we believe it is a complete path. Use it as it is.
10717        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10718$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10719        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10720$as_echo_n "checking for UNAME... " >&6; }
10721        if test ! -x "$tool_specified"; then
10722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10723$as_echo "not found" >&6; }
10724          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10725        fi
10726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10727$as_echo "$tool_specified" >&6; }
10728      fi
10729    fi
10730  fi
10731
10732
10733
10734  if test "x$UNAME" = x; then
10735    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10736  fi
10737
10738
10739
10740
10741
10742  # Publish this variable in the help.
10743
10744
10745  if test "x$UNIQ" = x; then
10746    # The variable is not set by user, try to locate tool using the code snippet
10747    for ac_prog in uniq
10748do
10749  # Extract the first word of "$ac_prog", so it can be a program name with args.
10750set dummy $ac_prog; ac_word=$2
10751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10752$as_echo_n "checking for $ac_word... " >&6; }
10753if ${ac_cv_path_UNIQ+:} false; then :
10754  $as_echo_n "(cached) " >&6
10755else
10756  case $UNIQ in
10757  [\\/]* | ?:[\\/]*)
10758  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10759  ;;
10760  *)
10761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10762for as_dir in $PATH
10763do
10764  IFS=$as_save_IFS
10765  test -z "$as_dir" && as_dir=.
10766    for ac_exec_ext in '' $ac_executable_extensions; do
10767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10768    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10770    break 2
10771  fi
10772done
10773  done
10774IFS=$as_save_IFS
10775
10776  ;;
10777esac
10778fi
10779UNIQ=$ac_cv_path_UNIQ
10780if test -n "$UNIQ"; then
10781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10782$as_echo "$UNIQ" >&6; }
10783else
10784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10785$as_echo "no" >&6; }
10786fi
10787
10788
10789  test -n "$UNIQ" && break
10790done
10791
10792  else
10793    # The variable is set, but is it from the command line or the environment?
10794
10795    # Try to remove the string !UNIQ! from our list.
10796    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10797    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10798      # If it failed, the variable was not from the command line. Ignore it,
10799      # but warn the user (except for BASH, which is always set by the calling BASH).
10800      if test "xUNIQ" != xBASH; then
10801        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10802$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10803      fi
10804      # Try to locate tool using the code snippet
10805      for ac_prog in uniq
10806do
10807  # Extract the first word of "$ac_prog", so it can be a program name with args.
10808set dummy $ac_prog; ac_word=$2
10809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10810$as_echo_n "checking for $ac_word... " >&6; }
10811if ${ac_cv_path_UNIQ+:} false; then :
10812  $as_echo_n "(cached) " >&6
10813else
10814  case $UNIQ in
10815  [\\/]* | ?:[\\/]*)
10816  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10817  ;;
10818  *)
10819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10820for as_dir in $PATH
10821do
10822  IFS=$as_save_IFS
10823  test -z "$as_dir" && as_dir=.
10824    for ac_exec_ext in '' $ac_executable_extensions; do
10825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10826    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10828    break 2
10829  fi
10830done
10831  done
10832IFS=$as_save_IFS
10833
10834  ;;
10835esac
10836fi
10837UNIQ=$ac_cv_path_UNIQ
10838if test -n "$UNIQ"; then
10839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10840$as_echo "$UNIQ" >&6; }
10841else
10842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10843$as_echo "no" >&6; }
10844fi
10845
10846
10847  test -n "$UNIQ" && break
10848done
10849
10850    else
10851      # If it succeeded, then it was overridden by the user. We will use it
10852      # for the tool.
10853
10854      # First remove it from the list of overridden variables, so we can test
10855      # for unknown variables in the end.
10856      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10857
10858      # Check if the provided tool contains a complete path.
10859      tool_specified="$UNIQ"
10860      tool_basename="${tool_specified##*/}"
10861      if test "x$tool_basename" = "x$tool_specified"; then
10862        # A command without a complete path is provided, search $PATH.
10863        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10864$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10865        # Extract the first word of "$tool_basename", so it can be a program name with args.
10866set dummy $tool_basename; ac_word=$2
10867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10868$as_echo_n "checking for $ac_word... " >&6; }
10869if ${ac_cv_path_UNIQ+:} false; then :
10870  $as_echo_n "(cached) " >&6
10871else
10872  case $UNIQ in
10873  [\\/]* | ?:[\\/]*)
10874  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10875  ;;
10876  *)
10877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10878for as_dir in $PATH
10879do
10880  IFS=$as_save_IFS
10881  test -z "$as_dir" && as_dir=.
10882    for ac_exec_ext in '' $ac_executable_extensions; do
10883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10884    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10886    break 2
10887  fi
10888done
10889  done
10890IFS=$as_save_IFS
10891
10892  ;;
10893esac
10894fi
10895UNIQ=$ac_cv_path_UNIQ
10896if test -n "$UNIQ"; then
10897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10898$as_echo "$UNIQ" >&6; }
10899else
10900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10901$as_echo "no" >&6; }
10902fi
10903
10904
10905        if test "x$UNIQ" = x; then
10906          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10907        fi
10908      else
10909        # Otherwise we believe it is a complete path. Use it as it is.
10910        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10911$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10913$as_echo_n "checking for UNIQ... " >&6; }
10914        if test ! -x "$tool_specified"; then
10915          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10916$as_echo "not found" >&6; }
10917          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10918        fi
10919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10920$as_echo "$tool_specified" >&6; }
10921      fi
10922    fi
10923  fi
10924
10925
10926
10927  if test "x$UNIQ" = x; then
10928    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10929  fi
10930
10931
10932
10933
10934
10935  # Publish this variable in the help.
10936
10937
10938  if test "x$WC" = x; then
10939    # The variable is not set by user, try to locate tool using the code snippet
10940    for ac_prog in wc
10941do
10942  # Extract the first word of "$ac_prog", so it can be a program name with args.
10943set dummy $ac_prog; ac_word=$2
10944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10945$as_echo_n "checking for $ac_word... " >&6; }
10946if ${ac_cv_path_WC+:} false; then :
10947  $as_echo_n "(cached) " >&6
10948else
10949  case $WC in
10950  [\\/]* | ?:[\\/]*)
10951  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10952  ;;
10953  *)
10954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10955for as_dir in $PATH
10956do
10957  IFS=$as_save_IFS
10958  test -z "$as_dir" && as_dir=.
10959    for ac_exec_ext in '' $ac_executable_extensions; do
10960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10961    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10963    break 2
10964  fi
10965done
10966  done
10967IFS=$as_save_IFS
10968
10969  ;;
10970esac
10971fi
10972WC=$ac_cv_path_WC
10973if test -n "$WC"; then
10974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10975$as_echo "$WC" >&6; }
10976else
10977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10978$as_echo "no" >&6; }
10979fi
10980
10981
10982  test -n "$WC" && break
10983done
10984
10985  else
10986    # The variable is set, but is it from the command line or the environment?
10987
10988    # Try to remove the string !WC! from our list.
10989    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10990    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10991      # If it failed, the variable was not from the command line. Ignore it,
10992      # but warn the user (except for BASH, which is always set by the calling BASH).
10993      if test "xWC" != xBASH; then
10994        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10995$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10996      fi
10997      # Try to locate tool using the code snippet
10998      for ac_prog in wc
10999do
11000  # Extract the first word of "$ac_prog", so it can be a program name with args.
11001set dummy $ac_prog; ac_word=$2
11002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11003$as_echo_n "checking for $ac_word... " >&6; }
11004if ${ac_cv_path_WC+:} false; then :
11005  $as_echo_n "(cached) " >&6
11006else
11007  case $WC in
11008  [\\/]* | ?:[\\/]*)
11009  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11010  ;;
11011  *)
11012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11013for as_dir in $PATH
11014do
11015  IFS=$as_save_IFS
11016  test -z "$as_dir" && as_dir=.
11017    for ac_exec_ext in '' $ac_executable_extensions; do
11018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11019    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11021    break 2
11022  fi
11023done
11024  done
11025IFS=$as_save_IFS
11026
11027  ;;
11028esac
11029fi
11030WC=$ac_cv_path_WC
11031if test -n "$WC"; then
11032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11033$as_echo "$WC" >&6; }
11034else
11035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11036$as_echo "no" >&6; }
11037fi
11038
11039
11040  test -n "$WC" && break
11041done
11042
11043    else
11044      # If it succeeded, then it was overridden by the user. We will use it
11045      # for the tool.
11046
11047      # First remove it from the list of overridden variables, so we can test
11048      # for unknown variables in the end.
11049      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11050
11051      # Check if the provided tool contains a complete path.
11052      tool_specified="$WC"
11053      tool_basename="${tool_specified##*/}"
11054      if test "x$tool_basename" = "x$tool_specified"; then
11055        # A command without a complete path is provided, search $PATH.
11056        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11057$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11058        # Extract the first word of "$tool_basename", so it can be a program name with args.
11059set dummy $tool_basename; ac_word=$2
11060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11061$as_echo_n "checking for $ac_word... " >&6; }
11062if ${ac_cv_path_WC+:} false; then :
11063  $as_echo_n "(cached) " >&6
11064else
11065  case $WC in
11066  [\\/]* | ?:[\\/]*)
11067  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11068  ;;
11069  *)
11070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11071for as_dir in $PATH
11072do
11073  IFS=$as_save_IFS
11074  test -z "$as_dir" && as_dir=.
11075    for ac_exec_ext in '' $ac_executable_extensions; do
11076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11077    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11079    break 2
11080  fi
11081done
11082  done
11083IFS=$as_save_IFS
11084
11085  ;;
11086esac
11087fi
11088WC=$ac_cv_path_WC
11089if test -n "$WC"; then
11090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11091$as_echo "$WC" >&6; }
11092else
11093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11094$as_echo "no" >&6; }
11095fi
11096
11097
11098        if test "x$WC" = x; then
11099          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11100        fi
11101      else
11102        # Otherwise we believe it is a complete path. Use it as it is.
11103        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11104$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11105        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11106$as_echo_n "checking for WC... " >&6; }
11107        if test ! -x "$tool_specified"; then
11108          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11109$as_echo "not found" >&6; }
11110          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11111        fi
11112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11113$as_echo "$tool_specified" >&6; }
11114      fi
11115    fi
11116  fi
11117
11118
11119
11120  if test "x$WC" = x; then
11121    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11122  fi
11123
11124
11125
11126
11127
11128  # Publish this variable in the help.
11129
11130
11131  if test "x$WHICH" = x; then
11132    # The variable is not set by user, try to locate tool using the code snippet
11133    for ac_prog in which
11134do
11135  # Extract the first word of "$ac_prog", so it can be a program name with args.
11136set dummy $ac_prog; ac_word=$2
11137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11138$as_echo_n "checking for $ac_word... " >&6; }
11139if ${ac_cv_path_WHICH+:} false; then :
11140  $as_echo_n "(cached) " >&6
11141else
11142  case $WHICH in
11143  [\\/]* | ?:[\\/]*)
11144  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11145  ;;
11146  *)
11147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11148for as_dir in $PATH
11149do
11150  IFS=$as_save_IFS
11151  test -z "$as_dir" && as_dir=.
11152    for ac_exec_ext in '' $ac_executable_extensions; do
11153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11154    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11156    break 2
11157  fi
11158done
11159  done
11160IFS=$as_save_IFS
11161
11162  ;;
11163esac
11164fi
11165WHICH=$ac_cv_path_WHICH
11166if test -n "$WHICH"; then
11167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11168$as_echo "$WHICH" >&6; }
11169else
11170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11171$as_echo "no" >&6; }
11172fi
11173
11174
11175  test -n "$WHICH" && break
11176done
11177
11178  else
11179    # The variable is set, but is it from the command line or the environment?
11180
11181    # Try to remove the string !WHICH! from our list.
11182    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11183    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11184      # If it failed, the variable was not from the command line. Ignore it,
11185      # but warn the user (except for BASH, which is always set by the calling BASH).
11186      if test "xWHICH" != xBASH; then
11187        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11188$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11189      fi
11190      # Try to locate tool using the code snippet
11191      for ac_prog in which
11192do
11193  # Extract the first word of "$ac_prog", so it can be a program name with args.
11194set dummy $ac_prog; ac_word=$2
11195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11196$as_echo_n "checking for $ac_word... " >&6; }
11197if ${ac_cv_path_WHICH+:} false; then :
11198  $as_echo_n "(cached) " >&6
11199else
11200  case $WHICH in
11201  [\\/]* | ?:[\\/]*)
11202  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11203  ;;
11204  *)
11205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11206for as_dir in $PATH
11207do
11208  IFS=$as_save_IFS
11209  test -z "$as_dir" && as_dir=.
11210    for ac_exec_ext in '' $ac_executable_extensions; do
11211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11212    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11214    break 2
11215  fi
11216done
11217  done
11218IFS=$as_save_IFS
11219
11220  ;;
11221esac
11222fi
11223WHICH=$ac_cv_path_WHICH
11224if test -n "$WHICH"; then
11225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11226$as_echo "$WHICH" >&6; }
11227else
11228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11229$as_echo "no" >&6; }
11230fi
11231
11232
11233  test -n "$WHICH" && break
11234done
11235
11236    else
11237      # If it succeeded, then it was overridden by the user. We will use it
11238      # for the tool.
11239
11240      # First remove it from the list of overridden variables, so we can test
11241      # for unknown variables in the end.
11242      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11243
11244      # Check if the provided tool contains a complete path.
11245      tool_specified="$WHICH"
11246      tool_basename="${tool_specified##*/}"
11247      if test "x$tool_basename" = "x$tool_specified"; then
11248        # A command without a complete path is provided, search $PATH.
11249        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11250$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11251        # Extract the first word of "$tool_basename", so it can be a program name with args.
11252set dummy $tool_basename; ac_word=$2
11253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11254$as_echo_n "checking for $ac_word... " >&6; }
11255if ${ac_cv_path_WHICH+:} false; then :
11256  $as_echo_n "(cached) " >&6
11257else
11258  case $WHICH in
11259  [\\/]* | ?:[\\/]*)
11260  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11261  ;;
11262  *)
11263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11264for as_dir in $PATH
11265do
11266  IFS=$as_save_IFS
11267  test -z "$as_dir" && as_dir=.
11268    for ac_exec_ext in '' $ac_executable_extensions; do
11269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11270    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11272    break 2
11273  fi
11274done
11275  done
11276IFS=$as_save_IFS
11277
11278  ;;
11279esac
11280fi
11281WHICH=$ac_cv_path_WHICH
11282if test -n "$WHICH"; then
11283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11284$as_echo "$WHICH" >&6; }
11285else
11286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11287$as_echo "no" >&6; }
11288fi
11289
11290
11291        if test "x$WHICH" = x; then
11292          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11293        fi
11294      else
11295        # Otherwise we believe it is a complete path. Use it as it is.
11296        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11297$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11299$as_echo_n "checking for WHICH... " >&6; }
11300        if test ! -x "$tool_specified"; then
11301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11302$as_echo "not found" >&6; }
11303          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11304        fi
11305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11306$as_echo "$tool_specified" >&6; }
11307      fi
11308    fi
11309  fi
11310
11311
11312
11313  if test "x$WHICH" = x; then
11314    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11315  fi
11316
11317
11318
11319
11320
11321  # Publish this variable in the help.
11322
11323
11324  if test "x$XARGS" = x; then
11325    # The variable is not set by user, try to locate tool using the code snippet
11326    for ac_prog in xargs
11327do
11328  # Extract the first word of "$ac_prog", so it can be a program name with args.
11329set dummy $ac_prog; ac_word=$2
11330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11331$as_echo_n "checking for $ac_word... " >&6; }
11332if ${ac_cv_path_XARGS+:} false; then :
11333  $as_echo_n "(cached) " >&6
11334else
11335  case $XARGS in
11336  [\\/]* | ?:[\\/]*)
11337  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11338  ;;
11339  *)
11340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11341for as_dir in $PATH
11342do
11343  IFS=$as_save_IFS
11344  test -z "$as_dir" && as_dir=.
11345    for ac_exec_ext in '' $ac_executable_extensions; do
11346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11347    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11349    break 2
11350  fi
11351done
11352  done
11353IFS=$as_save_IFS
11354
11355  ;;
11356esac
11357fi
11358XARGS=$ac_cv_path_XARGS
11359if test -n "$XARGS"; then
11360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11361$as_echo "$XARGS" >&6; }
11362else
11363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11364$as_echo "no" >&6; }
11365fi
11366
11367
11368  test -n "$XARGS" && 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 !XARGS! from our list.
11375    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
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 "xXARGS" != xBASH; then
11380        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11381$as_echo "$as_me: WARNING: Ignoring value of XARGS 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 xargs
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_path_XARGS+:} false; then :
11391  $as_echo_n "(cached) " >&6
11392else
11393  case $XARGS in
11394  [\\/]* | ?:[\\/]*)
11395  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11396  ;;
11397  *)
11398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11399for as_dir in $PATH
11400do
11401  IFS=$as_save_IFS
11402  test -z "$as_dir" && as_dir=.
11403    for ac_exec_ext in '' $ac_executable_extensions; do
11404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11405    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11407    break 2
11408  fi
11409done
11410  done
11411IFS=$as_save_IFS
11412
11413  ;;
11414esac
11415fi
11416XARGS=$ac_cv_path_XARGS
11417if test -n "$XARGS"; then
11418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11419$as_echo "$XARGS" >&6; }
11420else
11421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11422$as_echo "no" >&6; }
11423fi
11424
11425
11426  test -n "$XARGS" && break
11427done
11428
11429    else
11430      # If it succeeded, then it was overridden by the user. We will use it
11431      # for the tool.
11432
11433      # First remove it from the list of overridden variables, so we can test
11434      # for unknown variables in the end.
11435      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11436
11437      # Check if the provided tool contains a complete path.
11438      tool_specified="$XARGS"
11439      tool_basename="${tool_specified##*/}"
11440      if test "x$tool_basename" = "x$tool_specified"; then
11441        # A command without a complete path is provided, search $PATH.
11442        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11443$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11444        # Extract the first word of "$tool_basename", so it can be a program name with args.
11445set dummy $tool_basename; ac_word=$2
11446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11447$as_echo_n "checking for $ac_word... " >&6; }
11448if ${ac_cv_path_XARGS+:} false; then :
11449  $as_echo_n "(cached) " >&6
11450else
11451  case $XARGS in
11452  [\\/]* | ?:[\\/]*)
11453  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11454  ;;
11455  *)
11456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11457for as_dir in $PATH
11458do
11459  IFS=$as_save_IFS
11460  test -z "$as_dir" && as_dir=.
11461    for ac_exec_ext in '' $ac_executable_extensions; do
11462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11463    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11465    break 2
11466  fi
11467done
11468  done
11469IFS=$as_save_IFS
11470
11471  ;;
11472esac
11473fi
11474XARGS=$ac_cv_path_XARGS
11475if test -n "$XARGS"; then
11476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11477$as_echo "$XARGS" >&6; }
11478else
11479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11480$as_echo "no" >&6; }
11481fi
11482
11483
11484        if test "x$XARGS" = x; then
11485          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11486        fi
11487      else
11488        # Otherwise we believe it is a complete path. Use it as it is.
11489        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11490$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11491        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11492$as_echo_n "checking for XARGS... " >&6; }
11493        if test ! -x "$tool_specified"; then
11494          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11495$as_echo "not found" >&6; }
11496          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11497        fi
11498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11499$as_echo "$tool_specified" >&6; }
11500      fi
11501    fi
11502  fi
11503
11504
11505
11506  if test "x$XARGS" = x; then
11507    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11508  fi
11509
11510
11511
11512  # Then required tools that require some special treatment.
11513
11514
11515  # Publish this variable in the help.
11516
11517
11518  if test "x$AWK" = x; then
11519    # The variable is not set by user, try to locate tool using the code snippet
11520    for ac_prog in gawk mawk nawk awk
11521do
11522  # Extract the first word of "$ac_prog", so it can be a program name with args.
11523set dummy $ac_prog; ac_word=$2
11524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11525$as_echo_n "checking for $ac_word... " >&6; }
11526if ${ac_cv_prog_AWK+:} false; then :
11527  $as_echo_n "(cached) " >&6
11528else
11529  if test -n "$AWK"; then
11530  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11531else
11532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11533for as_dir in $PATH
11534do
11535  IFS=$as_save_IFS
11536  test -z "$as_dir" && as_dir=.
11537    for ac_exec_ext in '' $ac_executable_extensions; do
11538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11539    ac_cv_prog_AWK="$ac_prog"
11540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11541    break 2
11542  fi
11543done
11544  done
11545IFS=$as_save_IFS
11546
11547fi
11548fi
11549AWK=$ac_cv_prog_AWK
11550if test -n "$AWK"; then
11551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11552$as_echo "$AWK" >&6; }
11553else
11554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11555$as_echo "no" >&6; }
11556fi
11557
11558
11559  test -n "$AWK" && break
11560done
11561
11562  else
11563    # The variable is set, but is it from the command line or the environment?
11564
11565    # Try to remove the string !AWK! from our list.
11566    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11567    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11568      # If it failed, the variable was not from the command line. Ignore it,
11569      # but warn the user (except for BASH, which is always set by the calling BASH).
11570      if test "xAWK" != xBASH; then
11571        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11572$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11573      fi
11574      # Try to locate tool using the code snippet
11575      for ac_prog in gawk mawk nawk awk
11576do
11577  # Extract the first word of "$ac_prog", so it can be a program name with args.
11578set dummy $ac_prog; ac_word=$2
11579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11580$as_echo_n "checking for $ac_word... " >&6; }
11581if ${ac_cv_prog_AWK+:} false; then :
11582  $as_echo_n "(cached) " >&6
11583else
11584  if test -n "$AWK"; then
11585  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11586else
11587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11588for as_dir in $PATH
11589do
11590  IFS=$as_save_IFS
11591  test -z "$as_dir" && as_dir=.
11592    for ac_exec_ext in '' $ac_executable_extensions; do
11593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11594    ac_cv_prog_AWK="$ac_prog"
11595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11596    break 2
11597  fi
11598done
11599  done
11600IFS=$as_save_IFS
11601
11602fi
11603fi
11604AWK=$ac_cv_prog_AWK
11605if test -n "$AWK"; then
11606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11607$as_echo "$AWK" >&6; }
11608else
11609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11610$as_echo "no" >&6; }
11611fi
11612
11613
11614  test -n "$AWK" && break
11615done
11616
11617    else
11618      # If it succeeded, then it was overridden by the user. We will use it
11619      # for the tool.
11620
11621      # First remove it from the list of overridden variables, so we can test
11622      # for unknown variables in the end.
11623      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11624
11625      # Check if the provided tool contains a complete path.
11626      tool_specified="$AWK"
11627      tool_basename="${tool_specified##*/}"
11628      if test "x$tool_basename" = "x$tool_specified"; then
11629        # A command without a complete path is provided, search $PATH.
11630        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11631$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11632        # Extract the first word of "$tool_basename", so it can be a program name with args.
11633set dummy $tool_basename; ac_word=$2
11634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11635$as_echo_n "checking for $ac_word... " >&6; }
11636if ${ac_cv_path_AWK+:} false; then :
11637  $as_echo_n "(cached) " >&6
11638else
11639  case $AWK in
11640  [\\/]* | ?:[\\/]*)
11641  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11642  ;;
11643  *)
11644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11645for as_dir in $PATH
11646do
11647  IFS=$as_save_IFS
11648  test -z "$as_dir" && as_dir=.
11649    for ac_exec_ext in '' $ac_executable_extensions; do
11650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11651    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11653    break 2
11654  fi
11655done
11656  done
11657IFS=$as_save_IFS
11658
11659  ;;
11660esac
11661fi
11662AWK=$ac_cv_path_AWK
11663if test -n "$AWK"; then
11664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11665$as_echo "$AWK" >&6; }
11666else
11667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11668$as_echo "no" >&6; }
11669fi
11670
11671
11672        if test "x$AWK" = x; then
11673          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11674        fi
11675      else
11676        # Otherwise we believe it is a complete path. Use it as it is.
11677        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11678$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11679        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11680$as_echo_n "checking for AWK... " >&6; }
11681        if test ! -x "$tool_specified"; then
11682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11683$as_echo "not found" >&6; }
11684          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11685        fi
11686        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11687$as_echo "$tool_specified" >&6; }
11688      fi
11689    fi
11690  fi
11691
11692
11693  if test "x$AWK" = x; then
11694    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11695  fi
11696
11697
11698
11699
11700  # Publish this variable in the help.
11701
11702
11703  if test "x$GREP" = x; then
11704    # The variable is not set by user, try to locate tool using the code snippet
11705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11706$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11707if ${ac_cv_path_GREP+:} false; then :
11708  $as_echo_n "(cached) " >&6
11709else
11710  if test -z "$GREP"; then
11711  ac_path_GREP_found=false
11712  # Loop through the user's path and test for each of PROGNAME-LIST
11713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11714for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11715do
11716  IFS=$as_save_IFS
11717  test -z "$as_dir" && as_dir=.
11718    for ac_prog in grep ggrep; do
11719    for ac_exec_ext in '' $ac_executable_extensions; do
11720      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11721      as_fn_executable_p "$ac_path_GREP" || continue
11722# Check for GNU ac_path_GREP and select it if it is found.
11723  # Check for GNU $ac_path_GREP
11724case `"$ac_path_GREP" --version 2>&1` in
11725*GNU*)
11726  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11727*)
11728  ac_count=0
11729  $as_echo_n 0123456789 >"conftest.in"
11730  while :
11731  do
11732    cat "conftest.in" "conftest.in" >"conftest.tmp"
11733    mv "conftest.tmp" "conftest.in"
11734    cp "conftest.in" "conftest.nl"
11735    $as_echo 'GREP' >> "conftest.nl"
11736    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11737    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11738    as_fn_arith $ac_count + 1 && ac_count=$as_val
11739    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11740      # Best one so far, save it but keep looking for a better one
11741      ac_cv_path_GREP="$ac_path_GREP"
11742      ac_path_GREP_max=$ac_count
11743    fi
11744    # 10*(2^10) chars as input seems more than enough
11745    test $ac_count -gt 10 && break
11746  done
11747  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11748esac
11749
11750      $ac_path_GREP_found && break 3
11751    done
11752  done
11753  done
11754IFS=$as_save_IFS
11755  if test -z "$ac_cv_path_GREP"; then
11756    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11757  fi
11758else
11759  ac_cv_path_GREP=$GREP
11760fi
11761
11762fi
11763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11764$as_echo "$ac_cv_path_GREP" >&6; }
11765 GREP="$ac_cv_path_GREP"
11766
11767
11768  else
11769    # The variable is set, but is it from the command line or the environment?
11770
11771    # Try to remove the string !GREP! from our list.
11772    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11773    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11774      # If it failed, the variable was not from the command line. Ignore it,
11775      # but warn the user (except for BASH, which is always set by the calling BASH).
11776      if test "xGREP" != xBASH; then
11777        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11778$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11779      fi
11780      # Try to locate tool using the code snippet
11781      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11782$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11783if ${ac_cv_path_GREP+:} false; then :
11784  $as_echo_n "(cached) " >&6
11785else
11786  if test -z "$GREP"; then
11787  ac_path_GREP_found=false
11788  # Loop through the user's path and test for each of PROGNAME-LIST
11789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11790for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11791do
11792  IFS=$as_save_IFS
11793  test -z "$as_dir" && as_dir=.
11794    for ac_prog in grep ggrep; do
11795    for ac_exec_ext in '' $ac_executable_extensions; do
11796      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11797      as_fn_executable_p "$ac_path_GREP" || continue
11798# Check for GNU ac_path_GREP and select it if it is found.
11799  # Check for GNU $ac_path_GREP
11800case `"$ac_path_GREP" --version 2>&1` in
11801*GNU*)
11802  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11803*)
11804  ac_count=0
11805  $as_echo_n 0123456789 >"conftest.in"
11806  while :
11807  do
11808    cat "conftest.in" "conftest.in" >"conftest.tmp"
11809    mv "conftest.tmp" "conftest.in"
11810    cp "conftest.in" "conftest.nl"
11811    $as_echo 'GREP' >> "conftest.nl"
11812    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11813    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11814    as_fn_arith $ac_count + 1 && ac_count=$as_val
11815    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11816      # Best one so far, save it but keep looking for a better one
11817      ac_cv_path_GREP="$ac_path_GREP"
11818      ac_path_GREP_max=$ac_count
11819    fi
11820    # 10*(2^10) chars as input seems more than enough
11821    test $ac_count -gt 10 && break
11822  done
11823  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11824esac
11825
11826      $ac_path_GREP_found && break 3
11827    done
11828  done
11829  done
11830IFS=$as_save_IFS
11831  if test -z "$ac_cv_path_GREP"; then
11832    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11833  fi
11834else
11835  ac_cv_path_GREP=$GREP
11836fi
11837
11838fi
11839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11840$as_echo "$ac_cv_path_GREP" >&6; }
11841 GREP="$ac_cv_path_GREP"
11842
11843
11844    else
11845      # If it succeeded, then it was overridden by the user. We will use it
11846      # for the tool.
11847
11848      # First remove it from the list of overridden variables, so we can test
11849      # for unknown variables in the end.
11850      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11851
11852      # Check if the provided tool contains a complete path.
11853      tool_specified="$GREP"
11854      tool_basename="${tool_specified##*/}"
11855      if test "x$tool_basename" = "x$tool_specified"; then
11856        # A command without a complete path is provided, search $PATH.
11857        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11858$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11859        # Extract the first word of "$tool_basename", so it can be a program name with args.
11860set dummy $tool_basename; ac_word=$2
11861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11862$as_echo_n "checking for $ac_word... " >&6; }
11863if ${ac_cv_path_GREP+:} false; then :
11864  $as_echo_n "(cached) " >&6
11865else
11866  case $GREP in
11867  [\\/]* | ?:[\\/]*)
11868  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11869  ;;
11870  *)
11871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11872for as_dir in $PATH
11873do
11874  IFS=$as_save_IFS
11875  test -z "$as_dir" && as_dir=.
11876    for ac_exec_ext in '' $ac_executable_extensions; do
11877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11878    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11880    break 2
11881  fi
11882done
11883  done
11884IFS=$as_save_IFS
11885
11886  ;;
11887esac
11888fi
11889GREP=$ac_cv_path_GREP
11890if test -n "$GREP"; then
11891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11892$as_echo "$GREP" >&6; }
11893else
11894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11895$as_echo "no" >&6; }
11896fi
11897
11898
11899        if test "x$GREP" = x; then
11900          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11901        fi
11902      else
11903        # Otherwise we believe it is a complete path. Use it as it is.
11904        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11905$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11907$as_echo_n "checking for GREP... " >&6; }
11908        if test ! -x "$tool_specified"; then
11909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11910$as_echo "not found" >&6; }
11911          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11912        fi
11913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11914$as_echo "$tool_specified" >&6; }
11915      fi
11916    fi
11917  fi
11918
11919
11920  if test "x$GREP" = x; then
11921    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11922  fi
11923
11924
11925
11926
11927  # Publish this variable in the help.
11928
11929
11930  if test "x$EGREP" = x; then
11931    # The variable is not set by user, try to locate tool using the code snippet
11932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11933$as_echo_n "checking for egrep... " >&6; }
11934if ${ac_cv_path_EGREP+:} false; then :
11935  $as_echo_n "(cached) " >&6
11936else
11937  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11938   then ac_cv_path_EGREP="$GREP -E"
11939   else
11940     if test -z "$EGREP"; then
11941  ac_path_EGREP_found=false
11942  # Loop through the user's path and test for each of PROGNAME-LIST
11943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11944for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11945do
11946  IFS=$as_save_IFS
11947  test -z "$as_dir" && as_dir=.
11948    for ac_prog in egrep; do
11949    for ac_exec_ext in '' $ac_executable_extensions; do
11950      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11951      as_fn_executable_p "$ac_path_EGREP" || continue
11952# Check for GNU ac_path_EGREP and select it if it is found.
11953  # Check for GNU $ac_path_EGREP
11954case `"$ac_path_EGREP" --version 2>&1` in
11955*GNU*)
11956  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11957*)
11958  ac_count=0
11959  $as_echo_n 0123456789 >"conftest.in"
11960  while :
11961  do
11962    cat "conftest.in" "conftest.in" >"conftest.tmp"
11963    mv "conftest.tmp" "conftest.in"
11964    cp "conftest.in" "conftest.nl"
11965    $as_echo 'EGREP' >> "conftest.nl"
11966    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11967    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11968    as_fn_arith $ac_count + 1 && ac_count=$as_val
11969    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11970      # Best one so far, save it but keep looking for a better one
11971      ac_cv_path_EGREP="$ac_path_EGREP"
11972      ac_path_EGREP_max=$ac_count
11973    fi
11974    # 10*(2^10) chars as input seems more than enough
11975    test $ac_count -gt 10 && break
11976  done
11977  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11978esac
11979
11980      $ac_path_EGREP_found && break 3
11981    done
11982  done
11983  done
11984IFS=$as_save_IFS
11985  if test -z "$ac_cv_path_EGREP"; then
11986    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11987  fi
11988else
11989  ac_cv_path_EGREP=$EGREP
11990fi
11991
11992   fi
11993fi
11994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11995$as_echo "$ac_cv_path_EGREP" >&6; }
11996 EGREP="$ac_cv_path_EGREP"
11997
11998
11999  else
12000    # The variable is set, but is it from the command line or the environment?
12001
12002    # Try to remove the string !EGREP! from our list.
12003    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12004    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12005      # If it failed, the variable was not from the command line. Ignore it,
12006      # but warn the user (except for BASH, which is always set by the calling BASH).
12007      if test "xEGREP" != xBASH; then
12008        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12009$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12010      fi
12011      # Try to locate tool using the code snippet
12012      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12013$as_echo_n "checking for egrep... " >&6; }
12014if ${ac_cv_path_EGREP+:} false; then :
12015  $as_echo_n "(cached) " >&6
12016else
12017  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12018   then ac_cv_path_EGREP="$GREP -E"
12019   else
12020     if test -z "$EGREP"; then
12021  ac_path_EGREP_found=false
12022  # Loop through the user's path and test for each of PROGNAME-LIST
12023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12024for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12025do
12026  IFS=$as_save_IFS
12027  test -z "$as_dir" && as_dir=.
12028    for ac_prog in egrep; do
12029    for ac_exec_ext in '' $ac_executable_extensions; do
12030      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12031      as_fn_executable_p "$ac_path_EGREP" || continue
12032# Check for GNU ac_path_EGREP and select it if it is found.
12033  # Check for GNU $ac_path_EGREP
12034case `"$ac_path_EGREP" --version 2>&1` in
12035*GNU*)
12036  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12037*)
12038  ac_count=0
12039  $as_echo_n 0123456789 >"conftest.in"
12040  while :
12041  do
12042    cat "conftest.in" "conftest.in" >"conftest.tmp"
12043    mv "conftest.tmp" "conftest.in"
12044    cp "conftest.in" "conftest.nl"
12045    $as_echo 'EGREP' >> "conftest.nl"
12046    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12047    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12048    as_fn_arith $ac_count + 1 && ac_count=$as_val
12049    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12050      # Best one so far, save it but keep looking for a better one
12051      ac_cv_path_EGREP="$ac_path_EGREP"
12052      ac_path_EGREP_max=$ac_count
12053    fi
12054    # 10*(2^10) chars as input seems more than enough
12055    test $ac_count -gt 10 && break
12056  done
12057  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12058esac
12059
12060      $ac_path_EGREP_found && break 3
12061    done
12062  done
12063  done
12064IFS=$as_save_IFS
12065  if test -z "$ac_cv_path_EGREP"; then
12066    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12067  fi
12068else
12069  ac_cv_path_EGREP=$EGREP
12070fi
12071
12072   fi
12073fi
12074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12075$as_echo "$ac_cv_path_EGREP" >&6; }
12076 EGREP="$ac_cv_path_EGREP"
12077
12078
12079    else
12080      # If it succeeded, then it was overridden by the user. We will use it
12081      # for the tool.
12082
12083      # First remove it from the list of overridden variables, so we can test
12084      # for unknown variables in the end.
12085      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12086
12087      # Check if the provided tool contains a complete path.
12088      tool_specified="$EGREP"
12089      tool_basename="${tool_specified##*/}"
12090      if test "x$tool_basename" = "x$tool_specified"; then
12091        # A command without a complete path is provided, search $PATH.
12092        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12093$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12094        # Extract the first word of "$tool_basename", so it can be a program name with args.
12095set dummy $tool_basename; ac_word=$2
12096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12097$as_echo_n "checking for $ac_word... " >&6; }
12098if ${ac_cv_path_EGREP+:} false; then :
12099  $as_echo_n "(cached) " >&6
12100else
12101  case $EGREP in
12102  [\\/]* | ?:[\\/]*)
12103  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12104  ;;
12105  *)
12106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12107for as_dir in $PATH
12108do
12109  IFS=$as_save_IFS
12110  test -z "$as_dir" && as_dir=.
12111    for ac_exec_ext in '' $ac_executable_extensions; do
12112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12113    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12115    break 2
12116  fi
12117done
12118  done
12119IFS=$as_save_IFS
12120
12121  ;;
12122esac
12123fi
12124EGREP=$ac_cv_path_EGREP
12125if test -n "$EGREP"; then
12126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12127$as_echo "$EGREP" >&6; }
12128else
12129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12130$as_echo "no" >&6; }
12131fi
12132
12133
12134        if test "x$EGREP" = x; then
12135          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12136        fi
12137      else
12138        # Otherwise we believe it is a complete path. Use it as it is.
12139        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12140$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12141        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12142$as_echo_n "checking for EGREP... " >&6; }
12143        if test ! -x "$tool_specified"; then
12144          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12145$as_echo "not found" >&6; }
12146          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12147        fi
12148        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12149$as_echo "$tool_specified" >&6; }
12150      fi
12151    fi
12152  fi
12153
12154
12155  if test "x$EGREP" = x; then
12156    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12157  fi
12158
12159
12160
12161
12162  # Publish this variable in the help.
12163
12164
12165  if test "x$FGREP" = x; then
12166    # The variable is not set by user, try to locate tool using the code snippet
12167    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12168$as_echo_n "checking for fgrep... " >&6; }
12169if ${ac_cv_path_FGREP+:} false; then :
12170  $as_echo_n "(cached) " >&6
12171else
12172  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12173   then ac_cv_path_FGREP="$GREP -F"
12174   else
12175     if test -z "$FGREP"; then
12176  ac_path_FGREP_found=false
12177  # Loop through the user's path and test for each of PROGNAME-LIST
12178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12179for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12180do
12181  IFS=$as_save_IFS
12182  test -z "$as_dir" && as_dir=.
12183    for ac_prog in fgrep; do
12184    for ac_exec_ext in '' $ac_executable_extensions; do
12185      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12186      as_fn_executable_p "$ac_path_FGREP" || continue
12187# Check for GNU ac_path_FGREP and select it if it is found.
12188  # Check for GNU $ac_path_FGREP
12189case `"$ac_path_FGREP" --version 2>&1` in
12190*GNU*)
12191  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12192*)
12193  ac_count=0
12194  $as_echo_n 0123456789 >"conftest.in"
12195  while :
12196  do
12197    cat "conftest.in" "conftest.in" >"conftest.tmp"
12198    mv "conftest.tmp" "conftest.in"
12199    cp "conftest.in" "conftest.nl"
12200    $as_echo 'FGREP' >> "conftest.nl"
12201    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12202    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12203    as_fn_arith $ac_count + 1 && ac_count=$as_val
12204    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12205      # Best one so far, save it but keep looking for a better one
12206      ac_cv_path_FGREP="$ac_path_FGREP"
12207      ac_path_FGREP_max=$ac_count
12208    fi
12209    # 10*(2^10) chars as input seems more than enough
12210    test $ac_count -gt 10 && break
12211  done
12212  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12213esac
12214
12215      $ac_path_FGREP_found && break 3
12216    done
12217  done
12218  done
12219IFS=$as_save_IFS
12220  if test -z "$ac_cv_path_FGREP"; then
12221    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12222  fi
12223else
12224  ac_cv_path_FGREP=$FGREP
12225fi
12226
12227   fi
12228fi
12229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12230$as_echo "$ac_cv_path_FGREP" >&6; }
12231 FGREP="$ac_cv_path_FGREP"
12232
12233
12234  else
12235    # The variable is set, but is it from the command line or the environment?
12236
12237    # Try to remove the string !FGREP! from our list.
12238    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12239    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12240      # If it failed, the variable was not from the command line. Ignore it,
12241      # but warn the user (except for BASH, which is always set by the calling BASH).
12242      if test "xFGREP" != xBASH; then
12243        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12244$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12245      fi
12246      # Try to locate tool using the code snippet
12247      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12248$as_echo_n "checking for fgrep... " >&6; }
12249if ${ac_cv_path_FGREP+:} false; then :
12250  $as_echo_n "(cached) " >&6
12251else
12252  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12253   then ac_cv_path_FGREP="$GREP -F"
12254   else
12255     if test -z "$FGREP"; then
12256  ac_path_FGREP_found=false
12257  # Loop through the user's path and test for each of PROGNAME-LIST
12258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12259for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12260do
12261  IFS=$as_save_IFS
12262  test -z "$as_dir" && as_dir=.
12263    for ac_prog in fgrep; do
12264    for ac_exec_ext in '' $ac_executable_extensions; do
12265      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12266      as_fn_executable_p "$ac_path_FGREP" || continue
12267# Check for GNU ac_path_FGREP and select it if it is found.
12268  # Check for GNU $ac_path_FGREP
12269case `"$ac_path_FGREP" --version 2>&1` in
12270*GNU*)
12271  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12272*)
12273  ac_count=0
12274  $as_echo_n 0123456789 >"conftest.in"
12275  while :
12276  do
12277    cat "conftest.in" "conftest.in" >"conftest.tmp"
12278    mv "conftest.tmp" "conftest.in"
12279    cp "conftest.in" "conftest.nl"
12280    $as_echo 'FGREP' >> "conftest.nl"
12281    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12282    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12283    as_fn_arith $ac_count + 1 && ac_count=$as_val
12284    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12285      # Best one so far, save it but keep looking for a better one
12286      ac_cv_path_FGREP="$ac_path_FGREP"
12287      ac_path_FGREP_max=$ac_count
12288    fi
12289    # 10*(2^10) chars as input seems more than enough
12290    test $ac_count -gt 10 && break
12291  done
12292  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12293esac
12294
12295      $ac_path_FGREP_found && break 3
12296    done
12297  done
12298  done
12299IFS=$as_save_IFS
12300  if test -z "$ac_cv_path_FGREP"; then
12301    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12302  fi
12303else
12304  ac_cv_path_FGREP=$FGREP
12305fi
12306
12307   fi
12308fi
12309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12310$as_echo "$ac_cv_path_FGREP" >&6; }
12311 FGREP="$ac_cv_path_FGREP"
12312
12313
12314    else
12315      # If it succeeded, then it was overridden by the user. We will use it
12316      # for the tool.
12317
12318      # First remove it from the list of overridden variables, so we can test
12319      # for unknown variables in the end.
12320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12321
12322      # Check if the provided tool contains a complete path.
12323      tool_specified="$FGREP"
12324      tool_basename="${tool_specified##*/}"
12325      if test "x$tool_basename" = "x$tool_specified"; then
12326        # A command without a complete path is provided, search $PATH.
12327        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12328$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12329        # Extract the first word of "$tool_basename", so it can be a program name with args.
12330set dummy $tool_basename; ac_word=$2
12331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12332$as_echo_n "checking for $ac_word... " >&6; }
12333if ${ac_cv_path_FGREP+:} false; then :
12334  $as_echo_n "(cached) " >&6
12335else
12336  case $FGREP in
12337  [\\/]* | ?:[\\/]*)
12338  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12339  ;;
12340  *)
12341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12342for as_dir in $PATH
12343do
12344  IFS=$as_save_IFS
12345  test -z "$as_dir" && as_dir=.
12346    for ac_exec_ext in '' $ac_executable_extensions; do
12347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12348    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12350    break 2
12351  fi
12352done
12353  done
12354IFS=$as_save_IFS
12355
12356  ;;
12357esac
12358fi
12359FGREP=$ac_cv_path_FGREP
12360if test -n "$FGREP"; then
12361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12362$as_echo "$FGREP" >&6; }
12363else
12364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12365$as_echo "no" >&6; }
12366fi
12367
12368
12369        if test "x$FGREP" = x; then
12370          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12371        fi
12372      else
12373        # Otherwise we believe it is a complete path. Use it as it is.
12374        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12375$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12377$as_echo_n "checking for FGREP... " >&6; }
12378        if test ! -x "$tool_specified"; then
12379          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12380$as_echo "not found" >&6; }
12381          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12382        fi
12383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12384$as_echo "$tool_specified" >&6; }
12385      fi
12386    fi
12387  fi
12388
12389
12390  if test "x$FGREP" = x; then
12391    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12392  fi
12393
12394
12395
12396
12397  # Publish this variable in the help.
12398
12399
12400  if test "x$SED" = x; then
12401    # The variable is not set by user, try to locate tool using the code snippet
12402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12403$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12404if ${ac_cv_path_SED+:} false; then :
12405  $as_echo_n "(cached) " >&6
12406else
12407            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12408     for ac_i in 1 2 3 4 5 6 7; do
12409       ac_script="$ac_script$as_nl$ac_script"
12410     done
12411     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12412     { ac_script=; unset ac_script;}
12413     if test -z "$SED"; then
12414  ac_path_SED_found=false
12415  # Loop through the user's path and test for each of PROGNAME-LIST
12416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12417for as_dir in $PATH
12418do
12419  IFS=$as_save_IFS
12420  test -z "$as_dir" && as_dir=.
12421    for ac_prog in sed gsed; do
12422    for ac_exec_ext in '' $ac_executable_extensions; do
12423      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12424      as_fn_executable_p "$ac_path_SED" || continue
12425# Check for GNU ac_path_SED and select it if it is found.
12426  # Check for GNU $ac_path_SED
12427case `"$ac_path_SED" --version 2>&1` in
12428*GNU*)
12429  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12430*)
12431  ac_count=0
12432  $as_echo_n 0123456789 >"conftest.in"
12433  while :
12434  do
12435    cat "conftest.in" "conftest.in" >"conftest.tmp"
12436    mv "conftest.tmp" "conftest.in"
12437    cp "conftest.in" "conftest.nl"
12438    $as_echo '' >> "conftest.nl"
12439    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12440    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12441    as_fn_arith $ac_count + 1 && ac_count=$as_val
12442    if test $ac_count -gt ${ac_path_SED_max-0}; then
12443      # Best one so far, save it but keep looking for a better one
12444      ac_cv_path_SED="$ac_path_SED"
12445      ac_path_SED_max=$ac_count
12446    fi
12447    # 10*(2^10) chars as input seems more than enough
12448    test $ac_count -gt 10 && break
12449  done
12450  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12451esac
12452
12453      $ac_path_SED_found && break 3
12454    done
12455  done
12456  done
12457IFS=$as_save_IFS
12458  if test -z "$ac_cv_path_SED"; then
12459    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12460  fi
12461else
12462  ac_cv_path_SED=$SED
12463fi
12464
12465fi
12466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12467$as_echo "$ac_cv_path_SED" >&6; }
12468 SED="$ac_cv_path_SED"
12469  rm -f conftest.sed
12470
12471  else
12472    # The variable is set, but is it from the command line or the environment?
12473
12474    # Try to remove the string !SED! from our list.
12475    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12476    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12477      # If it failed, the variable was not from the command line. Ignore it,
12478      # but warn the user (except for BASH, which is always set by the calling BASH).
12479      if test "xSED" != xBASH; then
12480        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12481$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12482      fi
12483      # Try to locate tool using the code snippet
12484      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12485$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12486if ${ac_cv_path_SED+:} false; then :
12487  $as_echo_n "(cached) " >&6
12488else
12489            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12490     for ac_i in 1 2 3 4 5 6 7; do
12491       ac_script="$ac_script$as_nl$ac_script"
12492     done
12493     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12494     { ac_script=; unset ac_script;}
12495     if test -z "$SED"; then
12496  ac_path_SED_found=false
12497  # Loop through the user's path and test for each of PROGNAME-LIST
12498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12499for as_dir in $PATH
12500do
12501  IFS=$as_save_IFS
12502  test -z "$as_dir" && as_dir=.
12503    for ac_prog in sed gsed; do
12504    for ac_exec_ext in '' $ac_executable_extensions; do
12505      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12506      as_fn_executable_p "$ac_path_SED" || continue
12507# Check for GNU ac_path_SED and select it if it is found.
12508  # Check for GNU $ac_path_SED
12509case `"$ac_path_SED" --version 2>&1` in
12510*GNU*)
12511  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12512*)
12513  ac_count=0
12514  $as_echo_n 0123456789 >"conftest.in"
12515  while :
12516  do
12517    cat "conftest.in" "conftest.in" >"conftest.tmp"
12518    mv "conftest.tmp" "conftest.in"
12519    cp "conftest.in" "conftest.nl"
12520    $as_echo '' >> "conftest.nl"
12521    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12522    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12523    as_fn_arith $ac_count + 1 && ac_count=$as_val
12524    if test $ac_count -gt ${ac_path_SED_max-0}; then
12525      # Best one so far, save it but keep looking for a better one
12526      ac_cv_path_SED="$ac_path_SED"
12527      ac_path_SED_max=$ac_count
12528    fi
12529    # 10*(2^10) chars as input seems more than enough
12530    test $ac_count -gt 10 && break
12531  done
12532  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12533esac
12534
12535      $ac_path_SED_found && break 3
12536    done
12537  done
12538  done
12539IFS=$as_save_IFS
12540  if test -z "$ac_cv_path_SED"; then
12541    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12542  fi
12543else
12544  ac_cv_path_SED=$SED
12545fi
12546
12547fi
12548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12549$as_echo "$ac_cv_path_SED" >&6; }
12550 SED="$ac_cv_path_SED"
12551  rm -f conftest.sed
12552
12553    else
12554      # If it succeeded, then it was overridden by the user. We will use it
12555      # for the tool.
12556
12557      # First remove it from the list of overridden variables, so we can test
12558      # for unknown variables in the end.
12559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12560
12561      # Check if the provided tool contains a complete path.
12562      tool_specified="$SED"
12563      tool_basename="${tool_specified##*/}"
12564      if test "x$tool_basename" = "x$tool_specified"; then
12565        # A command without a complete path is provided, search $PATH.
12566        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12567$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12568        # Extract the first word of "$tool_basename", so it can be a program name with args.
12569set dummy $tool_basename; ac_word=$2
12570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12571$as_echo_n "checking for $ac_word... " >&6; }
12572if ${ac_cv_path_SED+:} false; then :
12573  $as_echo_n "(cached) " >&6
12574else
12575  case $SED in
12576  [\\/]* | ?:[\\/]*)
12577  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12578  ;;
12579  *)
12580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12581for as_dir in $PATH
12582do
12583  IFS=$as_save_IFS
12584  test -z "$as_dir" && as_dir=.
12585    for ac_exec_ext in '' $ac_executable_extensions; do
12586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12587    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12589    break 2
12590  fi
12591done
12592  done
12593IFS=$as_save_IFS
12594
12595  ;;
12596esac
12597fi
12598SED=$ac_cv_path_SED
12599if test -n "$SED"; then
12600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12601$as_echo "$SED" >&6; }
12602else
12603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12604$as_echo "no" >&6; }
12605fi
12606
12607
12608        if test "x$SED" = x; then
12609          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12610        fi
12611      else
12612        # Otherwise we believe it is a complete path. Use it as it is.
12613        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12614$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12615        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12616$as_echo_n "checking for SED... " >&6; }
12617        if test ! -x "$tool_specified"; then
12618          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12619$as_echo "not found" >&6; }
12620          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12621        fi
12622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12623$as_echo "$tool_specified" >&6; }
12624      fi
12625    fi
12626  fi
12627
12628
12629  if test "x$SED" = x; then
12630    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12631  fi
12632
12633
12634
12635  # Always force rm.
12636  RM="$RM -f"
12637
12638  # pwd behaves differently on various platforms and some don't support the -L flag.
12639  # Always use the bash builtin pwd to get uniform behavior.
12640  THEPWDCMD=pwd
12641
12642  # These are not required on all platforms
12643
12644
12645  # Publish this variable in the help.
12646
12647
12648  if test "x$CYGPATH" = x; then
12649    # The variable is not set by user, try to locate tool using the code snippet
12650    for ac_prog in cygpath
12651do
12652  # Extract the first word of "$ac_prog", so it can be a program name with args.
12653set dummy $ac_prog; ac_word=$2
12654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12655$as_echo_n "checking for $ac_word... " >&6; }
12656if ${ac_cv_path_CYGPATH+:} false; then :
12657  $as_echo_n "(cached) " >&6
12658else
12659  case $CYGPATH in
12660  [\\/]* | ?:[\\/]*)
12661  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12662  ;;
12663  *)
12664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12665for as_dir in $PATH
12666do
12667  IFS=$as_save_IFS
12668  test -z "$as_dir" && as_dir=.
12669    for ac_exec_ext in '' $ac_executable_extensions; do
12670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12671    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12673    break 2
12674  fi
12675done
12676  done
12677IFS=$as_save_IFS
12678
12679  ;;
12680esac
12681fi
12682CYGPATH=$ac_cv_path_CYGPATH
12683if test -n "$CYGPATH"; then
12684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12685$as_echo "$CYGPATH" >&6; }
12686else
12687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12688$as_echo "no" >&6; }
12689fi
12690
12691
12692  test -n "$CYGPATH" && break
12693done
12694
12695  else
12696    # The variable is set, but is it from the command line or the environment?
12697
12698    # Try to remove the string !CYGPATH! from our list.
12699    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12700    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12701      # If it failed, the variable was not from the command line. Ignore it,
12702      # but warn the user (except for BASH, which is always set by the calling BASH).
12703      if test "xCYGPATH" != xBASH; then
12704        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12705$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12706      fi
12707      # Try to locate tool using the code snippet
12708      for ac_prog in cygpath
12709do
12710  # Extract the first word of "$ac_prog", so it can be a program name with args.
12711set dummy $ac_prog; ac_word=$2
12712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12713$as_echo_n "checking for $ac_word... " >&6; }
12714if ${ac_cv_path_CYGPATH+:} false; then :
12715  $as_echo_n "(cached) " >&6
12716else
12717  case $CYGPATH in
12718  [\\/]* | ?:[\\/]*)
12719  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12720  ;;
12721  *)
12722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12723for as_dir in $PATH
12724do
12725  IFS=$as_save_IFS
12726  test -z "$as_dir" && as_dir=.
12727    for ac_exec_ext in '' $ac_executable_extensions; do
12728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12729    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12731    break 2
12732  fi
12733done
12734  done
12735IFS=$as_save_IFS
12736
12737  ;;
12738esac
12739fi
12740CYGPATH=$ac_cv_path_CYGPATH
12741if test -n "$CYGPATH"; then
12742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12743$as_echo "$CYGPATH" >&6; }
12744else
12745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12746$as_echo "no" >&6; }
12747fi
12748
12749
12750  test -n "$CYGPATH" && break
12751done
12752
12753    else
12754      # If it succeeded, then it was overridden by the user. We will use it
12755      # for the tool.
12756
12757      # First remove it from the list of overridden variables, so we can test
12758      # for unknown variables in the end.
12759      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12760
12761      # Check if the provided tool contains a complete path.
12762      tool_specified="$CYGPATH"
12763      tool_basename="${tool_specified##*/}"
12764      if test "x$tool_basename" = "x$tool_specified"; then
12765        # A command without a complete path is provided, search $PATH.
12766        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12767$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12768        # Extract the first word of "$tool_basename", so it can be a program name with args.
12769set dummy $tool_basename; ac_word=$2
12770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12771$as_echo_n "checking for $ac_word... " >&6; }
12772if ${ac_cv_path_CYGPATH+:} false; then :
12773  $as_echo_n "(cached) " >&6
12774else
12775  case $CYGPATH in
12776  [\\/]* | ?:[\\/]*)
12777  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12778  ;;
12779  *)
12780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12781for as_dir in $PATH
12782do
12783  IFS=$as_save_IFS
12784  test -z "$as_dir" && as_dir=.
12785    for ac_exec_ext in '' $ac_executable_extensions; do
12786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12787    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12789    break 2
12790  fi
12791done
12792  done
12793IFS=$as_save_IFS
12794
12795  ;;
12796esac
12797fi
12798CYGPATH=$ac_cv_path_CYGPATH
12799if test -n "$CYGPATH"; then
12800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12801$as_echo "$CYGPATH" >&6; }
12802else
12803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12804$as_echo "no" >&6; }
12805fi
12806
12807
12808        if test "x$CYGPATH" = x; then
12809          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12810        fi
12811      else
12812        # Otherwise we believe it is a complete path. Use it as it is.
12813        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12814$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12816$as_echo_n "checking for CYGPATH... " >&6; }
12817        if test ! -x "$tool_specified"; then
12818          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12819$as_echo "not found" >&6; }
12820          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12821        fi
12822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12823$as_echo "$tool_specified" >&6; }
12824      fi
12825    fi
12826  fi
12827
12828
12829
12830
12831  # Publish this variable in the help.
12832
12833
12834  if test "x$READLINK" = x; then
12835    # The variable is not set by user, try to locate tool using the code snippet
12836    for ac_prog in greadlink readlink
12837do
12838  # Extract the first word of "$ac_prog", so it can be a program name with args.
12839set dummy $ac_prog; ac_word=$2
12840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12841$as_echo_n "checking for $ac_word... " >&6; }
12842if ${ac_cv_path_READLINK+:} false; then :
12843  $as_echo_n "(cached) " >&6
12844else
12845  case $READLINK in
12846  [\\/]* | ?:[\\/]*)
12847  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12848  ;;
12849  *)
12850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12851for as_dir in $PATH
12852do
12853  IFS=$as_save_IFS
12854  test -z "$as_dir" && as_dir=.
12855    for ac_exec_ext in '' $ac_executable_extensions; do
12856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12857    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12859    break 2
12860  fi
12861done
12862  done
12863IFS=$as_save_IFS
12864
12865  ;;
12866esac
12867fi
12868READLINK=$ac_cv_path_READLINK
12869if test -n "$READLINK"; then
12870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12871$as_echo "$READLINK" >&6; }
12872else
12873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12874$as_echo "no" >&6; }
12875fi
12876
12877
12878  test -n "$READLINK" && break
12879done
12880
12881  else
12882    # The variable is set, but is it from the command line or the environment?
12883
12884    # Try to remove the string !READLINK! from our list.
12885    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12886    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12887      # If it failed, the variable was not from the command line. Ignore it,
12888      # but warn the user (except for BASH, which is always set by the calling BASH).
12889      if test "xREADLINK" != xBASH; then
12890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12891$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12892      fi
12893      # Try to locate tool using the code snippet
12894      for ac_prog in greadlink readlink
12895do
12896  # Extract the first word of "$ac_prog", so it can be a program name with args.
12897set dummy $ac_prog; ac_word=$2
12898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12899$as_echo_n "checking for $ac_word... " >&6; }
12900if ${ac_cv_path_READLINK+:} false; then :
12901  $as_echo_n "(cached) " >&6
12902else
12903  case $READLINK in
12904  [\\/]* | ?:[\\/]*)
12905  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12906  ;;
12907  *)
12908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12909for as_dir in $PATH
12910do
12911  IFS=$as_save_IFS
12912  test -z "$as_dir" && as_dir=.
12913    for ac_exec_ext in '' $ac_executable_extensions; do
12914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12915    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12917    break 2
12918  fi
12919done
12920  done
12921IFS=$as_save_IFS
12922
12923  ;;
12924esac
12925fi
12926READLINK=$ac_cv_path_READLINK
12927if test -n "$READLINK"; then
12928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12929$as_echo "$READLINK" >&6; }
12930else
12931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12932$as_echo "no" >&6; }
12933fi
12934
12935
12936  test -n "$READLINK" && break
12937done
12938
12939    else
12940      # If it succeeded, then it was overridden by the user. We will use it
12941      # for the tool.
12942
12943      # First remove it from the list of overridden variables, so we can test
12944      # for unknown variables in the end.
12945      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12946
12947      # Check if the provided tool contains a complete path.
12948      tool_specified="$READLINK"
12949      tool_basename="${tool_specified##*/}"
12950      if test "x$tool_basename" = "x$tool_specified"; then
12951        # A command without a complete path is provided, search $PATH.
12952        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12953$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12954        # Extract the first word of "$tool_basename", so it can be a program name with args.
12955set dummy $tool_basename; ac_word=$2
12956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12957$as_echo_n "checking for $ac_word... " >&6; }
12958if ${ac_cv_path_READLINK+:} false; then :
12959  $as_echo_n "(cached) " >&6
12960else
12961  case $READLINK in
12962  [\\/]* | ?:[\\/]*)
12963  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12964  ;;
12965  *)
12966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12967for as_dir in $PATH
12968do
12969  IFS=$as_save_IFS
12970  test -z "$as_dir" && as_dir=.
12971    for ac_exec_ext in '' $ac_executable_extensions; do
12972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12973    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12975    break 2
12976  fi
12977done
12978  done
12979IFS=$as_save_IFS
12980
12981  ;;
12982esac
12983fi
12984READLINK=$ac_cv_path_READLINK
12985if test -n "$READLINK"; then
12986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12987$as_echo "$READLINK" >&6; }
12988else
12989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12990$as_echo "no" >&6; }
12991fi
12992
12993
12994        if test "x$READLINK" = x; then
12995          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12996        fi
12997      else
12998        # Otherwise we believe it is a complete path. Use it as it is.
12999        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13000$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13001        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13002$as_echo_n "checking for READLINK... " >&6; }
13003        if test ! -x "$tool_specified"; then
13004          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13005$as_echo "not found" >&6; }
13006          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13007        fi
13008        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13009$as_echo "$tool_specified" >&6; }
13010      fi
13011    fi
13012  fi
13013
13014
13015
13016
13017  # Publish this variable in the help.
13018
13019
13020  if test "x$DF" = x; then
13021    # The variable is not set by user, try to locate tool using the code snippet
13022    for ac_prog in df
13023do
13024  # Extract the first word of "$ac_prog", so it can be a program name with args.
13025set dummy $ac_prog; ac_word=$2
13026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13027$as_echo_n "checking for $ac_word... " >&6; }
13028if ${ac_cv_path_DF+:} false; then :
13029  $as_echo_n "(cached) " >&6
13030else
13031  case $DF in
13032  [\\/]* | ?:[\\/]*)
13033  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13034  ;;
13035  *)
13036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13037for as_dir in $PATH
13038do
13039  IFS=$as_save_IFS
13040  test -z "$as_dir" && as_dir=.
13041    for ac_exec_ext in '' $ac_executable_extensions; do
13042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13043    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13045    break 2
13046  fi
13047done
13048  done
13049IFS=$as_save_IFS
13050
13051  ;;
13052esac
13053fi
13054DF=$ac_cv_path_DF
13055if test -n "$DF"; then
13056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13057$as_echo "$DF" >&6; }
13058else
13059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13060$as_echo "no" >&6; }
13061fi
13062
13063
13064  test -n "$DF" && break
13065done
13066
13067  else
13068    # The variable is set, but is it from the command line or the environment?
13069
13070    # Try to remove the string !DF! from our list.
13071    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13072    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13073      # If it failed, the variable was not from the command line. Ignore it,
13074      # but warn the user (except for BASH, which is always set by the calling BASH).
13075      if test "xDF" != xBASH; then
13076        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13077$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13078      fi
13079      # Try to locate tool using the code snippet
13080      for ac_prog in df
13081do
13082  # Extract the first word of "$ac_prog", so it can be a program name with args.
13083set dummy $ac_prog; ac_word=$2
13084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13085$as_echo_n "checking for $ac_word... " >&6; }
13086if ${ac_cv_path_DF+:} false; then :
13087  $as_echo_n "(cached) " >&6
13088else
13089  case $DF in
13090  [\\/]* | ?:[\\/]*)
13091  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13092  ;;
13093  *)
13094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13095for as_dir in $PATH
13096do
13097  IFS=$as_save_IFS
13098  test -z "$as_dir" && as_dir=.
13099    for ac_exec_ext in '' $ac_executable_extensions; do
13100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13101    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13103    break 2
13104  fi
13105done
13106  done
13107IFS=$as_save_IFS
13108
13109  ;;
13110esac
13111fi
13112DF=$ac_cv_path_DF
13113if test -n "$DF"; then
13114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13115$as_echo "$DF" >&6; }
13116else
13117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13118$as_echo "no" >&6; }
13119fi
13120
13121
13122  test -n "$DF" && break
13123done
13124
13125    else
13126      # If it succeeded, then it was overridden by the user. We will use it
13127      # for the tool.
13128
13129      # First remove it from the list of overridden variables, so we can test
13130      # for unknown variables in the end.
13131      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13132
13133      # Check if the provided tool contains a complete path.
13134      tool_specified="$DF"
13135      tool_basename="${tool_specified##*/}"
13136      if test "x$tool_basename" = "x$tool_specified"; then
13137        # A command without a complete path is provided, search $PATH.
13138        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13139$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13140        # Extract the first word of "$tool_basename", so it can be a program name with args.
13141set dummy $tool_basename; ac_word=$2
13142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13143$as_echo_n "checking for $ac_word... " >&6; }
13144if ${ac_cv_path_DF+:} false; then :
13145  $as_echo_n "(cached) " >&6
13146else
13147  case $DF in
13148  [\\/]* | ?:[\\/]*)
13149  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13150  ;;
13151  *)
13152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13153for as_dir in $PATH
13154do
13155  IFS=$as_save_IFS
13156  test -z "$as_dir" && as_dir=.
13157    for ac_exec_ext in '' $ac_executable_extensions; do
13158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13159    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13161    break 2
13162  fi
13163done
13164  done
13165IFS=$as_save_IFS
13166
13167  ;;
13168esac
13169fi
13170DF=$ac_cv_path_DF
13171if test -n "$DF"; then
13172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13173$as_echo "$DF" >&6; }
13174else
13175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13176$as_echo "no" >&6; }
13177fi
13178
13179
13180        if test "x$DF" = x; then
13181          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13182        fi
13183      else
13184        # Otherwise we believe it is a complete path. Use it as it is.
13185        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13186$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13187        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13188$as_echo_n "checking for DF... " >&6; }
13189        if test ! -x "$tool_specified"; then
13190          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13191$as_echo "not found" >&6; }
13192          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13193        fi
13194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13195$as_echo "$tool_specified" >&6; }
13196      fi
13197    fi
13198  fi
13199
13200
13201
13202
13203  # Publish this variable in the help.
13204
13205
13206  if test "x$SETFILE" = x; then
13207    # The variable is not set by user, try to locate tool using the code snippet
13208    for ac_prog in SetFile
13209do
13210  # Extract the first word of "$ac_prog", so it can be a program name with args.
13211set dummy $ac_prog; ac_word=$2
13212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13213$as_echo_n "checking for $ac_word... " >&6; }
13214if ${ac_cv_path_SETFILE+:} false; then :
13215  $as_echo_n "(cached) " >&6
13216else
13217  case $SETFILE in
13218  [\\/]* | ?:[\\/]*)
13219  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13220  ;;
13221  *)
13222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13223for as_dir in $PATH
13224do
13225  IFS=$as_save_IFS
13226  test -z "$as_dir" && as_dir=.
13227    for ac_exec_ext in '' $ac_executable_extensions; do
13228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13229    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13231    break 2
13232  fi
13233done
13234  done
13235IFS=$as_save_IFS
13236
13237  ;;
13238esac
13239fi
13240SETFILE=$ac_cv_path_SETFILE
13241if test -n "$SETFILE"; then
13242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13243$as_echo "$SETFILE" >&6; }
13244else
13245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13246$as_echo "no" >&6; }
13247fi
13248
13249
13250  test -n "$SETFILE" && break
13251done
13252
13253  else
13254    # The variable is set, but is it from the command line or the environment?
13255
13256    # Try to remove the string !SETFILE! from our list.
13257    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13258    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13259      # If it failed, the variable was not from the command line. Ignore it,
13260      # but warn the user (except for BASH, which is always set by the calling BASH).
13261      if test "xSETFILE" != xBASH; then
13262        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13263$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13264      fi
13265      # Try to locate tool using the code snippet
13266      for ac_prog in SetFile
13267do
13268  # Extract the first word of "$ac_prog", so it can be a program name with args.
13269set dummy $ac_prog; ac_word=$2
13270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13271$as_echo_n "checking for $ac_word... " >&6; }
13272if ${ac_cv_path_SETFILE+:} false; then :
13273  $as_echo_n "(cached) " >&6
13274else
13275  case $SETFILE in
13276  [\\/]* | ?:[\\/]*)
13277  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13278  ;;
13279  *)
13280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13281for as_dir in $PATH
13282do
13283  IFS=$as_save_IFS
13284  test -z "$as_dir" && as_dir=.
13285    for ac_exec_ext in '' $ac_executable_extensions; do
13286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13287    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13289    break 2
13290  fi
13291done
13292  done
13293IFS=$as_save_IFS
13294
13295  ;;
13296esac
13297fi
13298SETFILE=$ac_cv_path_SETFILE
13299if test -n "$SETFILE"; then
13300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13301$as_echo "$SETFILE" >&6; }
13302else
13303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13304$as_echo "no" >&6; }
13305fi
13306
13307
13308  test -n "$SETFILE" && break
13309done
13310
13311    else
13312      # If it succeeded, then it was overridden by the user. We will use it
13313      # for the tool.
13314
13315      # First remove it from the list of overridden variables, so we can test
13316      # for unknown variables in the end.
13317      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13318
13319      # Check if the provided tool contains a complete path.
13320      tool_specified="$SETFILE"
13321      tool_basename="${tool_specified##*/}"
13322      if test "x$tool_basename" = "x$tool_specified"; then
13323        # A command without a complete path is provided, search $PATH.
13324        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13325$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13326        # Extract the first word of "$tool_basename", so it can be a program name with args.
13327set dummy $tool_basename; ac_word=$2
13328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13329$as_echo_n "checking for $ac_word... " >&6; }
13330if ${ac_cv_path_SETFILE+:} false; then :
13331  $as_echo_n "(cached) " >&6
13332else
13333  case $SETFILE in
13334  [\\/]* | ?:[\\/]*)
13335  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13336  ;;
13337  *)
13338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13339for as_dir in $PATH
13340do
13341  IFS=$as_save_IFS
13342  test -z "$as_dir" && as_dir=.
13343    for ac_exec_ext in '' $ac_executable_extensions; do
13344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13345    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13347    break 2
13348  fi
13349done
13350  done
13351IFS=$as_save_IFS
13352
13353  ;;
13354esac
13355fi
13356SETFILE=$ac_cv_path_SETFILE
13357if test -n "$SETFILE"; then
13358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13359$as_echo "$SETFILE" >&6; }
13360else
13361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13362$as_echo "no" >&6; }
13363fi
13364
13365
13366        if test "x$SETFILE" = x; then
13367          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13368        fi
13369      else
13370        # Otherwise we believe it is a complete path. Use it as it is.
13371        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13372$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13373        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13374$as_echo_n "checking for SETFILE... " >&6; }
13375        if test ! -x "$tool_specified"; then
13376          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13377$as_echo "not found" >&6; }
13378          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13379        fi
13380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13381$as_echo "$tool_specified" >&6; }
13382      fi
13383    fi
13384  fi
13385
13386
13387
13388
13389# Now we can determine OpenJDK build and target platforms. This is required to
13390# have early on.
13391# Make sure we can run config.sub.
13392$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13393  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13394
13395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13396$as_echo_n "checking build system type... " >&6; }
13397if ${ac_cv_build+:} false; then :
13398  $as_echo_n "(cached) " >&6
13399else
13400  ac_build_alias=$build_alias
13401test "x$ac_build_alias" = x &&
13402  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13403test "x$ac_build_alias" = x &&
13404  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13405ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13406  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13407
13408fi
13409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13410$as_echo "$ac_cv_build" >&6; }
13411case $ac_cv_build in
13412*-*-*) ;;
13413*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13414esac
13415build=$ac_cv_build
13416ac_save_IFS=$IFS; IFS='-'
13417set x $ac_cv_build
13418shift
13419build_cpu=$1
13420build_vendor=$2
13421shift; shift
13422# Remember, the first character of IFS is used to create $*,
13423# except with old shells:
13424build_os=$*
13425IFS=$ac_save_IFS
13426case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13427
13428
13429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13430$as_echo_n "checking host system type... " >&6; }
13431if ${ac_cv_host+:} false; then :
13432  $as_echo_n "(cached) " >&6
13433else
13434  if test "x$host_alias" = x; then
13435  ac_cv_host=$ac_cv_build
13436else
13437  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13438    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13439fi
13440
13441fi
13442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13443$as_echo "$ac_cv_host" >&6; }
13444case $ac_cv_host in
13445*-*-*) ;;
13446*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13447esac
13448host=$ac_cv_host
13449ac_save_IFS=$IFS; IFS='-'
13450set x $ac_cv_host
13451shift
13452host_cpu=$1
13453host_vendor=$2
13454shift; shift
13455# Remember, the first character of IFS is used to create $*,
13456# except with old shells:
13457host_os=$*
13458IFS=$ac_save_IFS
13459case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13460
13461
13462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13463$as_echo_n "checking target system type... " >&6; }
13464if ${ac_cv_target+:} false; then :
13465  $as_echo_n "(cached) " >&6
13466else
13467  if test "x$target_alias" = x; then
13468  ac_cv_target=$ac_cv_host
13469else
13470  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13471    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13472fi
13473
13474fi
13475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13476$as_echo "$ac_cv_target" >&6; }
13477case $ac_cv_target in
13478*-*-*) ;;
13479*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13480esac
13481target=$ac_cv_target
13482ac_save_IFS=$IFS; IFS='-'
13483set x $ac_cv_target
13484shift
13485target_cpu=$1
13486target_vendor=$2
13487shift; shift
13488# Remember, the first character of IFS is used to create $*,
13489# except with old shells:
13490target_os=$*
13491IFS=$ac_save_IFS
13492case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13493
13494
13495# The aliases save the names the user supplied, while $host etc.
13496# will get canonicalized.
13497test -n "$target_alias" &&
13498  test "$program_prefix$program_suffix$program_transform_name" = \
13499    NONENONEs,x,x, &&
13500  program_prefix=${target_alias}-
13501
13502  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13503  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13504  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13505  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13506  # to use the configure naming style.
13507
13508
13509
13510
13511
13512  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13513  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13514  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13515  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13516  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13517  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13518
13519
13520
13521  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13522
13523  case "$build_os" in
13524    *linux*)
13525      VAR_OS=linux
13526      VAR_OS_API=posix
13527      VAR_OS_ENV=linux
13528      ;;
13529    *solaris*)
13530      VAR_OS=solaris
13531      VAR_OS_API=posix
13532      VAR_OS_ENV=solaris
13533      ;;
13534    *darwin*)
13535      VAR_OS=macosx
13536      VAR_OS_API=posix
13537      VAR_OS_ENV=macosx
13538      ;;
13539    *bsd*)
13540      VAR_OS=bsd
13541      VAR_OS_API=posix
13542      VAR_OS_ENV=bsd
13543      ;;
13544    *cygwin*)
13545      VAR_OS=windows
13546      VAR_OS_API=winapi
13547      VAR_OS_ENV=windows.cygwin
13548      ;;
13549    *mingw*)
13550      VAR_OS=windows
13551      VAR_OS_API=winapi
13552      VAR_OS_ENV=windows.msys
13553      ;;
13554    *aix*)
13555      VAR_OS=aix
13556      VAR_OS_API=posix
13557      VAR_OS_ENV=aix
13558      ;;
13559    *)
13560      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13561      ;;
13562  esac
13563
13564
13565  # First argument is the cpu name from the trip/quad
13566  case "$build_cpu" in
13567    x86_64)
13568      VAR_CPU=x86_64
13569      VAR_CPU_ARCH=x86
13570      VAR_CPU_BITS=64
13571      VAR_CPU_ENDIAN=little
13572      ;;
13573    i?86)
13574      VAR_CPU=x86
13575      VAR_CPU_ARCH=x86
13576      VAR_CPU_BITS=32
13577      VAR_CPU_ENDIAN=little
13578      ;;
13579    arm*)
13580      VAR_CPU=arm
13581      VAR_CPU_ARCH=arm
13582      VAR_CPU_BITS=32
13583      VAR_CPU_ENDIAN=little
13584      ;;
13585    powerpc)
13586      VAR_CPU=ppc
13587      VAR_CPU_ARCH=ppc
13588      VAR_CPU_BITS=32
13589      VAR_CPU_ENDIAN=big
13590      ;;
13591    powerpc64)
13592      VAR_CPU=ppc64
13593      VAR_CPU_ARCH=ppc
13594      VAR_CPU_BITS=64
13595      VAR_CPU_ENDIAN=big
13596      ;;
13597    powerpc64le)
13598      VAR_CPU=ppc64
13599      VAR_CPU_ARCH=ppc
13600      VAR_CPU_BITS=64
13601      VAR_CPU_ENDIAN=little
13602      ;;
13603    s390)
13604      VAR_CPU=s390
13605      VAR_CPU_ARCH=s390
13606      VAR_CPU_BITS=32
13607      VAR_CPU_ENDIAN=big
13608      ;;
13609    s390x)
13610      VAR_CPU=s390x
13611      VAR_CPU_ARCH=s390
13612      VAR_CPU_BITS=64
13613      VAR_CPU_ENDIAN=big
13614      ;;
13615    sparc)
13616      VAR_CPU=sparc
13617      VAR_CPU_ARCH=sparc
13618      VAR_CPU_BITS=32
13619      VAR_CPU_ENDIAN=big
13620      ;;
13621    sparcv9|sparc64)
13622      VAR_CPU=sparcv9
13623      VAR_CPU_ARCH=sparc
13624      VAR_CPU_BITS=64
13625      VAR_CPU_ENDIAN=big
13626      ;;
13627    *)
13628      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13629      ;;
13630  esac
13631
13632  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13633  OPENJDK_BUILD_OS="$VAR_OS"
13634  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13635  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13636  OPENJDK_BUILD_CPU="$VAR_CPU"
13637  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13638  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13639  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13640
13641
13642
13643
13644
13645
13646
13647  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13648$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13650$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13651
13652  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13653
13654  case "$host_os" in
13655    *linux*)
13656      VAR_OS=linux
13657      VAR_OS_API=posix
13658      VAR_OS_ENV=linux
13659      ;;
13660    *solaris*)
13661      VAR_OS=solaris
13662      VAR_OS_API=posix
13663      VAR_OS_ENV=solaris
13664      ;;
13665    *darwin*)
13666      VAR_OS=macosx
13667      VAR_OS_API=posix
13668      VAR_OS_ENV=macosx
13669      ;;
13670    *bsd*)
13671      VAR_OS=bsd
13672      VAR_OS_API=posix
13673      VAR_OS_ENV=bsd
13674      ;;
13675    *cygwin*)
13676      VAR_OS=windows
13677      VAR_OS_API=winapi
13678      VAR_OS_ENV=windows.cygwin
13679      ;;
13680    *mingw*)
13681      VAR_OS=windows
13682      VAR_OS_API=winapi
13683      VAR_OS_ENV=windows.msys
13684      ;;
13685    *aix*)
13686      VAR_OS=aix
13687      VAR_OS_API=posix
13688      VAR_OS_ENV=aix
13689      ;;
13690    *)
13691      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13692      ;;
13693  esac
13694
13695
13696  # First argument is the cpu name from the trip/quad
13697  case "$host_cpu" in
13698    x86_64)
13699      VAR_CPU=x86_64
13700      VAR_CPU_ARCH=x86
13701      VAR_CPU_BITS=64
13702      VAR_CPU_ENDIAN=little
13703      ;;
13704    i?86)
13705      VAR_CPU=x86
13706      VAR_CPU_ARCH=x86
13707      VAR_CPU_BITS=32
13708      VAR_CPU_ENDIAN=little
13709      ;;
13710    arm*)
13711      VAR_CPU=arm
13712      VAR_CPU_ARCH=arm
13713      VAR_CPU_BITS=32
13714      VAR_CPU_ENDIAN=little
13715      ;;
13716    powerpc)
13717      VAR_CPU=ppc
13718      VAR_CPU_ARCH=ppc
13719      VAR_CPU_BITS=32
13720      VAR_CPU_ENDIAN=big
13721      ;;
13722    powerpc64)
13723      VAR_CPU=ppc64
13724      VAR_CPU_ARCH=ppc
13725      VAR_CPU_BITS=64
13726      VAR_CPU_ENDIAN=big
13727      ;;
13728    powerpc64le)
13729      VAR_CPU=ppc64
13730      VAR_CPU_ARCH=ppc
13731      VAR_CPU_BITS=64
13732      VAR_CPU_ENDIAN=little
13733      ;;
13734    s390)
13735      VAR_CPU=s390
13736      VAR_CPU_ARCH=s390
13737      VAR_CPU_BITS=32
13738      VAR_CPU_ENDIAN=big
13739      ;;
13740    s390x)
13741      VAR_CPU=s390x
13742      VAR_CPU_ARCH=s390
13743      VAR_CPU_BITS=64
13744      VAR_CPU_ENDIAN=big
13745      ;;
13746    sparc)
13747      VAR_CPU=sparc
13748      VAR_CPU_ARCH=sparc
13749      VAR_CPU_BITS=32
13750      VAR_CPU_ENDIAN=big
13751      ;;
13752    sparcv9|sparc64)
13753      VAR_CPU=sparcv9
13754      VAR_CPU_ARCH=sparc
13755      VAR_CPU_BITS=64
13756      VAR_CPU_ENDIAN=big
13757      ;;
13758    *)
13759      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13760      ;;
13761  esac
13762
13763  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13764  OPENJDK_TARGET_OS="$VAR_OS"
13765  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13766  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13767  OPENJDK_TARGET_CPU="$VAR_CPU"
13768  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13769  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13770  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13771
13772
13773
13774
13775
13776
13777
13778  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13779$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13781$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13782
13783
13784
13785# Check whether --with-target-bits was given.
13786if test "${with_target_bits+set}" = set; then :
13787  withval=$with_target_bits;
13788fi
13789
13790
13791  # We have three types of compiles:
13792  # native  == normal compilation, target system == build system
13793  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13794  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13795  #
13796  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13797    # We're doing a proper cross-compilation
13798    COMPILE_TYPE="cross"
13799  else
13800    COMPILE_TYPE="native"
13801  fi
13802
13803  if test "x$with_target_bits" != x; then
13804    if test "x$COMPILE_TYPE" = "xcross"; then
13805      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13806    fi
13807
13808    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13809      # A reduced build is requested
13810      COMPILE_TYPE="reduced"
13811      OPENJDK_TARGET_CPU_BITS=32
13812      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13813        OPENJDK_TARGET_CPU=x86
13814      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13815        OPENJDK_TARGET_CPU=sparc
13816      else
13817        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13818      fi
13819    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13820      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
13821    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13822      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13823$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13824    else
13825      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13826    fi
13827  fi
13828
13829
13830  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13831$as_echo_n "checking compilation type... " >&6; }
13832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13833$as_echo "$COMPILE_TYPE" >&6; }
13834
13835
13836  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13837    REQUIRED_OS_NAME=SunOS
13838    REQUIRED_OS_VERSION=5.10
13839  fi
13840  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13841    REQUIRED_OS_NAME=Linux
13842    REQUIRED_OS_VERSION=2.6
13843  fi
13844  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13845    REQUIRED_OS_NAME=Windows
13846    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13847      REQUIRED_OS_VERSION=5.2
13848    else
13849      REQUIRED_OS_VERSION=5.1
13850    fi
13851  fi
13852  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13853    REQUIRED_OS_NAME=Darwin
13854    REQUIRED_OS_VERSION=11.2
13855  fi
13856
13857
13858
13859
13860
13861  # Also store the legacy naming of the cpu.
13862  # Ie i586 and amd64 instead of x86 and x86_64
13863  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13864  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13865    OPENJDK_TARGET_CPU_LEGACY="i586"
13866  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13867    # On all platforms except MacOSX replace x86_64 with amd64.
13868    OPENJDK_TARGET_CPU_LEGACY="amd64"
13869  fi
13870
13871
13872  # And the second legacy naming of the cpu.
13873  # Ie i386 and amd64 instead of x86 and x86_64.
13874  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13875  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13876    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13877  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13878    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13879  fi
13880
13881
13882  # This is the name of the cpu (but using i386 and amd64 instead of
13883  # x86 and x86_64, respectively), preceeded by a /, to be used when
13884  # locating libraries. On macosx, it's empty, though.
13885  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13886  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13887    OPENJDK_TARGET_CPU_LIBDIR=""
13888  fi
13889
13890
13891  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13892  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13893  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13894  OPENJDK_TARGET_CPU_ISADIR=""
13895  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13896    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13897      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13898    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13899      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13900    fi
13901  fi
13902
13903
13904  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13905  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13906  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13907    # On linux only, we replace x86 with i386.
13908    OPENJDK_TARGET_CPU_OSARCH="i386"
13909  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13910    # On all platforms except macosx, we replace x86_64 with amd64.
13911    OPENJDK_TARGET_CPU_OSARCH="amd64"
13912  fi
13913
13914
13915  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13916  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13917    OPENJDK_TARGET_CPU_JLI="i386"
13918  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13919    # On all platforms except macosx, we replace x86_64 with amd64.
13920    OPENJDK_TARGET_CPU_JLI="amd64"
13921  fi
13922  # Now setup the -D flags for building libjli.
13923  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13924  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13925    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13926      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13927    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13928      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13929    fi
13930  fi
13931
13932
13933  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13934  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13935    OPENJDK_TARGET_OS_API_DIR="unix"
13936  fi
13937  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13938    OPENJDK_TARGET_OS_API_DIR="windows"
13939  fi
13940
13941
13942  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13943      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13944  else
13945      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13946  fi
13947
13948
13949  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13950    A_LP64="LP64:="
13951    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13952    # unpack200.exe
13953    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13954      ADD_LP64="-D_LP64=1"
13955    fi
13956  fi
13957  LP64=$A_LP64
13958
13959
13960  if test "x$COMPILE_TYPE" = "xcross"; then
13961    # FIXME: ... or should this include reduced builds..?
13962    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13963  else
13964    DEFINE_CROSS_COMPILE_ARCH=""
13965  fi
13966
13967
13968  # ZERO_ARCHDEF is used to enable architecture-specific code
13969  case "${OPENJDK_TARGET_CPU}" in
13970    ppc*)    ZERO_ARCHDEF=PPC   ;;
13971    s390*)   ZERO_ARCHDEF=S390  ;;
13972    sparc*)  ZERO_ARCHDEF=SPARC ;;
13973    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13974    x86)     ZERO_ARCHDEF=IA32  ;;
13975    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13976  esac
13977
13978
13979
13980
13981# Continue setting up basic stuff. Most remaining code require fundamental tools.
13982
13983  # Save the current directory this script was started from
13984  CURDIR="$PWD"
13985
13986  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13987    PATH_SEP=";"
13988
13989  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13990  if test $SRC_ROOT_LENGTH -gt 100; then
13991    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13992  fi
13993
13994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13996$as_echo_n "checking cygwin release... " >&6; }
13997    CYGWIN_VERSION=`$UNAME -r`
13998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13999$as_echo "$CYGWIN_VERSION" >&6; }
14000    WINDOWS_ENV_VENDOR='cygwin'
14001    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14002
14003    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14004    if test "x$CYGWIN_VERSION_OK" = x; then
14005      { $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
14006$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;}
14007      as_fn_error $? "Cannot continue" "$LINENO" 5
14008    fi
14009    if test "x$CYGPATH" = x; then
14010      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14011    fi
14012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14013$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14014    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14015    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14016    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14017    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14019$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14020    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14021    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14022    if test "x$test_cygdrive_prefix" = x; then
14023      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14024    fi
14025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14027$as_echo_n "checking msys release... " >&6; }
14028    MSYS_VERSION=`$UNAME -r`
14029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14030$as_echo "$MSYS_VERSION" >&6; }
14031
14032    WINDOWS_ENV_VENDOR='msys'
14033    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14034
14035    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14036$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14037    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14038    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14039
14040  windows_path="$MSYS_ROOT_PATH"
14041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14042    unix_path=`$CYGPATH -u "$windows_path"`
14043    MSYS_ROOT_PATH="$unix_path"
14044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14046    MSYS_ROOT_PATH="$unix_path"
14047  fi
14048
14049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14050$as_echo "$MSYS_ROOT_PATH" >&6; }
14051    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14052  else
14053    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14054  fi
14055
14056  # Test if windows or unix (cygwin/msys) find is first in path.
14057  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14058$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14059  FIND_BINARY_OUTPUT=`find --version 2>&1`
14060  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14062$as_echo "unix style" >&6; }
14063  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14065$as_echo "Windows" >&6; }
14066    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14067$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14068    { $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
14069$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14070    as_fn_error $? "Cannot continue" "$LINENO" 5
14071  else
14072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14073$as_echo "unknown" >&6; }
14074    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14075$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14076  fi
14077
14078  else
14079    PATH_SEP=":"
14080  fi
14081
14082
14083  # We get the top-level directory from the supporting wrappers.
14084  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14085$as_echo_n "checking for top-level directory... " >&6; }
14086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14087$as_echo "$TOPDIR" >&6; }
14088
14089
14090  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14091
14092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14093
14094  # Input might be given as Windows format, start by converting to
14095  # unix format.
14096  path="$CURDIR"
14097  new_path=`$CYGPATH -u "$path"`
14098
14099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14102  # "foo.exe" is OK but "foo" is an error.
14103  #
14104  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14105  # It is also a way to make sure we got the proper file name for the real test later on.
14106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14107  if test "x$test_shortpath" = x; then
14108    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14109$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14110    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14111  fi
14112
14113  # Call helper function which possibly converts this using DOS-style short mode.
14114  # If so, the updated path is stored in $new_path.
14115
14116  input_path="$new_path"
14117  # Check if we need to convert this using DOS-style short mode. If the path
14118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14119  # take no chances and rewrite it.
14120  # Note: m4 eats our [], so we need to use [ and ] instead.
14121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14122  if test "x$has_forbidden_chars" != x; then
14123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14127      # Going to short mode and back again did indeed matter. Since short mode is
14128      # case insensitive, let's make it lowercase to improve readability.
14129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14130      # Now convert it back to Unix-stile (cygpath)
14131      input_path=`$CYGPATH -u "$shortmode_path"`
14132      new_path="$input_path"
14133    fi
14134  fi
14135
14136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14137  if test "x$test_cygdrive_prefix" = x; then
14138    # As a simple fix, exclude /usr/bin since it's not a real path.
14139    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14141      # a path prefixed by /cygdrive for fixpath to work.
14142      new_path="$CYGWIN_ROOT_PATH$input_path"
14143    fi
14144  fi
14145
14146
14147  if test "x$path" != "x$new_path"; then
14148    CURDIR="$new_path"
14149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14150$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14151  fi
14152
14153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14154
14155  path="$CURDIR"
14156  has_colon=`$ECHO $path | $GREP ^.:`
14157  new_path="$path"
14158  if test "x$has_colon" = x; then
14159    # Not in mixed or Windows style, start by that.
14160    new_path=`cmd //c echo $path`
14161  fi
14162
14163
14164  input_path="$new_path"
14165  # Check if we need to convert this using DOS-style short mode. If the path
14166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14167  # take no chances and rewrite it.
14168  # Note: m4 eats our [], so we need to use [ and ] instead.
14169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14170  if test "x$has_forbidden_chars" != x; then
14171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14173  fi
14174
14175
14176  windows_path="$new_path"
14177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14178    unix_path=`$CYGPATH -u "$windows_path"`
14179    new_path="$unix_path"
14180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14182    new_path="$unix_path"
14183  fi
14184
14185  if test "x$path" != "x$new_path"; then
14186    CURDIR="$new_path"
14187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14188$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14189  fi
14190
14191  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14192  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14193
14194  else
14195    # We're on a posix platform. Hooray! :)
14196    path="$CURDIR"
14197    has_space=`$ECHO "$path" | $GREP " "`
14198    if test "x$has_space" != x; then
14199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14200$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14201      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14202    fi
14203
14204    # Use eval to expand a potential ~
14205    eval path="$path"
14206    if test ! -f "$path" && test ! -d "$path"; then
14207      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14208    fi
14209
14210    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14211  fi
14212
14213
14214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14215
14216  # Input might be given as Windows format, start by converting to
14217  # unix format.
14218  path="$TOPDIR"
14219  new_path=`$CYGPATH -u "$path"`
14220
14221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14224  # "foo.exe" is OK but "foo" is an error.
14225  #
14226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14227  # It is also a way to make sure we got the proper file name for the real test later on.
14228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14229  if test "x$test_shortpath" = x; then
14230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14231$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14232    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14233  fi
14234
14235  # Call helper function which possibly converts this using DOS-style short mode.
14236  # If so, the updated path is stored in $new_path.
14237
14238  input_path="$new_path"
14239  # Check if we need to convert this using DOS-style short mode. If the path
14240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14241  # take no chances and rewrite it.
14242  # Note: m4 eats our [], so we need to use [ and ] instead.
14243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14244  if test "x$has_forbidden_chars" != x; then
14245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14249      # Going to short mode and back again did indeed matter. Since short mode is
14250      # case insensitive, let's make it lowercase to improve readability.
14251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14252      # Now convert it back to Unix-stile (cygpath)
14253      input_path=`$CYGPATH -u "$shortmode_path"`
14254      new_path="$input_path"
14255    fi
14256  fi
14257
14258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14259  if test "x$test_cygdrive_prefix" = x; then
14260    # As a simple fix, exclude /usr/bin since it's not a real path.
14261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14263      # a path prefixed by /cygdrive for fixpath to work.
14264      new_path="$CYGWIN_ROOT_PATH$input_path"
14265    fi
14266  fi
14267
14268
14269  if test "x$path" != "x$new_path"; then
14270    TOPDIR="$new_path"
14271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14272$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14273  fi
14274
14275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14276
14277  path="$TOPDIR"
14278  has_colon=`$ECHO $path | $GREP ^.:`
14279  new_path="$path"
14280  if test "x$has_colon" = x; then
14281    # Not in mixed or Windows style, start by that.
14282    new_path=`cmd //c echo $path`
14283  fi
14284
14285
14286  input_path="$new_path"
14287  # Check if we need to convert this using DOS-style short mode. If the path
14288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14289  # take no chances and rewrite it.
14290  # Note: m4 eats our [], so we need to use [ and ] instead.
14291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14292  if test "x$has_forbidden_chars" != x; then
14293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14295  fi
14296
14297
14298  windows_path="$new_path"
14299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14300    unix_path=`$CYGPATH -u "$windows_path"`
14301    new_path="$unix_path"
14302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14304    new_path="$unix_path"
14305  fi
14306
14307  if test "x$path" != "x$new_path"; then
14308    TOPDIR="$new_path"
14309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14310$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14311  fi
14312
14313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14315
14316  else
14317    # We're on a posix platform. Hooray! :)
14318    path="$TOPDIR"
14319    has_space=`$ECHO "$path" | $GREP " "`
14320    if test "x$has_space" != x; then
14321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14322$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14323      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14324    fi
14325
14326    # Use eval to expand a potential ~
14327    eval path="$path"
14328    if test ! -f "$path" && test ! -d "$path"; then
14329      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14330    fi
14331
14332    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14333  fi
14334
14335  # SRC_ROOT is a traditional alias for TOPDIR.
14336  SRC_ROOT=$TOPDIR
14337
14338  # Locate the directory of this script.
14339  AUTOCONF_DIR=$TOPDIR/common/autoconf
14340
14341
14342  # Setup default logging of stdout and stderr to build.log in the output root.
14343  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14344  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14345  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14346
14347
14348
14349
14350
14351# Check if it's a pure open build or if custom sources are to be used.
14352
14353  # Check whether --enable-openjdk-only was given.
14354if test "${enable_openjdk_only+set}" = set; then :
14355  enableval=$enable_openjdk_only;
14356else
14357  enable_openjdk_only="no"
14358fi
14359
14360
14361  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14362$as_echo_n "checking for presence of closed sources... " >&6; }
14363  if test -d "$SRC_ROOT/jdk/src/closed"; then
14364    CLOSED_SOURCE_PRESENT=yes
14365  else
14366    CLOSED_SOURCE_PRESENT=no
14367  fi
14368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14369$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14370
14371  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14372$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14373  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14375$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14376
14377  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14378    OPENJDK=true
14379    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14380      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14381$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14382    fi
14383  else
14384    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14385      OPENJDK=true
14386    else
14387      OPENJDK=false
14388    fi
14389  fi
14390
14391  if test "x$OPENJDK" = "xtrue"; then
14392    SET_OPENJDK="OPENJDK=true"
14393  fi
14394
14395
14396
14397  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14398  # the IncludeCustomExtension macro.
14399
14400
14401# Check whether --with-custom-make-dir was given.
14402if test "${with_custom_make_dir+set}" = set; then :
14403  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
14404$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14405fi
14406
14407
14408
14409
14410# These are needed to be able to create a configuration name (and thus the output directory)
14411
14412  ###############################################################################
14413  #
14414  # Check which variant of the JDK that we want to build.
14415  # Currently we have:
14416  #    normal:   standard edition
14417  # but the custom make system may add other variants
14418  #
14419  # Effectively the JDK variant gives a name to a specific set of
14420  # modules to compile into the JDK. In the future, these modules
14421  # might even be Jigsaw modules.
14422  #
14423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14424$as_echo_n "checking which variant of the JDK to build... " >&6; }
14425
14426# Check whether --with-jdk-variant was given.
14427if test "${with_jdk_variant+set}" = set; then :
14428  withval=$with_jdk_variant;
14429fi
14430
14431
14432  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14433    JDK_VARIANT="normal"
14434  else
14435    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14436  fi
14437
14438
14439
14440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14441$as_echo "$JDK_VARIANT" >&6; }
14442
14443
14444###############################################################################
14445#
14446# Check which interpreter of the JVM we want to build.
14447# Currently we have:
14448#    template: Template interpreter (the default)
14449#    cpp     : C++ interpreter
14450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14451$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14452
14453# Check whether --with-jvm-interpreter was given.
14454if test "${with_jvm_interpreter+set}" = set; then :
14455  withval=$with_jvm_interpreter;
14456fi
14457
14458
14459if test "x$with_jvm_interpreter" = x; then
14460     with_jvm_interpreter="template"
14461fi
14462
14463JVM_INTERPRETER="$with_jvm_interpreter"
14464
14465if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14466   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14467fi
14468
14469
14470
14471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14472$as_echo "$with_jvm_interpreter" >&6; }
14473
14474
14475
14476  ###############################################################################
14477  #
14478  # Check which variants of the JVM that we want to build.
14479  # Currently we have:
14480  #    server: normal interpreter and a tiered C1/C2 compiler
14481  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14482  #    minimal1: reduced form of client with optional VM services and features stripped out
14483  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14484  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14485  #    zero: no machine code interpreter, no compiler
14486  #    zeroshark: zero interpreter and shark/llvm compiler backend
14487#    core: interpreter only, no compiler (only works on some platforms)
14488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14489$as_echo_n "checking which variants of the JVM to build... " >&6; }
14490
14491# Check whether --with-jvm-variants was given.
14492if test "${with_jvm_variants+set}" = set; then :
14493  withval=$with_jvm_variants;
14494fi
14495
14496
14497  if test "x$with_jvm_variants" = x; then
14498    with_jvm_variants="server"
14499  fi
14500
14501  JVM_VARIANTS=",$with_jvm_variants,"
14502  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,//'`
14503
14504  if test "x$TEST_VARIANTS" != "x,"; then
14505     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14506  fi
14507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14508$as_echo "$with_jvm_variants" >&6; }
14509
14510  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14511  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14512  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14513  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14514  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14515  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14516  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14517
14518  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14519    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14520      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14521    fi
14522  fi
14523  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14524    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14525      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14526    fi
14527  fi
14528  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14529    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14530      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14531    fi
14532  fi
14533
14534  # Replace the commas with AND for use in the build directory name.
14535  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14536  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/'`
14537  if test "x$COUNT_VARIANTS" != "x,1"; then
14538    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14539  else
14540    BUILDING_MULTIPLE_JVM_VARIANTS=no
14541  fi
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552  INCLUDE_SA=true
14553  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14554    INCLUDE_SA=false
14555  fi
14556  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14557    INCLUDE_SA=false
14558  fi
14559  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14560    INCLUDE_SA=false
14561  fi
14562
14563
14564  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14565    MACOSX_UNIVERSAL="true"
14566  fi
14567
14568
14569
14570
14571  ###############################################################################
14572  #
14573  # Set the debug level
14574  #    release: no debug information, all optimizations, no asserts.
14575  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14576  #    fastdebug: debug information (-g), all optimizations, all asserts
14577  #    slowdebug: debug information (-g), no optimizations, all asserts
14578  #
14579  DEBUG_LEVEL="release"
14580  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14581$as_echo_n "checking which debug level to use... " >&6; }
14582  # Check whether --enable-debug was given.
14583if test "${enable_debug+set}" = set; then :
14584  enableval=$enable_debug;
14585        ENABLE_DEBUG="${enableval}"
14586        DEBUG_LEVEL="fastdebug"
14587
14588else
14589  ENABLE_DEBUG="no"
14590fi
14591
14592
14593
14594# Check whether --with-debug-level was given.
14595if test "${with_debug_level+set}" = set; then :
14596  withval=$with_debug_level;
14597        DEBUG_LEVEL="${withval}"
14598        if test "x$ENABLE_DEBUG" = xyes; then
14599          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14600        fi
14601
14602fi
14603
14604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14605$as_echo "$DEBUG_LEVEL" >&6; }
14606
14607  if test "x$DEBUG_LEVEL" != xrelease && \
14608      test "x$DEBUG_LEVEL" != xoptimized && \
14609      test "x$DEBUG_LEVEL" != xfastdebug && \
14610      test "x$DEBUG_LEVEL" != xslowdebug; then
14611    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14612  fi
14613
14614
14615  ###############################################################################
14616  #
14617  # Setup legacy vars/targets and new vars to deal with different debug levels.
14618  #
14619
14620  case $DEBUG_LEVEL in
14621    release )
14622      VARIANT="OPT"
14623      FASTDEBUG="false"
14624      DEBUG_CLASSFILES="false"
14625      BUILD_VARIANT_RELEASE=""
14626      HOTSPOT_DEBUG_LEVEL="product"
14627      HOTSPOT_EXPORT="product"
14628      ;;
14629    fastdebug )
14630      VARIANT="DBG"
14631      FASTDEBUG="true"
14632      DEBUG_CLASSFILES="true"
14633      BUILD_VARIANT_RELEASE="-fastdebug"
14634      HOTSPOT_DEBUG_LEVEL="fastdebug"
14635      HOTSPOT_EXPORT="fastdebug"
14636      ;;
14637    slowdebug )
14638      VARIANT="DBG"
14639      FASTDEBUG="false"
14640      DEBUG_CLASSFILES="true"
14641      BUILD_VARIANT_RELEASE="-debug"
14642      HOTSPOT_DEBUG_LEVEL="jvmg"
14643      HOTSPOT_EXPORT="debug"
14644      ;;
14645    optimized )
14646      VARIANT="OPT"
14647      FASTDEBUG="false"
14648      DEBUG_CLASSFILES="false"
14649      BUILD_VARIANT_RELEASE="-optimized"
14650      HOTSPOT_DEBUG_LEVEL="optimized"
14651      HOTSPOT_EXPORT="optimized"
14652      ;;
14653  esac
14654
14655  # The debug level 'optimized' is a little special because it is currently only
14656  # applicable to the HotSpot build where it means to build a completely
14657  # optimized version of the VM without any debugging code (like for the
14658  # 'release' debug level which is called 'product' in the HotSpot build) but
14659  # with the exception that it can contain additional code which is otherwise
14660  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14661  # test new and/or experimental features which are not intended for customer
14662  # shipment. Because these new features need to be tested and benchmarked in
14663  # real world scenarios, we want to build the containing JDK at the 'release'
14664  # debug level.
14665  if test "x$DEBUG_LEVEL" = xoptimized; then
14666    DEBUG_LEVEL="release"
14667  fi
14668
14669  #####
14670  # Generate the legacy makefile targets for hotspot.
14671  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14672  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14673  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14674  # But until then ...
14675  HOTSPOT_TARGET=""
14676
14677  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14678    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14679  fi
14680
14681  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14682    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14683  fi
14684
14685  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14686    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14687  fi
14688
14689  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14690    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14691  fi
14692
14693  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14694    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14695  fi
14696
14697  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14698    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14699  fi
14700
14701  if test "x$JVM_VARIANT_CORE" = xtrue; then
14702    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14703  fi
14704
14705  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14706
14707  # On Macosx universal binaries are produced, but they only contain
14708  # 64 bit intel. This invalidates control of which jvms are built
14709  # from configure, but only server is valid anyway. Fix this
14710  # when hotspot makefiles are rewritten.
14711  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14712    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14713  fi
14714
14715  #####
14716
14717
14718
14719
14720
14721
14722
14723
14724# With basic setup done, call the custom early hook.
14725
14726
14727# Check if we have devkits, extra paths or sysroot set.
14728
14729
14730# Check whether --with-devkit was given.
14731if test "${with_devkit+set}" = set; then :
14732  withval=$with_devkit;
14733
14734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14735
14736  # Input might be given as Windows format, start by converting to
14737  # unix format.
14738  path="$with_devkit"
14739  new_path=`$CYGPATH -u "$path"`
14740
14741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14744  # "foo.exe" is OK but "foo" is an error.
14745  #
14746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14747  # It is also a way to make sure we got the proper file name for the real test later on.
14748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14749  if test "x$test_shortpath" = x; then
14750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14751$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14752    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14753  fi
14754
14755  # Call helper function which possibly converts this using DOS-style short mode.
14756  # If so, the updated path is stored in $new_path.
14757
14758  input_path="$new_path"
14759  # Check if we need to convert this using DOS-style short mode. If the path
14760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14761  # take no chances and rewrite it.
14762  # Note: m4 eats our [], so we need to use [ and ] instead.
14763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14764  if test "x$has_forbidden_chars" != x; then
14765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14769      # Going to short mode and back again did indeed matter. Since short mode is
14770      # case insensitive, let's make it lowercase to improve readability.
14771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14772      # Now convert it back to Unix-stile (cygpath)
14773      input_path=`$CYGPATH -u "$shortmode_path"`
14774      new_path="$input_path"
14775    fi
14776  fi
14777
14778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14779  if test "x$test_cygdrive_prefix" = x; then
14780    # As a simple fix, exclude /usr/bin since it's not a real path.
14781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14783      # a path prefixed by /cygdrive for fixpath to work.
14784      new_path="$CYGWIN_ROOT_PATH$input_path"
14785    fi
14786  fi
14787
14788
14789  if test "x$path" != "x$new_path"; then
14790    with_devkit="$new_path"
14791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14792$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14793  fi
14794
14795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14796
14797  path="$with_devkit"
14798  has_colon=`$ECHO $path | $GREP ^.:`
14799  new_path="$path"
14800  if test "x$has_colon" = x; then
14801    # Not in mixed or Windows style, start by that.
14802    new_path=`cmd //c echo $path`
14803  fi
14804
14805
14806  input_path="$new_path"
14807  # Check if we need to convert this using DOS-style short mode. If the path
14808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14809  # take no chances and rewrite it.
14810  # Note: m4 eats our [], so we need to use [ and ] instead.
14811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14812  if test "x$has_forbidden_chars" != x; then
14813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14815  fi
14816
14817
14818  windows_path="$new_path"
14819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14820    unix_path=`$CYGPATH -u "$windows_path"`
14821    new_path="$unix_path"
14822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14824    new_path="$unix_path"
14825  fi
14826
14827  if test "x$path" != "x$new_path"; then
14828    with_devkit="$new_path"
14829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14830$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14831  fi
14832
14833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14835
14836  else
14837    # We're on a posix platform. Hooray! :)
14838    path="$with_devkit"
14839    has_space=`$ECHO "$path" | $GREP " "`
14840    if test "x$has_space" != x; then
14841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14842$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14843      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14844    fi
14845
14846    # Use eval to expand a potential ~
14847    eval path="$path"
14848    if test ! -f "$path" && test ! -d "$path"; then
14849      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14850    fi
14851
14852    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14853  fi
14854
14855        DEVKIT_ROOT="$with_devkit"
14856        # Check for a meta data info file in the root of the devkit
14857        if test -f "$DEVKIT_ROOT/devkit.info"; then
14858          # This potentially sets the following:
14859          # DEVKIT_NAME: A descriptive name of the devkit
14860          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14861          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14862          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14863          . $DEVKIT_ROOT/devkit.info
14864        fi
14865
14866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14867$as_echo_n "checking for devkit... " >&6; }
14868        if test "x$DEVKIT_NAME" != x; then
14869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14870$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14871        else
14872          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14873$as_echo "$DEVKIT_ROOT" >&6; }
14874        fi
14875
14876        if test "x$DEVKIT_EXTRA_PATH" != x; then
14877
14878  if test "x$DEVKIT_EXTRA_PATH" != x; then
14879    if test "x$EXTRA_PATH" = x; then
14880      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14881    else
14882      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14883    fi
14884  fi
14885
14886        fi
14887
14888        # Fallback default of just /bin if DEVKIT_PATH is not defined
14889        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14890          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14891        fi
14892
14893  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14894    if test "x$TOOLCHAIN_PATH" = x; then
14895      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14896    else
14897      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14898    fi
14899  fi
14900
14901
14902        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14903        # places for backwards compatiblity.
14904        if test "x$DEVKIT_SYSROOT" != x; then
14905          SYSROOT="$DEVKIT_SYSROOT"
14906        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14907          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14908        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14909          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14910        fi
14911
14912
14913fi
14914
14915
14916  # You can force the sysroot if the sysroot encoded into the compiler tools
14917  # is not correct.
14918
14919# Check whether --with-sys-root was given.
14920if test "${with_sys_root+set}" = set; then :
14921  withval=$with_sys_root; SYSROOT=$with_sys_root
14922
14923fi
14924
14925
14926
14927# Check whether --with-sysroot was given.
14928if test "${with_sysroot+set}" = set; then :
14929  withval=$with_sysroot; SYSROOT=$with_sysroot
14930
14931fi
14932
14933
14934
14935# Check whether --with-tools-dir was given.
14936if test "${with_tools_dir+set}" = set; then :
14937  withval=$with_tools_dir;
14938  if test "x$with_tools_dir" != x; then
14939    if test "x$TOOLCHAIN_PATH" = x; then
14940      TOOLCHAIN_PATH="$with_tools_dir"
14941    else
14942      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14943    fi
14944  fi
14945
14946
14947fi
14948
14949
14950
14951# Check whether --with-toolchain-path was given.
14952if test "${with_toolchain_path+set}" = set; then :
14953  withval=$with_toolchain_path;
14954  if test "x$with_toolchain_path" != x; then
14955    if test "x$TOOLCHAIN_PATH" = x; then
14956      TOOLCHAIN_PATH="$with_toolchain_path"
14957    else
14958      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14959    fi
14960  fi
14961
14962
14963fi
14964
14965
14966
14967# Check whether --with-extra-path was given.
14968if test "${with_extra_path+set}" = set; then :
14969  withval=$with_extra_path;
14970  if test "x$with_extra_path" != x; then
14971    if test "x$EXTRA_PATH" = x; then
14972      EXTRA_PATH="$with_extra_path"
14973    else
14974      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14975    fi
14976  fi
14977
14978
14979fi
14980
14981
14982  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14983    # detect if Xcode is installed by running xcodebuild -version
14984    # if no Xcode installed, xcodebuild exits with 1
14985    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14986    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14987      # We need to use xcodebuild in the toolchain dir provided by the user, this will
14988      # fall back on the stub binary in /usr/bin/xcodebuild
14989      # Extract the first word of "xcodebuild", so it can be a program name with args.
14990set dummy xcodebuild; ac_word=$2
14991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14992$as_echo_n "checking for $ac_word... " >&6; }
14993if ${ac_cv_path_XCODEBUILD+:} false; then :
14994  $as_echo_n "(cached) " >&6
14995else
14996  case $XCODEBUILD in
14997  [\\/]* | ?:[\\/]*)
14998  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
14999  ;;
15000  *)
15001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15002for as_dir in $TOOLCHAIN_PATH
15003do
15004  IFS=$as_save_IFS
15005  test -z "$as_dir" && as_dir=.
15006    for ac_exec_ext in '' $ac_executable_extensions; do
15007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15008    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15010    break 2
15011  fi
15012done
15013  done
15014IFS=$as_save_IFS
15015
15016  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15017  ;;
15018esac
15019fi
15020XCODEBUILD=$ac_cv_path_XCODEBUILD
15021if test -n "$XCODEBUILD"; then
15022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15023$as_echo "$XCODEBUILD" >&6; }
15024else
15025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15026$as_echo "no" >&6; }
15027fi
15028
15029
15030    else
15031      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15032      # when only the command line tools are installed there are no SDKs, so headers
15033      # are copied into the system frameworks
15034      XCODEBUILD=
15035
15036    fi
15037
15038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15039$as_echo_n "checking for sdk name... " >&6; }
15040
15041# Check whether --with-sdk-name was given.
15042if test "${with_sdk_name+set}" = set; then :
15043  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15044
15045fi
15046
15047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15048$as_echo "$SDKNAME" >&6; }
15049
15050    # if toolchain path is specified then don't rely on system headers, they may not compile
15051    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15052    test -z "$TOOLCHAIN_PATH" && \
15053      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15054
15055    if test -z "$SYSROOT"; then
15056      if test -n "$XCODEBUILD"; then
15057        # if we don't have system headers, use default SDK name (last resort)
15058        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15059          SDKNAME=${SDKNAME:-macosx}
15060        fi
15061
15062        if test -n "$SDKNAME"; then
15063          # Call xcodebuild to determine SYSROOT
15064          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15065        fi
15066      else
15067        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15068          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
15069        fi
15070      fi
15071    else
15072      # warn user if --with-sdk-name was also set
15073      if test -n "$with_sdk_name"; then
15074        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15075$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15076      fi
15077    fi
15078
15079    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15080      # If no system framework headers, then SYSROOT must be set, or we won't build
15081      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
15082    fi
15083
15084    # Perform a basic sanity test
15085    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15086      if test -z "$SYSROOT"; then
15087        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
15088      else
15089        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15090      fi
15091    fi
15092
15093    # set SDKROOT too, Xcode tools will pick it up
15094    SDKROOT=$SYSROOT
15095
15096  fi
15097
15098  # Prepend the extra path to the global path
15099
15100  if test "x$EXTRA_PATH" != x; then
15101    if test "x$PATH" = x; then
15102      PATH="$EXTRA_PATH"
15103    else
15104      PATH="$EXTRA_PATH:$PATH"
15105    fi
15106  fi
15107
15108
15109  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15110    # Add extra search paths on solaris for utilities like ar and as etc...
15111    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15112  fi
15113
15114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15115$as_echo_n "checking for sysroot... " >&6; }
15116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15117$as_echo "$SYSROOT" >&6; }
15118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15119$as_echo_n "checking for toolchain path... " >&6; }
15120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15121$as_echo "$TOOLCHAIN_PATH" >&6; }
15122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15123$as_echo_n "checking for extra path... " >&6; }
15124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15125$as_echo "$EXTRA_PATH" >&6; }
15126
15127
15128# To properly create a configuration name, we need to have the OpenJDK target
15129# and options (variants and debug level) parsed.
15130
15131
15132
15133# Check whether --with-conf-name was given.
15134if test "${with_conf_name+set}" = set; then :
15135  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15136fi
15137
15138
15139  # Test from where we are running configure, in or outside of src root.
15140  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15141$as_echo_n "checking where to store configuration... " >&6; }
15142  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15143      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15144      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15145    # We are running configure from the src root.
15146    # Create a default ./build/target-variant-debuglevel output root.
15147    if test "x${CONF_NAME}" = x; then
15148      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15149$as_echo "in default location" >&6; }
15150      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15151    else
15152      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15153$as_echo "in build directory with custom name" >&6; }
15154    fi
15155    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15156    $MKDIR -p "$OUTPUT_ROOT"
15157    if test ! -d "$OUTPUT_ROOT"; then
15158      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15159    fi
15160  else
15161    # We are running configure from outside of the src dir.
15162    # Then use the current directory as output dir!
15163    # If configuration is situated in normal build directory, just use the build
15164    # directory name as configuration name, otherwise use the complete path.
15165    if test "x${CONF_NAME}" = x; then
15166      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15167    fi
15168    OUTPUT_ROOT="$CURDIR"
15169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15170$as_echo "in current directory" >&6; }
15171
15172    # WARNING: This might be a bad thing to do. You need to be sure you want to
15173    # have a configuration in this directory. Do some sanity checks!
15174
15175    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15176      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15177      # other files
15178      files_present=`$LS $OUTPUT_ROOT`
15179      # Configure has already touched config.log and confdefs.h in the current dir when this check
15180      # is performed.
15181      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15182      | $TR -d '\n'`
15183      if test "x$filtered_files" != x; then
15184        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15185$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15186        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15187$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15188        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15189$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15190        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15191$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15192        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15193$as_echo "$as_me: seriously mess up just about everything." >&6;}
15194        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15195$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15196        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15197$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15198        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15199      fi
15200    fi
15201  fi
15202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15203$as_echo_n "checking what configuration name to use... " >&6; }
15204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15205$as_echo "$CONF_NAME" >&6; }
15206
15207
15208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15209
15210  # Input might be given as Windows format, start by converting to
15211  # unix format.
15212  path="$OUTPUT_ROOT"
15213  new_path=`$CYGPATH -u "$path"`
15214
15215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15218  # "foo.exe" is OK but "foo" is an error.
15219  #
15220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15221  # It is also a way to make sure we got the proper file name for the real test later on.
15222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15223  if test "x$test_shortpath" = x; then
15224    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15225$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15226    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15227  fi
15228
15229  # Call helper function which possibly converts this using DOS-style short mode.
15230  # If so, the updated path is stored in $new_path.
15231
15232  input_path="$new_path"
15233  # Check if we need to convert this using DOS-style short mode. If the path
15234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15235  # take no chances and rewrite it.
15236  # Note: m4 eats our [], so we need to use [ and ] instead.
15237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15238  if test "x$has_forbidden_chars" != x; then
15239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15243      # Going to short mode and back again did indeed matter. Since short mode is
15244      # case insensitive, let's make it lowercase to improve readability.
15245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15246      # Now convert it back to Unix-stile (cygpath)
15247      input_path=`$CYGPATH -u "$shortmode_path"`
15248      new_path="$input_path"
15249    fi
15250  fi
15251
15252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15253  if test "x$test_cygdrive_prefix" = x; then
15254    # As a simple fix, exclude /usr/bin since it's not a real path.
15255    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15257      # a path prefixed by /cygdrive for fixpath to work.
15258      new_path="$CYGWIN_ROOT_PATH$input_path"
15259    fi
15260  fi
15261
15262
15263  if test "x$path" != "x$new_path"; then
15264    OUTPUT_ROOT="$new_path"
15265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15266$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15267  fi
15268
15269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15270
15271  path="$OUTPUT_ROOT"
15272  has_colon=`$ECHO $path | $GREP ^.:`
15273  new_path="$path"
15274  if test "x$has_colon" = x; then
15275    # Not in mixed or Windows style, start by that.
15276    new_path=`cmd //c echo $path`
15277  fi
15278
15279
15280  input_path="$new_path"
15281  # Check if we need to convert this using DOS-style short mode. If the path
15282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15283  # take no chances and rewrite it.
15284  # Note: m4 eats our [], so we need to use [ and ] instead.
15285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15286  if test "x$has_forbidden_chars" != x; then
15287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15289  fi
15290
15291
15292  windows_path="$new_path"
15293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15294    unix_path=`$CYGPATH -u "$windows_path"`
15295    new_path="$unix_path"
15296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15298    new_path="$unix_path"
15299  fi
15300
15301  if test "x$path" != "x$new_path"; then
15302    OUTPUT_ROOT="$new_path"
15303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15304$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15305  fi
15306
15307  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15308  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15309
15310  else
15311    # We're on a posix platform. Hooray! :)
15312    path="$OUTPUT_ROOT"
15313    has_space=`$ECHO "$path" | $GREP " "`
15314    if test "x$has_space" != x; then
15315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15316$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15317      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15318    fi
15319
15320    # Use eval to expand a potential ~
15321    eval path="$path"
15322    if test ! -f "$path" && test ! -d "$path"; then
15323      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15324    fi
15325
15326    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15327  fi
15328
15329
15330  SPEC=$OUTPUT_ROOT/spec.gmk
15331
15332  CONF_NAME=$CONF_NAME
15333
15334  OUTPUT_ROOT=$OUTPUT_ROOT
15335
15336
15337  # Most of the probed defines are put into config.h
15338  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15339
15340  # The spec.gmk file contains all variables for the make system.
15341  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15342
15343  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15344  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15345
15346  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15347  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15348
15349  # The compare.sh is used to compare the build output to other builds.
15350  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15351
15352  # Spec.sh is currently used by compare-objects.sh
15353  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15354
15355  # The generated Makefile knows where the spec.gmk is and where the source is.
15356  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15357  # which will look for generated configurations
15358  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15359
15360
15361
15362# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15363
15364  for ac_prog in apt-get yum port pkgutil pkgadd
15365do
15366  # Extract the first word of "$ac_prog", so it can be a program name with args.
15367set dummy $ac_prog; ac_word=$2
15368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15369$as_echo_n "checking for $ac_word... " >&6; }
15370if ${ac_cv_prog_PKGHANDLER+:} false; then :
15371  $as_echo_n "(cached) " >&6
15372else
15373  if test -n "$PKGHANDLER"; then
15374  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15375else
15376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15377for as_dir in $PATH
15378do
15379  IFS=$as_save_IFS
15380  test -z "$as_dir" && as_dir=.
15381    for ac_exec_ext in '' $ac_executable_extensions; do
15382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15383    ac_cv_prog_PKGHANDLER="$ac_prog"
15384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15385    break 2
15386  fi
15387done
15388  done
15389IFS=$as_save_IFS
15390
15391fi
15392fi
15393PKGHANDLER=$ac_cv_prog_PKGHANDLER
15394if test -n "$PKGHANDLER"; then
15395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15396$as_echo "$PKGHANDLER" >&6; }
15397else
15398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15399$as_echo "no" >&6; }
15400fi
15401
15402
15403  test -n "$PKGHANDLER" && break
15404done
15405
15406
15407
15408# Setup tools that requires more complex handling, or that is not needed by the configure script.
15409
15410
15411  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15412  if test "x$MAKE" != x; then
15413    # User has supplied a make, test it.
15414    if test ! -f "$MAKE"; then
15415      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15416    fi
15417
15418  MAKE_CANDIDATE=""$MAKE""
15419  DESCRIPTION="user supplied MAKE=$MAKE"
15420  if test "x$MAKE_CANDIDATE" != x; then
15421    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15422$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15423    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15424    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15425    if test "x$IS_GNU_MAKE" = x; then
15426      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15427$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15428    else
15429      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15430      if test "x$IS_MODERN_MAKE" = x; then
15431        { $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
15432$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;}
15433      else
15434        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15435          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15436            MAKE_EXPECTED_ENV='cygwin'
15437          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15438            MAKE_EXPECTED_ENV='msys'
15439          else
15440            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15441          fi
15442          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15443          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15444        else
15445          # Not relevant for non-Windows
15446          IS_MAKE_CORRECT_ENV=true
15447        fi
15448        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15449          { $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
15450$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;}
15451        else
15452          FOUND_MAKE=$MAKE_CANDIDATE
15453
15454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15455
15456  # First separate the path from the arguments. This will split at the first
15457  # space.
15458  complete="$FOUND_MAKE"
15459  path="${complete%% *}"
15460  tmp="$complete EOL"
15461  arguments="${tmp#* }"
15462
15463  # Input might be given as Windows format, start by converting to
15464  # unix format.
15465  new_path=`$CYGPATH -u "$path"`
15466
15467  # Now try to locate executable using which
15468  new_path=`$WHICH "$new_path" 2> /dev/null`
15469  # bat and cmd files are not always considered executable in cygwin causing which
15470  # to not find them
15471  if test "x$new_path" = x \
15472      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15473      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15474    new_path=`$CYGPATH -u "$path"`
15475  fi
15476  if test "x$new_path" = x; then
15477    # Oops. Which didn't find the executable.
15478    # The splitting of arguments from the executable at a space might have been incorrect,
15479    # since paths with space are more likely in Windows. Give it another try with the whole
15480    # argument.
15481    path="$complete"
15482    arguments="EOL"
15483    new_path=`$CYGPATH -u "$path"`
15484    new_path=`$WHICH "$new_path" 2> /dev/null`
15485    # bat and cmd files are not always considered executable in cygwin causing which
15486    # to not find them
15487    if test "x$new_path" = x \
15488        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15489        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15490      new_path=`$CYGPATH -u "$path"`
15491    fi
15492    if test "x$new_path" = x; then
15493      # It's still not found. Now this is an unrecoverable error.
15494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15495$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15496      has_space=`$ECHO "$complete" | $GREP " "`
15497      if test "x$has_space" != x; then
15498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15500      fi
15501      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15502    fi
15503  fi
15504
15505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15508  # "foo.exe" is OK but "foo" is an error.
15509  #
15510  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15511  # It is also a way to make sure we got the proper file name for the real test later on.
15512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15513  if test "x$test_shortpath" = x; then
15514    # Short path failed, file does not exist as specified.
15515    # Try adding .exe or .cmd
15516    if test -f "${new_path}.exe"; then
15517      input_to_shortpath="${new_path}.exe"
15518    elif test -f "${new_path}.cmd"; then
15519      input_to_shortpath="${new_path}.cmd"
15520    else
15521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15522$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15523      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15524$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15525      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15526    fi
15527  else
15528    input_to_shortpath="$new_path"
15529  fi
15530
15531  # Call helper function which possibly converts this using DOS-style short mode.
15532  # If so, the updated path is stored in $new_path.
15533  new_path="$input_to_shortpath"
15534
15535  input_path="$input_to_shortpath"
15536  # Check if we need to convert this using DOS-style short mode. If the path
15537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15538  # take no chances and rewrite it.
15539  # Note: m4 eats our [], so we need to use [ and ] instead.
15540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15541  if test "x$has_forbidden_chars" != x; then
15542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15546      # Going to short mode and back again did indeed matter. Since short mode is
15547      # case insensitive, let's make it lowercase to improve readability.
15548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15549      # Now convert it back to Unix-stile (cygpath)
15550      input_path=`$CYGPATH -u "$shortmode_path"`
15551      new_path="$input_path"
15552    fi
15553  fi
15554
15555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15556  if test "x$test_cygdrive_prefix" = x; then
15557    # As a simple fix, exclude /usr/bin since it's not a real path.
15558    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15560      # a path prefixed by /cygdrive for fixpath to work.
15561      new_path="$CYGWIN_ROOT_PATH$input_path"
15562    fi
15563  fi
15564
15565  # remove trailing .exe if any
15566  new_path="${new_path/%.exe/}"
15567
15568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15569
15570  # First separate the path from the arguments. This will split at the first
15571  # space.
15572  complete="$FOUND_MAKE"
15573  path="${complete%% *}"
15574  tmp="$complete EOL"
15575  arguments="${tmp#* }"
15576
15577  # Input might be given as Windows format, start by converting to
15578  # unix format.
15579  new_path="$path"
15580
15581  windows_path="$new_path"
15582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15583    unix_path=`$CYGPATH -u "$windows_path"`
15584    new_path="$unix_path"
15585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15587    new_path="$unix_path"
15588  fi
15589
15590
15591  # Now try to locate executable using which
15592  new_path=`$WHICH "$new_path" 2> /dev/null`
15593
15594  if test "x$new_path" = x; then
15595    # Oops. Which didn't find the executable.
15596    # The splitting of arguments from the executable at a space might have been incorrect,
15597    # since paths with space are more likely in Windows. Give it another try with the whole
15598    # argument.
15599    path="$complete"
15600    arguments="EOL"
15601    new_path="$path"
15602
15603  windows_path="$new_path"
15604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15605    unix_path=`$CYGPATH -u "$windows_path"`
15606    new_path="$unix_path"
15607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15609    new_path="$unix_path"
15610  fi
15611
15612
15613    new_path=`$WHICH "$new_path" 2> /dev/null`
15614
15615    if test "x$new_path" = x; then
15616      # It's still not found. Now this is an unrecoverable error.
15617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15618$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15619      has_space=`$ECHO "$complete" | $GREP " "`
15620      if test "x$has_space" != x; then
15621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15623      fi
15624      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15625    fi
15626  fi
15627
15628  # Now new_path has a complete unix path to the binary
15629  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15630    # Keep paths in /bin as-is, but remove trailing .exe if any
15631    new_path="${new_path/%.exe/}"
15632    # Do not save /bin paths to all_fixpath_prefixes!
15633  else
15634    # Not in mixed or Windows style, start by that.
15635    new_path=`cmd //c echo $new_path`
15636
15637  input_path="$new_path"
15638  # Check if we need to convert this using DOS-style short mode. If the path
15639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15640  # take no chances and rewrite it.
15641  # Note: m4 eats our [], so we need to use [ and ] instead.
15642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15643  if test "x$has_forbidden_chars" != x; then
15644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15646  fi
15647
15648    # Output is in $new_path
15649
15650  windows_path="$new_path"
15651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15652    unix_path=`$CYGPATH -u "$windows_path"`
15653    new_path="$unix_path"
15654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15656    new_path="$unix_path"
15657  fi
15658
15659    # remove trailing .exe if any
15660    new_path="${new_path/%.exe/}"
15661
15662    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15663    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15664  fi
15665
15666  else
15667    # We're on a posix platform. Hooray! :)
15668    # First separate the path from the arguments. This will split at the first
15669    # space.
15670    complete="$FOUND_MAKE"
15671    path="${complete%% *}"
15672    tmp="$complete EOL"
15673    arguments="${tmp#* }"
15674
15675    # Cannot rely on the command "which" here since it doesn't always work.
15676    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15677    if test -z "$is_absolute_path"; then
15678      # Path to executable is not absolute. Find it.
15679      IFS_save="$IFS"
15680      IFS=:
15681      for p in $PATH; do
15682        if test -f "$p/$path" && test -x "$p/$path"; then
15683          new_path="$p/$path"
15684          break
15685        fi
15686      done
15687      IFS="$IFS_save"
15688    else
15689      # This is an absolute path, we can use it without further modifications.
15690      new_path="$path"
15691    fi
15692
15693    if test "x$new_path" = x; then
15694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15695$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15696      has_space=`$ECHO "$complete" | $GREP " "`
15697      if test "x$has_space" != x; then
15698        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15699$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15700      fi
15701      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15702    fi
15703  fi
15704
15705  # Now join together the path and the arguments once again
15706  if test "x$arguments" != xEOL; then
15707    new_complete="$new_path ${arguments% *}"
15708  else
15709    new_complete="$new_path"
15710  fi
15711
15712  if test "x$complete" != "x$new_complete"; then
15713    FOUND_MAKE="$new_complete"
15714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15715$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15716  fi
15717
15718        fi
15719      fi
15720    fi
15721  fi
15722
15723    if test "x$FOUND_MAKE" = x; then
15724      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15725    fi
15726  else
15727    # Try our hardest to locate a correct version of GNU make
15728    for ac_prog in gmake
15729do
15730  # Extract the first word of "$ac_prog", so it can be a program name with args.
15731set dummy $ac_prog; ac_word=$2
15732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15733$as_echo_n "checking for $ac_word... " >&6; }
15734if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15735  $as_echo_n "(cached) " >&6
15736else
15737  case $CHECK_GMAKE in
15738  [\\/]* | ?:[\\/]*)
15739  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15740  ;;
15741  *)
15742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15743for as_dir in $PATH
15744do
15745  IFS=$as_save_IFS
15746  test -z "$as_dir" && as_dir=.
15747    for ac_exec_ext in '' $ac_executable_extensions; do
15748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15749    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15751    break 2
15752  fi
15753done
15754  done
15755IFS=$as_save_IFS
15756
15757  ;;
15758esac
15759fi
15760CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15761if test -n "$CHECK_GMAKE"; then
15762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15763$as_echo "$CHECK_GMAKE" >&6; }
15764else
15765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15766$as_echo "no" >&6; }
15767fi
15768
15769
15770  test -n "$CHECK_GMAKE" && break
15771done
15772
15773
15774  MAKE_CANDIDATE=""$CHECK_GMAKE""
15775  DESCRIPTION="gmake in PATH"
15776  if test "x$MAKE_CANDIDATE" != x; then
15777    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15778$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15779    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15780    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15781    if test "x$IS_GNU_MAKE" = x; then
15782      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15783$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15784    else
15785      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15786      if test "x$IS_MODERN_MAKE" = x; then
15787        { $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
15788$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;}
15789      else
15790        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15791          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15792            MAKE_EXPECTED_ENV='cygwin'
15793          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15794            MAKE_EXPECTED_ENV='msys'
15795          else
15796            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15797          fi
15798          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15799          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15800        else
15801          # Not relevant for non-Windows
15802          IS_MAKE_CORRECT_ENV=true
15803        fi
15804        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15805          { $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
15806$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;}
15807        else
15808          FOUND_MAKE=$MAKE_CANDIDATE
15809
15810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15811
15812  # First separate the path from the arguments. This will split at the first
15813  # space.
15814  complete="$FOUND_MAKE"
15815  path="${complete%% *}"
15816  tmp="$complete EOL"
15817  arguments="${tmp#* }"
15818
15819  # Input might be given as Windows format, start by converting to
15820  # unix format.
15821  new_path=`$CYGPATH -u "$path"`
15822
15823  # Now try to locate executable using which
15824  new_path=`$WHICH "$new_path" 2> /dev/null`
15825  # bat and cmd files are not always considered executable in cygwin causing which
15826  # to not find them
15827  if test "x$new_path" = x \
15828      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15829      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15830    new_path=`$CYGPATH -u "$path"`
15831  fi
15832  if test "x$new_path" = x; then
15833    # Oops. Which didn't find the executable.
15834    # The splitting of arguments from the executable at a space might have been incorrect,
15835    # since paths with space are more likely in Windows. Give it another try with the whole
15836    # argument.
15837    path="$complete"
15838    arguments="EOL"
15839    new_path=`$CYGPATH -u "$path"`
15840    new_path=`$WHICH "$new_path" 2> /dev/null`
15841    # bat and cmd files are not always considered executable in cygwin causing which
15842    # to not find them
15843    if test "x$new_path" = x \
15844        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15845        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15846      new_path=`$CYGPATH -u "$path"`
15847    fi
15848    if test "x$new_path" = x; then
15849      # It's still not found. Now this is an unrecoverable error.
15850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15851$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15852      has_space=`$ECHO "$complete" | $GREP " "`
15853      if test "x$has_space" != x; then
15854        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15855$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15856      fi
15857      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15858    fi
15859  fi
15860
15861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15864  # "foo.exe" is OK but "foo" is an error.
15865  #
15866  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15867  # It is also a way to make sure we got the proper file name for the real test later on.
15868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15869  if test "x$test_shortpath" = x; then
15870    # Short path failed, file does not exist as specified.
15871    # Try adding .exe or .cmd
15872    if test -f "${new_path}.exe"; then
15873      input_to_shortpath="${new_path}.exe"
15874    elif test -f "${new_path}.cmd"; then
15875      input_to_shortpath="${new_path}.cmd"
15876    else
15877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15878$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15879      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15880$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15881      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15882    fi
15883  else
15884    input_to_shortpath="$new_path"
15885  fi
15886
15887  # Call helper function which possibly converts this using DOS-style short mode.
15888  # If so, the updated path is stored in $new_path.
15889  new_path="$input_to_shortpath"
15890
15891  input_path="$input_to_shortpath"
15892  # Check if we need to convert this using DOS-style short mode. If the path
15893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15894  # take no chances and rewrite it.
15895  # Note: m4 eats our [], so we need to use [ and ] instead.
15896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15897  if test "x$has_forbidden_chars" != x; then
15898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15902      # Going to short mode and back again did indeed matter. Since short mode is
15903      # case insensitive, let's make it lowercase to improve readability.
15904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15905      # Now convert it back to Unix-stile (cygpath)
15906      input_path=`$CYGPATH -u "$shortmode_path"`
15907      new_path="$input_path"
15908    fi
15909  fi
15910
15911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15912  if test "x$test_cygdrive_prefix" = x; then
15913    # As a simple fix, exclude /usr/bin since it's not a real path.
15914    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15916      # a path prefixed by /cygdrive for fixpath to work.
15917      new_path="$CYGWIN_ROOT_PATH$input_path"
15918    fi
15919  fi
15920
15921  # remove trailing .exe if any
15922  new_path="${new_path/%.exe/}"
15923
15924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15925
15926  # First separate the path from the arguments. This will split at the first
15927  # space.
15928  complete="$FOUND_MAKE"
15929  path="${complete%% *}"
15930  tmp="$complete EOL"
15931  arguments="${tmp#* }"
15932
15933  # Input might be given as Windows format, start by converting to
15934  # unix format.
15935  new_path="$path"
15936
15937  windows_path="$new_path"
15938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15939    unix_path=`$CYGPATH -u "$windows_path"`
15940    new_path="$unix_path"
15941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15943    new_path="$unix_path"
15944  fi
15945
15946
15947  # Now try to locate executable using which
15948  new_path=`$WHICH "$new_path" 2> /dev/null`
15949
15950  if test "x$new_path" = x; then
15951    # Oops. Which didn't find the executable.
15952    # The splitting of arguments from the executable at a space might have been incorrect,
15953    # since paths with space are more likely in Windows. Give it another try with the whole
15954    # argument.
15955    path="$complete"
15956    arguments="EOL"
15957    new_path="$path"
15958
15959  windows_path="$new_path"
15960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15961    unix_path=`$CYGPATH -u "$windows_path"`
15962    new_path="$unix_path"
15963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15965    new_path="$unix_path"
15966  fi
15967
15968
15969    new_path=`$WHICH "$new_path" 2> /dev/null`
15970
15971    if test "x$new_path" = x; then
15972      # It's still not found. Now this is an unrecoverable error.
15973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15974$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15975      has_space=`$ECHO "$complete" | $GREP " "`
15976      if test "x$has_space" != x; then
15977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15979      fi
15980      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15981    fi
15982  fi
15983
15984  # Now new_path has a complete unix path to the binary
15985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15986    # Keep paths in /bin as-is, but remove trailing .exe if any
15987    new_path="${new_path/%.exe/}"
15988    # Do not save /bin paths to all_fixpath_prefixes!
15989  else
15990    # Not in mixed or Windows style, start by that.
15991    new_path=`cmd //c echo $new_path`
15992
15993  input_path="$new_path"
15994  # Check if we need to convert this using DOS-style short mode. If the path
15995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15996  # take no chances and rewrite it.
15997  # Note: m4 eats our [], so we need to use [ and ] instead.
15998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15999  if test "x$has_forbidden_chars" != x; then
16000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16002  fi
16003
16004    # Output is in $new_path
16005
16006  windows_path="$new_path"
16007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16008    unix_path=`$CYGPATH -u "$windows_path"`
16009    new_path="$unix_path"
16010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16012    new_path="$unix_path"
16013  fi
16014
16015    # remove trailing .exe if any
16016    new_path="${new_path/%.exe/}"
16017
16018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16020  fi
16021
16022  else
16023    # We're on a posix platform. Hooray! :)
16024    # First separate the path from the arguments. This will split at the first
16025    # space.
16026    complete="$FOUND_MAKE"
16027    path="${complete%% *}"
16028    tmp="$complete EOL"
16029    arguments="${tmp#* }"
16030
16031    # Cannot rely on the command "which" here since it doesn't always work.
16032    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16033    if test -z "$is_absolute_path"; then
16034      # Path to executable is not absolute. Find it.
16035      IFS_save="$IFS"
16036      IFS=:
16037      for p in $PATH; do
16038        if test -f "$p/$path" && test -x "$p/$path"; then
16039          new_path="$p/$path"
16040          break
16041        fi
16042      done
16043      IFS="$IFS_save"
16044    else
16045      # This is an absolute path, we can use it without further modifications.
16046      new_path="$path"
16047    fi
16048
16049    if test "x$new_path" = x; then
16050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16052      has_space=`$ECHO "$complete" | $GREP " "`
16053      if test "x$has_space" != x; then
16054        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16056      fi
16057      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16058    fi
16059  fi
16060
16061  # Now join together the path and the arguments once again
16062  if test "x$arguments" != xEOL; then
16063    new_complete="$new_path ${arguments% *}"
16064  else
16065    new_complete="$new_path"
16066  fi
16067
16068  if test "x$complete" != "x$new_complete"; then
16069    FOUND_MAKE="$new_complete"
16070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16071$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16072  fi
16073
16074        fi
16075      fi
16076    fi
16077  fi
16078
16079
16080    if test "x$FOUND_MAKE" = x; then
16081      for ac_prog in make
16082do
16083  # Extract the first word of "$ac_prog", so it can be a program name with args.
16084set dummy $ac_prog; ac_word=$2
16085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16086$as_echo_n "checking for $ac_word... " >&6; }
16087if ${ac_cv_path_CHECK_MAKE+:} false; then :
16088  $as_echo_n "(cached) " >&6
16089else
16090  case $CHECK_MAKE in
16091  [\\/]* | ?:[\\/]*)
16092  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16093  ;;
16094  *)
16095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16096for as_dir in $PATH
16097do
16098  IFS=$as_save_IFS
16099  test -z "$as_dir" && as_dir=.
16100    for ac_exec_ext in '' $ac_executable_extensions; do
16101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16102    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16104    break 2
16105  fi
16106done
16107  done
16108IFS=$as_save_IFS
16109
16110  ;;
16111esac
16112fi
16113CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16114if test -n "$CHECK_MAKE"; then
16115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16116$as_echo "$CHECK_MAKE" >&6; }
16117else
16118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16119$as_echo "no" >&6; }
16120fi
16121
16122
16123  test -n "$CHECK_MAKE" && break
16124done
16125
16126
16127  MAKE_CANDIDATE=""$CHECK_MAKE""
16128  DESCRIPTION="make in PATH"
16129  if test "x$MAKE_CANDIDATE" != x; then
16130    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16131$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16132    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16133    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16134    if test "x$IS_GNU_MAKE" = x; then
16135      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16136$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16137    else
16138      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16139      if test "x$IS_MODERN_MAKE" = x; then
16140        { $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
16141$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;}
16142      else
16143        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16144          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16145            MAKE_EXPECTED_ENV='cygwin'
16146          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16147            MAKE_EXPECTED_ENV='msys'
16148          else
16149            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16150          fi
16151          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16152          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16153        else
16154          # Not relevant for non-Windows
16155          IS_MAKE_CORRECT_ENV=true
16156        fi
16157        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16158          { $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
16159$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;}
16160        else
16161          FOUND_MAKE=$MAKE_CANDIDATE
16162
16163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16164
16165  # First separate the path from the arguments. This will split at the first
16166  # space.
16167  complete="$FOUND_MAKE"
16168  path="${complete%% *}"
16169  tmp="$complete EOL"
16170  arguments="${tmp#* }"
16171
16172  # Input might be given as Windows format, start by converting to
16173  # unix format.
16174  new_path=`$CYGPATH -u "$path"`
16175
16176  # Now try to locate executable using which
16177  new_path=`$WHICH "$new_path" 2> /dev/null`
16178  # bat and cmd files are not always considered executable in cygwin causing which
16179  # to not find them
16180  if test "x$new_path" = x \
16181      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16182      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16183    new_path=`$CYGPATH -u "$path"`
16184  fi
16185  if test "x$new_path" = x; then
16186    # Oops. Which didn't find the executable.
16187    # The splitting of arguments from the executable at a space might have been incorrect,
16188    # since paths with space are more likely in Windows. Give it another try with the whole
16189    # argument.
16190    path="$complete"
16191    arguments="EOL"
16192    new_path=`$CYGPATH -u "$path"`
16193    new_path=`$WHICH "$new_path" 2> /dev/null`
16194    # bat and cmd files are not always considered executable in cygwin causing which
16195    # to not find them
16196    if test "x$new_path" = x \
16197        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16198        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16199      new_path=`$CYGPATH -u "$path"`
16200    fi
16201    if test "x$new_path" = x; then
16202      # It's still not found. Now this is an unrecoverable error.
16203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16204$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16205      has_space=`$ECHO "$complete" | $GREP " "`
16206      if test "x$has_space" != x; then
16207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16209      fi
16210      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16211    fi
16212  fi
16213
16214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16217  # "foo.exe" is OK but "foo" is an error.
16218  #
16219  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16220  # It is also a way to make sure we got the proper file name for the real test later on.
16221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16222  if test "x$test_shortpath" = x; then
16223    # Short path failed, file does not exist as specified.
16224    # Try adding .exe or .cmd
16225    if test -f "${new_path}.exe"; then
16226      input_to_shortpath="${new_path}.exe"
16227    elif test -f "${new_path}.cmd"; then
16228      input_to_shortpath="${new_path}.cmd"
16229    else
16230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16231$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16232      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16233$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16234      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16235    fi
16236  else
16237    input_to_shortpath="$new_path"
16238  fi
16239
16240  # Call helper function which possibly converts this using DOS-style short mode.
16241  # If so, the updated path is stored in $new_path.
16242  new_path="$input_to_shortpath"
16243
16244  input_path="$input_to_shortpath"
16245  # Check if we need to convert this using DOS-style short mode. If the path
16246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16247  # take no chances and rewrite it.
16248  # Note: m4 eats our [], so we need to use [ and ] instead.
16249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16250  if test "x$has_forbidden_chars" != x; then
16251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16252    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16253    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16254    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16255      # Going to short mode and back again did indeed matter. Since short mode is
16256      # case insensitive, let's make it lowercase to improve readability.
16257      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16258      # Now convert it back to Unix-stile (cygpath)
16259      input_path=`$CYGPATH -u "$shortmode_path"`
16260      new_path="$input_path"
16261    fi
16262  fi
16263
16264  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16265  if test "x$test_cygdrive_prefix" = x; then
16266    # As a simple fix, exclude /usr/bin since it's not a real path.
16267    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16268      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16269      # a path prefixed by /cygdrive for fixpath to work.
16270      new_path="$CYGWIN_ROOT_PATH$input_path"
16271    fi
16272  fi
16273
16274  # remove trailing .exe if any
16275  new_path="${new_path/%.exe/}"
16276
16277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16278
16279  # First separate the path from the arguments. This will split at the first
16280  # space.
16281  complete="$FOUND_MAKE"
16282  path="${complete%% *}"
16283  tmp="$complete EOL"
16284  arguments="${tmp#* }"
16285
16286  # Input might be given as Windows format, start by converting to
16287  # unix format.
16288  new_path="$path"
16289
16290  windows_path="$new_path"
16291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16292    unix_path=`$CYGPATH -u "$windows_path"`
16293    new_path="$unix_path"
16294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16296    new_path="$unix_path"
16297  fi
16298
16299
16300  # Now try to locate executable using which
16301  new_path=`$WHICH "$new_path" 2> /dev/null`
16302
16303  if test "x$new_path" = x; then
16304    # Oops. Which didn't find the executable.
16305    # The splitting of arguments from the executable at a space might have been incorrect,
16306    # since paths with space are more likely in Windows. Give it another try with the whole
16307    # argument.
16308    path="$complete"
16309    arguments="EOL"
16310    new_path="$path"
16311
16312  windows_path="$new_path"
16313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16314    unix_path=`$CYGPATH -u "$windows_path"`
16315    new_path="$unix_path"
16316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16318    new_path="$unix_path"
16319  fi
16320
16321
16322    new_path=`$WHICH "$new_path" 2> /dev/null`
16323
16324    if test "x$new_path" = x; then
16325      # It's still not found. Now this is an unrecoverable error.
16326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16327$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16328      has_space=`$ECHO "$complete" | $GREP " "`
16329      if test "x$has_space" != x; then
16330        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16331$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16332      fi
16333      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16334    fi
16335  fi
16336
16337  # Now new_path has a complete unix path to the binary
16338  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16339    # Keep paths in /bin as-is, but remove trailing .exe if any
16340    new_path="${new_path/%.exe/}"
16341    # Do not save /bin paths to all_fixpath_prefixes!
16342  else
16343    # Not in mixed or Windows style, start by that.
16344    new_path=`cmd //c echo $new_path`
16345
16346  input_path="$new_path"
16347  # Check if we need to convert this using DOS-style short mode. If the path
16348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16349  # take no chances and rewrite it.
16350  # Note: m4 eats our [], so we need to use [ and ] instead.
16351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16352  if test "x$has_forbidden_chars" != x; then
16353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16355  fi
16356
16357    # Output is in $new_path
16358
16359  windows_path="$new_path"
16360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16361    unix_path=`$CYGPATH -u "$windows_path"`
16362    new_path="$unix_path"
16363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16365    new_path="$unix_path"
16366  fi
16367
16368    # remove trailing .exe if any
16369    new_path="${new_path/%.exe/}"
16370
16371    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16372    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16373  fi
16374
16375  else
16376    # We're on a posix platform. Hooray! :)
16377    # First separate the path from the arguments. This will split at the first
16378    # space.
16379    complete="$FOUND_MAKE"
16380    path="${complete%% *}"
16381    tmp="$complete EOL"
16382    arguments="${tmp#* }"
16383
16384    # Cannot rely on the command "which" here since it doesn't always work.
16385    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16386    if test -z "$is_absolute_path"; then
16387      # Path to executable is not absolute. Find it.
16388      IFS_save="$IFS"
16389      IFS=:
16390      for p in $PATH; do
16391        if test -f "$p/$path" && test -x "$p/$path"; then
16392          new_path="$p/$path"
16393          break
16394        fi
16395      done
16396      IFS="$IFS_save"
16397    else
16398      # This is an absolute path, we can use it without further modifications.
16399      new_path="$path"
16400    fi
16401
16402    if test "x$new_path" = x; then
16403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16404$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16405      has_space=`$ECHO "$complete" | $GREP " "`
16406      if test "x$has_space" != x; then
16407        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16408$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16409      fi
16410      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16411    fi
16412  fi
16413
16414  # Now join together the path and the arguments once again
16415  if test "x$arguments" != xEOL; then
16416    new_complete="$new_path ${arguments% *}"
16417  else
16418    new_complete="$new_path"
16419  fi
16420
16421  if test "x$complete" != "x$new_complete"; then
16422    FOUND_MAKE="$new_complete"
16423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16424$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16425  fi
16426
16427        fi
16428      fi
16429    fi
16430  fi
16431
16432    fi
16433
16434    if test "x$FOUND_MAKE" = x; then
16435      if test "x$TOOLCHAIN_PATH" != x; then
16436        # We have a toolchain path, check that as well before giving up.
16437        OLD_PATH=$PATH
16438        PATH=$TOOLCHAIN_PATH:$PATH
16439        for ac_prog in gmake
16440do
16441  # Extract the first word of "$ac_prog", so it can be a program name with args.
16442set dummy $ac_prog; ac_word=$2
16443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16444$as_echo_n "checking for $ac_word... " >&6; }
16445if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16446  $as_echo_n "(cached) " >&6
16447else
16448  case $CHECK_TOOLSDIR_GMAKE in
16449  [\\/]* | ?:[\\/]*)
16450  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16451  ;;
16452  *)
16453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16454for as_dir in $PATH
16455do
16456  IFS=$as_save_IFS
16457  test -z "$as_dir" && as_dir=.
16458    for ac_exec_ext in '' $ac_executable_extensions; do
16459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16460    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16462    break 2
16463  fi
16464done
16465  done
16466IFS=$as_save_IFS
16467
16468  ;;
16469esac
16470fi
16471CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16472if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16474$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16475else
16476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16477$as_echo "no" >&6; }
16478fi
16479
16480
16481  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16482done
16483
16484
16485  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16486  DESCRIPTION="gmake in tools-dir"
16487  if test "x$MAKE_CANDIDATE" != x; then
16488    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16489$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16490    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16491    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16492    if test "x$IS_GNU_MAKE" = x; then
16493      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16494$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16495    else
16496      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16497      if test "x$IS_MODERN_MAKE" = x; then
16498        { $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
16499$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;}
16500      else
16501        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16502          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16503            MAKE_EXPECTED_ENV='cygwin'
16504          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16505            MAKE_EXPECTED_ENV='msys'
16506          else
16507            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16508          fi
16509          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16510          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16511        else
16512          # Not relevant for non-Windows
16513          IS_MAKE_CORRECT_ENV=true
16514        fi
16515        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16516          { $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
16517$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;}
16518        else
16519          FOUND_MAKE=$MAKE_CANDIDATE
16520
16521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16522
16523  # First separate the path from the arguments. This will split at the first
16524  # space.
16525  complete="$FOUND_MAKE"
16526  path="${complete%% *}"
16527  tmp="$complete EOL"
16528  arguments="${tmp#* }"
16529
16530  # Input might be given as Windows format, start by converting to
16531  # unix format.
16532  new_path=`$CYGPATH -u "$path"`
16533
16534  # Now try to locate executable using which
16535  new_path=`$WHICH "$new_path" 2> /dev/null`
16536  # bat and cmd files are not always considered executable in cygwin causing which
16537  # to not find them
16538  if test "x$new_path" = x \
16539      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16540      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16541    new_path=`$CYGPATH -u "$path"`
16542  fi
16543  if test "x$new_path" = x; then
16544    # Oops. Which didn't find the executable.
16545    # The splitting of arguments from the executable at a space might have been incorrect,
16546    # since paths with space are more likely in Windows. Give it another try with the whole
16547    # argument.
16548    path="$complete"
16549    arguments="EOL"
16550    new_path=`$CYGPATH -u "$path"`
16551    new_path=`$WHICH "$new_path" 2> /dev/null`
16552    # bat and cmd files are not always considered executable in cygwin causing which
16553    # to not find them
16554    if test "x$new_path" = x \
16555        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16556        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16557      new_path=`$CYGPATH -u "$path"`
16558    fi
16559    if test "x$new_path" = x; then
16560      # It's still not found. Now this is an unrecoverable error.
16561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16562$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16563      has_space=`$ECHO "$complete" | $GREP " "`
16564      if test "x$has_space" != x; then
16565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16567      fi
16568      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16569    fi
16570  fi
16571
16572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16575  # "foo.exe" is OK but "foo" is an error.
16576  #
16577  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16578  # It is also a way to make sure we got the proper file name for the real test later on.
16579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16580  if test "x$test_shortpath" = x; then
16581    # Short path failed, file does not exist as specified.
16582    # Try adding .exe or .cmd
16583    if test -f "${new_path}.exe"; then
16584      input_to_shortpath="${new_path}.exe"
16585    elif test -f "${new_path}.cmd"; then
16586      input_to_shortpath="${new_path}.cmd"
16587    else
16588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16589$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16590      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16591$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16592      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16593    fi
16594  else
16595    input_to_shortpath="$new_path"
16596  fi
16597
16598  # Call helper function which possibly converts this using DOS-style short mode.
16599  # If so, the updated path is stored in $new_path.
16600  new_path="$input_to_shortpath"
16601
16602  input_path="$input_to_shortpath"
16603  # Check if we need to convert this using DOS-style short mode. If the path
16604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16605  # take no chances and rewrite it.
16606  # Note: m4 eats our [], so we need to use [ and ] instead.
16607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16608  if test "x$has_forbidden_chars" != x; then
16609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16613      # Going to short mode and back again did indeed matter. Since short mode is
16614      # case insensitive, let's make it lowercase to improve readability.
16615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16616      # Now convert it back to Unix-stile (cygpath)
16617      input_path=`$CYGPATH -u "$shortmode_path"`
16618      new_path="$input_path"
16619    fi
16620  fi
16621
16622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16623  if test "x$test_cygdrive_prefix" = x; then
16624    # As a simple fix, exclude /usr/bin since it's not a real path.
16625    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16627      # a path prefixed by /cygdrive for fixpath to work.
16628      new_path="$CYGWIN_ROOT_PATH$input_path"
16629    fi
16630  fi
16631
16632  # remove trailing .exe if any
16633  new_path="${new_path/%.exe/}"
16634
16635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16636
16637  # First separate the path from the arguments. This will split at the first
16638  # space.
16639  complete="$FOUND_MAKE"
16640  path="${complete%% *}"
16641  tmp="$complete EOL"
16642  arguments="${tmp#* }"
16643
16644  # Input might be given as Windows format, start by converting to
16645  # unix format.
16646  new_path="$path"
16647
16648  windows_path="$new_path"
16649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16650    unix_path=`$CYGPATH -u "$windows_path"`
16651    new_path="$unix_path"
16652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16654    new_path="$unix_path"
16655  fi
16656
16657
16658  # Now try to locate executable using which
16659  new_path=`$WHICH "$new_path" 2> /dev/null`
16660
16661  if test "x$new_path" = x; then
16662    # Oops. Which didn't find the executable.
16663    # The splitting of arguments from the executable at a space might have been incorrect,
16664    # since paths with space are more likely in Windows. Give it another try with the whole
16665    # argument.
16666    path="$complete"
16667    arguments="EOL"
16668    new_path="$path"
16669
16670  windows_path="$new_path"
16671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16672    unix_path=`$CYGPATH -u "$windows_path"`
16673    new_path="$unix_path"
16674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16676    new_path="$unix_path"
16677  fi
16678
16679
16680    new_path=`$WHICH "$new_path" 2> /dev/null`
16681
16682    if test "x$new_path" = x; then
16683      # It's still not found. Now this is an unrecoverable error.
16684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16685$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16686      has_space=`$ECHO "$complete" | $GREP " "`
16687      if test "x$has_space" != x; then
16688        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16689$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16690      fi
16691      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16692    fi
16693  fi
16694
16695  # Now new_path has a complete unix path to the binary
16696  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16697    # Keep paths in /bin as-is, but remove trailing .exe if any
16698    new_path="${new_path/%.exe/}"
16699    # Do not save /bin paths to all_fixpath_prefixes!
16700  else
16701    # Not in mixed or Windows style, start by that.
16702    new_path=`cmd //c echo $new_path`
16703
16704  input_path="$new_path"
16705  # Check if we need to convert this using DOS-style short mode. If the path
16706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16707  # take no chances and rewrite it.
16708  # Note: m4 eats our [], so we need to use [ and ] instead.
16709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16710  if test "x$has_forbidden_chars" != x; then
16711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16712    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16713  fi
16714
16715    # Output is in $new_path
16716
16717  windows_path="$new_path"
16718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16719    unix_path=`$CYGPATH -u "$windows_path"`
16720    new_path="$unix_path"
16721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16723    new_path="$unix_path"
16724  fi
16725
16726    # remove trailing .exe if any
16727    new_path="${new_path/%.exe/}"
16728
16729    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16730    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16731  fi
16732
16733  else
16734    # We're on a posix platform. Hooray! :)
16735    # First separate the path from the arguments. This will split at the first
16736    # space.
16737    complete="$FOUND_MAKE"
16738    path="${complete%% *}"
16739    tmp="$complete EOL"
16740    arguments="${tmp#* }"
16741
16742    # Cannot rely on the command "which" here since it doesn't always work.
16743    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16744    if test -z "$is_absolute_path"; then
16745      # Path to executable is not absolute. Find it.
16746      IFS_save="$IFS"
16747      IFS=:
16748      for p in $PATH; do
16749        if test -f "$p/$path" && test -x "$p/$path"; then
16750          new_path="$p/$path"
16751          break
16752        fi
16753      done
16754      IFS="$IFS_save"
16755    else
16756      # This is an absolute path, we can use it without further modifications.
16757      new_path="$path"
16758    fi
16759
16760    if test "x$new_path" = x; then
16761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16762$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16763      has_space=`$ECHO "$complete" | $GREP " "`
16764      if test "x$has_space" != x; then
16765        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16766$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16767      fi
16768      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16769    fi
16770  fi
16771
16772  # Now join together the path and the arguments once again
16773  if test "x$arguments" != xEOL; then
16774    new_complete="$new_path ${arguments% *}"
16775  else
16776    new_complete="$new_path"
16777  fi
16778
16779  if test "x$complete" != "x$new_complete"; then
16780    FOUND_MAKE="$new_complete"
16781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16782$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16783  fi
16784
16785        fi
16786      fi
16787    fi
16788  fi
16789
16790        if test "x$FOUND_MAKE" = x; then
16791          for ac_prog in make
16792do
16793  # Extract the first word of "$ac_prog", so it can be a program name with args.
16794set dummy $ac_prog; ac_word=$2
16795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16796$as_echo_n "checking for $ac_word... " >&6; }
16797if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16798  $as_echo_n "(cached) " >&6
16799else
16800  case $CHECK_TOOLSDIR_MAKE in
16801  [\\/]* | ?:[\\/]*)
16802  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16803  ;;
16804  *)
16805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16806for as_dir in $PATH
16807do
16808  IFS=$as_save_IFS
16809  test -z "$as_dir" && as_dir=.
16810    for ac_exec_ext in '' $ac_executable_extensions; do
16811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16812    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16814    break 2
16815  fi
16816done
16817  done
16818IFS=$as_save_IFS
16819
16820  ;;
16821esac
16822fi
16823CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16824if test -n "$CHECK_TOOLSDIR_MAKE"; then
16825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16826$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16827else
16828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16829$as_echo "no" >&6; }
16830fi
16831
16832
16833  test -n "$CHECK_TOOLSDIR_MAKE" && break
16834done
16835
16836
16837  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16838  DESCRIPTION="make in tools-dir"
16839  if test "x$MAKE_CANDIDATE" != x; then
16840    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16841$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16842    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16843    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16844    if test "x$IS_GNU_MAKE" = x; then
16845      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16846$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16847    else
16848      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16849      if test "x$IS_MODERN_MAKE" = x; then
16850        { $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
16851$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;}
16852      else
16853        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16854          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16855            MAKE_EXPECTED_ENV='cygwin'
16856          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16857            MAKE_EXPECTED_ENV='msys'
16858          else
16859            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16860          fi
16861          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16862          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16863        else
16864          # Not relevant for non-Windows
16865          IS_MAKE_CORRECT_ENV=true
16866        fi
16867        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16868          { $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
16869$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;}
16870        else
16871          FOUND_MAKE=$MAKE_CANDIDATE
16872
16873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16874
16875  # First separate the path from the arguments. This will split at the first
16876  # space.
16877  complete="$FOUND_MAKE"
16878  path="${complete%% *}"
16879  tmp="$complete EOL"
16880  arguments="${tmp#* }"
16881
16882  # Input might be given as Windows format, start by converting to
16883  # unix format.
16884  new_path=`$CYGPATH -u "$path"`
16885
16886  # Now try to locate executable using which
16887  new_path=`$WHICH "$new_path" 2> /dev/null`
16888  # bat and cmd files are not always considered executable in cygwin causing which
16889  # to not find them
16890  if test "x$new_path" = x \
16891      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16892      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16893    new_path=`$CYGPATH -u "$path"`
16894  fi
16895  if test "x$new_path" = x; then
16896    # Oops. Which didn't find the executable.
16897    # The splitting of arguments from the executable at a space might have been incorrect,
16898    # since paths with space are more likely in Windows. Give it another try with the whole
16899    # argument.
16900    path="$complete"
16901    arguments="EOL"
16902    new_path=`$CYGPATH -u "$path"`
16903    new_path=`$WHICH "$new_path" 2> /dev/null`
16904    # bat and cmd files are not always considered executable in cygwin causing which
16905    # to not find them
16906    if test "x$new_path" = x \
16907        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16908        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16909      new_path=`$CYGPATH -u "$path"`
16910    fi
16911    if test "x$new_path" = x; then
16912      # It's still not found. Now this is an unrecoverable error.
16913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16914$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16915      has_space=`$ECHO "$complete" | $GREP " "`
16916      if test "x$has_space" != x; then
16917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16919      fi
16920      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16921    fi
16922  fi
16923
16924  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16925  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16926  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16927  # "foo.exe" is OK but "foo" is an error.
16928  #
16929  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16930  # It is also a way to make sure we got the proper file name for the real test later on.
16931  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16932  if test "x$test_shortpath" = x; then
16933    # Short path failed, file does not exist as specified.
16934    # Try adding .exe or .cmd
16935    if test -f "${new_path}.exe"; then
16936      input_to_shortpath="${new_path}.exe"
16937    elif test -f "${new_path}.cmd"; then
16938      input_to_shortpath="${new_path}.cmd"
16939    else
16940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16941$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16942      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16943$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16944      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16945    fi
16946  else
16947    input_to_shortpath="$new_path"
16948  fi
16949
16950  # Call helper function which possibly converts this using DOS-style short mode.
16951  # If so, the updated path is stored in $new_path.
16952  new_path="$input_to_shortpath"
16953
16954  input_path="$input_to_shortpath"
16955  # Check if we need to convert this using DOS-style short mode. If the path
16956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16957  # take no chances and rewrite it.
16958  # Note: m4 eats our [], so we need to use [ and ] instead.
16959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16960  if test "x$has_forbidden_chars" != x; then
16961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16965      # Going to short mode and back again did indeed matter. Since short mode is
16966      # case insensitive, let's make it lowercase to improve readability.
16967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16968      # Now convert it back to Unix-stile (cygpath)
16969      input_path=`$CYGPATH -u "$shortmode_path"`
16970      new_path="$input_path"
16971    fi
16972  fi
16973
16974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16975  if test "x$test_cygdrive_prefix" = x; then
16976    # As a simple fix, exclude /usr/bin since it's not a real path.
16977    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16979      # a path prefixed by /cygdrive for fixpath to work.
16980      new_path="$CYGWIN_ROOT_PATH$input_path"
16981    fi
16982  fi
16983
16984  # remove trailing .exe if any
16985  new_path="${new_path/%.exe/}"
16986
16987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16988
16989  # First separate the path from the arguments. This will split at the first
16990  # space.
16991  complete="$FOUND_MAKE"
16992  path="${complete%% *}"
16993  tmp="$complete EOL"
16994  arguments="${tmp#* }"
16995
16996  # Input might be given as Windows format, start by converting to
16997  # unix format.
16998  new_path="$path"
16999
17000  windows_path="$new_path"
17001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17002    unix_path=`$CYGPATH -u "$windows_path"`
17003    new_path="$unix_path"
17004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17006    new_path="$unix_path"
17007  fi
17008
17009
17010  # Now try to locate executable using which
17011  new_path=`$WHICH "$new_path" 2> /dev/null`
17012
17013  if test "x$new_path" = x; then
17014    # Oops. Which didn't find the executable.
17015    # The splitting of arguments from the executable at a space might have been incorrect,
17016    # since paths with space are more likely in Windows. Give it another try with the whole
17017    # argument.
17018    path="$complete"
17019    arguments="EOL"
17020    new_path="$path"
17021
17022  windows_path="$new_path"
17023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17024    unix_path=`$CYGPATH -u "$windows_path"`
17025    new_path="$unix_path"
17026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17028    new_path="$unix_path"
17029  fi
17030
17031
17032    new_path=`$WHICH "$new_path" 2> /dev/null`
17033
17034    if test "x$new_path" = x; then
17035      # It's still not found. Now this is an unrecoverable error.
17036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17037$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17038      has_space=`$ECHO "$complete" | $GREP " "`
17039      if test "x$has_space" != x; then
17040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17042      fi
17043      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17044    fi
17045  fi
17046
17047  # Now new_path has a complete unix path to the binary
17048  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17049    # Keep paths in /bin as-is, but remove trailing .exe if any
17050    new_path="${new_path/%.exe/}"
17051    # Do not save /bin paths to all_fixpath_prefixes!
17052  else
17053    # Not in mixed or Windows style, start by that.
17054    new_path=`cmd //c echo $new_path`
17055
17056  input_path="$new_path"
17057  # Check if we need to convert this using DOS-style short mode. If the path
17058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17059  # take no chances and rewrite it.
17060  # Note: m4 eats our [], so we need to use [ and ] instead.
17061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17062  if test "x$has_forbidden_chars" != x; then
17063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17065  fi
17066
17067    # Output is in $new_path
17068
17069  windows_path="$new_path"
17070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17071    unix_path=`$CYGPATH -u "$windows_path"`
17072    new_path="$unix_path"
17073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17075    new_path="$unix_path"
17076  fi
17077
17078    # remove trailing .exe if any
17079    new_path="${new_path/%.exe/}"
17080
17081    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17082    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17083  fi
17084
17085  else
17086    # We're on a posix platform. Hooray! :)
17087    # First separate the path from the arguments. This will split at the first
17088    # space.
17089    complete="$FOUND_MAKE"
17090    path="${complete%% *}"
17091    tmp="$complete EOL"
17092    arguments="${tmp#* }"
17093
17094    # Cannot rely on the command "which" here since it doesn't always work.
17095    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17096    if test -z "$is_absolute_path"; then
17097      # Path to executable is not absolute. Find it.
17098      IFS_save="$IFS"
17099      IFS=:
17100      for p in $PATH; do
17101        if test -f "$p/$path" && test -x "$p/$path"; then
17102          new_path="$p/$path"
17103          break
17104        fi
17105      done
17106      IFS="$IFS_save"
17107    else
17108      # This is an absolute path, we can use it without further modifications.
17109      new_path="$path"
17110    fi
17111
17112    if test "x$new_path" = x; then
17113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17114$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17115      has_space=`$ECHO "$complete" | $GREP " "`
17116      if test "x$has_space" != x; then
17117        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17118$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17119      fi
17120      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17121    fi
17122  fi
17123
17124  # Now join together the path and the arguments once again
17125  if test "x$arguments" != xEOL; then
17126    new_complete="$new_path ${arguments% *}"
17127  else
17128    new_complete="$new_path"
17129  fi
17130
17131  if test "x$complete" != "x$new_complete"; then
17132    FOUND_MAKE="$new_complete"
17133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17134$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17135  fi
17136
17137        fi
17138      fi
17139    fi
17140  fi
17141
17142        fi
17143        PATH=$OLD_PATH
17144      fi
17145    fi
17146
17147    if test "x$FOUND_MAKE" = x; then
17148      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
17149    fi
17150  fi
17151
17152  MAKE=$FOUND_MAKE
17153
17154  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17155$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17156
17157
17158  # Check if make supports the output sync option and if so, setup using it.
17159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17160$as_echo_n "checking if make --output-sync is supported... " >&6; }
17161  if $MAKE --version -O > /dev/null 2>&1; then
17162    OUTPUT_SYNC_SUPPORTED=true
17163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17164$as_echo "yes" >&6; }
17165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17166$as_echo_n "checking for output-sync value... " >&6; }
17167
17168# Check whether --with-output-sync was given.
17169if test "${with_output_sync+set}" = set; then :
17170  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17171fi
17172
17173    if test "x$OUTPUT_SYNC" = "x"; then
17174      OUTPUT_SYNC=none
17175    fi
17176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17177$as_echo "$OUTPUT_SYNC" >&6; }
17178    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17179      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17180    fi
17181  else
17182    OUTPUT_SYNC_SUPPORTED=false
17183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17184$as_echo "no" >&6; }
17185  fi
17186
17187
17188
17189
17190
17191
17192  # Test if find supports -delete
17193  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17194$as_echo_n "checking if find supports -delete... " >&6; }
17195  FIND_DELETE="-delete"
17196
17197  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17198
17199  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17200
17201  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17202  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17203    # No, it does not.
17204    rm $DELETEDIR/TestIfFindSupportsDelete
17205    FIND_DELETE="-exec rm \{\} \+"
17206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17207$as_echo "no" >&6; }
17208  else
17209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17210$as_echo "yes" >&6; }
17211  fi
17212  rmdir $DELETEDIR
17213
17214
17215
17216  # These tools might not be installed by default,
17217  # need hint on how to install them.
17218
17219
17220
17221  # Publish this variable in the help.
17222
17223
17224  if test "x$UNZIP" = x; then
17225    # The variable is not set by user, try to locate tool using the code snippet
17226    for ac_prog in unzip
17227do
17228  # Extract the first word of "$ac_prog", so it can be a program name with args.
17229set dummy $ac_prog; ac_word=$2
17230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17231$as_echo_n "checking for $ac_word... " >&6; }
17232if ${ac_cv_path_UNZIP+:} false; then :
17233  $as_echo_n "(cached) " >&6
17234else
17235  case $UNZIP in
17236  [\\/]* | ?:[\\/]*)
17237  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17238  ;;
17239  *)
17240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17241for as_dir in $PATH
17242do
17243  IFS=$as_save_IFS
17244  test -z "$as_dir" && as_dir=.
17245    for ac_exec_ext in '' $ac_executable_extensions; do
17246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17247    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17249    break 2
17250  fi
17251done
17252  done
17253IFS=$as_save_IFS
17254
17255  ;;
17256esac
17257fi
17258UNZIP=$ac_cv_path_UNZIP
17259if test -n "$UNZIP"; then
17260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17261$as_echo "$UNZIP" >&6; }
17262else
17263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17264$as_echo "no" >&6; }
17265fi
17266
17267
17268  test -n "$UNZIP" && break
17269done
17270
17271  else
17272    # The variable is set, but is it from the command line or the environment?
17273
17274    # Try to remove the string !UNZIP! from our list.
17275    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17276    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17277      # If it failed, the variable was not from the command line. Ignore it,
17278      # but warn the user (except for BASH, which is always set by the calling BASH).
17279      if test "xUNZIP" != xBASH; then
17280        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17281$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17282      fi
17283      # Try to locate tool using the code snippet
17284      for ac_prog in unzip
17285do
17286  # Extract the first word of "$ac_prog", so it can be a program name with args.
17287set dummy $ac_prog; ac_word=$2
17288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17289$as_echo_n "checking for $ac_word... " >&6; }
17290if ${ac_cv_path_UNZIP+:} false; then :
17291  $as_echo_n "(cached) " >&6
17292else
17293  case $UNZIP in
17294  [\\/]* | ?:[\\/]*)
17295  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17296  ;;
17297  *)
17298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17299for as_dir in $PATH
17300do
17301  IFS=$as_save_IFS
17302  test -z "$as_dir" && as_dir=.
17303    for ac_exec_ext in '' $ac_executable_extensions; do
17304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17305    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17307    break 2
17308  fi
17309done
17310  done
17311IFS=$as_save_IFS
17312
17313  ;;
17314esac
17315fi
17316UNZIP=$ac_cv_path_UNZIP
17317if test -n "$UNZIP"; then
17318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17319$as_echo "$UNZIP" >&6; }
17320else
17321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17322$as_echo "no" >&6; }
17323fi
17324
17325
17326  test -n "$UNZIP" && break
17327done
17328
17329    else
17330      # If it succeeded, then it was overridden by the user. We will use it
17331      # for the tool.
17332
17333      # First remove it from the list of overridden variables, so we can test
17334      # for unknown variables in the end.
17335      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17336
17337      # Check if the provided tool contains a complete path.
17338      tool_specified="$UNZIP"
17339      tool_basename="${tool_specified##*/}"
17340      if test "x$tool_basename" = "x$tool_specified"; then
17341        # A command without a complete path is provided, search $PATH.
17342        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17343$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17344        # Extract the first word of "$tool_basename", so it can be a program name with args.
17345set dummy $tool_basename; ac_word=$2
17346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17347$as_echo_n "checking for $ac_word... " >&6; }
17348if ${ac_cv_path_UNZIP+:} false; then :
17349  $as_echo_n "(cached) " >&6
17350else
17351  case $UNZIP in
17352  [\\/]* | ?:[\\/]*)
17353  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17354  ;;
17355  *)
17356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17357for as_dir in $PATH
17358do
17359  IFS=$as_save_IFS
17360  test -z "$as_dir" && as_dir=.
17361    for ac_exec_ext in '' $ac_executable_extensions; do
17362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17363    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17365    break 2
17366  fi
17367done
17368  done
17369IFS=$as_save_IFS
17370
17371  ;;
17372esac
17373fi
17374UNZIP=$ac_cv_path_UNZIP
17375if test -n "$UNZIP"; then
17376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17377$as_echo "$UNZIP" >&6; }
17378else
17379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17380$as_echo "no" >&6; }
17381fi
17382
17383
17384        if test "x$UNZIP" = x; then
17385          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17386        fi
17387      else
17388        # Otherwise we believe it is a complete path. Use it as it is.
17389        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17390$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17392$as_echo_n "checking for UNZIP... " >&6; }
17393        if test ! -x "$tool_specified"; then
17394          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17395$as_echo "not found" >&6; }
17396          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17397        fi
17398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17399$as_echo "$tool_specified" >&6; }
17400      fi
17401    fi
17402  fi
17403
17404
17405
17406  if test "x$UNZIP" = x; then
17407    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17408  fi
17409
17410
17411
17412
17413
17414  # Publish this variable in the help.
17415
17416
17417  if test "x$ZIP" = x; then
17418    # The variable is not set by user, try to locate tool using the code snippet
17419    for ac_prog in zip
17420do
17421  # Extract the first word of "$ac_prog", so it can be a program name with args.
17422set dummy $ac_prog; ac_word=$2
17423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17424$as_echo_n "checking for $ac_word... " >&6; }
17425if ${ac_cv_path_ZIP+:} false; then :
17426  $as_echo_n "(cached) " >&6
17427else
17428  case $ZIP in
17429  [\\/]* | ?:[\\/]*)
17430  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17431  ;;
17432  *)
17433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17434for as_dir in $PATH
17435do
17436  IFS=$as_save_IFS
17437  test -z "$as_dir" && as_dir=.
17438    for ac_exec_ext in '' $ac_executable_extensions; do
17439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17440    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17442    break 2
17443  fi
17444done
17445  done
17446IFS=$as_save_IFS
17447
17448  ;;
17449esac
17450fi
17451ZIP=$ac_cv_path_ZIP
17452if test -n "$ZIP"; then
17453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17454$as_echo "$ZIP" >&6; }
17455else
17456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17457$as_echo "no" >&6; }
17458fi
17459
17460
17461  test -n "$ZIP" && break
17462done
17463
17464  else
17465    # The variable is set, but is it from the command line or the environment?
17466
17467    # Try to remove the string !ZIP! from our list.
17468    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17469    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17470      # If it failed, the variable was not from the command line. Ignore it,
17471      # but warn the user (except for BASH, which is always set by the calling BASH).
17472      if test "xZIP" != xBASH; then
17473        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17474$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17475      fi
17476      # Try to locate tool using the code snippet
17477      for ac_prog in zip
17478do
17479  # Extract the first word of "$ac_prog", so it can be a program name with args.
17480set dummy $ac_prog; ac_word=$2
17481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17482$as_echo_n "checking for $ac_word... " >&6; }
17483if ${ac_cv_path_ZIP+:} false; then :
17484  $as_echo_n "(cached) " >&6
17485else
17486  case $ZIP in
17487  [\\/]* | ?:[\\/]*)
17488  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17489  ;;
17490  *)
17491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17492for as_dir in $PATH
17493do
17494  IFS=$as_save_IFS
17495  test -z "$as_dir" && as_dir=.
17496    for ac_exec_ext in '' $ac_executable_extensions; do
17497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17498    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17500    break 2
17501  fi
17502done
17503  done
17504IFS=$as_save_IFS
17505
17506  ;;
17507esac
17508fi
17509ZIP=$ac_cv_path_ZIP
17510if test -n "$ZIP"; then
17511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17512$as_echo "$ZIP" >&6; }
17513else
17514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17515$as_echo "no" >&6; }
17516fi
17517
17518
17519  test -n "$ZIP" && break
17520done
17521
17522    else
17523      # If it succeeded, then it was overridden by the user. We will use it
17524      # for the tool.
17525
17526      # First remove it from the list of overridden variables, so we can test
17527      # for unknown variables in the end.
17528      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17529
17530      # Check if the provided tool contains a complete path.
17531      tool_specified="$ZIP"
17532      tool_basename="${tool_specified##*/}"
17533      if test "x$tool_basename" = "x$tool_specified"; then
17534        # A command without a complete path is provided, search $PATH.
17535        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17536$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17537        # Extract the first word of "$tool_basename", so it can be a program name with args.
17538set dummy $tool_basename; ac_word=$2
17539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17540$as_echo_n "checking for $ac_word... " >&6; }
17541if ${ac_cv_path_ZIP+:} false; then :
17542  $as_echo_n "(cached) " >&6
17543else
17544  case $ZIP in
17545  [\\/]* | ?:[\\/]*)
17546  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17547  ;;
17548  *)
17549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17550for as_dir in $PATH
17551do
17552  IFS=$as_save_IFS
17553  test -z "$as_dir" && as_dir=.
17554    for ac_exec_ext in '' $ac_executable_extensions; do
17555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17556    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17558    break 2
17559  fi
17560done
17561  done
17562IFS=$as_save_IFS
17563
17564  ;;
17565esac
17566fi
17567ZIP=$ac_cv_path_ZIP
17568if test -n "$ZIP"; then
17569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17570$as_echo "$ZIP" >&6; }
17571else
17572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17573$as_echo "no" >&6; }
17574fi
17575
17576
17577        if test "x$ZIP" = x; then
17578          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17579        fi
17580      else
17581        # Otherwise we believe it is a complete path. Use it as it is.
17582        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17583$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17584        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17585$as_echo_n "checking for ZIP... " >&6; }
17586        if test ! -x "$tool_specified"; then
17587          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17588$as_echo "not found" >&6; }
17589          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17590        fi
17591        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17592$as_echo "$tool_specified" >&6; }
17593      fi
17594    fi
17595  fi
17596
17597
17598
17599  if test "x$ZIP" = x; then
17600    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17601  fi
17602
17603
17604
17605  # Non-required basic tools
17606
17607
17608
17609  # Publish this variable in the help.
17610
17611
17612  if test "x$LDD" = x; then
17613    # The variable is not set by user, try to locate tool using the code snippet
17614    for ac_prog in ldd
17615do
17616  # Extract the first word of "$ac_prog", so it can be a program name with args.
17617set dummy $ac_prog; ac_word=$2
17618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17619$as_echo_n "checking for $ac_word... " >&6; }
17620if ${ac_cv_path_LDD+:} false; then :
17621  $as_echo_n "(cached) " >&6
17622else
17623  case $LDD in
17624  [\\/]* | ?:[\\/]*)
17625  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17626  ;;
17627  *)
17628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17629for as_dir in $PATH
17630do
17631  IFS=$as_save_IFS
17632  test -z "$as_dir" && as_dir=.
17633    for ac_exec_ext in '' $ac_executable_extensions; do
17634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17635    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17637    break 2
17638  fi
17639done
17640  done
17641IFS=$as_save_IFS
17642
17643  ;;
17644esac
17645fi
17646LDD=$ac_cv_path_LDD
17647if test -n "$LDD"; then
17648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17649$as_echo "$LDD" >&6; }
17650else
17651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17652$as_echo "no" >&6; }
17653fi
17654
17655
17656  test -n "$LDD" && break
17657done
17658
17659  else
17660    # The variable is set, but is it from the command line or the environment?
17661
17662    # Try to remove the string !LDD! from our list.
17663    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17664    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17665      # If it failed, the variable was not from the command line. Ignore it,
17666      # but warn the user (except for BASH, which is always set by the calling BASH).
17667      if test "xLDD" != xBASH; then
17668        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17669$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17670      fi
17671      # Try to locate tool using the code snippet
17672      for ac_prog in ldd
17673do
17674  # Extract the first word of "$ac_prog", so it can be a program name with args.
17675set dummy $ac_prog; ac_word=$2
17676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17677$as_echo_n "checking for $ac_word... " >&6; }
17678if ${ac_cv_path_LDD+:} false; then :
17679  $as_echo_n "(cached) " >&6
17680else
17681  case $LDD in
17682  [\\/]* | ?:[\\/]*)
17683  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17684  ;;
17685  *)
17686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17687for as_dir in $PATH
17688do
17689  IFS=$as_save_IFS
17690  test -z "$as_dir" && as_dir=.
17691    for ac_exec_ext in '' $ac_executable_extensions; do
17692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17693    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17695    break 2
17696  fi
17697done
17698  done
17699IFS=$as_save_IFS
17700
17701  ;;
17702esac
17703fi
17704LDD=$ac_cv_path_LDD
17705if test -n "$LDD"; then
17706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17707$as_echo "$LDD" >&6; }
17708else
17709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17710$as_echo "no" >&6; }
17711fi
17712
17713
17714  test -n "$LDD" && break
17715done
17716
17717    else
17718      # If it succeeded, then it was overridden by the user. We will use it
17719      # for the tool.
17720
17721      # First remove it from the list of overridden variables, so we can test
17722      # for unknown variables in the end.
17723      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17724
17725      # Check if the provided tool contains a complete path.
17726      tool_specified="$LDD"
17727      tool_basename="${tool_specified##*/}"
17728      if test "x$tool_basename" = "x$tool_specified"; then
17729        # A command without a complete path is provided, search $PATH.
17730        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17731$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17732        # Extract the first word of "$tool_basename", so it can be a program name with args.
17733set dummy $tool_basename; ac_word=$2
17734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17735$as_echo_n "checking for $ac_word... " >&6; }
17736if ${ac_cv_path_LDD+:} false; then :
17737  $as_echo_n "(cached) " >&6
17738else
17739  case $LDD in
17740  [\\/]* | ?:[\\/]*)
17741  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17742  ;;
17743  *)
17744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17745for as_dir in $PATH
17746do
17747  IFS=$as_save_IFS
17748  test -z "$as_dir" && as_dir=.
17749    for ac_exec_ext in '' $ac_executable_extensions; do
17750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17751    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17753    break 2
17754  fi
17755done
17756  done
17757IFS=$as_save_IFS
17758
17759  ;;
17760esac
17761fi
17762LDD=$ac_cv_path_LDD
17763if test -n "$LDD"; then
17764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17765$as_echo "$LDD" >&6; }
17766else
17767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17768$as_echo "no" >&6; }
17769fi
17770
17771
17772        if test "x$LDD" = x; then
17773          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17774        fi
17775      else
17776        # Otherwise we believe it is a complete path. Use it as it is.
17777        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17778$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17779        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17780$as_echo_n "checking for LDD... " >&6; }
17781        if test ! -x "$tool_specified"; then
17782          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17783$as_echo "not found" >&6; }
17784          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17785        fi
17786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17787$as_echo "$tool_specified" >&6; }
17788      fi
17789    fi
17790  fi
17791
17792
17793  if test "x$LDD" = "x"; then
17794    # List shared lib dependencies is used for
17795    # debug output and checking for forbidden dependencies.
17796    # We can build without it.
17797    LDD="true"
17798  fi
17799
17800
17801  # Publish this variable in the help.
17802
17803
17804  if test "x$OTOOL" = x; then
17805    # The variable is not set by user, try to locate tool using the code snippet
17806    for ac_prog in otool
17807do
17808  # Extract the first word of "$ac_prog", so it can be a program name with args.
17809set dummy $ac_prog; ac_word=$2
17810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17811$as_echo_n "checking for $ac_word... " >&6; }
17812if ${ac_cv_path_OTOOL+:} false; then :
17813  $as_echo_n "(cached) " >&6
17814else
17815  case $OTOOL in
17816  [\\/]* | ?:[\\/]*)
17817  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17818  ;;
17819  *)
17820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17821for as_dir in $PATH
17822do
17823  IFS=$as_save_IFS
17824  test -z "$as_dir" && as_dir=.
17825    for ac_exec_ext in '' $ac_executable_extensions; do
17826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17827    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17829    break 2
17830  fi
17831done
17832  done
17833IFS=$as_save_IFS
17834
17835  ;;
17836esac
17837fi
17838OTOOL=$ac_cv_path_OTOOL
17839if test -n "$OTOOL"; then
17840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17841$as_echo "$OTOOL" >&6; }
17842else
17843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17844$as_echo "no" >&6; }
17845fi
17846
17847
17848  test -n "$OTOOL" && break
17849done
17850
17851  else
17852    # The variable is set, but is it from the command line or the environment?
17853
17854    # Try to remove the string !OTOOL! from our list.
17855    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17856    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17857      # If it failed, the variable was not from the command line. Ignore it,
17858      # but warn the user (except for BASH, which is always set by the calling BASH).
17859      if test "xOTOOL" != xBASH; then
17860        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17861$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17862      fi
17863      # Try to locate tool using the code snippet
17864      for ac_prog in otool
17865do
17866  # Extract the first word of "$ac_prog", so it can be a program name with args.
17867set dummy $ac_prog; ac_word=$2
17868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17869$as_echo_n "checking for $ac_word... " >&6; }
17870if ${ac_cv_path_OTOOL+:} false; then :
17871  $as_echo_n "(cached) " >&6
17872else
17873  case $OTOOL in
17874  [\\/]* | ?:[\\/]*)
17875  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17876  ;;
17877  *)
17878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17879for as_dir in $PATH
17880do
17881  IFS=$as_save_IFS
17882  test -z "$as_dir" && as_dir=.
17883    for ac_exec_ext in '' $ac_executable_extensions; do
17884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17885    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17887    break 2
17888  fi
17889done
17890  done
17891IFS=$as_save_IFS
17892
17893  ;;
17894esac
17895fi
17896OTOOL=$ac_cv_path_OTOOL
17897if test -n "$OTOOL"; then
17898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17899$as_echo "$OTOOL" >&6; }
17900else
17901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17902$as_echo "no" >&6; }
17903fi
17904
17905
17906  test -n "$OTOOL" && break
17907done
17908
17909    else
17910      # If it succeeded, then it was overridden by the user. We will use it
17911      # for the tool.
17912
17913      # First remove it from the list of overridden variables, so we can test
17914      # for unknown variables in the end.
17915      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17916
17917      # Check if the provided tool contains a complete path.
17918      tool_specified="$OTOOL"
17919      tool_basename="${tool_specified##*/}"
17920      if test "x$tool_basename" = "x$tool_specified"; then
17921        # A command without a complete path is provided, search $PATH.
17922        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17923$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17924        # Extract the first word of "$tool_basename", so it can be a program name with args.
17925set dummy $tool_basename; ac_word=$2
17926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17927$as_echo_n "checking for $ac_word... " >&6; }
17928if ${ac_cv_path_OTOOL+:} false; then :
17929  $as_echo_n "(cached) " >&6
17930else
17931  case $OTOOL in
17932  [\\/]* | ?:[\\/]*)
17933  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17934  ;;
17935  *)
17936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17937for as_dir in $PATH
17938do
17939  IFS=$as_save_IFS
17940  test -z "$as_dir" && as_dir=.
17941    for ac_exec_ext in '' $ac_executable_extensions; do
17942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17943    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17945    break 2
17946  fi
17947done
17948  done
17949IFS=$as_save_IFS
17950
17951  ;;
17952esac
17953fi
17954OTOOL=$ac_cv_path_OTOOL
17955if test -n "$OTOOL"; then
17956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17957$as_echo "$OTOOL" >&6; }
17958else
17959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17960$as_echo "no" >&6; }
17961fi
17962
17963
17964        if test "x$OTOOL" = x; then
17965          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17966        fi
17967      else
17968        # Otherwise we believe it is a complete path. Use it as it is.
17969        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17970$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17972$as_echo_n "checking for OTOOL... " >&6; }
17973        if test ! -x "$tool_specified"; then
17974          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17975$as_echo "not found" >&6; }
17976          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17977        fi
17978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17979$as_echo "$tool_specified" >&6; }
17980      fi
17981    fi
17982  fi
17983
17984
17985  if test "x$OTOOL" = "x"; then
17986    OTOOL="true"
17987  fi
17988
17989
17990  # Publish this variable in the help.
17991
17992
17993  if test "x$READELF" = x; then
17994    # The variable is not set by user, try to locate tool using the code snippet
17995    for ac_prog in greadelf readelf
17996do
17997  # Extract the first word of "$ac_prog", so it can be a program name with args.
17998set dummy $ac_prog; ac_word=$2
17999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18000$as_echo_n "checking for $ac_word... " >&6; }
18001if ${ac_cv_path_READELF+:} false; then :
18002  $as_echo_n "(cached) " >&6
18003else
18004  case $READELF in
18005  [\\/]* | ?:[\\/]*)
18006  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18007  ;;
18008  *)
18009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18010for as_dir in $PATH
18011do
18012  IFS=$as_save_IFS
18013  test -z "$as_dir" && as_dir=.
18014    for ac_exec_ext in '' $ac_executable_extensions; do
18015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18016    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18018    break 2
18019  fi
18020done
18021  done
18022IFS=$as_save_IFS
18023
18024  ;;
18025esac
18026fi
18027READELF=$ac_cv_path_READELF
18028if test -n "$READELF"; then
18029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18030$as_echo "$READELF" >&6; }
18031else
18032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18033$as_echo "no" >&6; }
18034fi
18035
18036
18037  test -n "$READELF" && break
18038done
18039
18040  else
18041    # The variable is set, but is it from the command line or the environment?
18042
18043    # Try to remove the string !READELF! from our list.
18044    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18045    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18046      # If it failed, the variable was not from the command line. Ignore it,
18047      # but warn the user (except for BASH, which is always set by the calling BASH).
18048      if test "xREADELF" != xBASH; then
18049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18050$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18051      fi
18052      # Try to locate tool using the code snippet
18053      for ac_prog in greadelf readelf
18054do
18055  # Extract the first word of "$ac_prog", so it can be a program name with args.
18056set dummy $ac_prog; ac_word=$2
18057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18058$as_echo_n "checking for $ac_word... " >&6; }
18059if ${ac_cv_path_READELF+:} false; then :
18060  $as_echo_n "(cached) " >&6
18061else
18062  case $READELF in
18063  [\\/]* | ?:[\\/]*)
18064  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18065  ;;
18066  *)
18067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18068for as_dir in $PATH
18069do
18070  IFS=$as_save_IFS
18071  test -z "$as_dir" && as_dir=.
18072    for ac_exec_ext in '' $ac_executable_extensions; do
18073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18074    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18076    break 2
18077  fi
18078done
18079  done
18080IFS=$as_save_IFS
18081
18082  ;;
18083esac
18084fi
18085READELF=$ac_cv_path_READELF
18086if test -n "$READELF"; then
18087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18088$as_echo "$READELF" >&6; }
18089else
18090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18091$as_echo "no" >&6; }
18092fi
18093
18094
18095  test -n "$READELF" && break
18096done
18097
18098    else
18099      # If it succeeded, then it was overridden by the user. We will use it
18100      # for the tool.
18101
18102      # First remove it from the list of overridden variables, so we can test
18103      # for unknown variables in the end.
18104      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18105
18106      # Check if the provided tool contains a complete path.
18107      tool_specified="$READELF"
18108      tool_basename="${tool_specified##*/}"
18109      if test "x$tool_basename" = "x$tool_specified"; then
18110        # A command without a complete path is provided, search $PATH.
18111        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18112$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18113        # Extract the first word of "$tool_basename", so it can be a program name with args.
18114set dummy $tool_basename; ac_word=$2
18115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18116$as_echo_n "checking for $ac_word... " >&6; }
18117if ${ac_cv_path_READELF+:} false; then :
18118  $as_echo_n "(cached) " >&6
18119else
18120  case $READELF in
18121  [\\/]* | ?:[\\/]*)
18122  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18123  ;;
18124  *)
18125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18126for as_dir in $PATH
18127do
18128  IFS=$as_save_IFS
18129  test -z "$as_dir" && as_dir=.
18130    for ac_exec_ext in '' $ac_executable_extensions; do
18131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18132    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18134    break 2
18135  fi
18136done
18137  done
18138IFS=$as_save_IFS
18139
18140  ;;
18141esac
18142fi
18143READELF=$ac_cv_path_READELF
18144if test -n "$READELF"; then
18145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18146$as_echo "$READELF" >&6; }
18147else
18148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18149$as_echo "no" >&6; }
18150fi
18151
18152
18153        if test "x$READELF" = x; then
18154          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18155        fi
18156      else
18157        # Otherwise we believe it is a complete path. Use it as it is.
18158        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18159$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18160        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18161$as_echo_n "checking for READELF... " >&6; }
18162        if test ! -x "$tool_specified"; then
18163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18164$as_echo "not found" >&6; }
18165          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18166        fi
18167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18168$as_echo "$tool_specified" >&6; }
18169      fi
18170    fi
18171  fi
18172
18173
18174
18175
18176  # Publish this variable in the help.
18177
18178
18179  if test "x$HG" = x; then
18180    # The variable is not set by user, try to locate tool using the code snippet
18181    for ac_prog in hg
18182do
18183  # Extract the first word of "$ac_prog", so it can be a program name with args.
18184set dummy $ac_prog; ac_word=$2
18185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18186$as_echo_n "checking for $ac_word... " >&6; }
18187if ${ac_cv_path_HG+:} false; then :
18188  $as_echo_n "(cached) " >&6
18189else
18190  case $HG in
18191  [\\/]* | ?:[\\/]*)
18192  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18193  ;;
18194  *)
18195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18196for as_dir in $PATH
18197do
18198  IFS=$as_save_IFS
18199  test -z "$as_dir" && as_dir=.
18200    for ac_exec_ext in '' $ac_executable_extensions; do
18201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18202    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18204    break 2
18205  fi
18206done
18207  done
18208IFS=$as_save_IFS
18209
18210  ;;
18211esac
18212fi
18213HG=$ac_cv_path_HG
18214if test -n "$HG"; then
18215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18216$as_echo "$HG" >&6; }
18217else
18218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18219$as_echo "no" >&6; }
18220fi
18221
18222
18223  test -n "$HG" && break
18224done
18225
18226  else
18227    # The variable is set, but is it from the command line or the environment?
18228
18229    # Try to remove the string !HG! from our list.
18230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18232      # If it failed, the variable was not from the command line. Ignore it,
18233      # but warn the user (except for BASH, which is always set by the calling BASH).
18234      if test "xHG" != xBASH; then
18235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18236$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18237      fi
18238      # Try to locate tool using the code snippet
18239      for ac_prog in hg
18240do
18241  # Extract the first word of "$ac_prog", so it can be a program name with args.
18242set dummy $ac_prog; ac_word=$2
18243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18244$as_echo_n "checking for $ac_word... " >&6; }
18245if ${ac_cv_path_HG+:} false; then :
18246  $as_echo_n "(cached) " >&6
18247else
18248  case $HG in
18249  [\\/]* | ?:[\\/]*)
18250  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18251  ;;
18252  *)
18253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18254for as_dir in $PATH
18255do
18256  IFS=$as_save_IFS
18257  test -z "$as_dir" && as_dir=.
18258    for ac_exec_ext in '' $ac_executable_extensions; do
18259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18260    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18262    break 2
18263  fi
18264done
18265  done
18266IFS=$as_save_IFS
18267
18268  ;;
18269esac
18270fi
18271HG=$ac_cv_path_HG
18272if test -n "$HG"; then
18273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18274$as_echo "$HG" >&6; }
18275else
18276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18277$as_echo "no" >&6; }
18278fi
18279
18280
18281  test -n "$HG" && break
18282done
18283
18284    else
18285      # If it succeeded, then it was overridden by the user. We will use it
18286      # for the tool.
18287
18288      # First remove it from the list of overridden variables, so we can test
18289      # for unknown variables in the end.
18290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18291
18292      # Check if the provided tool contains a complete path.
18293      tool_specified="$HG"
18294      tool_basename="${tool_specified##*/}"
18295      if test "x$tool_basename" = "x$tool_specified"; then
18296        # A command without a complete path is provided, search $PATH.
18297        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18298$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18299        # Extract the first word of "$tool_basename", so it can be a program name with args.
18300set dummy $tool_basename; ac_word=$2
18301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18302$as_echo_n "checking for $ac_word... " >&6; }
18303if ${ac_cv_path_HG+:} false; then :
18304  $as_echo_n "(cached) " >&6
18305else
18306  case $HG in
18307  [\\/]* | ?:[\\/]*)
18308  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18309  ;;
18310  *)
18311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18312for as_dir in $PATH
18313do
18314  IFS=$as_save_IFS
18315  test -z "$as_dir" && as_dir=.
18316    for ac_exec_ext in '' $ac_executable_extensions; do
18317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18318    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18320    break 2
18321  fi
18322done
18323  done
18324IFS=$as_save_IFS
18325
18326  ;;
18327esac
18328fi
18329HG=$ac_cv_path_HG
18330if test -n "$HG"; then
18331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18332$as_echo "$HG" >&6; }
18333else
18334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18335$as_echo "no" >&6; }
18336fi
18337
18338
18339        if test "x$HG" = x; then
18340          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18341        fi
18342      else
18343        # Otherwise we believe it is a complete path. Use it as it is.
18344        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18345$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18346        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18347$as_echo_n "checking for HG... " >&6; }
18348        if test ! -x "$tool_specified"; then
18349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18350$as_echo "not found" >&6; }
18351          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18352        fi
18353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18354$as_echo "$tool_specified" >&6; }
18355      fi
18356    fi
18357  fi
18358
18359
18360
18361
18362  # Publish this variable in the help.
18363
18364
18365  if test "x$STAT" = x; then
18366    # The variable is not set by user, try to locate tool using the code snippet
18367    for ac_prog in stat
18368do
18369  # Extract the first word of "$ac_prog", so it can be a program name with args.
18370set dummy $ac_prog; ac_word=$2
18371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18372$as_echo_n "checking for $ac_word... " >&6; }
18373if ${ac_cv_path_STAT+:} false; then :
18374  $as_echo_n "(cached) " >&6
18375else
18376  case $STAT in
18377  [\\/]* | ?:[\\/]*)
18378  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18379  ;;
18380  *)
18381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18382for as_dir in $PATH
18383do
18384  IFS=$as_save_IFS
18385  test -z "$as_dir" && as_dir=.
18386    for ac_exec_ext in '' $ac_executable_extensions; do
18387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18388    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18390    break 2
18391  fi
18392done
18393  done
18394IFS=$as_save_IFS
18395
18396  ;;
18397esac
18398fi
18399STAT=$ac_cv_path_STAT
18400if test -n "$STAT"; then
18401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18402$as_echo "$STAT" >&6; }
18403else
18404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18405$as_echo "no" >&6; }
18406fi
18407
18408
18409  test -n "$STAT" && break
18410done
18411
18412  else
18413    # The variable is set, but is it from the command line or the environment?
18414
18415    # Try to remove the string !STAT! from our list.
18416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18418      # If it failed, the variable was not from the command line. Ignore it,
18419      # but warn the user (except for BASH, which is always set by the calling BASH).
18420      if test "xSTAT" != xBASH; then
18421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18422$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18423      fi
18424      # Try to locate tool using the code snippet
18425      for ac_prog in stat
18426do
18427  # Extract the first word of "$ac_prog", so it can be a program name with args.
18428set dummy $ac_prog; ac_word=$2
18429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18430$as_echo_n "checking for $ac_word... " >&6; }
18431if ${ac_cv_path_STAT+:} false; then :
18432  $as_echo_n "(cached) " >&6
18433else
18434  case $STAT in
18435  [\\/]* | ?:[\\/]*)
18436  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18437  ;;
18438  *)
18439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18440for as_dir in $PATH
18441do
18442  IFS=$as_save_IFS
18443  test -z "$as_dir" && as_dir=.
18444    for ac_exec_ext in '' $ac_executable_extensions; do
18445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18446    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18448    break 2
18449  fi
18450done
18451  done
18452IFS=$as_save_IFS
18453
18454  ;;
18455esac
18456fi
18457STAT=$ac_cv_path_STAT
18458if test -n "$STAT"; then
18459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18460$as_echo "$STAT" >&6; }
18461else
18462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18463$as_echo "no" >&6; }
18464fi
18465
18466
18467  test -n "$STAT" && break
18468done
18469
18470    else
18471      # If it succeeded, then it was overridden by the user. We will use it
18472      # for the tool.
18473
18474      # First remove it from the list of overridden variables, so we can test
18475      # for unknown variables in the end.
18476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18477
18478      # Check if the provided tool contains a complete path.
18479      tool_specified="$STAT"
18480      tool_basename="${tool_specified##*/}"
18481      if test "x$tool_basename" = "x$tool_specified"; then
18482        # A command without a complete path is provided, search $PATH.
18483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18484$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18485        # Extract the first word of "$tool_basename", so it can be a program name with args.
18486set dummy $tool_basename; ac_word=$2
18487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18488$as_echo_n "checking for $ac_word... " >&6; }
18489if ${ac_cv_path_STAT+:} false; then :
18490  $as_echo_n "(cached) " >&6
18491else
18492  case $STAT in
18493  [\\/]* | ?:[\\/]*)
18494  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18495  ;;
18496  *)
18497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18498for as_dir in $PATH
18499do
18500  IFS=$as_save_IFS
18501  test -z "$as_dir" && as_dir=.
18502    for ac_exec_ext in '' $ac_executable_extensions; do
18503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18504    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18506    break 2
18507  fi
18508done
18509  done
18510IFS=$as_save_IFS
18511
18512  ;;
18513esac
18514fi
18515STAT=$ac_cv_path_STAT
18516if test -n "$STAT"; then
18517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18518$as_echo "$STAT" >&6; }
18519else
18520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18521$as_echo "no" >&6; }
18522fi
18523
18524
18525        if test "x$STAT" = x; then
18526          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18527        fi
18528      else
18529        # Otherwise we believe it is a complete path. Use it as it is.
18530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18531$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18533$as_echo_n "checking for STAT... " >&6; }
18534        if test ! -x "$tool_specified"; then
18535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18536$as_echo "not found" >&6; }
18537          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18538        fi
18539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18540$as_echo "$tool_specified" >&6; }
18541      fi
18542    fi
18543  fi
18544
18545
18546
18547
18548  # Publish this variable in the help.
18549
18550
18551  if test "x$TIME" = x; then
18552    # The variable is not set by user, try to locate tool using the code snippet
18553    for ac_prog in time
18554do
18555  # Extract the first word of "$ac_prog", so it can be a program name with args.
18556set dummy $ac_prog; ac_word=$2
18557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18558$as_echo_n "checking for $ac_word... " >&6; }
18559if ${ac_cv_path_TIME+:} false; then :
18560  $as_echo_n "(cached) " >&6
18561else
18562  case $TIME in
18563  [\\/]* | ?:[\\/]*)
18564  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18565  ;;
18566  *)
18567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18568for as_dir in $PATH
18569do
18570  IFS=$as_save_IFS
18571  test -z "$as_dir" && as_dir=.
18572    for ac_exec_ext in '' $ac_executable_extensions; do
18573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18574    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18576    break 2
18577  fi
18578done
18579  done
18580IFS=$as_save_IFS
18581
18582  ;;
18583esac
18584fi
18585TIME=$ac_cv_path_TIME
18586if test -n "$TIME"; then
18587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18588$as_echo "$TIME" >&6; }
18589else
18590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18591$as_echo "no" >&6; }
18592fi
18593
18594
18595  test -n "$TIME" && break
18596done
18597
18598  else
18599    # The variable is set, but is it from the command line or the environment?
18600
18601    # Try to remove the string !TIME! from our list.
18602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18604      # If it failed, the variable was not from the command line. Ignore it,
18605      # but warn the user (except for BASH, which is always set by the calling BASH).
18606      if test "xTIME" != xBASH; then
18607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18608$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18609      fi
18610      # Try to locate tool using the code snippet
18611      for ac_prog in time
18612do
18613  # Extract the first word of "$ac_prog", so it can be a program name with args.
18614set dummy $ac_prog; ac_word=$2
18615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18616$as_echo_n "checking for $ac_word... " >&6; }
18617if ${ac_cv_path_TIME+:} false; then :
18618  $as_echo_n "(cached) " >&6
18619else
18620  case $TIME in
18621  [\\/]* | ?:[\\/]*)
18622  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18623  ;;
18624  *)
18625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18626for as_dir in $PATH
18627do
18628  IFS=$as_save_IFS
18629  test -z "$as_dir" && as_dir=.
18630    for ac_exec_ext in '' $ac_executable_extensions; do
18631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18632    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18634    break 2
18635  fi
18636done
18637  done
18638IFS=$as_save_IFS
18639
18640  ;;
18641esac
18642fi
18643TIME=$ac_cv_path_TIME
18644if test -n "$TIME"; then
18645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18646$as_echo "$TIME" >&6; }
18647else
18648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18649$as_echo "no" >&6; }
18650fi
18651
18652
18653  test -n "$TIME" && break
18654done
18655
18656    else
18657      # If it succeeded, then it was overridden by the user. We will use it
18658      # for the tool.
18659
18660      # First remove it from the list of overridden variables, so we can test
18661      # for unknown variables in the end.
18662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18663
18664      # Check if the provided tool contains a complete path.
18665      tool_specified="$TIME"
18666      tool_basename="${tool_specified##*/}"
18667      if test "x$tool_basename" = "x$tool_specified"; then
18668        # A command without a complete path is provided, search $PATH.
18669        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18670$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18671        # Extract the first word of "$tool_basename", so it can be a program name with args.
18672set dummy $tool_basename; ac_word=$2
18673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18674$as_echo_n "checking for $ac_word... " >&6; }
18675if ${ac_cv_path_TIME+:} false; then :
18676  $as_echo_n "(cached) " >&6
18677else
18678  case $TIME in
18679  [\\/]* | ?:[\\/]*)
18680  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18681  ;;
18682  *)
18683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18684for as_dir in $PATH
18685do
18686  IFS=$as_save_IFS
18687  test -z "$as_dir" && as_dir=.
18688    for ac_exec_ext in '' $ac_executable_extensions; do
18689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18690    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18692    break 2
18693  fi
18694done
18695  done
18696IFS=$as_save_IFS
18697
18698  ;;
18699esac
18700fi
18701TIME=$ac_cv_path_TIME
18702if test -n "$TIME"; then
18703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18704$as_echo "$TIME" >&6; }
18705else
18706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18707$as_echo "no" >&6; }
18708fi
18709
18710
18711        if test "x$TIME" = x; then
18712          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18713        fi
18714      else
18715        # Otherwise we believe it is a complete path. Use it as it is.
18716        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18717$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18719$as_echo_n "checking for TIME... " >&6; }
18720        if test ! -x "$tool_specified"; then
18721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18722$as_echo "not found" >&6; }
18723          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18724        fi
18725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18726$as_echo "$tool_specified" >&6; }
18727      fi
18728    fi
18729  fi
18730
18731
18732  # Check if it's GNU time
18733  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18734  if test "x$IS_GNU_TIME" != x; then
18735    IS_GNU_TIME=yes
18736  else
18737    IS_GNU_TIME=no
18738  fi
18739
18740
18741  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18742
18743
18744
18745  # Publish this variable in the help.
18746
18747
18748  if test "x$COMM" = x; then
18749    # The variable is not set by user, try to locate tool using the code snippet
18750    for ac_prog in comm
18751do
18752  # Extract the first word of "$ac_prog", so it can be a program name with args.
18753set dummy $ac_prog; ac_word=$2
18754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18755$as_echo_n "checking for $ac_word... " >&6; }
18756if ${ac_cv_path_COMM+:} false; then :
18757  $as_echo_n "(cached) " >&6
18758else
18759  case $COMM in
18760  [\\/]* | ?:[\\/]*)
18761  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18762  ;;
18763  *)
18764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18765for as_dir in $PATH
18766do
18767  IFS=$as_save_IFS
18768  test -z "$as_dir" && as_dir=.
18769    for ac_exec_ext in '' $ac_executable_extensions; do
18770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18771    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18773    break 2
18774  fi
18775done
18776  done
18777IFS=$as_save_IFS
18778
18779  ;;
18780esac
18781fi
18782COMM=$ac_cv_path_COMM
18783if test -n "$COMM"; then
18784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18785$as_echo "$COMM" >&6; }
18786else
18787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18788$as_echo "no" >&6; }
18789fi
18790
18791
18792  test -n "$COMM" && break
18793done
18794
18795  else
18796    # The variable is set, but is it from the command line or the environment?
18797
18798    # Try to remove the string !COMM! from our list.
18799    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18800    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18801      # If it failed, the variable was not from the command line. Ignore it,
18802      # but warn the user (except for BASH, which is always set by the calling BASH).
18803      if test "xCOMM" != xBASH; then
18804        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18805$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18806      fi
18807      # Try to locate tool using the code snippet
18808      for ac_prog in comm
18809do
18810  # Extract the first word of "$ac_prog", so it can be a program name with args.
18811set dummy $ac_prog; ac_word=$2
18812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18813$as_echo_n "checking for $ac_word... " >&6; }
18814if ${ac_cv_path_COMM+:} false; then :
18815  $as_echo_n "(cached) " >&6
18816else
18817  case $COMM in
18818  [\\/]* | ?:[\\/]*)
18819  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18820  ;;
18821  *)
18822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18823for as_dir in $PATH
18824do
18825  IFS=$as_save_IFS
18826  test -z "$as_dir" && as_dir=.
18827    for ac_exec_ext in '' $ac_executable_extensions; do
18828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18829    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18831    break 2
18832  fi
18833done
18834  done
18835IFS=$as_save_IFS
18836
18837  ;;
18838esac
18839fi
18840COMM=$ac_cv_path_COMM
18841if test -n "$COMM"; then
18842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18843$as_echo "$COMM" >&6; }
18844else
18845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18846$as_echo "no" >&6; }
18847fi
18848
18849
18850  test -n "$COMM" && break
18851done
18852
18853    else
18854      # If it succeeded, then it was overridden by the user. We will use it
18855      # for the tool.
18856
18857      # First remove it from the list of overridden variables, so we can test
18858      # for unknown variables in the end.
18859      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18860
18861      # Check if the provided tool contains a complete path.
18862      tool_specified="$COMM"
18863      tool_basename="${tool_specified##*/}"
18864      if test "x$tool_basename" = "x$tool_specified"; then
18865        # A command without a complete path is provided, search $PATH.
18866        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18867$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18868        # Extract the first word of "$tool_basename", so it can be a program name with args.
18869set dummy $tool_basename; ac_word=$2
18870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18871$as_echo_n "checking for $ac_word... " >&6; }
18872if ${ac_cv_path_COMM+:} false; then :
18873  $as_echo_n "(cached) " >&6
18874else
18875  case $COMM in
18876  [\\/]* | ?:[\\/]*)
18877  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18878  ;;
18879  *)
18880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18881for as_dir in $PATH
18882do
18883  IFS=$as_save_IFS
18884  test -z "$as_dir" && as_dir=.
18885    for ac_exec_ext in '' $ac_executable_extensions; do
18886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18887    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18889    break 2
18890  fi
18891done
18892  done
18893IFS=$as_save_IFS
18894
18895  ;;
18896esac
18897fi
18898COMM=$ac_cv_path_COMM
18899if test -n "$COMM"; then
18900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18901$as_echo "$COMM" >&6; }
18902else
18903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18904$as_echo "no" >&6; }
18905fi
18906
18907
18908        if test "x$COMM" = x; then
18909          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18910        fi
18911      else
18912        # Otherwise we believe it is a complete path. Use it as it is.
18913        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18914$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18915        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18916$as_echo_n "checking for COMM... " >&6; }
18917        if test ! -x "$tool_specified"; then
18918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18919$as_echo "not found" >&6; }
18920          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18921        fi
18922        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18923$as_echo "$tool_specified" >&6; }
18924      fi
18925    fi
18926  fi
18927
18928
18929
18930  if test "x$COMM" = x; then
18931    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18932  fi
18933
18934
18935  fi
18936
18937  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18938
18939
18940
18941  # Publish this variable in the help.
18942
18943
18944  if test "x$DSYMUTIL" = x; then
18945    # The variable is not set by user, try to locate tool using the code snippet
18946    for ac_prog in dsymutil
18947do
18948  # Extract the first word of "$ac_prog", so it can be a program name with args.
18949set dummy $ac_prog; ac_word=$2
18950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18951$as_echo_n "checking for $ac_word... " >&6; }
18952if ${ac_cv_path_DSYMUTIL+:} false; then :
18953  $as_echo_n "(cached) " >&6
18954else
18955  case $DSYMUTIL in
18956  [\\/]* | ?:[\\/]*)
18957  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18958  ;;
18959  *)
18960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18961for as_dir in $PATH
18962do
18963  IFS=$as_save_IFS
18964  test -z "$as_dir" && as_dir=.
18965    for ac_exec_ext in '' $ac_executable_extensions; do
18966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18967    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18969    break 2
18970  fi
18971done
18972  done
18973IFS=$as_save_IFS
18974
18975  ;;
18976esac
18977fi
18978DSYMUTIL=$ac_cv_path_DSYMUTIL
18979if test -n "$DSYMUTIL"; then
18980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18981$as_echo "$DSYMUTIL" >&6; }
18982else
18983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18984$as_echo "no" >&6; }
18985fi
18986
18987
18988  test -n "$DSYMUTIL" && break
18989done
18990
18991  else
18992    # The variable is set, but is it from the command line or the environment?
18993
18994    # Try to remove the string !DSYMUTIL! from our list.
18995    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18996    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18997      # If it failed, the variable was not from the command line. Ignore it,
18998      # but warn the user (except for BASH, which is always set by the calling BASH).
18999      if test "xDSYMUTIL" != xBASH; then
19000        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19001$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19002      fi
19003      # Try to locate tool using the code snippet
19004      for ac_prog in dsymutil
19005do
19006  # Extract the first word of "$ac_prog", so it can be a program name with args.
19007set dummy $ac_prog; ac_word=$2
19008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19009$as_echo_n "checking for $ac_word... " >&6; }
19010if ${ac_cv_path_DSYMUTIL+:} false; then :
19011  $as_echo_n "(cached) " >&6
19012else
19013  case $DSYMUTIL in
19014  [\\/]* | ?:[\\/]*)
19015  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19016  ;;
19017  *)
19018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19019for as_dir in $PATH
19020do
19021  IFS=$as_save_IFS
19022  test -z "$as_dir" && as_dir=.
19023    for ac_exec_ext in '' $ac_executable_extensions; do
19024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19025    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19027    break 2
19028  fi
19029done
19030  done
19031IFS=$as_save_IFS
19032
19033  ;;
19034esac
19035fi
19036DSYMUTIL=$ac_cv_path_DSYMUTIL
19037if test -n "$DSYMUTIL"; then
19038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19039$as_echo "$DSYMUTIL" >&6; }
19040else
19041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19042$as_echo "no" >&6; }
19043fi
19044
19045
19046  test -n "$DSYMUTIL" && break
19047done
19048
19049    else
19050      # If it succeeded, then it was overridden by the user. We will use it
19051      # for the tool.
19052
19053      # First remove it from the list of overridden variables, so we can test
19054      # for unknown variables in the end.
19055      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19056
19057      # Check if the provided tool contains a complete path.
19058      tool_specified="$DSYMUTIL"
19059      tool_basename="${tool_specified##*/}"
19060      if test "x$tool_basename" = "x$tool_specified"; then
19061        # A command without a complete path is provided, search $PATH.
19062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19063$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19064        # Extract the first word of "$tool_basename", so it can be a program name with args.
19065set dummy $tool_basename; ac_word=$2
19066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19067$as_echo_n "checking for $ac_word... " >&6; }
19068if ${ac_cv_path_DSYMUTIL+:} false; then :
19069  $as_echo_n "(cached) " >&6
19070else
19071  case $DSYMUTIL in
19072  [\\/]* | ?:[\\/]*)
19073  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19074  ;;
19075  *)
19076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19077for as_dir in $PATH
19078do
19079  IFS=$as_save_IFS
19080  test -z "$as_dir" && as_dir=.
19081    for ac_exec_ext in '' $ac_executable_extensions; do
19082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19083    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19085    break 2
19086  fi
19087done
19088  done
19089IFS=$as_save_IFS
19090
19091  ;;
19092esac
19093fi
19094DSYMUTIL=$ac_cv_path_DSYMUTIL
19095if test -n "$DSYMUTIL"; then
19096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19097$as_echo "$DSYMUTIL" >&6; }
19098else
19099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19100$as_echo "no" >&6; }
19101fi
19102
19103
19104        if test "x$DSYMUTIL" = x; then
19105          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19106        fi
19107      else
19108        # Otherwise we believe it is a complete path. Use it as it is.
19109        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19110$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19112$as_echo_n "checking for DSYMUTIL... " >&6; }
19113        if test ! -x "$tool_specified"; then
19114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19115$as_echo "not found" >&6; }
19116          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19117        fi
19118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19119$as_echo "$tool_specified" >&6; }
19120      fi
19121    fi
19122  fi
19123
19124
19125
19126  if test "x$DSYMUTIL" = x; then
19127    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19128  fi
19129
19130
19131
19132
19133
19134  # Publish this variable in the help.
19135
19136
19137  if test "x$XATTR" = x; then
19138    # The variable is not set by user, try to locate tool using the code snippet
19139    for ac_prog in xattr
19140do
19141  # Extract the first word of "$ac_prog", so it can be a program name with args.
19142set dummy $ac_prog; ac_word=$2
19143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19144$as_echo_n "checking for $ac_word... " >&6; }
19145if ${ac_cv_path_XATTR+:} false; then :
19146  $as_echo_n "(cached) " >&6
19147else
19148  case $XATTR in
19149  [\\/]* | ?:[\\/]*)
19150  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19151  ;;
19152  *)
19153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19154for as_dir in $PATH
19155do
19156  IFS=$as_save_IFS
19157  test -z "$as_dir" && as_dir=.
19158    for ac_exec_ext in '' $ac_executable_extensions; do
19159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19160    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19162    break 2
19163  fi
19164done
19165  done
19166IFS=$as_save_IFS
19167
19168  ;;
19169esac
19170fi
19171XATTR=$ac_cv_path_XATTR
19172if test -n "$XATTR"; then
19173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19174$as_echo "$XATTR" >&6; }
19175else
19176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19177$as_echo "no" >&6; }
19178fi
19179
19180
19181  test -n "$XATTR" && break
19182done
19183
19184  else
19185    # The variable is set, but is it from the command line or the environment?
19186
19187    # Try to remove the string !XATTR! from our list.
19188    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19189    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19190      # If it failed, the variable was not from the command line. Ignore it,
19191      # but warn the user (except for BASH, which is always set by the calling BASH).
19192      if test "xXATTR" != xBASH; then
19193        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19194$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19195      fi
19196      # Try to locate tool using the code snippet
19197      for ac_prog in xattr
19198do
19199  # Extract the first word of "$ac_prog", so it can be a program name with args.
19200set dummy $ac_prog; ac_word=$2
19201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19202$as_echo_n "checking for $ac_word... " >&6; }
19203if ${ac_cv_path_XATTR+:} false; then :
19204  $as_echo_n "(cached) " >&6
19205else
19206  case $XATTR in
19207  [\\/]* | ?:[\\/]*)
19208  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19209  ;;
19210  *)
19211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19212for as_dir in $PATH
19213do
19214  IFS=$as_save_IFS
19215  test -z "$as_dir" && as_dir=.
19216    for ac_exec_ext in '' $ac_executable_extensions; do
19217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19218    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19220    break 2
19221  fi
19222done
19223  done
19224IFS=$as_save_IFS
19225
19226  ;;
19227esac
19228fi
19229XATTR=$ac_cv_path_XATTR
19230if test -n "$XATTR"; then
19231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19232$as_echo "$XATTR" >&6; }
19233else
19234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19235$as_echo "no" >&6; }
19236fi
19237
19238
19239  test -n "$XATTR" && break
19240done
19241
19242    else
19243      # If it succeeded, then it was overridden by the user. We will use it
19244      # for the tool.
19245
19246      # First remove it from the list of overridden variables, so we can test
19247      # for unknown variables in the end.
19248      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19249
19250      # Check if the provided tool contains a complete path.
19251      tool_specified="$XATTR"
19252      tool_basename="${tool_specified##*/}"
19253      if test "x$tool_basename" = "x$tool_specified"; then
19254        # A command without a complete path is provided, search $PATH.
19255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19256$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19257        # Extract the first word of "$tool_basename", so it can be a program name with args.
19258set dummy $tool_basename; ac_word=$2
19259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19260$as_echo_n "checking for $ac_word... " >&6; }
19261if ${ac_cv_path_XATTR+:} false; then :
19262  $as_echo_n "(cached) " >&6
19263else
19264  case $XATTR in
19265  [\\/]* | ?:[\\/]*)
19266  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19267  ;;
19268  *)
19269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19270for as_dir in $PATH
19271do
19272  IFS=$as_save_IFS
19273  test -z "$as_dir" && as_dir=.
19274    for ac_exec_ext in '' $ac_executable_extensions; do
19275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19276    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19278    break 2
19279  fi
19280done
19281  done
19282IFS=$as_save_IFS
19283
19284  ;;
19285esac
19286fi
19287XATTR=$ac_cv_path_XATTR
19288if test -n "$XATTR"; then
19289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19290$as_echo "$XATTR" >&6; }
19291else
19292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19293$as_echo "no" >&6; }
19294fi
19295
19296
19297        if test "x$XATTR" = x; then
19298          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19299        fi
19300      else
19301        # Otherwise we believe it is a complete path. Use it as it is.
19302        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19303$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19304        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19305$as_echo_n "checking for XATTR... " >&6; }
19306        if test ! -x "$tool_specified"; then
19307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19308$as_echo "not found" >&6; }
19309          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19310        fi
19311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19312$as_echo "$tool_specified" >&6; }
19313      fi
19314    fi
19315  fi
19316
19317
19318
19319  if test "x$XATTR" = x; then
19320    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19321  fi
19322
19323
19324
19325
19326  # Publish this variable in the help.
19327
19328
19329  if test "x$CODESIGN" = x; then
19330    # The variable is not set by user, try to locate tool using the code snippet
19331    for ac_prog in codesign
19332do
19333  # Extract the first word of "$ac_prog", so it can be a program name with args.
19334set dummy $ac_prog; ac_word=$2
19335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19336$as_echo_n "checking for $ac_word... " >&6; }
19337if ${ac_cv_path_CODESIGN+:} false; then :
19338  $as_echo_n "(cached) " >&6
19339else
19340  case $CODESIGN in
19341  [\\/]* | ?:[\\/]*)
19342  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19343  ;;
19344  *)
19345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19346for as_dir in $PATH
19347do
19348  IFS=$as_save_IFS
19349  test -z "$as_dir" && as_dir=.
19350    for ac_exec_ext in '' $ac_executable_extensions; do
19351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19352    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19354    break 2
19355  fi
19356done
19357  done
19358IFS=$as_save_IFS
19359
19360  ;;
19361esac
19362fi
19363CODESIGN=$ac_cv_path_CODESIGN
19364if test -n "$CODESIGN"; then
19365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19366$as_echo "$CODESIGN" >&6; }
19367else
19368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19369$as_echo "no" >&6; }
19370fi
19371
19372
19373  test -n "$CODESIGN" && break
19374done
19375
19376  else
19377    # The variable is set, but is it from the command line or the environment?
19378
19379    # Try to remove the string !CODESIGN! from our list.
19380    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19381    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19382      # If it failed, the variable was not from the command line. Ignore it,
19383      # but warn the user (except for BASH, which is always set by the calling BASH).
19384      if test "xCODESIGN" != xBASH; then
19385        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19386$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19387      fi
19388      # Try to locate tool using the code snippet
19389      for ac_prog in codesign
19390do
19391  # Extract the first word of "$ac_prog", so it can be a program name with args.
19392set dummy $ac_prog; ac_word=$2
19393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19394$as_echo_n "checking for $ac_word... " >&6; }
19395if ${ac_cv_path_CODESIGN+:} false; then :
19396  $as_echo_n "(cached) " >&6
19397else
19398  case $CODESIGN in
19399  [\\/]* | ?:[\\/]*)
19400  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19401  ;;
19402  *)
19403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19404for as_dir in $PATH
19405do
19406  IFS=$as_save_IFS
19407  test -z "$as_dir" && as_dir=.
19408    for ac_exec_ext in '' $ac_executable_extensions; do
19409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19410    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19412    break 2
19413  fi
19414done
19415  done
19416IFS=$as_save_IFS
19417
19418  ;;
19419esac
19420fi
19421CODESIGN=$ac_cv_path_CODESIGN
19422if test -n "$CODESIGN"; then
19423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19424$as_echo "$CODESIGN" >&6; }
19425else
19426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19427$as_echo "no" >&6; }
19428fi
19429
19430
19431  test -n "$CODESIGN" && break
19432done
19433
19434    else
19435      # If it succeeded, then it was overridden by the user. We will use it
19436      # for the tool.
19437
19438      # First remove it from the list of overridden variables, so we can test
19439      # for unknown variables in the end.
19440      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19441
19442      # Check if the provided tool contains a complete path.
19443      tool_specified="$CODESIGN"
19444      tool_basename="${tool_specified##*/}"
19445      if test "x$tool_basename" = "x$tool_specified"; then
19446        # A command without a complete path is provided, search $PATH.
19447        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19448$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19449        # Extract the first word of "$tool_basename", so it can be a program name with args.
19450set dummy $tool_basename; ac_word=$2
19451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19452$as_echo_n "checking for $ac_word... " >&6; }
19453if ${ac_cv_path_CODESIGN+:} false; then :
19454  $as_echo_n "(cached) " >&6
19455else
19456  case $CODESIGN in
19457  [\\/]* | ?:[\\/]*)
19458  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19459  ;;
19460  *)
19461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19462for as_dir in $PATH
19463do
19464  IFS=$as_save_IFS
19465  test -z "$as_dir" && as_dir=.
19466    for ac_exec_ext in '' $ac_executable_extensions; do
19467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19468    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19470    break 2
19471  fi
19472done
19473  done
19474IFS=$as_save_IFS
19475
19476  ;;
19477esac
19478fi
19479CODESIGN=$ac_cv_path_CODESIGN
19480if test -n "$CODESIGN"; then
19481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19482$as_echo "$CODESIGN" >&6; }
19483else
19484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19485$as_echo "no" >&6; }
19486fi
19487
19488
19489        if test "x$CODESIGN" = x; then
19490          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19491        fi
19492      else
19493        # Otherwise we believe it is a complete path. Use it as it is.
19494        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19495$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19497$as_echo_n "checking for CODESIGN... " >&6; }
19498        if test ! -x "$tool_specified"; then
19499          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19500$as_echo "not found" >&6; }
19501          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19502        fi
19503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19504$as_echo "$tool_specified" >&6; }
19505      fi
19506    fi
19507  fi
19508
19509
19510    if test "x$CODESIGN" != "x"; then
19511      # Verify that the openjdk_codesign certificate is present
19512      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19513$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19514      rm -f codesign-testfile
19515      touch codesign-testfile
19516      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19517      rm -f codesign-testfile
19518      if test "x$CODESIGN" = x; then
19519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19520$as_echo "no" >&6; }
19521      else
19522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19523$as_echo "yes" >&6; }
19524      fi
19525    fi
19526  fi
19527
19528
19529# Check if pkg-config is available.
19530
19531
19532if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19533	if test -n "$ac_tool_prefix"; then
19534  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19535set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19537$as_echo_n "checking for $ac_word... " >&6; }
19538if ${ac_cv_path_PKG_CONFIG+:} false; then :
19539  $as_echo_n "(cached) " >&6
19540else
19541  case $PKG_CONFIG in
19542  [\\/]* | ?:[\\/]*)
19543  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19544  ;;
19545  *)
19546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19547for as_dir in $PATH
19548do
19549  IFS=$as_save_IFS
19550  test -z "$as_dir" && as_dir=.
19551    for ac_exec_ext in '' $ac_executable_extensions; do
19552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19553    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19555    break 2
19556  fi
19557done
19558  done
19559IFS=$as_save_IFS
19560
19561  ;;
19562esac
19563fi
19564PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19565if test -n "$PKG_CONFIG"; then
19566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19567$as_echo "$PKG_CONFIG" >&6; }
19568else
19569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19570$as_echo "no" >&6; }
19571fi
19572
19573
19574fi
19575if test -z "$ac_cv_path_PKG_CONFIG"; then
19576  ac_pt_PKG_CONFIG=$PKG_CONFIG
19577  # Extract the first word of "pkg-config", so it can be a program name with args.
19578set dummy pkg-config; ac_word=$2
19579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19580$as_echo_n "checking for $ac_word... " >&6; }
19581if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19582  $as_echo_n "(cached) " >&6
19583else
19584  case $ac_pt_PKG_CONFIG in
19585  [\\/]* | ?:[\\/]*)
19586  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19587  ;;
19588  *)
19589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19590for as_dir in $PATH
19591do
19592  IFS=$as_save_IFS
19593  test -z "$as_dir" && as_dir=.
19594    for ac_exec_ext in '' $ac_executable_extensions; do
19595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19596    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19598    break 2
19599  fi
19600done
19601  done
19602IFS=$as_save_IFS
19603
19604  ;;
19605esac
19606fi
19607ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19608if test -n "$ac_pt_PKG_CONFIG"; then
19609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19610$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19611else
19612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19613$as_echo "no" >&6; }
19614fi
19615
19616  if test "x$ac_pt_PKG_CONFIG" = x; then
19617    PKG_CONFIG=""
19618  else
19619    case $cross_compiling:$ac_tool_warned in
19620yes:)
19621{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19622$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19623ac_tool_warned=yes ;;
19624esac
19625    PKG_CONFIG=$ac_pt_PKG_CONFIG
19626  fi
19627else
19628  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19629fi
19630
19631fi
19632if test -n "$PKG_CONFIG"; then
19633	_pkg_min_version=0.9.0
19634	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19635$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19636	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19637		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19638$as_echo "yes" >&6; }
19639	else
19640		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19641$as_echo "no" >&6; }
19642		PKG_CONFIG=""
19643	fi
19644
19645fi
19646
19647# After basic tools have been setup, we can check build os specific details.
19648
19649  ###############################################################################
19650
19651  # Note that this is the build platform OS version!
19652
19653  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19654  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19655  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19656  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19657
19658
19659
19660
19661
19662# Setup builddeps, for automatic downloading of tools we need.
19663# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19664# boot-jdk setup, but we need to have basic tools setup first.
19665
19666
19667# Check whether --with-builddeps-conf was given.
19668if test "${with_builddeps_conf+set}" = set; then :
19669  withval=$with_builddeps_conf;
19670fi
19671
19672
19673
19674# Check whether --with-builddeps-server was given.
19675if test "${with_builddeps_server+set}" = set; then :
19676  withval=$with_builddeps_server;
19677fi
19678
19679
19680
19681# Check whether --with-builddeps-dir was given.
19682if test "${with_builddeps_dir+set}" = set; then :
19683  withval=$with_builddeps_dir;
19684else
19685  with_builddeps_dir=/localhome/builddeps
19686fi
19687
19688
19689
19690# Check whether --with-builddeps-group was given.
19691if test "${with_builddeps_group+set}" = set; then :
19692  withval=$with_builddeps_group;
19693fi
19694
19695
19696
19697
19698  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19699    if test "x$with_builddeps_conf" != x; then
19700      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19701$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19702      builddepsfile=$with_builddeps_conf
19703      if test -s $builddepsfile; then
19704        . $builddepsfile
19705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19706$as_echo "loaded!" >&6; }
19707      else
19708        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19709      fi
19710    else
19711      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19712$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19713      builddepsfile=`mktemp`
19714      touch $builddepsfile
19715      # Put all found confs into a single file.
19716      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19717      # Source the file to acquire the variables
19718      if test -s $builddepsfile; then
19719        . $builddepsfile
19720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19721$as_echo "found at least one!" >&6; }
19722      else
19723        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19724      fi
19725    fi
19726    # Create build and target names that use _ instead of "-" and ".".
19727    # This is necessary to use them in variable names.
19728    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19729    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19730    # Extract rewrite information for build and target
19731    eval rewritten_build=\${REWRITE_${build_var}}
19732    if test "x$rewritten_build" = x; then
19733      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19734      echo Build stays the same $rewritten_build
19735    else
19736      echo Rewriting build for builddeps into $rewritten_build
19737    fi
19738    eval rewritten_target=\${REWRITE_${target_var}}
19739    if test "x$rewritten_target" = x; then
19740      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19741      echo Target stays the same $rewritten_target
19742    else
19743      echo Rewriting target for builddeps into $rewritten_target
19744    fi
19745    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19746    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19747  fi
19748  for ac_prog in 7z unzip
19749do
19750  # Extract the first word of "$ac_prog", so it can be a program name with args.
19751set dummy $ac_prog; ac_word=$2
19752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19753$as_echo_n "checking for $ac_word... " >&6; }
19754if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19755  $as_echo_n "(cached) " >&6
19756else
19757  if test -n "$BDEPS_UNZIP"; then
19758  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19759else
19760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19761for as_dir in $PATH
19762do
19763  IFS=$as_save_IFS
19764  test -z "$as_dir" && as_dir=.
19765    for ac_exec_ext in '' $ac_executable_extensions; do
19766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19767    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19769    break 2
19770  fi
19771done
19772  done
19773IFS=$as_save_IFS
19774
19775fi
19776fi
19777BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19778if test -n "$BDEPS_UNZIP"; then
19779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19780$as_echo "$BDEPS_UNZIP" >&6; }
19781else
19782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19783$as_echo "no" >&6; }
19784fi
19785
19786
19787  test -n "$BDEPS_UNZIP" && break
19788done
19789
19790  if test "x$BDEPS_UNZIP" = x7z; then
19791    BDEPS_UNZIP="7z x"
19792  fi
19793
19794  for ac_prog in wget lftp ftp
19795do
19796  # Extract the first word of "$ac_prog", so it can be a program name with args.
19797set dummy $ac_prog; ac_word=$2
19798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19799$as_echo_n "checking for $ac_word... " >&6; }
19800if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19801  $as_echo_n "(cached) " >&6
19802else
19803  if test -n "$BDEPS_FTP"; then
19804  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19805else
19806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19807for as_dir in $PATH
19808do
19809  IFS=$as_save_IFS
19810  test -z "$as_dir" && as_dir=.
19811    for ac_exec_ext in '' $ac_executable_extensions; do
19812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19813    ac_cv_prog_BDEPS_FTP="$ac_prog"
19814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19815    break 2
19816  fi
19817done
19818  done
19819IFS=$as_save_IFS
19820
19821fi
19822fi
19823BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19824if test -n "$BDEPS_FTP"; then
19825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19826$as_echo "$BDEPS_FTP" >&6; }
19827else
19828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19829$as_echo "no" >&6; }
19830fi
19831
19832
19833  test -n "$BDEPS_FTP" && break
19834done
19835
19836
19837
19838###############################################################################
19839#
19840# Determine OpenJDK variants, options and version numbers.
19841#
19842###############################################################################
19843
19844# We need build & target for this.
19845
19846
19847  ###############################################################################
19848  #
19849  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19850  # We always build headless support.
19851  #
19852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19853$as_echo_n "checking headful support... " >&6; }
19854  # Check whether --enable-headful was given.
19855if test "${enable_headful+set}" = set; then :
19856  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19857else
19858  SUPPORT_HEADFUL=yes
19859fi
19860
19861
19862  SUPPORT_HEADLESS=yes
19863  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19864
19865  if test "x$SUPPORT_HEADFUL" = xyes; then
19866    # We are building both headful and headless.
19867    headful_msg="include support for both headful and headless"
19868  fi
19869
19870  if test "x$SUPPORT_HEADFUL" = xno; then
19871    # Thus we are building headless only.
19872    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19873    headful_msg="headless only"
19874  fi
19875
19876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19877$as_echo "$headful_msg" >&6; }
19878
19879
19880
19881
19882
19883  # Control wether Hotspot runs Queens test after build.
19884  # Check whether --enable-hotspot-test-in-build was given.
19885if test "${enable_hotspot_test_in_build+set}" = set; then :
19886  enableval=$enable_hotspot_test_in_build;
19887else
19888  enable_hotspot_test_in_build=no
19889fi
19890
19891  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19892    TEST_IN_BUILD=true
19893  else
19894    TEST_IN_BUILD=false
19895  fi
19896
19897
19898  ###############################################################################
19899  #
19900  # Choose cacerts source file
19901  #
19902
19903# Check whether --with-cacerts-file was given.
19904if test "${with_cacerts_file+set}" = set; then :
19905  withval=$with_cacerts_file;
19906fi
19907
19908  if test "x$with_cacerts_file" != x; then
19909    CACERTS_FILE=$with_cacerts_file
19910  fi
19911
19912
19913  ###############################################################################
19914  #
19915  # Enable or disable unlimited crypto
19916  #
19917  # Check whether --enable-unlimited-crypto was given.
19918if test "${enable_unlimited_crypto+set}" = set; then :
19919  enableval=$enable_unlimited_crypto;
19920else
19921  enable_unlimited_crypto=no
19922fi
19923
19924  if test "x$enable_unlimited_crypto" = "xyes"; then
19925    UNLIMITED_CRYPTO=true
19926  else
19927    UNLIMITED_CRYPTO=false
19928  fi
19929
19930
19931  ###############################################################################
19932  #
19933  # Enable or disable the elliptic curve crypto implementation
19934  #
19935
19936
19937  ###############################################################################
19938  #
19939  # --enable-rmiconnector-iiop
19940  #
19941  # Check whether --enable-rmiconnector-iiop was given.
19942if test "${enable_rmiconnector_iiop+set}" = set; then :
19943  enableval=$enable_rmiconnector_iiop;
19944fi
19945
19946  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19947    RMICONNECTOR_IIOP=true
19948  else
19949    RMICONNECTOR_IIOP=false
19950  fi
19951
19952
19953  ###############################################################################
19954  #
19955  # Compress jars
19956  #
19957  COMPRESS_JARS=false
19958
19959
19960
19961
19962  # Source the version numbers
19963  . $AUTOCONF_DIR/version-numbers
19964
19965  # Get the settings from parameters
19966
19967# Check whether --with-milestone was given.
19968if test "${with_milestone+set}" = set; then :
19969  withval=$with_milestone;
19970fi
19971
19972  if test "x$with_milestone" = xyes; then
19973    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19974  elif test "x$with_milestone" != x; then
19975    MILESTONE="$with_milestone"
19976  fi
19977  if test "x$MILESTONE" = x; then
19978    MILESTONE=internal
19979  fi
19980
19981
19982# Check whether --with-update-version was given.
19983if test "${with_update_version+set}" = set; then :
19984  withval=$with_update_version;
19985fi
19986
19987  if test "x$with_update_version" = xyes; then
19988    as_fn_error $? "Update version must have a value" "$LINENO" 5
19989  elif test "x$with_update_version" != x; then
19990    JDK_UPDATE_VERSION="$with_update_version"
19991    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19992    # to a bug in expr (which reduces it to just X). To work around this, we
19993    # always add a 0 to one digit update versions.
19994    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19995      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19996    fi
19997  fi
19998
19999
20000# Check whether --with-user-release-suffix was given.
20001if test "${with_user_release_suffix+set}" = set; then :
20002  withval=$with_user_release_suffix;
20003fi
20004
20005  if test "x$with_user_release_suffix" = xyes; then
20006    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20007  elif test "x$with_user_release_suffix" != x; then
20008    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20009  fi
20010
20011
20012# Check whether --with-build-number was given.
20013if test "${with_build_number+set}" = set; then :
20014  withval=$with_build_number;
20015fi
20016
20017  if test "x$with_build_number" = xyes; then
20018    as_fn_error $? "Build number must have a value" "$LINENO" 5
20019  elif test "x$with_build_number" != x; then
20020    JDK_BUILD_NUMBER="$with_build_number"
20021  fi
20022  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20023  if test "x$JDK_BUILD_NUMBER" = x; then
20024    JDK_BUILD_NUMBER=b00
20025    if test "x$USER_RELEASE_SUFFIX" = x; then
20026      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20027      # Avoid [:alnum:] since it depends on the locale.
20028      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20029      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20030    fi
20031  fi
20032
20033  # Now set the JDK version, milestone, build number etc.
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049  COPYRIGHT_YEAR=`date +'%Y'`
20050
20051
20052  if test "x$JDK_UPDATE_VERSION" != x; then
20053    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20054  else
20055    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20056  fi
20057
20058
20059  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20060
20061
20062
20063###############################################################################
20064#
20065# Setup BootJDK, used to bootstrap the build.
20066#
20067###############################################################################
20068
20069
20070  BOOT_JDK_FOUND=no
20071
20072# Check whether --with-boot-jdk was given.
20073if test "${with_boot_jdk+set}" = set; then :
20074  withval=$with_boot_jdk;
20075fi
20076
20077
20078  # We look for the Boot JDK through various means, going from more certain to
20079  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20080  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20081  # must check if this is indeed valid; otherwise we'll continue looking.
20082
20083  # Test: Is bootjdk explicitely set by command line arguments?
20084
20085  if test "x$BOOT_JDK_FOUND" = xno; then
20086    # Now execute the test
20087
20088  if test "x$with_boot_jdk" != x; then
20089    BOOT_JDK=$with_boot_jdk
20090    BOOT_JDK_FOUND=maybe
20091    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20092$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20093  fi
20094
20095
20096    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20097    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20098      # Do we have a bin/java?
20099      if test ! -x "$BOOT_JDK/bin/java"; then
20100        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20102        BOOT_JDK_FOUND=no
20103      else
20104        # Do we have a bin/javac?
20105        if test ! -x "$BOOT_JDK/bin/javac"; then
20106          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20107$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20108          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20109$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20110          BOOT_JDK_FOUND=no
20111        else
20112          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20113          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20114            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20116            BOOT_JDK_FOUND=no
20117          else
20118            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20119            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20120
20121            # Extra M4 quote needed to protect [] in grep expression.
20122            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20123            if test "x$FOUND_CORRECT_VERSION" = x; then
20124              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20126              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20127$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20128              BOOT_JDK_FOUND=no
20129            else
20130              # We're done! :-)
20131              BOOT_JDK_FOUND=yes
20132
20133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20134
20135  # Input might be given as Windows format, start by converting to
20136  # unix format.
20137  path="$BOOT_JDK"
20138  new_path=`$CYGPATH -u "$path"`
20139
20140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20143  # "foo.exe" is OK but "foo" is an error.
20144  #
20145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20146  # It is also a way to make sure we got the proper file name for the real test later on.
20147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20148  if test "x$test_shortpath" = x; then
20149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20150$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20151    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20152  fi
20153
20154  # Call helper function which possibly converts this using DOS-style short mode.
20155  # If so, the updated path is stored in $new_path.
20156
20157  input_path="$new_path"
20158  # Check if we need to convert this using DOS-style short mode. If the path
20159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20160  # take no chances and rewrite it.
20161  # Note: m4 eats our [], so we need to use [ and ] instead.
20162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20163  if test "x$has_forbidden_chars" != x; then
20164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20168      # Going to short mode and back again did indeed matter. Since short mode is
20169      # case insensitive, let's make it lowercase to improve readability.
20170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20171      # Now convert it back to Unix-stile (cygpath)
20172      input_path=`$CYGPATH -u "$shortmode_path"`
20173      new_path="$input_path"
20174    fi
20175  fi
20176
20177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20178  if test "x$test_cygdrive_prefix" = x; then
20179    # As a simple fix, exclude /usr/bin since it's not a real path.
20180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20182      # a path prefixed by /cygdrive for fixpath to work.
20183      new_path="$CYGWIN_ROOT_PATH$input_path"
20184    fi
20185  fi
20186
20187
20188  if test "x$path" != "x$new_path"; then
20189    BOOT_JDK="$new_path"
20190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20191$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20192  fi
20193
20194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20195
20196  path="$BOOT_JDK"
20197  has_colon=`$ECHO $path | $GREP ^.:`
20198  new_path="$path"
20199  if test "x$has_colon" = x; then
20200    # Not in mixed or Windows style, start by that.
20201    new_path=`cmd //c echo $path`
20202  fi
20203
20204
20205  input_path="$new_path"
20206  # Check if we need to convert this using DOS-style short mode. If the path
20207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20208  # take no chances and rewrite it.
20209  # Note: m4 eats our [], so we need to use [ and ] instead.
20210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20211  if test "x$has_forbidden_chars" != x; then
20212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20214  fi
20215
20216
20217  windows_path="$new_path"
20218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20219    unix_path=`$CYGPATH -u "$windows_path"`
20220    new_path="$unix_path"
20221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20223    new_path="$unix_path"
20224  fi
20225
20226  if test "x$path" != "x$new_path"; then
20227    BOOT_JDK="$new_path"
20228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20230  fi
20231
20232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20234
20235  else
20236    # We're on a posix platform. Hooray! :)
20237    path="$BOOT_JDK"
20238    has_space=`$ECHO "$path" | $GREP " "`
20239    if test "x$has_space" != x; then
20240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20241$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20242      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20243    fi
20244
20245    # Use eval to expand a potential ~
20246    eval path="$path"
20247    if test ! -f "$path" && test ! -d "$path"; then
20248      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20249    fi
20250
20251    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20252  fi
20253
20254              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20255$as_echo_n "checking for Boot JDK... " >&6; }
20256              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20257$as_echo "$BOOT_JDK" >&6; }
20258              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20259$as_echo_n "checking Boot JDK version... " >&6; }
20260              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20261              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20262$as_echo "$BOOT_JDK_VERSION" >&6; }
20263            fi # end check jdk version
20264          fi # end check rt.jar
20265        fi # end check javac
20266      fi # end check java
20267    fi # end check boot jdk found
20268  fi
20269
20270  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20271    # Having specified an argument which is incorrect will produce an instant failure;
20272    # we should not go on looking
20273    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20274  fi
20275
20276  # Test: Is bootjdk available from builddeps?
20277
20278  if test "x$BOOT_JDK_FOUND" = xno; then
20279    # Now execute the test
20280
20281
20282
20283  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20284    # Source the builddeps file again, to make sure it uses the latest variables!
20285    . $builddepsfile
20286    # Look for a target and build machine specific resource!
20287    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20288    if test "x$resource" = x; then
20289      # Ok, lets instead look for a target specific resource
20290      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20291    fi
20292    if test "x$resource" = x; then
20293      # Ok, lets instead look for a build specific resource
20294      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20295    fi
20296    if test "x$resource" = x; then
20297      # Ok, lets instead look for a generic resource
20298      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20299      resource=${builddep_bootjdk}
20300    fi
20301    if test "x$resource" != x; then
20302      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20303$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20304      # If the resource in the builddeps.conf file is an existing directory,
20305      # for example /java/linux/cups
20306      if test -d ${resource}; then
20307        depdir=${resource}
20308      else
20309
20310  # bootjdk is for example mymodule
20311  # $resource is for example libs/general/libmymod_1_2_3.zip
20312  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20313  # $with_builddeps_dir is for example /localhome/builddeps
20314  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20315  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20316  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20317  filename=`basename $resource`
20318  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20319  filebase=${filename%%.*}
20320  extension=${filename#*.}
20321  installdir=$with_builddeps_dir/$filebase
20322  if test ! -f $installdir/$filename.unpacked; then
20323    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20324$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20325    if test ! -d $installdir; then
20326      mkdir -p $installdir
20327    fi
20328    if test ! -d $installdir; then
20329      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20330    fi
20331    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20332    touch $tmpfile
20333    if test ! -f $tmpfile; then
20334      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20335    fi
20336
20337  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20338  # $tmpfile is the local file name for the downloaded file.
20339  VALID_TOOL=no
20340  if test "x$BDEPS_FTP" = xwget; then
20341    VALID_TOOL=yes
20342    wget -O $tmpfile $with_builddeps_server/$resource
20343  fi
20344  if test "x$BDEPS_FTP" = xlftp; then
20345    VALID_TOOL=yes
20346    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20347  fi
20348  if test "x$BDEPS_FTP" = xftp; then
20349    VALID_TOOL=yes
20350    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20351    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20352    FTPUSERPWD=${FTPSERVER%%@*}
20353    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20354      FTPUSER=${userpwd%%:*}
20355      FTPPWD=${userpwd#*@}
20356      FTPSERVER=${FTPSERVER#*@}
20357    else
20358      FTPUSER=ftp
20359      FTPPWD=ftp
20360    fi
20361    # the "pass" command does not work on some
20362    # ftp clients (read ftp.exe) but if it works,
20363    # passive mode is better!
20364    ( \
20365        echo "user $FTPUSER $FTPPWD"        ; \
20366        echo "pass"                         ; \
20367        echo "bin"                          ; \
20368        echo "get $FTPPATH $tmpfile"              ; \
20369    ) | ftp -in $FTPSERVER
20370  fi
20371  if test "x$VALID_TOOL" != xyes; then
20372    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20373  fi
20374
20375    mv $tmpfile $installdir/$filename
20376    if test ! -s $installdir/$filename; then
20377      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20378    fi
20379    case "$extension" in
20380      zip)  echo "Unzipping $installdir/$filename..."
20381        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20382        ;;
20383      tar.gz) echo "Untaring $installdir/$filename..."
20384        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20385        ;;
20386      tgz) echo "Untaring $installdir/$filename..."
20387        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20388        ;;
20389      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20390        ;;
20391    esac
20392  fi
20393  if test -f $installdir/$filename.unpacked; then
20394    depdir=$installdir
20395  fi
20396
20397      fi
20398      # Source the builddeps file again, because in the previous command, the depdir
20399      # was updated to point at the current build dependency install directory.
20400      . $builddepsfile
20401      # Now extract variables from the builddeps.conf files.
20402      theroot=${builddep_bootjdk_ROOT}
20403      thecflags=${builddep_bootjdk_CFLAGS}
20404      thelibs=${builddep_bootjdk_LIBS}
20405      if test "x$depdir" = x; then
20406        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20407      fi
20408      BOOT_JDK=$depdir
20409      if test "x$theroot" != x; then
20410        BOOT_JDK="$theroot"
20411      fi
20412      if test "x$thecflags" != x; then
20413        BOOT_JDK_CFLAGS="$thecflags"
20414      fi
20415      if test "x$thelibs" != x; then
20416        BOOT_JDK_LIBS="$thelibs"
20417      fi
20418      BOOT_JDK_FOUND=maybe
20419      else BOOT_JDK_FOUND=no
20420
20421    fi
20422    else BOOT_JDK_FOUND=no
20423
20424  fi
20425
20426
20427
20428    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20429    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20430      # Do we have a bin/java?
20431      if test ! -x "$BOOT_JDK/bin/java"; then
20432        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20434        BOOT_JDK_FOUND=no
20435      else
20436        # Do we have a bin/javac?
20437        if test ! -x "$BOOT_JDK/bin/javac"; then
20438          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20439$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20440          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20441$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20442          BOOT_JDK_FOUND=no
20443        else
20444          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20445          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20446            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20448            BOOT_JDK_FOUND=no
20449          else
20450            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20451            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20452
20453            # Extra M4 quote needed to protect [] in grep expression.
20454            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20455            if test "x$FOUND_CORRECT_VERSION" = x; then
20456              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20458              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20459$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20460              BOOT_JDK_FOUND=no
20461            else
20462              # We're done! :-)
20463              BOOT_JDK_FOUND=yes
20464
20465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20466
20467  # Input might be given as Windows format, start by converting to
20468  # unix format.
20469  path="$BOOT_JDK"
20470  new_path=`$CYGPATH -u "$path"`
20471
20472  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20473  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20474  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20475  # "foo.exe" is OK but "foo" is an error.
20476  #
20477  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20478  # It is also a way to make sure we got the proper file name for the real test later on.
20479  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20480  if test "x$test_shortpath" = x; then
20481    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20482$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20483    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20484  fi
20485
20486  # Call helper function which possibly converts this using DOS-style short mode.
20487  # If so, the updated path is stored in $new_path.
20488
20489  input_path="$new_path"
20490  # Check if we need to convert this using DOS-style short mode. If the path
20491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20492  # take no chances and rewrite it.
20493  # Note: m4 eats our [], so we need to use [ and ] instead.
20494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20495  if test "x$has_forbidden_chars" != x; then
20496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20497    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20498    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20499    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20500      # Going to short mode and back again did indeed matter. Since short mode is
20501      # case insensitive, let's make it lowercase to improve readability.
20502      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20503      # Now convert it back to Unix-stile (cygpath)
20504      input_path=`$CYGPATH -u "$shortmode_path"`
20505      new_path="$input_path"
20506    fi
20507  fi
20508
20509  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20510  if test "x$test_cygdrive_prefix" = x; then
20511    # As a simple fix, exclude /usr/bin since it's not a real path.
20512    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20513      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20514      # a path prefixed by /cygdrive for fixpath to work.
20515      new_path="$CYGWIN_ROOT_PATH$input_path"
20516    fi
20517  fi
20518
20519
20520  if test "x$path" != "x$new_path"; then
20521    BOOT_JDK="$new_path"
20522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20523$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20524  fi
20525
20526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20527
20528  path="$BOOT_JDK"
20529  has_colon=`$ECHO $path | $GREP ^.:`
20530  new_path="$path"
20531  if test "x$has_colon" = x; then
20532    # Not in mixed or Windows style, start by that.
20533    new_path=`cmd //c echo $path`
20534  fi
20535
20536
20537  input_path="$new_path"
20538  # Check if we need to convert this using DOS-style short mode. If the path
20539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20540  # take no chances and rewrite it.
20541  # Note: m4 eats our [], so we need to use [ and ] instead.
20542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20543  if test "x$has_forbidden_chars" != x; then
20544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20546  fi
20547
20548
20549  windows_path="$new_path"
20550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20551    unix_path=`$CYGPATH -u "$windows_path"`
20552    new_path="$unix_path"
20553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20555    new_path="$unix_path"
20556  fi
20557
20558  if test "x$path" != "x$new_path"; then
20559    BOOT_JDK="$new_path"
20560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20561$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20562  fi
20563
20564  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20565  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20566
20567  else
20568    # We're on a posix platform. Hooray! :)
20569    path="$BOOT_JDK"
20570    has_space=`$ECHO "$path" | $GREP " "`
20571    if test "x$has_space" != x; then
20572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20573$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20574      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20575    fi
20576
20577    # Use eval to expand a potential ~
20578    eval path="$path"
20579    if test ! -f "$path" && test ! -d "$path"; then
20580      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20581    fi
20582
20583    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20584  fi
20585
20586              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20587$as_echo_n "checking for Boot JDK... " >&6; }
20588              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20589$as_echo "$BOOT_JDK" >&6; }
20590              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20591$as_echo_n "checking Boot JDK version... " >&6; }
20592              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20593              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20594$as_echo "$BOOT_JDK_VERSION" >&6; }
20595            fi # end check jdk version
20596          fi # end check rt.jar
20597        fi # end check javac
20598      fi # end check java
20599    fi # end check boot jdk found
20600  fi
20601
20602
20603  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20604
20605  if test "x$BOOT_JDK_FOUND" = xno; then
20606    # Now execute the test
20607
20608  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20609    # First check at user selected default
20610
20611  if test "x$BOOT_JDK_FOUND" = xno; then
20612    # Now execute the test
20613
20614  if test -x /usr/libexec/java_home; then
20615    BOOT_JDK=`/usr/libexec/java_home `
20616    BOOT_JDK_FOUND=maybe
20617    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20618$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20619  fi
20620
20621
20622    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20623    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20624      # Do we have a bin/java?
20625      if test ! -x "$BOOT_JDK/bin/java"; then
20626        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20628        BOOT_JDK_FOUND=no
20629      else
20630        # Do we have a bin/javac?
20631        if test ! -x "$BOOT_JDK/bin/javac"; then
20632          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20634          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20635$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20636          BOOT_JDK_FOUND=no
20637        else
20638          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20639          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20640            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20641$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20642            BOOT_JDK_FOUND=no
20643          else
20644            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20645            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20646
20647            # Extra M4 quote needed to protect [] in grep expression.
20648            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20649            if test "x$FOUND_CORRECT_VERSION" = x; then
20650              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20652              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20653$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20654              BOOT_JDK_FOUND=no
20655            else
20656              # We're done! :-)
20657              BOOT_JDK_FOUND=yes
20658
20659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20660
20661  # Input might be given as Windows format, start by converting to
20662  # unix format.
20663  path="$BOOT_JDK"
20664  new_path=`$CYGPATH -u "$path"`
20665
20666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20669  # "foo.exe" is OK but "foo" is an error.
20670  #
20671  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20672  # It is also a way to make sure we got the proper file name for the real test later on.
20673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20674  if test "x$test_shortpath" = x; then
20675    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20676$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20677    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20678  fi
20679
20680  # Call helper function which possibly converts this using DOS-style short mode.
20681  # If so, the updated path is stored in $new_path.
20682
20683  input_path="$new_path"
20684  # Check if we need to convert this using DOS-style short mode. If the path
20685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20686  # take no chances and rewrite it.
20687  # Note: m4 eats our [], so we need to use [ and ] instead.
20688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20689  if test "x$has_forbidden_chars" != x; then
20690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20691    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20692    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20693    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20694      # Going to short mode and back again did indeed matter. Since short mode is
20695      # case insensitive, let's make it lowercase to improve readability.
20696      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20697      # Now convert it back to Unix-stile (cygpath)
20698      input_path=`$CYGPATH -u "$shortmode_path"`
20699      new_path="$input_path"
20700    fi
20701  fi
20702
20703  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20704  if test "x$test_cygdrive_prefix" = x; then
20705    # As a simple fix, exclude /usr/bin since it's not a real path.
20706    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20707      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20708      # a path prefixed by /cygdrive for fixpath to work.
20709      new_path="$CYGWIN_ROOT_PATH$input_path"
20710    fi
20711  fi
20712
20713
20714  if test "x$path" != "x$new_path"; then
20715    BOOT_JDK="$new_path"
20716    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20717$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20718  fi
20719
20720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20721
20722  path="$BOOT_JDK"
20723  has_colon=`$ECHO $path | $GREP ^.:`
20724  new_path="$path"
20725  if test "x$has_colon" = x; then
20726    # Not in mixed or Windows style, start by that.
20727    new_path=`cmd //c echo $path`
20728  fi
20729
20730
20731  input_path="$new_path"
20732  # Check if we need to convert this using DOS-style short mode. If the path
20733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20734  # take no chances and rewrite it.
20735  # Note: m4 eats our [], so we need to use [ and ] instead.
20736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20737  if test "x$has_forbidden_chars" != x; then
20738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20740  fi
20741
20742
20743  windows_path="$new_path"
20744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20745    unix_path=`$CYGPATH -u "$windows_path"`
20746    new_path="$unix_path"
20747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20749    new_path="$unix_path"
20750  fi
20751
20752  if test "x$path" != "x$new_path"; then
20753    BOOT_JDK="$new_path"
20754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20755$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20756  fi
20757
20758  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20759  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20760
20761  else
20762    # We're on a posix platform. Hooray! :)
20763    path="$BOOT_JDK"
20764    has_space=`$ECHO "$path" | $GREP " "`
20765    if test "x$has_space" != x; then
20766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20767$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20768      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20769    fi
20770
20771    # Use eval to expand a potential ~
20772    eval path="$path"
20773    if test ! -f "$path" && test ! -d "$path"; then
20774      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20775    fi
20776
20777    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20778  fi
20779
20780              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20781$as_echo_n "checking for Boot JDK... " >&6; }
20782              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20783$as_echo "$BOOT_JDK" >&6; }
20784              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20785$as_echo_n "checking Boot JDK version... " >&6; }
20786              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20787              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20788$as_echo "$BOOT_JDK_VERSION" >&6; }
20789            fi # end check jdk version
20790          fi # end check rt.jar
20791        fi # end check javac
20792      fi # end check java
20793    fi # end check boot jdk found
20794  fi
20795
20796    # If that did not work out (e.g. too old), try explicit versions instead
20797
20798  if test "x$BOOT_JDK_FOUND" = xno; then
20799    # Now execute the test
20800
20801  if test -x /usr/libexec/java_home; then
20802    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20803    BOOT_JDK_FOUND=maybe
20804    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20805$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20806  fi
20807
20808
20809    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20810    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20811      # Do we have a bin/java?
20812      if test ! -x "$BOOT_JDK/bin/java"; then
20813        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20815        BOOT_JDK_FOUND=no
20816      else
20817        # Do we have a bin/javac?
20818        if test ! -x "$BOOT_JDK/bin/javac"; then
20819          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20821          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20822$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20823          BOOT_JDK_FOUND=no
20824        else
20825          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20826          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20827            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20829            BOOT_JDK_FOUND=no
20830          else
20831            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20832            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20833
20834            # Extra M4 quote needed to protect [] in grep expression.
20835            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20836            if test "x$FOUND_CORRECT_VERSION" = x; then
20837              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20839              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20840$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20841              BOOT_JDK_FOUND=no
20842            else
20843              # We're done! :-)
20844              BOOT_JDK_FOUND=yes
20845
20846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20847
20848  # Input might be given as Windows format, start by converting to
20849  # unix format.
20850  path="$BOOT_JDK"
20851  new_path=`$CYGPATH -u "$path"`
20852
20853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20856  # "foo.exe" is OK but "foo" is an error.
20857  #
20858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20859  # It is also a way to make sure we got the proper file name for the real test later on.
20860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20861  if test "x$test_shortpath" = x; then
20862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20863$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20864    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20865  fi
20866
20867  # Call helper function which possibly converts this using DOS-style short mode.
20868  # If so, the updated path is stored in $new_path.
20869
20870  input_path="$new_path"
20871  # Check if we need to convert this using DOS-style short mode. If the path
20872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20873  # take no chances and rewrite it.
20874  # Note: m4 eats our [], so we need to use [ and ] instead.
20875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20876  if test "x$has_forbidden_chars" != x; then
20877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20881      # Going to short mode and back again did indeed matter. Since short mode is
20882      # case insensitive, let's make it lowercase to improve readability.
20883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20884      # Now convert it back to Unix-stile (cygpath)
20885      input_path=`$CYGPATH -u "$shortmode_path"`
20886      new_path="$input_path"
20887    fi
20888  fi
20889
20890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20891  if test "x$test_cygdrive_prefix" = x; then
20892    # As a simple fix, exclude /usr/bin since it's not a real path.
20893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20895      # a path prefixed by /cygdrive for fixpath to work.
20896      new_path="$CYGWIN_ROOT_PATH$input_path"
20897    fi
20898  fi
20899
20900
20901  if test "x$path" != "x$new_path"; then
20902    BOOT_JDK="$new_path"
20903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20905  fi
20906
20907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20908
20909  path="$BOOT_JDK"
20910  has_colon=`$ECHO $path | $GREP ^.:`
20911  new_path="$path"
20912  if test "x$has_colon" = x; then
20913    # Not in mixed or Windows style, start by that.
20914    new_path=`cmd //c echo $path`
20915  fi
20916
20917
20918  input_path="$new_path"
20919  # Check if we need to convert this using DOS-style short mode. If the path
20920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20921  # take no chances and rewrite it.
20922  # Note: m4 eats our [], so we need to use [ and ] instead.
20923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20924  if test "x$has_forbidden_chars" != x; then
20925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20927  fi
20928
20929
20930  windows_path="$new_path"
20931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20932    unix_path=`$CYGPATH -u "$windows_path"`
20933    new_path="$unix_path"
20934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20936    new_path="$unix_path"
20937  fi
20938
20939  if test "x$path" != "x$new_path"; then
20940    BOOT_JDK="$new_path"
20941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20942$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20943  fi
20944
20945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20947
20948  else
20949    # We're on a posix platform. Hooray! :)
20950    path="$BOOT_JDK"
20951    has_space=`$ECHO "$path" | $GREP " "`
20952    if test "x$has_space" != x; then
20953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20954$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20955      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20956    fi
20957
20958    # Use eval to expand a potential ~
20959    eval path="$path"
20960    if test ! -f "$path" && test ! -d "$path"; then
20961      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20962    fi
20963
20964    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20965  fi
20966
20967              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20968$as_echo_n "checking for Boot JDK... " >&6; }
20969              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20970$as_echo "$BOOT_JDK" >&6; }
20971              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20972$as_echo_n "checking Boot JDK version... " >&6; }
20973              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20974              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20975$as_echo "$BOOT_JDK_VERSION" >&6; }
20976            fi # end check jdk version
20977          fi # end check rt.jar
20978        fi # end check javac
20979      fi # end check java
20980    fi # end check boot jdk found
20981  fi
20982
20983
20984  if test "x$BOOT_JDK_FOUND" = xno; then
20985    # Now execute the test
20986
20987  if test -x /usr/libexec/java_home; then
20988    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20989    BOOT_JDK_FOUND=maybe
20990    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20991$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20992  fi
20993
20994
20995    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20996    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20997      # Do we have a bin/java?
20998      if test ! -x "$BOOT_JDK/bin/java"; then
20999        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21001        BOOT_JDK_FOUND=no
21002      else
21003        # Do we have a bin/javac?
21004        if test ! -x "$BOOT_JDK/bin/javac"; then
21005          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21007          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21008$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21009          BOOT_JDK_FOUND=no
21010        else
21011          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21012          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21013            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21015            BOOT_JDK_FOUND=no
21016          else
21017            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21018            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21019
21020            # Extra M4 quote needed to protect [] in grep expression.
21021            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21022            if test "x$FOUND_CORRECT_VERSION" = x; then
21023              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21025              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21026$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21027              BOOT_JDK_FOUND=no
21028            else
21029              # We're done! :-)
21030              BOOT_JDK_FOUND=yes
21031
21032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21033
21034  # Input might be given as Windows format, start by converting to
21035  # unix format.
21036  path="$BOOT_JDK"
21037  new_path=`$CYGPATH -u "$path"`
21038
21039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21042  # "foo.exe" is OK but "foo" is an error.
21043  #
21044  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21045  # It is also a way to make sure we got the proper file name for the real test later on.
21046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21047  if test "x$test_shortpath" = x; then
21048    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21049$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21050    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21051  fi
21052
21053  # Call helper function which possibly converts this using DOS-style short mode.
21054  # If so, the updated path is stored in $new_path.
21055
21056  input_path="$new_path"
21057  # Check if we need to convert this using DOS-style short mode. If the path
21058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21059  # take no chances and rewrite it.
21060  # Note: m4 eats our [], so we need to use [ and ] instead.
21061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21062  if test "x$has_forbidden_chars" != x; then
21063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21067      # Going to short mode and back again did indeed matter. Since short mode is
21068      # case insensitive, let's make it lowercase to improve readability.
21069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21070      # Now convert it back to Unix-stile (cygpath)
21071      input_path=`$CYGPATH -u "$shortmode_path"`
21072      new_path="$input_path"
21073    fi
21074  fi
21075
21076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21077  if test "x$test_cygdrive_prefix" = x; then
21078    # As a simple fix, exclude /usr/bin since it's not a real path.
21079    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21081      # a path prefixed by /cygdrive for fixpath to work.
21082      new_path="$CYGWIN_ROOT_PATH$input_path"
21083    fi
21084  fi
21085
21086
21087  if test "x$path" != "x$new_path"; then
21088    BOOT_JDK="$new_path"
21089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21090$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21091  fi
21092
21093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21094
21095  path="$BOOT_JDK"
21096  has_colon=`$ECHO $path | $GREP ^.:`
21097  new_path="$path"
21098  if test "x$has_colon" = x; then
21099    # Not in mixed or Windows style, start by that.
21100    new_path=`cmd //c echo $path`
21101  fi
21102
21103
21104  input_path="$new_path"
21105  # Check if we need to convert this using DOS-style short mode. If the path
21106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21107  # take no chances and rewrite it.
21108  # Note: m4 eats our [], so we need to use [ and ] instead.
21109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21110  if test "x$has_forbidden_chars" != x; then
21111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21112    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21113  fi
21114
21115
21116  windows_path="$new_path"
21117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21118    unix_path=`$CYGPATH -u "$windows_path"`
21119    new_path="$unix_path"
21120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21122    new_path="$unix_path"
21123  fi
21124
21125  if test "x$path" != "x$new_path"; then
21126    BOOT_JDK="$new_path"
21127    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21128$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21129  fi
21130
21131  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21132  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21133
21134  else
21135    # We're on a posix platform. Hooray! :)
21136    path="$BOOT_JDK"
21137    has_space=`$ECHO "$path" | $GREP " "`
21138    if test "x$has_space" != x; then
21139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21140$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21141      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21142    fi
21143
21144    # Use eval to expand a potential ~
21145    eval path="$path"
21146    if test ! -f "$path" && test ! -d "$path"; then
21147      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21148    fi
21149
21150    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21151  fi
21152
21153              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21154$as_echo_n "checking for Boot JDK... " >&6; }
21155              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21156$as_echo "$BOOT_JDK" >&6; }
21157              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21158$as_echo_n "checking Boot JDK version... " >&6; }
21159              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21160              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21161$as_echo "$BOOT_JDK_VERSION" >&6; }
21162            fi # end check jdk version
21163          fi # end check rt.jar
21164        fi # end check javac
21165      fi # end check java
21166    fi # end check boot jdk found
21167  fi
21168
21169
21170  if test "x$BOOT_JDK_FOUND" = xno; then
21171    # Now execute the test
21172
21173  if test -x /usr/libexec/java_home; then
21174    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21175    BOOT_JDK_FOUND=maybe
21176    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21177$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21178  fi
21179
21180
21181    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21182    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21183      # Do we have a bin/java?
21184      if test ! -x "$BOOT_JDK/bin/java"; then
21185        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21187        BOOT_JDK_FOUND=no
21188      else
21189        # Do we have a bin/javac?
21190        if test ! -x "$BOOT_JDK/bin/javac"; then
21191          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21193          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21194$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21195          BOOT_JDK_FOUND=no
21196        else
21197          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21198          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21199            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21201            BOOT_JDK_FOUND=no
21202          else
21203            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21204            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21205
21206            # Extra M4 quote needed to protect [] in grep expression.
21207            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21208            if test "x$FOUND_CORRECT_VERSION" = x; then
21209              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21211              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21212$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21213              BOOT_JDK_FOUND=no
21214            else
21215              # We're done! :-)
21216              BOOT_JDK_FOUND=yes
21217
21218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21219
21220  # Input might be given as Windows format, start by converting to
21221  # unix format.
21222  path="$BOOT_JDK"
21223  new_path=`$CYGPATH -u "$path"`
21224
21225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21228  # "foo.exe" is OK but "foo" is an error.
21229  #
21230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21231  # It is also a way to make sure we got the proper file name for the real test later on.
21232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21233  if test "x$test_shortpath" = x; then
21234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21236    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21237  fi
21238
21239  # Call helper function which possibly converts this using DOS-style short mode.
21240  # If so, the updated path is stored in $new_path.
21241
21242  input_path="$new_path"
21243  # Check if we need to convert this using DOS-style short mode. If the path
21244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21245  # take no chances and rewrite it.
21246  # Note: m4 eats our [], so we need to use [ and ] instead.
21247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21248  if test "x$has_forbidden_chars" != x; then
21249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21253      # Going to short mode and back again did indeed matter. Since short mode is
21254      # case insensitive, let's make it lowercase to improve readability.
21255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21256      # Now convert it back to Unix-stile (cygpath)
21257      input_path=`$CYGPATH -u "$shortmode_path"`
21258      new_path="$input_path"
21259    fi
21260  fi
21261
21262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21263  if test "x$test_cygdrive_prefix" = x; then
21264    # As a simple fix, exclude /usr/bin since it's not a real path.
21265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21267      # a path prefixed by /cygdrive for fixpath to work.
21268      new_path="$CYGWIN_ROOT_PATH$input_path"
21269    fi
21270  fi
21271
21272
21273  if test "x$path" != "x$new_path"; then
21274    BOOT_JDK="$new_path"
21275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21276$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21277  fi
21278
21279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21280
21281  path="$BOOT_JDK"
21282  has_colon=`$ECHO $path | $GREP ^.:`
21283  new_path="$path"
21284  if test "x$has_colon" = x; then
21285    # Not in mixed or Windows style, start by that.
21286    new_path=`cmd //c echo $path`
21287  fi
21288
21289
21290  input_path="$new_path"
21291  # Check if we need to convert this using DOS-style short mode. If the path
21292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21293  # take no chances and rewrite it.
21294  # Note: m4 eats our [], so we need to use [ and ] instead.
21295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21296  if test "x$has_forbidden_chars" != x; then
21297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21299  fi
21300
21301
21302  windows_path="$new_path"
21303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21304    unix_path=`$CYGPATH -u "$windows_path"`
21305    new_path="$unix_path"
21306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21308    new_path="$unix_path"
21309  fi
21310
21311  if test "x$path" != "x$new_path"; then
21312    BOOT_JDK="$new_path"
21313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21315  fi
21316
21317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21319
21320  else
21321    # We're on a posix platform. Hooray! :)
21322    path="$BOOT_JDK"
21323    has_space=`$ECHO "$path" | $GREP " "`
21324    if test "x$has_space" != x; then
21325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21326$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21327      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21328    fi
21329
21330    # Use eval to expand a potential ~
21331    eval path="$path"
21332    if test ! -f "$path" && test ! -d "$path"; then
21333      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21334    fi
21335
21336    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21337  fi
21338
21339              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21340$as_echo_n "checking for Boot JDK... " >&6; }
21341              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21342$as_echo "$BOOT_JDK" >&6; }
21343              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21344$as_echo_n "checking Boot JDK version... " >&6; }
21345              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21346              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21347$as_echo "$BOOT_JDK_VERSION" >&6; }
21348            fi # end check jdk version
21349          fi # end check rt.jar
21350        fi # end check javac
21351      fi # end check java
21352    fi # end check boot jdk found
21353  fi
21354
21355  fi
21356
21357
21358    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21359    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21360      # Do we have a bin/java?
21361      if test ! -x "$BOOT_JDK/bin/java"; then
21362        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21363$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21364        BOOT_JDK_FOUND=no
21365      else
21366        # Do we have a bin/javac?
21367        if test ! -x "$BOOT_JDK/bin/javac"; then
21368          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21370          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21371$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21372          BOOT_JDK_FOUND=no
21373        else
21374          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21375          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21376            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21378            BOOT_JDK_FOUND=no
21379          else
21380            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21381            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21382
21383            # Extra M4 quote needed to protect [] in grep expression.
21384            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21385            if test "x$FOUND_CORRECT_VERSION" = x; then
21386              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21388              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21389$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21390              BOOT_JDK_FOUND=no
21391            else
21392              # We're done! :-)
21393              BOOT_JDK_FOUND=yes
21394
21395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21396
21397  # Input might be given as Windows format, start by converting to
21398  # unix format.
21399  path="$BOOT_JDK"
21400  new_path=`$CYGPATH -u "$path"`
21401
21402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21405  # "foo.exe" is OK but "foo" is an error.
21406  #
21407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21408  # It is also a way to make sure we got the proper file name for the real test later on.
21409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21410  if test "x$test_shortpath" = x; then
21411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21412$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21413    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21414  fi
21415
21416  # Call helper function which possibly converts this using DOS-style short mode.
21417  # If so, the updated path is stored in $new_path.
21418
21419  input_path="$new_path"
21420  # Check if we need to convert this using DOS-style short mode. If the path
21421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21422  # take no chances and rewrite it.
21423  # Note: m4 eats our [], so we need to use [ and ] instead.
21424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21425  if test "x$has_forbidden_chars" != x; then
21426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21430      # Going to short mode and back again did indeed matter. Since short mode is
21431      # case insensitive, let's make it lowercase to improve readability.
21432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21433      # Now convert it back to Unix-stile (cygpath)
21434      input_path=`$CYGPATH -u "$shortmode_path"`
21435      new_path="$input_path"
21436    fi
21437  fi
21438
21439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21440  if test "x$test_cygdrive_prefix" = x; then
21441    # As a simple fix, exclude /usr/bin since it's not a real path.
21442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21444      # a path prefixed by /cygdrive for fixpath to work.
21445      new_path="$CYGWIN_ROOT_PATH$input_path"
21446    fi
21447  fi
21448
21449
21450  if test "x$path" != "x$new_path"; then
21451    BOOT_JDK="$new_path"
21452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21453$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21454  fi
21455
21456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21457
21458  path="$BOOT_JDK"
21459  has_colon=`$ECHO $path | $GREP ^.:`
21460  new_path="$path"
21461  if test "x$has_colon" = x; then
21462    # Not in mixed or Windows style, start by that.
21463    new_path=`cmd //c echo $path`
21464  fi
21465
21466
21467  input_path="$new_path"
21468  # Check if we need to convert this using DOS-style short mode. If the path
21469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21470  # take no chances and rewrite it.
21471  # Note: m4 eats our [], so we need to use [ and ] instead.
21472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21473  if test "x$has_forbidden_chars" != x; then
21474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21476  fi
21477
21478
21479  windows_path="$new_path"
21480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21481    unix_path=`$CYGPATH -u "$windows_path"`
21482    new_path="$unix_path"
21483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21485    new_path="$unix_path"
21486  fi
21487
21488  if test "x$path" != "x$new_path"; then
21489    BOOT_JDK="$new_path"
21490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21492  fi
21493
21494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21496
21497  else
21498    # We're on a posix platform. Hooray! :)
21499    path="$BOOT_JDK"
21500    has_space=`$ECHO "$path" | $GREP " "`
21501    if test "x$has_space" != x; then
21502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21503$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21504      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21505    fi
21506
21507    # Use eval to expand a potential ~
21508    eval path="$path"
21509    if test ! -f "$path" && test ! -d "$path"; then
21510      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21511    fi
21512
21513    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21514  fi
21515
21516              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21517$as_echo_n "checking for Boot JDK... " >&6; }
21518              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21519$as_echo "$BOOT_JDK" >&6; }
21520              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21521$as_echo_n "checking Boot JDK version... " >&6; }
21522              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21523              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21524$as_echo "$BOOT_JDK_VERSION" >&6; }
21525            fi # end check jdk version
21526          fi # end check rt.jar
21527        fi # end check javac
21528      fi # end check java
21529    fi # end check boot jdk found
21530  fi
21531
21532
21533  # Test: Is $JAVA_HOME set?
21534
21535  if test "x$BOOT_JDK_FOUND" = xno; then
21536    # Now execute the test
21537
21538  if test "x$JAVA_HOME" != x; then
21539    JAVA_HOME_PROCESSED="$JAVA_HOME"
21540
21541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21542
21543  # Input might be given as Windows format, start by converting to
21544  # unix format.
21545  path="$JAVA_HOME_PROCESSED"
21546  new_path=`$CYGPATH -u "$path"`
21547
21548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21551  # "foo.exe" is OK but "foo" is an error.
21552  #
21553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21554  # It is also a way to make sure we got the proper file name for the real test later on.
21555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21556  if test "x$test_shortpath" = x; then
21557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21558$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21559    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21560  fi
21561
21562  # Call helper function which possibly converts this using DOS-style short mode.
21563  # If so, the updated path is stored in $new_path.
21564
21565  input_path="$new_path"
21566  # Check if we need to convert this using DOS-style short mode. If the path
21567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21568  # take no chances and rewrite it.
21569  # Note: m4 eats our [], so we need to use [ and ] instead.
21570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21571  if test "x$has_forbidden_chars" != x; then
21572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21576      # Going to short mode and back again did indeed matter. Since short mode is
21577      # case insensitive, let's make it lowercase to improve readability.
21578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21579      # Now convert it back to Unix-stile (cygpath)
21580      input_path=`$CYGPATH -u "$shortmode_path"`
21581      new_path="$input_path"
21582    fi
21583  fi
21584
21585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21586  if test "x$test_cygdrive_prefix" = x; then
21587    # As a simple fix, exclude /usr/bin since it's not a real path.
21588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21590      # a path prefixed by /cygdrive for fixpath to work.
21591      new_path="$CYGWIN_ROOT_PATH$input_path"
21592    fi
21593  fi
21594
21595
21596  if test "x$path" != "x$new_path"; then
21597    JAVA_HOME_PROCESSED="$new_path"
21598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21599$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21600  fi
21601
21602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21603
21604  path="$JAVA_HOME_PROCESSED"
21605  has_colon=`$ECHO $path | $GREP ^.:`
21606  new_path="$path"
21607  if test "x$has_colon" = x; then
21608    # Not in mixed or Windows style, start by that.
21609    new_path=`cmd //c echo $path`
21610  fi
21611
21612
21613  input_path="$new_path"
21614  # Check if we need to convert this using DOS-style short mode. If the path
21615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21616  # take no chances and rewrite it.
21617  # Note: m4 eats our [], so we need to use [ and ] instead.
21618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21619  if test "x$has_forbidden_chars" != x; then
21620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21622  fi
21623
21624
21625  windows_path="$new_path"
21626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21627    unix_path=`$CYGPATH -u "$windows_path"`
21628    new_path="$unix_path"
21629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21631    new_path="$unix_path"
21632  fi
21633
21634  if test "x$path" != "x$new_path"; then
21635    JAVA_HOME_PROCESSED="$new_path"
21636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21637$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21638  fi
21639
21640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21642
21643  else
21644    # We're on a posix platform. Hooray! :)
21645    path="$JAVA_HOME_PROCESSED"
21646    has_space=`$ECHO "$path" | $GREP " "`
21647    if test "x$has_space" != x; then
21648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21649$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21650      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21651    fi
21652
21653    # Use eval to expand a potential ~
21654    eval path="$path"
21655    if test ! -f "$path" && test ! -d "$path"; then
21656      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21657    fi
21658
21659    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21660  fi
21661
21662    if test ! -d "$JAVA_HOME_PROCESSED"; then
21663      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21664$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21665    else
21666      # Aha, the user has set a JAVA_HOME
21667      # let us use that as the Boot JDK.
21668      BOOT_JDK="$JAVA_HOME_PROCESSED"
21669      BOOT_JDK_FOUND=maybe
21670      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21671$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21672    fi
21673  fi
21674
21675
21676    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21677    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21678      # Do we have a bin/java?
21679      if test ! -x "$BOOT_JDK/bin/java"; then
21680        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21681$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21682        BOOT_JDK_FOUND=no
21683      else
21684        # Do we have a bin/javac?
21685        if test ! -x "$BOOT_JDK/bin/javac"; then
21686          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21688          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21689$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21690          BOOT_JDK_FOUND=no
21691        else
21692          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21693          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21694            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21696            BOOT_JDK_FOUND=no
21697          else
21698            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21699            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21700
21701            # Extra M4 quote needed to protect [] in grep expression.
21702            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21703            if test "x$FOUND_CORRECT_VERSION" = x; then
21704              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21706              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21707$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21708              BOOT_JDK_FOUND=no
21709            else
21710              # We're done! :-)
21711              BOOT_JDK_FOUND=yes
21712
21713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21714
21715  # Input might be given as Windows format, start by converting to
21716  # unix format.
21717  path="$BOOT_JDK"
21718  new_path=`$CYGPATH -u "$path"`
21719
21720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21723  # "foo.exe" is OK but "foo" is an error.
21724  #
21725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21726  # It is also a way to make sure we got the proper file name for the real test later on.
21727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21728  if test "x$test_shortpath" = x; then
21729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21731    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21732  fi
21733
21734  # Call helper function which possibly converts this using DOS-style short mode.
21735  # If so, the updated path is stored in $new_path.
21736
21737  input_path="$new_path"
21738  # Check if we need to convert this using DOS-style short mode. If the path
21739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21740  # take no chances and rewrite it.
21741  # Note: m4 eats our [], so we need to use [ and ] instead.
21742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21743  if test "x$has_forbidden_chars" != x; then
21744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21748      # Going to short mode and back again did indeed matter. Since short mode is
21749      # case insensitive, let's make it lowercase to improve readability.
21750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21751      # Now convert it back to Unix-stile (cygpath)
21752      input_path=`$CYGPATH -u "$shortmode_path"`
21753      new_path="$input_path"
21754    fi
21755  fi
21756
21757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21758  if test "x$test_cygdrive_prefix" = x; then
21759    # As a simple fix, exclude /usr/bin since it's not a real path.
21760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21762      # a path prefixed by /cygdrive for fixpath to work.
21763      new_path="$CYGWIN_ROOT_PATH$input_path"
21764    fi
21765  fi
21766
21767
21768  if test "x$path" != "x$new_path"; then
21769    BOOT_JDK="$new_path"
21770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21771$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21772  fi
21773
21774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21775
21776  path="$BOOT_JDK"
21777  has_colon=`$ECHO $path | $GREP ^.:`
21778  new_path="$path"
21779  if test "x$has_colon" = x; then
21780    # Not in mixed or Windows style, start by that.
21781    new_path=`cmd //c echo $path`
21782  fi
21783
21784
21785  input_path="$new_path"
21786  # Check if we need to convert this using DOS-style short mode. If the path
21787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21788  # take no chances and rewrite it.
21789  # Note: m4 eats our [], so we need to use [ and ] instead.
21790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21791  if test "x$has_forbidden_chars" != x; then
21792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21794  fi
21795
21796
21797  windows_path="$new_path"
21798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21799    unix_path=`$CYGPATH -u "$windows_path"`
21800    new_path="$unix_path"
21801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21803    new_path="$unix_path"
21804  fi
21805
21806  if test "x$path" != "x$new_path"; then
21807    BOOT_JDK="$new_path"
21808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21809$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21810  fi
21811
21812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21814
21815  else
21816    # We're on a posix platform. Hooray! :)
21817    path="$BOOT_JDK"
21818    has_space=`$ECHO "$path" | $GREP " "`
21819    if test "x$has_space" != x; then
21820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21821$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21822      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21823    fi
21824
21825    # Use eval to expand a potential ~
21826    eval path="$path"
21827    if test ! -f "$path" && test ! -d "$path"; then
21828      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21829    fi
21830
21831    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21832  fi
21833
21834              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21835$as_echo_n "checking for Boot JDK... " >&6; }
21836              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21837$as_echo "$BOOT_JDK" >&6; }
21838              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21839$as_echo_n "checking Boot JDK version... " >&6; }
21840              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21841              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21842$as_echo "$BOOT_JDK_VERSION" >&6; }
21843            fi # end check jdk version
21844          fi # end check rt.jar
21845        fi # end check javac
21846      fi # end check java
21847    fi # end check boot jdk found
21848  fi
21849
21850
21851  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21852
21853  if test "x$BOOT_JDK_FOUND" = xno; then
21854    # Now execute the test
21855
21856  # Extract the first word of "javac", so it can be a program name with args.
21857set dummy javac; ac_word=$2
21858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21859$as_echo_n "checking for $ac_word... " >&6; }
21860if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21861  $as_echo_n "(cached) " >&6
21862else
21863  case $JAVAC_CHECK in
21864  [\\/]* | ?:[\\/]*)
21865  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21866  ;;
21867  *)
21868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21869for as_dir in $PATH
21870do
21871  IFS=$as_save_IFS
21872  test -z "$as_dir" && as_dir=.
21873    for ac_exec_ext in '' $ac_executable_extensions; do
21874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21875    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21877    break 2
21878  fi
21879done
21880  done
21881IFS=$as_save_IFS
21882
21883  ;;
21884esac
21885fi
21886JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21887if test -n "$JAVAC_CHECK"; then
21888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21889$as_echo "$JAVAC_CHECK" >&6; }
21890else
21891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21892$as_echo "no" >&6; }
21893fi
21894
21895
21896  # Extract the first word of "java", so it can be a program name with args.
21897set dummy java; ac_word=$2
21898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21899$as_echo_n "checking for $ac_word... " >&6; }
21900if ${ac_cv_path_JAVA_CHECK+:} false; then :
21901  $as_echo_n "(cached) " >&6
21902else
21903  case $JAVA_CHECK in
21904  [\\/]* | ?:[\\/]*)
21905  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21906  ;;
21907  *)
21908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21909for as_dir in $PATH
21910do
21911  IFS=$as_save_IFS
21912  test -z "$as_dir" && as_dir=.
21913    for ac_exec_ext in '' $ac_executable_extensions; do
21914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21915    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21917    break 2
21918  fi
21919done
21920  done
21921IFS=$as_save_IFS
21922
21923  ;;
21924esac
21925fi
21926JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21927if test -n "$JAVA_CHECK"; then
21928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21929$as_echo "$JAVA_CHECK" >&6; }
21930else
21931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21932$as_echo "no" >&6; }
21933fi
21934
21935
21936  BINARY="$JAVAC_CHECK"
21937  if test "x$JAVAC_CHECK" = x; then
21938    BINARY="$JAVA_CHECK"
21939  fi
21940  if test "x$BINARY" != x; then
21941    # So there is a java(c) binary, it might be part of a JDK.
21942    # Lets find the JDK/JRE directory by following symbolic links.
21943    # Linux/GNU systems often have links from /usr/bin/java to
21944    # /etc/alternatives/java to the real JDK binary.
21945
21946  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21947    # Follow a chain of symbolic links. Use readlink
21948    # where it exists, else fall back to horribly
21949    # complicated shell code.
21950    if test "x$READLINK_TESTED" != yes; then
21951      # On MacOSX there is a readlink tool with a different
21952      # purpose than the GNU readlink tool. Check the found readlink.
21953      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21954      if test "x$ISGNU" = x; then
21955        # A readlink that we do not know how to use.
21956        # Are there other non-GNU readlinks out there?
21957        READLINK_TESTED=yes
21958        READLINK=
21959      fi
21960    fi
21961
21962    if test "x$READLINK" != x; then
21963      BINARY=`$READLINK -f $BINARY`
21964    else
21965      # Save the current directory for restoring afterwards
21966      STARTDIR=$PWD
21967      COUNTER=0
21968      sym_link_dir=`$DIRNAME $BINARY`
21969      sym_link_file=`$BASENAME $BINARY`
21970      cd $sym_link_dir
21971      # Use -P flag to resolve symlinks in directories.
21972      cd `$THEPWDCMD -P`
21973      sym_link_dir=`$THEPWDCMD -P`
21974      # Resolve file symlinks
21975      while test $COUNTER -lt 20; do
21976        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21977        if test "x$ISLINK" == x; then
21978          # This is not a symbolic link! We are done!
21979          break
21980        fi
21981        # Again resolve directory symlinks since the target of the just found
21982        # link could be in a different directory
21983        cd `$DIRNAME $ISLINK`
21984        sym_link_dir=`$THEPWDCMD -P`
21985        sym_link_file=`$BASENAME $ISLINK`
21986        let COUNTER=COUNTER+1
21987      done
21988      cd $STARTDIR
21989      BINARY=$sym_link_dir/$sym_link_file
21990    fi
21991  fi
21992
21993    BOOT_JDK=`dirname "$BINARY"`
21994    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21995    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21996      # Looks like we found ourselves an JDK
21997      BOOT_JDK_FOUND=maybe
21998      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21999$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22000    fi
22001  fi
22002
22003
22004    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22005    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22006      # Do we have a bin/java?
22007      if test ! -x "$BOOT_JDK/bin/java"; then
22008        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22009$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22010        BOOT_JDK_FOUND=no
22011      else
22012        # Do we have a bin/javac?
22013        if test ! -x "$BOOT_JDK/bin/javac"; then
22014          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22015$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22016          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22017$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22018          BOOT_JDK_FOUND=no
22019        else
22020          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22021          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22022            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22024            BOOT_JDK_FOUND=no
22025          else
22026            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22027            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22028
22029            # Extra M4 quote needed to protect [] in grep expression.
22030            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22031            if test "x$FOUND_CORRECT_VERSION" = x; then
22032              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22033$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22034              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22035$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22036              BOOT_JDK_FOUND=no
22037            else
22038              # We're done! :-)
22039              BOOT_JDK_FOUND=yes
22040
22041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22042
22043  # Input might be given as Windows format, start by converting to
22044  # unix format.
22045  path="$BOOT_JDK"
22046  new_path=`$CYGPATH -u "$path"`
22047
22048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22051  # "foo.exe" is OK but "foo" is an error.
22052  #
22053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22054  # It is also a way to make sure we got the proper file name for the real test later on.
22055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22056  if test "x$test_shortpath" = x; then
22057    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22058$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22059    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22060  fi
22061
22062  # Call helper function which possibly converts this using DOS-style short mode.
22063  # If so, the updated path is stored in $new_path.
22064
22065  input_path="$new_path"
22066  # Check if we need to convert this using DOS-style short mode. If the path
22067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22068  # take no chances and rewrite it.
22069  # Note: m4 eats our [], so we need to use [ and ] instead.
22070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22071  if test "x$has_forbidden_chars" != x; then
22072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22076      # Going to short mode and back again did indeed matter. Since short mode is
22077      # case insensitive, let's make it lowercase to improve readability.
22078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22079      # Now convert it back to Unix-stile (cygpath)
22080      input_path=`$CYGPATH -u "$shortmode_path"`
22081      new_path="$input_path"
22082    fi
22083  fi
22084
22085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22086  if test "x$test_cygdrive_prefix" = x; then
22087    # As a simple fix, exclude /usr/bin since it's not a real path.
22088    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22090      # a path prefixed by /cygdrive for fixpath to work.
22091      new_path="$CYGWIN_ROOT_PATH$input_path"
22092    fi
22093  fi
22094
22095
22096  if test "x$path" != "x$new_path"; then
22097    BOOT_JDK="$new_path"
22098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22099$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22100  fi
22101
22102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22103
22104  path="$BOOT_JDK"
22105  has_colon=`$ECHO $path | $GREP ^.:`
22106  new_path="$path"
22107  if test "x$has_colon" = x; then
22108    # Not in mixed or Windows style, start by that.
22109    new_path=`cmd //c echo $path`
22110  fi
22111
22112
22113  input_path="$new_path"
22114  # Check if we need to convert this using DOS-style short mode. If the path
22115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22116  # take no chances and rewrite it.
22117  # Note: m4 eats our [], so we need to use [ and ] instead.
22118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22119  if test "x$has_forbidden_chars" != x; then
22120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22122  fi
22123
22124
22125  windows_path="$new_path"
22126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22127    unix_path=`$CYGPATH -u "$windows_path"`
22128    new_path="$unix_path"
22129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22131    new_path="$unix_path"
22132  fi
22133
22134  if test "x$path" != "x$new_path"; then
22135    BOOT_JDK="$new_path"
22136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22138  fi
22139
22140  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22141  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22142
22143  else
22144    # We're on a posix platform. Hooray! :)
22145    path="$BOOT_JDK"
22146    has_space=`$ECHO "$path" | $GREP " "`
22147    if test "x$has_space" != x; then
22148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22149$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22150      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22151    fi
22152
22153    # Use eval to expand a potential ~
22154    eval path="$path"
22155    if test ! -f "$path" && test ! -d "$path"; then
22156      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22157    fi
22158
22159    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22160  fi
22161
22162              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22163$as_echo_n "checking for Boot JDK... " >&6; }
22164              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22165$as_echo "$BOOT_JDK" >&6; }
22166              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22167$as_echo_n "checking Boot JDK version... " >&6; }
22168              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22169              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22170$as_echo "$BOOT_JDK_VERSION" >&6; }
22171            fi # end check jdk version
22172          fi # end check rt.jar
22173        fi # end check javac
22174      fi # end check java
22175    fi # end check boot jdk found
22176  fi
22177
22178
22179  # Test: Is there a JDK installed in default, well-known locations?
22180
22181  if test "x$BOOT_JDK_FOUND" = xno; then
22182    # Now execute the test
22183
22184  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22185
22186  if test "x$BOOT_JDK_FOUND" = xno; then
22187    # Now execute the test
22188
22189  if test "x$ProgramW6432" != x; then
22190    VIRTUAL_DIR="$ProgramW6432/Java"
22191
22192  windows_path="$VIRTUAL_DIR"
22193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22194    unix_path=`$CYGPATH -u "$windows_path"`
22195    VIRTUAL_DIR="$unix_path"
22196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22198    VIRTUAL_DIR="$unix_path"
22199  fi
22200
22201
22202  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22203  BOOT_JDK_SUFFIX=""
22204  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22205  if test "x$ALL_JDKS_FOUND" != x; then
22206    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22207
22208  if test "x$BOOT_JDK_FOUND" = xno; then
22209    # Now execute the test
22210
22211        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22212        if test -d "$BOOT_JDK"; then
22213          BOOT_JDK_FOUND=maybe
22214          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22215$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22216        fi
22217
22218
22219    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22220    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22221      # Do we have a bin/java?
22222      if test ! -x "$BOOT_JDK/bin/java"; then
22223        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22225        BOOT_JDK_FOUND=no
22226      else
22227        # Do we have a bin/javac?
22228        if test ! -x "$BOOT_JDK/bin/javac"; then
22229          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22231          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22232$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22233          BOOT_JDK_FOUND=no
22234        else
22235          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22236          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22237            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22238$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22239            BOOT_JDK_FOUND=no
22240          else
22241            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22242            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22243
22244            # Extra M4 quote needed to protect [] in grep expression.
22245            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22246            if test "x$FOUND_CORRECT_VERSION" = x; then
22247              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22249              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22250$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22251              BOOT_JDK_FOUND=no
22252            else
22253              # We're done! :-)
22254              BOOT_JDK_FOUND=yes
22255
22256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22257
22258  # Input might be given as Windows format, start by converting to
22259  # unix format.
22260  path="$BOOT_JDK"
22261  new_path=`$CYGPATH -u "$path"`
22262
22263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22266  # "foo.exe" is OK but "foo" is an error.
22267  #
22268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22269  # It is also a way to make sure we got the proper file name for the real test later on.
22270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22271  if test "x$test_shortpath" = x; then
22272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22273$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22274    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22275  fi
22276
22277  # Call helper function which possibly converts this using DOS-style short mode.
22278  # If so, the updated path is stored in $new_path.
22279
22280  input_path="$new_path"
22281  # Check if we need to convert this using DOS-style short mode. If the path
22282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22283  # take no chances and rewrite it.
22284  # Note: m4 eats our [], so we need to use [ and ] instead.
22285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22286  if test "x$has_forbidden_chars" != x; then
22287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22291      # Going to short mode and back again did indeed matter. Since short mode is
22292      # case insensitive, let's make it lowercase to improve readability.
22293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22294      # Now convert it back to Unix-stile (cygpath)
22295      input_path=`$CYGPATH -u "$shortmode_path"`
22296      new_path="$input_path"
22297    fi
22298  fi
22299
22300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22301  if test "x$test_cygdrive_prefix" = x; then
22302    # As a simple fix, exclude /usr/bin since it's not a real path.
22303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22305      # a path prefixed by /cygdrive for fixpath to work.
22306      new_path="$CYGWIN_ROOT_PATH$input_path"
22307    fi
22308  fi
22309
22310
22311  if test "x$path" != "x$new_path"; then
22312    BOOT_JDK="$new_path"
22313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22315  fi
22316
22317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22318
22319  path="$BOOT_JDK"
22320  has_colon=`$ECHO $path | $GREP ^.:`
22321  new_path="$path"
22322  if test "x$has_colon" = x; then
22323    # Not in mixed or Windows style, start by that.
22324    new_path=`cmd //c echo $path`
22325  fi
22326
22327
22328  input_path="$new_path"
22329  # Check if we need to convert this using DOS-style short mode. If the path
22330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22331  # take no chances and rewrite it.
22332  # Note: m4 eats our [], so we need to use [ and ] instead.
22333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22334  if test "x$has_forbidden_chars" != x; then
22335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22337  fi
22338
22339
22340  windows_path="$new_path"
22341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22342    unix_path=`$CYGPATH -u "$windows_path"`
22343    new_path="$unix_path"
22344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22346    new_path="$unix_path"
22347  fi
22348
22349  if test "x$path" != "x$new_path"; then
22350    BOOT_JDK="$new_path"
22351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22352$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22353  fi
22354
22355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22357
22358  else
22359    # We're on a posix platform. Hooray! :)
22360    path="$BOOT_JDK"
22361    has_space=`$ECHO "$path" | $GREP " "`
22362    if test "x$has_space" != x; then
22363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22364$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22365      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22366    fi
22367
22368    # Use eval to expand a potential ~
22369    eval path="$path"
22370    if test ! -f "$path" && test ! -d "$path"; then
22371      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22372    fi
22373
22374    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22375  fi
22376
22377              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22378$as_echo_n "checking for Boot JDK... " >&6; }
22379              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22380$as_echo "$BOOT_JDK" >&6; }
22381              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22382$as_echo_n "checking Boot JDK version... " >&6; }
22383              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22384              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22385$as_echo "$BOOT_JDK_VERSION" >&6; }
22386            fi # end check jdk version
22387          fi # end check rt.jar
22388        fi # end check javac
22389      fi # end check java
22390    fi # end check boot jdk found
22391  fi
22392
22393    done
22394  fi
22395
22396  fi
22397
22398
22399    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22400    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22401      # Do we have a bin/java?
22402      if test ! -x "$BOOT_JDK/bin/java"; then
22403        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22404$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22405        BOOT_JDK_FOUND=no
22406      else
22407        # Do we have a bin/javac?
22408        if test ! -x "$BOOT_JDK/bin/javac"; then
22409          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22411          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22412$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22413          BOOT_JDK_FOUND=no
22414        else
22415          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22416          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22417            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22419            BOOT_JDK_FOUND=no
22420          else
22421            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22422            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22423
22424            # Extra M4 quote needed to protect [] in grep expression.
22425            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22426            if test "x$FOUND_CORRECT_VERSION" = x; then
22427              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22429              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22430$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22431              BOOT_JDK_FOUND=no
22432            else
22433              # We're done! :-)
22434              BOOT_JDK_FOUND=yes
22435
22436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22437
22438  # Input might be given as Windows format, start by converting to
22439  # unix format.
22440  path="$BOOT_JDK"
22441  new_path=`$CYGPATH -u "$path"`
22442
22443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22446  # "foo.exe" is OK but "foo" is an error.
22447  #
22448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22449  # It is also a way to make sure we got the proper file name for the real test later on.
22450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22451  if test "x$test_shortpath" = x; then
22452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22453$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22454    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22455  fi
22456
22457  # Call helper function which possibly converts this using DOS-style short mode.
22458  # If so, the updated path is stored in $new_path.
22459
22460  input_path="$new_path"
22461  # Check if we need to convert this using DOS-style short mode. If the path
22462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22463  # take no chances and rewrite it.
22464  # Note: m4 eats our [], so we need to use [ and ] instead.
22465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22466  if test "x$has_forbidden_chars" != x; then
22467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22471      # Going to short mode and back again did indeed matter. Since short mode is
22472      # case insensitive, let's make it lowercase to improve readability.
22473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22474      # Now convert it back to Unix-stile (cygpath)
22475      input_path=`$CYGPATH -u "$shortmode_path"`
22476      new_path="$input_path"
22477    fi
22478  fi
22479
22480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22481  if test "x$test_cygdrive_prefix" = x; then
22482    # As a simple fix, exclude /usr/bin since it's not a real path.
22483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22485      # a path prefixed by /cygdrive for fixpath to work.
22486      new_path="$CYGWIN_ROOT_PATH$input_path"
22487    fi
22488  fi
22489
22490
22491  if test "x$path" != "x$new_path"; then
22492    BOOT_JDK="$new_path"
22493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22494$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22495  fi
22496
22497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22498
22499  path="$BOOT_JDK"
22500  has_colon=`$ECHO $path | $GREP ^.:`
22501  new_path="$path"
22502  if test "x$has_colon" = x; then
22503    # Not in mixed or Windows style, start by that.
22504    new_path=`cmd //c echo $path`
22505  fi
22506
22507
22508  input_path="$new_path"
22509  # Check if we need to convert this using DOS-style short mode. If the path
22510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22511  # take no chances and rewrite it.
22512  # Note: m4 eats our [], so we need to use [ and ] instead.
22513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22514  if test "x$has_forbidden_chars" != x; then
22515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22517  fi
22518
22519
22520  windows_path="$new_path"
22521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22522    unix_path=`$CYGPATH -u "$windows_path"`
22523    new_path="$unix_path"
22524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22526    new_path="$unix_path"
22527  fi
22528
22529  if test "x$path" != "x$new_path"; then
22530    BOOT_JDK="$new_path"
22531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22532$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22533  fi
22534
22535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22537
22538  else
22539    # We're on a posix platform. Hooray! :)
22540    path="$BOOT_JDK"
22541    has_space=`$ECHO "$path" | $GREP " "`
22542    if test "x$has_space" != x; then
22543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22544$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22545      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22546    fi
22547
22548    # Use eval to expand a potential ~
22549    eval path="$path"
22550    if test ! -f "$path" && test ! -d "$path"; then
22551      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22552    fi
22553
22554    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22555  fi
22556
22557              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22558$as_echo_n "checking for Boot JDK... " >&6; }
22559              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22560$as_echo "$BOOT_JDK" >&6; }
22561              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22562$as_echo_n "checking Boot JDK version... " >&6; }
22563              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22564              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22565$as_echo "$BOOT_JDK_VERSION" >&6; }
22566            fi # end check jdk version
22567          fi # end check rt.jar
22568        fi # end check javac
22569      fi # end check java
22570    fi # end check boot jdk found
22571  fi
22572
22573
22574  if test "x$BOOT_JDK_FOUND" = xno; then
22575    # Now execute the test
22576
22577  if test "x$PROGRAMW6432" != x; then
22578    VIRTUAL_DIR="$PROGRAMW6432/Java"
22579
22580  windows_path="$VIRTUAL_DIR"
22581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22582    unix_path=`$CYGPATH -u "$windows_path"`
22583    VIRTUAL_DIR="$unix_path"
22584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22586    VIRTUAL_DIR="$unix_path"
22587  fi
22588
22589
22590  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22591  BOOT_JDK_SUFFIX=""
22592  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22593  if test "x$ALL_JDKS_FOUND" != x; then
22594    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22595
22596  if test "x$BOOT_JDK_FOUND" = xno; then
22597    # Now execute the test
22598
22599        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22600        if test -d "$BOOT_JDK"; then
22601          BOOT_JDK_FOUND=maybe
22602          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22603$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22604        fi
22605
22606
22607    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22608    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22609      # Do we have a bin/java?
22610      if test ! -x "$BOOT_JDK/bin/java"; then
22611        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22613        BOOT_JDK_FOUND=no
22614      else
22615        # Do we have a bin/javac?
22616        if test ! -x "$BOOT_JDK/bin/javac"; then
22617          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22619          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22620$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22621          BOOT_JDK_FOUND=no
22622        else
22623          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22624          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22625            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22627            BOOT_JDK_FOUND=no
22628          else
22629            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22630            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22631
22632            # Extra M4 quote needed to protect [] in grep expression.
22633            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22634            if test "x$FOUND_CORRECT_VERSION" = x; then
22635              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22637              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22638$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22639              BOOT_JDK_FOUND=no
22640            else
22641              # We're done! :-)
22642              BOOT_JDK_FOUND=yes
22643
22644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22645
22646  # Input might be given as Windows format, start by converting to
22647  # unix format.
22648  path="$BOOT_JDK"
22649  new_path=`$CYGPATH -u "$path"`
22650
22651  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22652  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22653  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22654  # "foo.exe" is OK but "foo" is an error.
22655  #
22656  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22657  # It is also a way to make sure we got the proper file name for the real test later on.
22658  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22659  if test "x$test_shortpath" = x; then
22660    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22661$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22662    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22663  fi
22664
22665  # Call helper function which possibly converts this using DOS-style short mode.
22666  # If so, the updated path is stored in $new_path.
22667
22668  input_path="$new_path"
22669  # Check if we need to convert this using DOS-style short mode. If the path
22670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22671  # take no chances and rewrite it.
22672  # Note: m4 eats our [], so we need to use [ and ] instead.
22673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22674  if test "x$has_forbidden_chars" != x; then
22675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22679      # Going to short mode and back again did indeed matter. Since short mode is
22680      # case insensitive, let's make it lowercase to improve readability.
22681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22682      # Now convert it back to Unix-stile (cygpath)
22683      input_path=`$CYGPATH -u "$shortmode_path"`
22684      new_path="$input_path"
22685    fi
22686  fi
22687
22688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22689  if test "x$test_cygdrive_prefix" = x; then
22690    # As a simple fix, exclude /usr/bin since it's not a real path.
22691    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22693      # a path prefixed by /cygdrive for fixpath to work.
22694      new_path="$CYGWIN_ROOT_PATH$input_path"
22695    fi
22696  fi
22697
22698
22699  if test "x$path" != "x$new_path"; then
22700    BOOT_JDK="$new_path"
22701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22702$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22703  fi
22704
22705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22706
22707  path="$BOOT_JDK"
22708  has_colon=`$ECHO $path | $GREP ^.:`
22709  new_path="$path"
22710  if test "x$has_colon" = x; then
22711    # Not in mixed or Windows style, start by that.
22712    new_path=`cmd //c echo $path`
22713  fi
22714
22715
22716  input_path="$new_path"
22717  # Check if we need to convert this using DOS-style short mode. If the path
22718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22719  # take no chances and rewrite it.
22720  # Note: m4 eats our [], so we need to use [ and ] instead.
22721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22722  if test "x$has_forbidden_chars" != x; then
22723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22725  fi
22726
22727
22728  windows_path="$new_path"
22729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22730    unix_path=`$CYGPATH -u "$windows_path"`
22731    new_path="$unix_path"
22732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22734    new_path="$unix_path"
22735  fi
22736
22737  if test "x$path" != "x$new_path"; then
22738    BOOT_JDK="$new_path"
22739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22740$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22741  fi
22742
22743  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22744  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22745
22746  else
22747    # We're on a posix platform. Hooray! :)
22748    path="$BOOT_JDK"
22749    has_space=`$ECHO "$path" | $GREP " "`
22750    if test "x$has_space" != x; then
22751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22752$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22753      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22754    fi
22755
22756    # Use eval to expand a potential ~
22757    eval path="$path"
22758    if test ! -f "$path" && test ! -d "$path"; then
22759      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22760    fi
22761
22762    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22763  fi
22764
22765              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22766$as_echo_n "checking for Boot JDK... " >&6; }
22767              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22768$as_echo "$BOOT_JDK" >&6; }
22769              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22770$as_echo_n "checking Boot JDK version... " >&6; }
22771              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22772              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22773$as_echo "$BOOT_JDK_VERSION" >&6; }
22774            fi # end check jdk version
22775          fi # end check rt.jar
22776        fi # end check javac
22777      fi # end check java
22778    fi # end check boot jdk found
22779  fi
22780
22781    done
22782  fi
22783
22784  fi
22785
22786
22787    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22788    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22789      # Do we have a bin/java?
22790      if test ! -x "$BOOT_JDK/bin/java"; then
22791        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22793        BOOT_JDK_FOUND=no
22794      else
22795        # Do we have a bin/javac?
22796        if test ! -x "$BOOT_JDK/bin/javac"; then
22797          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22799          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22800$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22801          BOOT_JDK_FOUND=no
22802        else
22803          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22804          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22805            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22807            BOOT_JDK_FOUND=no
22808          else
22809            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22810            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22811
22812            # Extra M4 quote needed to protect [] in grep expression.
22813            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22814            if test "x$FOUND_CORRECT_VERSION" = x; then
22815              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22817              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22818$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22819              BOOT_JDK_FOUND=no
22820            else
22821              # We're done! :-)
22822              BOOT_JDK_FOUND=yes
22823
22824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22825
22826  # Input might be given as Windows format, start by converting to
22827  # unix format.
22828  path="$BOOT_JDK"
22829  new_path=`$CYGPATH -u "$path"`
22830
22831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22834  # "foo.exe" is OK but "foo" is an error.
22835  #
22836  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22837  # It is also a way to make sure we got the proper file name for the real test later on.
22838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22839  if test "x$test_shortpath" = x; then
22840    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22841$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22842    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22843  fi
22844
22845  # Call helper function which possibly converts this using DOS-style short mode.
22846  # If so, the updated path is stored in $new_path.
22847
22848  input_path="$new_path"
22849  # Check if we need to convert this using DOS-style short mode. If the path
22850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22851  # take no chances and rewrite it.
22852  # Note: m4 eats our [], so we need to use [ and ] instead.
22853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22854  if test "x$has_forbidden_chars" != x; then
22855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22859      # Going to short mode and back again did indeed matter. Since short mode is
22860      # case insensitive, let's make it lowercase to improve readability.
22861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22862      # Now convert it back to Unix-stile (cygpath)
22863      input_path=`$CYGPATH -u "$shortmode_path"`
22864      new_path="$input_path"
22865    fi
22866  fi
22867
22868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22869  if test "x$test_cygdrive_prefix" = x; then
22870    # As a simple fix, exclude /usr/bin since it's not a real path.
22871    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22873      # a path prefixed by /cygdrive for fixpath to work.
22874      new_path="$CYGWIN_ROOT_PATH$input_path"
22875    fi
22876  fi
22877
22878
22879  if test "x$path" != "x$new_path"; then
22880    BOOT_JDK="$new_path"
22881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22882$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22883  fi
22884
22885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22886
22887  path="$BOOT_JDK"
22888  has_colon=`$ECHO $path | $GREP ^.:`
22889  new_path="$path"
22890  if test "x$has_colon" = x; then
22891    # Not in mixed or Windows style, start by that.
22892    new_path=`cmd //c echo $path`
22893  fi
22894
22895
22896  input_path="$new_path"
22897  # Check if we need to convert this using DOS-style short mode. If the path
22898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22899  # take no chances and rewrite it.
22900  # Note: m4 eats our [], so we need to use [ and ] instead.
22901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22902  if test "x$has_forbidden_chars" != x; then
22903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22905  fi
22906
22907
22908  windows_path="$new_path"
22909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22910    unix_path=`$CYGPATH -u "$windows_path"`
22911    new_path="$unix_path"
22912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22914    new_path="$unix_path"
22915  fi
22916
22917  if test "x$path" != "x$new_path"; then
22918    BOOT_JDK="$new_path"
22919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22920$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22921  fi
22922
22923  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22924  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22925
22926  else
22927    # We're on a posix platform. Hooray! :)
22928    path="$BOOT_JDK"
22929    has_space=`$ECHO "$path" | $GREP " "`
22930    if test "x$has_space" != x; then
22931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22932$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22933      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22934    fi
22935
22936    # Use eval to expand a potential ~
22937    eval path="$path"
22938    if test ! -f "$path" && test ! -d "$path"; then
22939      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22940    fi
22941
22942    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22943  fi
22944
22945              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22946$as_echo_n "checking for Boot JDK... " >&6; }
22947              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22948$as_echo "$BOOT_JDK" >&6; }
22949              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22950$as_echo_n "checking Boot JDK version... " >&6; }
22951              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22952              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22953$as_echo "$BOOT_JDK_VERSION" >&6; }
22954            fi # end check jdk version
22955          fi # end check rt.jar
22956        fi # end check javac
22957      fi # end check java
22958    fi # end check boot jdk found
22959  fi
22960
22961
22962  if test "x$BOOT_JDK_FOUND" = xno; then
22963    # Now execute the test
22964
22965  if test "x$PROGRAMFILES" != x; then
22966    VIRTUAL_DIR="$PROGRAMFILES/Java"
22967
22968  windows_path="$VIRTUAL_DIR"
22969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22970    unix_path=`$CYGPATH -u "$windows_path"`
22971    VIRTUAL_DIR="$unix_path"
22972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22974    VIRTUAL_DIR="$unix_path"
22975  fi
22976
22977
22978  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22979  BOOT_JDK_SUFFIX=""
22980  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22981  if test "x$ALL_JDKS_FOUND" != x; then
22982    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22983
22984  if test "x$BOOT_JDK_FOUND" = xno; then
22985    # Now execute the test
22986
22987        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22988        if test -d "$BOOT_JDK"; then
22989          BOOT_JDK_FOUND=maybe
22990          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22991$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22992        fi
22993
22994
22995    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22996    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22997      # Do we have a bin/java?
22998      if test ! -x "$BOOT_JDK/bin/java"; then
22999        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23001        BOOT_JDK_FOUND=no
23002      else
23003        # Do we have a bin/javac?
23004        if test ! -x "$BOOT_JDK/bin/javac"; then
23005          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23007          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23008$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23009          BOOT_JDK_FOUND=no
23010        else
23011          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23012          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23013            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23015            BOOT_JDK_FOUND=no
23016          else
23017            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23018            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23019
23020            # Extra M4 quote needed to protect [] in grep expression.
23021            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23022            if test "x$FOUND_CORRECT_VERSION" = x; then
23023              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23025              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23026$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23027              BOOT_JDK_FOUND=no
23028            else
23029              # We're done! :-)
23030              BOOT_JDK_FOUND=yes
23031
23032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23033
23034  # Input might be given as Windows format, start by converting to
23035  # unix format.
23036  path="$BOOT_JDK"
23037  new_path=`$CYGPATH -u "$path"`
23038
23039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23042  # "foo.exe" is OK but "foo" is an error.
23043  #
23044  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23045  # It is also a way to make sure we got the proper file name for the real test later on.
23046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23047  if test "x$test_shortpath" = x; then
23048    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23049$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23050    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23051  fi
23052
23053  # Call helper function which possibly converts this using DOS-style short mode.
23054  # If so, the updated path is stored in $new_path.
23055
23056  input_path="$new_path"
23057  # Check if we need to convert this using DOS-style short mode. If the path
23058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23059  # take no chances and rewrite it.
23060  # Note: m4 eats our [], so we need to use [ and ] instead.
23061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23062  if test "x$has_forbidden_chars" != x; then
23063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23067      # Going to short mode and back again did indeed matter. Since short mode is
23068      # case insensitive, let's make it lowercase to improve readability.
23069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23070      # Now convert it back to Unix-stile (cygpath)
23071      input_path=`$CYGPATH -u "$shortmode_path"`
23072      new_path="$input_path"
23073    fi
23074  fi
23075
23076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23077  if test "x$test_cygdrive_prefix" = x; then
23078    # As a simple fix, exclude /usr/bin since it's not a real path.
23079    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23081      # a path prefixed by /cygdrive for fixpath to work.
23082      new_path="$CYGWIN_ROOT_PATH$input_path"
23083    fi
23084  fi
23085
23086
23087  if test "x$path" != "x$new_path"; then
23088    BOOT_JDK="$new_path"
23089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23090$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23091  fi
23092
23093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23094
23095  path="$BOOT_JDK"
23096  has_colon=`$ECHO $path | $GREP ^.:`
23097  new_path="$path"
23098  if test "x$has_colon" = x; then
23099    # Not in mixed or Windows style, start by that.
23100    new_path=`cmd //c echo $path`
23101  fi
23102
23103
23104  input_path="$new_path"
23105  # Check if we need to convert this using DOS-style short mode. If the path
23106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23107  # take no chances and rewrite it.
23108  # Note: m4 eats our [], so we need to use [ and ] instead.
23109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23110  if test "x$has_forbidden_chars" != x; then
23111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23112    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23113  fi
23114
23115
23116  windows_path="$new_path"
23117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23118    unix_path=`$CYGPATH -u "$windows_path"`
23119    new_path="$unix_path"
23120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23122    new_path="$unix_path"
23123  fi
23124
23125  if test "x$path" != "x$new_path"; then
23126    BOOT_JDK="$new_path"
23127    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23128$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23129  fi
23130
23131  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23132  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23133
23134  else
23135    # We're on a posix platform. Hooray! :)
23136    path="$BOOT_JDK"
23137    has_space=`$ECHO "$path" | $GREP " "`
23138    if test "x$has_space" != x; then
23139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23140$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23141      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23142    fi
23143
23144    # Use eval to expand a potential ~
23145    eval path="$path"
23146    if test ! -f "$path" && test ! -d "$path"; then
23147      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23148    fi
23149
23150    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23151  fi
23152
23153              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23154$as_echo_n "checking for Boot JDK... " >&6; }
23155              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23156$as_echo "$BOOT_JDK" >&6; }
23157              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23158$as_echo_n "checking Boot JDK version... " >&6; }
23159              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23160              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23161$as_echo "$BOOT_JDK_VERSION" >&6; }
23162            fi # end check jdk version
23163          fi # end check rt.jar
23164        fi # end check javac
23165      fi # end check java
23166    fi # end check boot jdk found
23167  fi
23168
23169    done
23170  fi
23171
23172  fi
23173
23174
23175    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23176    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23177      # Do we have a bin/java?
23178      if test ! -x "$BOOT_JDK/bin/java"; then
23179        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23181        BOOT_JDK_FOUND=no
23182      else
23183        # Do we have a bin/javac?
23184        if test ! -x "$BOOT_JDK/bin/javac"; then
23185          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23187          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23188$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23189          BOOT_JDK_FOUND=no
23190        else
23191          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23192          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23193            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23194$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23195            BOOT_JDK_FOUND=no
23196          else
23197            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23198            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23199
23200            # Extra M4 quote needed to protect [] in grep expression.
23201            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23202            if test "x$FOUND_CORRECT_VERSION" = x; then
23203              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23205              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23206$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23207              BOOT_JDK_FOUND=no
23208            else
23209              # We're done! :-)
23210              BOOT_JDK_FOUND=yes
23211
23212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23213
23214  # Input might be given as Windows format, start by converting to
23215  # unix format.
23216  path="$BOOT_JDK"
23217  new_path=`$CYGPATH -u "$path"`
23218
23219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23222  # "foo.exe" is OK but "foo" is an error.
23223  #
23224  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23225  # It is also a way to make sure we got the proper file name for the real test later on.
23226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23227  if test "x$test_shortpath" = x; then
23228    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23229$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23230    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23231  fi
23232
23233  # Call helper function which possibly converts this using DOS-style short mode.
23234  # If so, the updated path is stored in $new_path.
23235
23236  input_path="$new_path"
23237  # Check if we need to convert this using DOS-style short mode. If the path
23238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23239  # take no chances and rewrite it.
23240  # Note: m4 eats our [], so we need to use [ and ] instead.
23241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23242  if test "x$has_forbidden_chars" != x; then
23243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23247      # Going to short mode and back again did indeed matter. Since short mode is
23248      # case insensitive, let's make it lowercase to improve readability.
23249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23250      # Now convert it back to Unix-stile (cygpath)
23251      input_path=`$CYGPATH -u "$shortmode_path"`
23252      new_path="$input_path"
23253    fi
23254  fi
23255
23256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23257  if test "x$test_cygdrive_prefix" = x; then
23258    # As a simple fix, exclude /usr/bin since it's not a real path.
23259    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23261      # a path prefixed by /cygdrive for fixpath to work.
23262      new_path="$CYGWIN_ROOT_PATH$input_path"
23263    fi
23264  fi
23265
23266
23267  if test "x$path" != "x$new_path"; then
23268    BOOT_JDK="$new_path"
23269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23270$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23271  fi
23272
23273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23274
23275  path="$BOOT_JDK"
23276  has_colon=`$ECHO $path | $GREP ^.:`
23277  new_path="$path"
23278  if test "x$has_colon" = x; then
23279    # Not in mixed or Windows style, start by that.
23280    new_path=`cmd //c echo $path`
23281  fi
23282
23283
23284  input_path="$new_path"
23285  # Check if we need to convert this using DOS-style short mode. If the path
23286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23287  # take no chances and rewrite it.
23288  # Note: m4 eats our [], so we need to use [ and ] instead.
23289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23290  if test "x$has_forbidden_chars" != x; then
23291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23293  fi
23294
23295
23296  windows_path="$new_path"
23297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23298    unix_path=`$CYGPATH -u "$windows_path"`
23299    new_path="$unix_path"
23300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23302    new_path="$unix_path"
23303  fi
23304
23305  if test "x$path" != "x$new_path"; then
23306    BOOT_JDK="$new_path"
23307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23308$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23309  fi
23310
23311  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23312  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23313
23314  else
23315    # We're on a posix platform. Hooray! :)
23316    path="$BOOT_JDK"
23317    has_space=`$ECHO "$path" | $GREP " "`
23318    if test "x$has_space" != x; then
23319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23320$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23321      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23322    fi
23323
23324    # Use eval to expand a potential ~
23325    eval path="$path"
23326    if test ! -f "$path" && test ! -d "$path"; then
23327      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23328    fi
23329
23330    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23331  fi
23332
23333              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23334$as_echo_n "checking for Boot JDK... " >&6; }
23335              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23336$as_echo "$BOOT_JDK" >&6; }
23337              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23338$as_echo_n "checking Boot JDK version... " >&6; }
23339              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23340              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23341$as_echo "$BOOT_JDK_VERSION" >&6; }
23342            fi # end check jdk version
23343          fi # end check rt.jar
23344        fi # end check javac
23345      fi # end check java
23346    fi # end check boot jdk found
23347  fi
23348
23349
23350  if test "x$BOOT_JDK_FOUND" = xno; then
23351    # Now execute the test
23352
23353  if test "x$ProgramFiles" != x; then
23354    VIRTUAL_DIR="$ProgramFiles/Java"
23355
23356  windows_path="$VIRTUAL_DIR"
23357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23358    unix_path=`$CYGPATH -u "$windows_path"`
23359    VIRTUAL_DIR="$unix_path"
23360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23362    VIRTUAL_DIR="$unix_path"
23363  fi
23364
23365
23366  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23367  BOOT_JDK_SUFFIX=""
23368  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23369  if test "x$ALL_JDKS_FOUND" != x; then
23370    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23371
23372  if test "x$BOOT_JDK_FOUND" = xno; then
23373    # Now execute the test
23374
23375        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23376        if test -d "$BOOT_JDK"; then
23377          BOOT_JDK_FOUND=maybe
23378          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23379$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23380        fi
23381
23382
23383    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23384    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23385      # Do we have a bin/java?
23386      if test ! -x "$BOOT_JDK/bin/java"; then
23387        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23389        BOOT_JDK_FOUND=no
23390      else
23391        # Do we have a bin/javac?
23392        if test ! -x "$BOOT_JDK/bin/javac"; then
23393          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23395          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23396$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23397          BOOT_JDK_FOUND=no
23398        else
23399          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23400          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23401            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23403            BOOT_JDK_FOUND=no
23404          else
23405            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23406            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23407
23408            # Extra M4 quote needed to protect [] in grep expression.
23409            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23410            if test "x$FOUND_CORRECT_VERSION" = x; then
23411              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23412$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23413              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23414$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23415              BOOT_JDK_FOUND=no
23416            else
23417              # We're done! :-)
23418              BOOT_JDK_FOUND=yes
23419
23420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23421
23422  # Input might be given as Windows format, start by converting to
23423  # unix format.
23424  path="$BOOT_JDK"
23425  new_path=`$CYGPATH -u "$path"`
23426
23427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23430  # "foo.exe" is OK but "foo" is an error.
23431  #
23432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23433  # It is also a way to make sure we got the proper file name for the real test later on.
23434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23435  if test "x$test_shortpath" = x; then
23436    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23437$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23438    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23439  fi
23440
23441  # Call helper function which possibly converts this using DOS-style short mode.
23442  # If so, the updated path is stored in $new_path.
23443
23444  input_path="$new_path"
23445  # Check if we need to convert this using DOS-style short mode. If the path
23446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23447  # take no chances and rewrite it.
23448  # Note: m4 eats our [], so we need to use [ and ] instead.
23449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23450  if test "x$has_forbidden_chars" != x; then
23451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23455      # Going to short mode and back again did indeed matter. Since short mode is
23456      # case insensitive, let's make it lowercase to improve readability.
23457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23458      # Now convert it back to Unix-stile (cygpath)
23459      input_path=`$CYGPATH -u "$shortmode_path"`
23460      new_path="$input_path"
23461    fi
23462  fi
23463
23464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23465  if test "x$test_cygdrive_prefix" = x; then
23466    # As a simple fix, exclude /usr/bin since it's not a real path.
23467    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23469      # a path prefixed by /cygdrive for fixpath to work.
23470      new_path="$CYGWIN_ROOT_PATH$input_path"
23471    fi
23472  fi
23473
23474
23475  if test "x$path" != "x$new_path"; then
23476    BOOT_JDK="$new_path"
23477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23478$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23479  fi
23480
23481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23482
23483  path="$BOOT_JDK"
23484  has_colon=`$ECHO $path | $GREP ^.:`
23485  new_path="$path"
23486  if test "x$has_colon" = x; then
23487    # Not in mixed or Windows style, start by that.
23488    new_path=`cmd //c echo $path`
23489  fi
23490
23491
23492  input_path="$new_path"
23493  # Check if we need to convert this using DOS-style short mode. If the path
23494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23495  # take no chances and rewrite it.
23496  # Note: m4 eats our [], so we need to use [ and ] instead.
23497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23498  if test "x$has_forbidden_chars" != x; then
23499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23501  fi
23502
23503
23504  windows_path="$new_path"
23505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23506    unix_path=`$CYGPATH -u "$windows_path"`
23507    new_path="$unix_path"
23508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23510    new_path="$unix_path"
23511  fi
23512
23513  if test "x$path" != "x$new_path"; then
23514    BOOT_JDK="$new_path"
23515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23516$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23517  fi
23518
23519  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23520  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23521
23522  else
23523    # We're on a posix platform. Hooray! :)
23524    path="$BOOT_JDK"
23525    has_space=`$ECHO "$path" | $GREP " "`
23526    if test "x$has_space" != x; then
23527      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23528$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23529      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23530    fi
23531
23532    # Use eval to expand a potential ~
23533    eval path="$path"
23534    if test ! -f "$path" && test ! -d "$path"; then
23535      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23536    fi
23537
23538    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23539  fi
23540
23541              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23542$as_echo_n "checking for Boot JDK... " >&6; }
23543              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23544$as_echo "$BOOT_JDK" >&6; }
23545              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23546$as_echo_n "checking Boot JDK version... " >&6; }
23547              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23548              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23549$as_echo "$BOOT_JDK_VERSION" >&6; }
23550            fi # end check jdk version
23551          fi # end check rt.jar
23552        fi # end check javac
23553      fi # end check java
23554    fi # end check boot jdk found
23555  fi
23556
23557    done
23558  fi
23559
23560  fi
23561
23562
23563    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23564    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23565      # Do we have a bin/java?
23566      if test ! -x "$BOOT_JDK/bin/java"; then
23567        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23568$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23569        BOOT_JDK_FOUND=no
23570      else
23571        # Do we have a bin/javac?
23572        if test ! -x "$BOOT_JDK/bin/javac"; then
23573          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23575          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23576$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23577          BOOT_JDK_FOUND=no
23578        else
23579          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23580          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23581            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23583            BOOT_JDK_FOUND=no
23584          else
23585            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23586            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23587
23588            # Extra M4 quote needed to protect [] in grep expression.
23589            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23590            if test "x$FOUND_CORRECT_VERSION" = x; then
23591              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23593              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23594$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23595              BOOT_JDK_FOUND=no
23596            else
23597              # We're done! :-)
23598              BOOT_JDK_FOUND=yes
23599
23600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23601
23602  # Input might be given as Windows format, start by converting to
23603  # unix format.
23604  path="$BOOT_JDK"
23605  new_path=`$CYGPATH -u "$path"`
23606
23607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23610  # "foo.exe" is OK but "foo" is an error.
23611  #
23612  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23613  # It is also a way to make sure we got the proper file name for the real test later on.
23614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23615  if test "x$test_shortpath" = x; then
23616    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23617$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23618    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23619  fi
23620
23621  # Call helper function which possibly converts this using DOS-style short mode.
23622  # If so, the updated path is stored in $new_path.
23623
23624  input_path="$new_path"
23625  # Check if we need to convert this using DOS-style short mode. If the path
23626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23627  # take no chances and rewrite it.
23628  # Note: m4 eats our [], so we need to use [ and ] instead.
23629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23630  if test "x$has_forbidden_chars" != x; then
23631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23635      # Going to short mode and back again did indeed matter. Since short mode is
23636      # case insensitive, let's make it lowercase to improve readability.
23637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23638      # Now convert it back to Unix-stile (cygpath)
23639      input_path=`$CYGPATH -u "$shortmode_path"`
23640      new_path="$input_path"
23641    fi
23642  fi
23643
23644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23645  if test "x$test_cygdrive_prefix" = x; then
23646    # As a simple fix, exclude /usr/bin since it's not a real path.
23647    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23649      # a path prefixed by /cygdrive for fixpath to work.
23650      new_path="$CYGWIN_ROOT_PATH$input_path"
23651    fi
23652  fi
23653
23654
23655  if test "x$path" != "x$new_path"; then
23656    BOOT_JDK="$new_path"
23657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23658$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23659  fi
23660
23661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23662
23663  path="$BOOT_JDK"
23664  has_colon=`$ECHO $path | $GREP ^.:`
23665  new_path="$path"
23666  if test "x$has_colon" = x; then
23667    # Not in mixed or Windows style, start by that.
23668    new_path=`cmd //c echo $path`
23669  fi
23670
23671
23672  input_path="$new_path"
23673  # Check if we need to convert this using DOS-style short mode. If the path
23674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23675  # take no chances and rewrite it.
23676  # Note: m4 eats our [], so we need to use [ and ] instead.
23677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23678  if test "x$has_forbidden_chars" != x; then
23679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23681  fi
23682
23683
23684  windows_path="$new_path"
23685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23686    unix_path=`$CYGPATH -u "$windows_path"`
23687    new_path="$unix_path"
23688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23690    new_path="$unix_path"
23691  fi
23692
23693  if test "x$path" != "x$new_path"; then
23694    BOOT_JDK="$new_path"
23695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23696$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23697  fi
23698
23699  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23700  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23701
23702  else
23703    # We're on a posix platform. Hooray! :)
23704    path="$BOOT_JDK"
23705    has_space=`$ECHO "$path" | $GREP " "`
23706    if test "x$has_space" != x; then
23707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23708$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23709      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23710    fi
23711
23712    # Use eval to expand a potential ~
23713    eval path="$path"
23714    if test ! -f "$path" && test ! -d "$path"; then
23715      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23716    fi
23717
23718    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23719  fi
23720
23721              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23722$as_echo_n "checking for Boot JDK... " >&6; }
23723              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23724$as_echo "$BOOT_JDK" >&6; }
23725              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23726$as_echo_n "checking Boot JDK version... " >&6; }
23727              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23728              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23729$as_echo "$BOOT_JDK_VERSION" >&6; }
23730            fi # end check jdk version
23731          fi # end check rt.jar
23732        fi # end check javac
23733      fi # end check java
23734    fi # end check boot jdk found
23735  fi
23736
23737
23738  if test "x$BOOT_JDK_FOUND" = xno; then
23739    # Now execute the test
23740
23741  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23742  BOOT_JDK_SUFFIX=""
23743  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23744  if test "x$ALL_JDKS_FOUND" != x; then
23745    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23746
23747  if test "x$BOOT_JDK_FOUND" = xno; then
23748    # Now execute the test
23749
23750        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23751        if test -d "$BOOT_JDK"; then
23752          BOOT_JDK_FOUND=maybe
23753          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23754$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23755        fi
23756
23757
23758    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23759    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23760      # Do we have a bin/java?
23761      if test ! -x "$BOOT_JDK/bin/java"; then
23762        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23763$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23764        BOOT_JDK_FOUND=no
23765      else
23766        # Do we have a bin/javac?
23767        if test ! -x "$BOOT_JDK/bin/javac"; then
23768          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23770          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23771$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23772          BOOT_JDK_FOUND=no
23773        else
23774          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23775          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23776            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23778            BOOT_JDK_FOUND=no
23779          else
23780            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23781            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23782
23783            # Extra M4 quote needed to protect [] in grep expression.
23784            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23785            if test "x$FOUND_CORRECT_VERSION" = x; then
23786              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23788              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23789$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23790              BOOT_JDK_FOUND=no
23791            else
23792              # We're done! :-)
23793              BOOT_JDK_FOUND=yes
23794
23795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23796
23797  # Input might be given as Windows format, start by converting to
23798  # unix format.
23799  path="$BOOT_JDK"
23800  new_path=`$CYGPATH -u "$path"`
23801
23802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23805  # "foo.exe" is OK but "foo" is an error.
23806  #
23807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23808  # It is also a way to make sure we got the proper file name for the real test later on.
23809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23810  if test "x$test_shortpath" = x; then
23811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23812$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23813    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23814  fi
23815
23816  # Call helper function which possibly converts this using DOS-style short mode.
23817  # If so, the updated path is stored in $new_path.
23818
23819  input_path="$new_path"
23820  # Check if we need to convert this using DOS-style short mode. If the path
23821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23822  # take no chances and rewrite it.
23823  # Note: m4 eats our [], so we need to use [ and ] instead.
23824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23825  if test "x$has_forbidden_chars" != x; then
23826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23830      # Going to short mode and back again did indeed matter. Since short mode is
23831      # case insensitive, let's make it lowercase to improve readability.
23832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23833      # Now convert it back to Unix-stile (cygpath)
23834      input_path=`$CYGPATH -u "$shortmode_path"`
23835      new_path="$input_path"
23836    fi
23837  fi
23838
23839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23840  if test "x$test_cygdrive_prefix" = x; then
23841    # As a simple fix, exclude /usr/bin since it's not a real path.
23842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23844      # a path prefixed by /cygdrive for fixpath to work.
23845      new_path="$CYGWIN_ROOT_PATH$input_path"
23846    fi
23847  fi
23848
23849
23850  if test "x$path" != "x$new_path"; then
23851    BOOT_JDK="$new_path"
23852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23853$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23854  fi
23855
23856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23857
23858  path="$BOOT_JDK"
23859  has_colon=`$ECHO $path | $GREP ^.:`
23860  new_path="$path"
23861  if test "x$has_colon" = x; then
23862    # Not in mixed or Windows style, start by that.
23863    new_path=`cmd //c echo $path`
23864  fi
23865
23866
23867  input_path="$new_path"
23868  # Check if we need to convert this using DOS-style short mode. If the path
23869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23870  # take no chances and rewrite it.
23871  # Note: m4 eats our [], so we need to use [ and ] instead.
23872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23873  if test "x$has_forbidden_chars" != x; then
23874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23876  fi
23877
23878
23879  windows_path="$new_path"
23880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23881    unix_path=`$CYGPATH -u "$windows_path"`
23882    new_path="$unix_path"
23883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23885    new_path="$unix_path"
23886  fi
23887
23888  if test "x$path" != "x$new_path"; then
23889    BOOT_JDK="$new_path"
23890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23891$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23892  fi
23893
23894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23896
23897  else
23898    # We're on a posix platform. Hooray! :)
23899    path="$BOOT_JDK"
23900    has_space=`$ECHO "$path" | $GREP " "`
23901    if test "x$has_space" != x; then
23902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23903$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23904      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23905    fi
23906
23907    # Use eval to expand a potential ~
23908    eval path="$path"
23909    if test ! -f "$path" && test ! -d "$path"; then
23910      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23911    fi
23912
23913    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23914  fi
23915
23916              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23917$as_echo_n "checking for Boot JDK... " >&6; }
23918              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23919$as_echo "$BOOT_JDK" >&6; }
23920              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23921$as_echo_n "checking Boot JDK version... " >&6; }
23922              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23923              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23924$as_echo "$BOOT_JDK_VERSION" >&6; }
23925            fi # end check jdk version
23926          fi # end check rt.jar
23927        fi # end check javac
23928      fi # end check java
23929    fi # end check boot jdk found
23930  fi
23931
23932    done
23933  fi
23934
23935
23936    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23937    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23938      # Do we have a bin/java?
23939      if test ! -x "$BOOT_JDK/bin/java"; then
23940        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23942        BOOT_JDK_FOUND=no
23943      else
23944        # Do we have a bin/javac?
23945        if test ! -x "$BOOT_JDK/bin/javac"; then
23946          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23948          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23949$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23950          BOOT_JDK_FOUND=no
23951        else
23952          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23953          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23954            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23956            BOOT_JDK_FOUND=no
23957          else
23958            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23959            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23960
23961            # Extra M4 quote needed to protect [] in grep expression.
23962            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23963            if test "x$FOUND_CORRECT_VERSION" = x; then
23964              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23966              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23967$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23968              BOOT_JDK_FOUND=no
23969            else
23970              # We're done! :-)
23971              BOOT_JDK_FOUND=yes
23972
23973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23974
23975  # Input might be given as Windows format, start by converting to
23976  # unix format.
23977  path="$BOOT_JDK"
23978  new_path=`$CYGPATH -u "$path"`
23979
23980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23983  # "foo.exe" is OK but "foo" is an error.
23984  #
23985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23986  # It is also a way to make sure we got the proper file name for the real test later on.
23987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23988  if test "x$test_shortpath" = x; then
23989    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23990$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23991    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23992  fi
23993
23994  # Call helper function which possibly converts this using DOS-style short mode.
23995  # If so, the updated path is stored in $new_path.
23996
23997  input_path="$new_path"
23998  # Check if we need to convert this using DOS-style short mode. If the path
23999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24000  # take no chances and rewrite it.
24001  # Note: m4 eats our [], so we need to use [ and ] instead.
24002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24003  if test "x$has_forbidden_chars" != x; then
24004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24008      # Going to short mode and back again did indeed matter. Since short mode is
24009      # case insensitive, let's make it lowercase to improve readability.
24010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24011      # Now convert it back to Unix-stile (cygpath)
24012      input_path=`$CYGPATH -u "$shortmode_path"`
24013      new_path="$input_path"
24014    fi
24015  fi
24016
24017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24018  if test "x$test_cygdrive_prefix" = x; then
24019    # As a simple fix, exclude /usr/bin since it's not a real path.
24020    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24022      # a path prefixed by /cygdrive for fixpath to work.
24023      new_path="$CYGWIN_ROOT_PATH$input_path"
24024    fi
24025  fi
24026
24027
24028  if test "x$path" != "x$new_path"; then
24029    BOOT_JDK="$new_path"
24030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24031$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24032  fi
24033
24034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24035
24036  path="$BOOT_JDK"
24037  has_colon=`$ECHO $path | $GREP ^.:`
24038  new_path="$path"
24039  if test "x$has_colon" = x; then
24040    # Not in mixed or Windows style, start by that.
24041    new_path=`cmd //c echo $path`
24042  fi
24043
24044
24045  input_path="$new_path"
24046  # Check if we need to convert this using DOS-style short mode. If the path
24047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24048  # take no chances and rewrite it.
24049  # Note: m4 eats our [], so we need to use [ and ] instead.
24050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24051  if test "x$has_forbidden_chars" != x; then
24052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24054  fi
24055
24056
24057  windows_path="$new_path"
24058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24059    unix_path=`$CYGPATH -u "$windows_path"`
24060    new_path="$unix_path"
24061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24063    new_path="$unix_path"
24064  fi
24065
24066  if test "x$path" != "x$new_path"; then
24067    BOOT_JDK="$new_path"
24068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24069$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24070  fi
24071
24072  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24073  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24074
24075  else
24076    # We're on a posix platform. Hooray! :)
24077    path="$BOOT_JDK"
24078    has_space=`$ECHO "$path" | $GREP " "`
24079    if test "x$has_space" != x; then
24080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24081$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24082      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24083    fi
24084
24085    # Use eval to expand a potential ~
24086    eval path="$path"
24087    if test ! -f "$path" && test ! -d "$path"; then
24088      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24089    fi
24090
24091    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24092  fi
24093
24094              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24095$as_echo_n "checking for Boot JDK... " >&6; }
24096              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24097$as_echo "$BOOT_JDK" >&6; }
24098              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24099$as_echo_n "checking Boot JDK version... " >&6; }
24100              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24101              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24102$as_echo "$BOOT_JDK_VERSION" >&6; }
24103            fi # end check jdk version
24104          fi # end check rt.jar
24105        fi # end check javac
24106      fi # end check java
24107    fi # end check boot jdk found
24108  fi
24109
24110  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24111
24112  if test "x$BOOT_JDK_FOUND" = xno; then
24113    # Now execute the test
24114
24115  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24116  BOOT_JDK_SUFFIX="/Contents/Home"
24117  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24118  if test "x$ALL_JDKS_FOUND" != x; then
24119    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24120
24121  if test "x$BOOT_JDK_FOUND" = xno; then
24122    # Now execute the test
24123
24124        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24125        if test -d "$BOOT_JDK"; then
24126          BOOT_JDK_FOUND=maybe
24127          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24128$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24129        fi
24130
24131
24132    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24133    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24134      # Do we have a bin/java?
24135      if test ! -x "$BOOT_JDK/bin/java"; then
24136        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24137$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24138        BOOT_JDK_FOUND=no
24139      else
24140        # Do we have a bin/javac?
24141        if test ! -x "$BOOT_JDK/bin/javac"; then
24142          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24143$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24144          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24145$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24146          BOOT_JDK_FOUND=no
24147        else
24148          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24149          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24150            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24152            BOOT_JDK_FOUND=no
24153          else
24154            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24155            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24156
24157            # Extra M4 quote needed to protect [] in grep expression.
24158            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24159            if test "x$FOUND_CORRECT_VERSION" = x; then
24160              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24161$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24162              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24163$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24164              BOOT_JDK_FOUND=no
24165            else
24166              # We're done! :-)
24167              BOOT_JDK_FOUND=yes
24168
24169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24170
24171  # Input might be given as Windows format, start by converting to
24172  # unix format.
24173  path="$BOOT_JDK"
24174  new_path=`$CYGPATH -u "$path"`
24175
24176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24179  # "foo.exe" is OK but "foo" is an error.
24180  #
24181  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24182  # It is also a way to make sure we got the proper file name for the real test later on.
24183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24184  if test "x$test_shortpath" = x; then
24185    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24186$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24187    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24188  fi
24189
24190  # Call helper function which possibly converts this using DOS-style short mode.
24191  # If so, the updated path is stored in $new_path.
24192
24193  input_path="$new_path"
24194  # Check if we need to convert this using DOS-style short mode. If the path
24195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24196  # take no chances and rewrite it.
24197  # Note: m4 eats our [], so we need to use [ and ] instead.
24198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24199  if test "x$has_forbidden_chars" != x; then
24200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24204      # Going to short mode and back again did indeed matter. Since short mode is
24205      # case insensitive, let's make it lowercase to improve readability.
24206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24207      # Now convert it back to Unix-stile (cygpath)
24208      input_path=`$CYGPATH -u "$shortmode_path"`
24209      new_path="$input_path"
24210    fi
24211  fi
24212
24213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24214  if test "x$test_cygdrive_prefix" = x; then
24215    # As a simple fix, exclude /usr/bin since it's not a real path.
24216    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24218      # a path prefixed by /cygdrive for fixpath to work.
24219      new_path="$CYGWIN_ROOT_PATH$input_path"
24220    fi
24221  fi
24222
24223
24224  if test "x$path" != "x$new_path"; then
24225    BOOT_JDK="$new_path"
24226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24227$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24228  fi
24229
24230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24231
24232  path="$BOOT_JDK"
24233  has_colon=`$ECHO $path | $GREP ^.:`
24234  new_path="$path"
24235  if test "x$has_colon" = x; then
24236    # Not in mixed or Windows style, start by that.
24237    new_path=`cmd //c echo $path`
24238  fi
24239
24240
24241  input_path="$new_path"
24242  # Check if we need to convert this using DOS-style short mode. If the path
24243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24244  # take no chances and rewrite it.
24245  # Note: m4 eats our [], so we need to use [ and ] instead.
24246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24247  if test "x$has_forbidden_chars" != x; then
24248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24250  fi
24251
24252
24253  windows_path="$new_path"
24254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24255    unix_path=`$CYGPATH -u "$windows_path"`
24256    new_path="$unix_path"
24257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24259    new_path="$unix_path"
24260  fi
24261
24262  if test "x$path" != "x$new_path"; then
24263    BOOT_JDK="$new_path"
24264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24265$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24266  fi
24267
24268  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24269  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24270
24271  else
24272    # We're on a posix platform. Hooray! :)
24273    path="$BOOT_JDK"
24274    has_space=`$ECHO "$path" | $GREP " "`
24275    if test "x$has_space" != x; then
24276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24277$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24278      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24279    fi
24280
24281    # Use eval to expand a potential ~
24282    eval path="$path"
24283    if test ! -f "$path" && test ! -d "$path"; then
24284      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24285    fi
24286
24287    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24288  fi
24289
24290              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24291$as_echo_n "checking for Boot JDK... " >&6; }
24292              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24293$as_echo "$BOOT_JDK" >&6; }
24294              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24295$as_echo_n "checking Boot JDK version... " >&6; }
24296              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24297              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24298$as_echo "$BOOT_JDK_VERSION" >&6; }
24299            fi # end check jdk version
24300          fi # end check rt.jar
24301        fi # end check javac
24302      fi # end check java
24303    fi # end check boot jdk found
24304  fi
24305
24306    done
24307  fi
24308
24309
24310    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24311    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24312      # Do we have a bin/java?
24313      if test ! -x "$BOOT_JDK/bin/java"; then
24314        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24316        BOOT_JDK_FOUND=no
24317      else
24318        # Do we have a bin/javac?
24319        if test ! -x "$BOOT_JDK/bin/javac"; then
24320          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24322          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24323$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24324          BOOT_JDK_FOUND=no
24325        else
24326          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24327          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24328            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24330            BOOT_JDK_FOUND=no
24331          else
24332            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24333            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24334
24335            # Extra M4 quote needed to protect [] in grep expression.
24336            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24337            if test "x$FOUND_CORRECT_VERSION" = x; then
24338              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24340              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24341$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24342              BOOT_JDK_FOUND=no
24343            else
24344              # We're done! :-)
24345              BOOT_JDK_FOUND=yes
24346
24347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24348
24349  # Input might be given as Windows format, start by converting to
24350  # unix format.
24351  path="$BOOT_JDK"
24352  new_path=`$CYGPATH -u "$path"`
24353
24354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24357  # "foo.exe" is OK but "foo" is an error.
24358  #
24359  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24360  # It is also a way to make sure we got the proper file name for the real test later on.
24361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24362  if test "x$test_shortpath" = x; then
24363    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24364$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24365    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24366  fi
24367
24368  # Call helper function which possibly converts this using DOS-style short mode.
24369  # If so, the updated path is stored in $new_path.
24370
24371  input_path="$new_path"
24372  # Check if we need to convert this using DOS-style short mode. If the path
24373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24374  # take no chances and rewrite it.
24375  # Note: m4 eats our [], so we need to use [ and ] instead.
24376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24377  if test "x$has_forbidden_chars" != x; then
24378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24382      # Going to short mode and back again did indeed matter. Since short mode is
24383      # case insensitive, let's make it lowercase to improve readability.
24384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24385      # Now convert it back to Unix-stile (cygpath)
24386      input_path=`$CYGPATH -u "$shortmode_path"`
24387      new_path="$input_path"
24388    fi
24389  fi
24390
24391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24392  if test "x$test_cygdrive_prefix" = x; then
24393    # As a simple fix, exclude /usr/bin since it's not a real path.
24394    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24396      # a path prefixed by /cygdrive for fixpath to work.
24397      new_path="$CYGWIN_ROOT_PATH$input_path"
24398    fi
24399  fi
24400
24401
24402  if test "x$path" != "x$new_path"; then
24403    BOOT_JDK="$new_path"
24404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24405$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24406  fi
24407
24408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24409
24410  path="$BOOT_JDK"
24411  has_colon=`$ECHO $path | $GREP ^.:`
24412  new_path="$path"
24413  if test "x$has_colon" = x; then
24414    # Not in mixed or Windows style, start by that.
24415    new_path=`cmd //c echo $path`
24416  fi
24417
24418
24419  input_path="$new_path"
24420  # Check if we need to convert this using DOS-style short mode. If the path
24421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24422  # take no chances and rewrite it.
24423  # Note: m4 eats our [], so we need to use [ and ] instead.
24424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24425  if test "x$has_forbidden_chars" != x; then
24426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24428  fi
24429
24430
24431  windows_path="$new_path"
24432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24433    unix_path=`$CYGPATH -u "$windows_path"`
24434    new_path="$unix_path"
24435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24437    new_path="$unix_path"
24438  fi
24439
24440  if test "x$path" != "x$new_path"; then
24441    BOOT_JDK="$new_path"
24442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24443$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24444  fi
24445
24446  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24447  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24448
24449  else
24450    # We're on a posix platform. Hooray! :)
24451    path="$BOOT_JDK"
24452    has_space=`$ECHO "$path" | $GREP " "`
24453    if test "x$has_space" != x; then
24454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24455$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24456      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24457    fi
24458
24459    # Use eval to expand a potential ~
24460    eval path="$path"
24461    if test ! -f "$path" && test ! -d "$path"; then
24462      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24463    fi
24464
24465    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24466  fi
24467
24468              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24469$as_echo_n "checking for Boot JDK... " >&6; }
24470              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24471$as_echo "$BOOT_JDK" >&6; }
24472              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24473$as_echo_n "checking Boot JDK version... " >&6; }
24474              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24475              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24476$as_echo "$BOOT_JDK_VERSION" >&6; }
24477            fi # end check jdk version
24478          fi # end check rt.jar
24479        fi # end check javac
24480      fi # end check java
24481    fi # end check boot jdk found
24482  fi
24483
24484
24485  if test "x$BOOT_JDK_FOUND" = xno; then
24486    # Now execute the test
24487
24488  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24489  BOOT_JDK_SUFFIX="/Contents/Home"
24490  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24491  if test "x$ALL_JDKS_FOUND" != x; then
24492    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24493
24494  if test "x$BOOT_JDK_FOUND" = xno; then
24495    # Now execute the test
24496
24497        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24498        if test -d "$BOOT_JDK"; then
24499          BOOT_JDK_FOUND=maybe
24500          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24501$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24502        fi
24503
24504
24505    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24506    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24507      # Do we have a bin/java?
24508      if test ! -x "$BOOT_JDK/bin/java"; then
24509        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24511        BOOT_JDK_FOUND=no
24512      else
24513        # Do we have a bin/javac?
24514        if test ! -x "$BOOT_JDK/bin/javac"; then
24515          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24517          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24518$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24519          BOOT_JDK_FOUND=no
24520        else
24521          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24522          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24523            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24524$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24525            BOOT_JDK_FOUND=no
24526          else
24527            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24528            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24529
24530            # Extra M4 quote needed to protect [] in grep expression.
24531            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24532            if test "x$FOUND_CORRECT_VERSION" = x; then
24533              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24535              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24536$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24537              BOOT_JDK_FOUND=no
24538            else
24539              # We're done! :-)
24540              BOOT_JDK_FOUND=yes
24541
24542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24543
24544  # Input might be given as Windows format, start by converting to
24545  # unix format.
24546  path="$BOOT_JDK"
24547  new_path=`$CYGPATH -u "$path"`
24548
24549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24552  # "foo.exe" is OK but "foo" is an error.
24553  #
24554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24555  # It is also a way to make sure we got the proper file name for the real test later on.
24556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24557  if test "x$test_shortpath" = x; then
24558    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24559$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24560    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24561  fi
24562
24563  # Call helper function which possibly converts this using DOS-style short mode.
24564  # If so, the updated path is stored in $new_path.
24565
24566  input_path="$new_path"
24567  # Check if we need to convert this using DOS-style short mode. If the path
24568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24569  # take no chances and rewrite it.
24570  # Note: m4 eats our [], so we need to use [ and ] instead.
24571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24572  if test "x$has_forbidden_chars" != x; then
24573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24577      # Going to short mode and back again did indeed matter. Since short mode is
24578      # case insensitive, let's make it lowercase to improve readability.
24579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24580      # Now convert it back to Unix-stile (cygpath)
24581      input_path=`$CYGPATH -u "$shortmode_path"`
24582      new_path="$input_path"
24583    fi
24584  fi
24585
24586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24587  if test "x$test_cygdrive_prefix" = x; then
24588    # As a simple fix, exclude /usr/bin since it's not a real path.
24589    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24591      # a path prefixed by /cygdrive for fixpath to work.
24592      new_path="$CYGWIN_ROOT_PATH$input_path"
24593    fi
24594  fi
24595
24596
24597  if test "x$path" != "x$new_path"; then
24598    BOOT_JDK="$new_path"
24599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24600$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24601  fi
24602
24603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24604
24605  path="$BOOT_JDK"
24606  has_colon=`$ECHO $path | $GREP ^.:`
24607  new_path="$path"
24608  if test "x$has_colon" = x; then
24609    # Not in mixed or Windows style, start by that.
24610    new_path=`cmd //c echo $path`
24611  fi
24612
24613
24614  input_path="$new_path"
24615  # Check if we need to convert this using DOS-style short mode. If the path
24616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24617  # take no chances and rewrite it.
24618  # Note: m4 eats our [], so we need to use [ and ] instead.
24619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24620  if test "x$has_forbidden_chars" != x; then
24621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24623  fi
24624
24625
24626  windows_path="$new_path"
24627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24628    unix_path=`$CYGPATH -u "$windows_path"`
24629    new_path="$unix_path"
24630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24632    new_path="$unix_path"
24633  fi
24634
24635  if test "x$path" != "x$new_path"; then
24636    BOOT_JDK="$new_path"
24637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24639  fi
24640
24641  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24642  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24643
24644  else
24645    # We're on a posix platform. Hooray! :)
24646    path="$BOOT_JDK"
24647    has_space=`$ECHO "$path" | $GREP " "`
24648    if test "x$has_space" != x; then
24649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24650$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24651      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24652    fi
24653
24654    # Use eval to expand a potential ~
24655    eval path="$path"
24656    if test ! -f "$path" && test ! -d "$path"; then
24657      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24658    fi
24659
24660    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24661  fi
24662
24663              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24664$as_echo_n "checking for Boot JDK... " >&6; }
24665              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24666$as_echo "$BOOT_JDK" >&6; }
24667              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24668$as_echo_n "checking Boot JDK version... " >&6; }
24669              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24670              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24671$as_echo "$BOOT_JDK_VERSION" >&6; }
24672            fi # end check jdk version
24673          fi # end check rt.jar
24674        fi # end check javac
24675      fi # end check java
24676    fi # end check boot jdk found
24677  fi
24678
24679    done
24680  fi
24681
24682
24683    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24684    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24685      # Do we have a bin/java?
24686      if test ! -x "$BOOT_JDK/bin/java"; then
24687        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24689        BOOT_JDK_FOUND=no
24690      else
24691        # Do we have a bin/javac?
24692        if test ! -x "$BOOT_JDK/bin/javac"; then
24693          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24695          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24696$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24697          BOOT_JDK_FOUND=no
24698        else
24699          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24700          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24701            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24702$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24703            BOOT_JDK_FOUND=no
24704          else
24705            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24706            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24707
24708            # Extra M4 quote needed to protect [] in grep expression.
24709            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24710            if test "x$FOUND_CORRECT_VERSION" = x; then
24711              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24713              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24714$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24715              BOOT_JDK_FOUND=no
24716            else
24717              # We're done! :-)
24718              BOOT_JDK_FOUND=yes
24719
24720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24721
24722  # Input might be given as Windows format, start by converting to
24723  # unix format.
24724  path="$BOOT_JDK"
24725  new_path=`$CYGPATH -u "$path"`
24726
24727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24730  # "foo.exe" is OK but "foo" is an error.
24731  #
24732  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24733  # It is also a way to make sure we got the proper file name for the real test later on.
24734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24735  if test "x$test_shortpath" = x; then
24736    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24738    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24739  fi
24740
24741  # Call helper function which possibly converts this using DOS-style short mode.
24742  # If so, the updated path is stored in $new_path.
24743
24744  input_path="$new_path"
24745  # Check if we need to convert this using DOS-style short mode. If the path
24746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24747  # take no chances and rewrite it.
24748  # Note: m4 eats our [], so we need to use [ and ] instead.
24749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24750  if test "x$has_forbidden_chars" != x; then
24751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24755      # Going to short mode and back again did indeed matter. Since short mode is
24756      # case insensitive, let's make it lowercase to improve readability.
24757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24758      # Now convert it back to Unix-stile (cygpath)
24759      input_path=`$CYGPATH -u "$shortmode_path"`
24760      new_path="$input_path"
24761    fi
24762  fi
24763
24764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24765  if test "x$test_cygdrive_prefix" = x; then
24766    # As a simple fix, exclude /usr/bin since it's not a real path.
24767    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24769      # a path prefixed by /cygdrive for fixpath to work.
24770      new_path="$CYGWIN_ROOT_PATH$input_path"
24771    fi
24772  fi
24773
24774
24775  if test "x$path" != "x$new_path"; then
24776    BOOT_JDK="$new_path"
24777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24778$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24779  fi
24780
24781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24782
24783  path="$BOOT_JDK"
24784  has_colon=`$ECHO $path | $GREP ^.:`
24785  new_path="$path"
24786  if test "x$has_colon" = x; then
24787    # Not in mixed or Windows style, start by that.
24788    new_path=`cmd //c echo $path`
24789  fi
24790
24791
24792  input_path="$new_path"
24793  # Check if we need to convert this using DOS-style short mode. If the path
24794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24795  # take no chances and rewrite it.
24796  # Note: m4 eats our [], so we need to use [ and ] instead.
24797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24798  if test "x$has_forbidden_chars" != x; then
24799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24801  fi
24802
24803
24804  windows_path="$new_path"
24805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24806    unix_path=`$CYGPATH -u "$windows_path"`
24807    new_path="$unix_path"
24808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24810    new_path="$unix_path"
24811  fi
24812
24813  if test "x$path" != "x$new_path"; then
24814    BOOT_JDK="$new_path"
24815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24816$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24817  fi
24818
24819  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24820  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24821
24822  else
24823    # We're on a posix platform. Hooray! :)
24824    path="$BOOT_JDK"
24825    has_space=`$ECHO "$path" | $GREP " "`
24826    if test "x$has_space" != x; then
24827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24829      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24830    fi
24831
24832    # Use eval to expand a potential ~
24833    eval path="$path"
24834    if test ! -f "$path" && test ! -d "$path"; then
24835      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24836    fi
24837
24838    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24839  fi
24840
24841              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24842$as_echo_n "checking for Boot JDK... " >&6; }
24843              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24844$as_echo "$BOOT_JDK" >&6; }
24845              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24846$as_echo_n "checking Boot JDK version... " >&6; }
24847              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24848              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24849$as_echo "$BOOT_JDK_VERSION" >&6; }
24850            fi # end check jdk version
24851          fi # end check rt.jar
24852        fi # end check javac
24853      fi # end check java
24854    fi # end check boot jdk found
24855  fi
24856
24857  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24858
24859  if test "x$BOOT_JDK_FOUND" = xno; then
24860    # Now execute the test
24861
24862  BOOT_JDK_PREFIX="/usr/lib/jvm"
24863  BOOT_JDK_SUFFIX=""
24864  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24865  if test "x$ALL_JDKS_FOUND" != x; then
24866    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24867
24868  if test "x$BOOT_JDK_FOUND" = xno; then
24869    # Now execute the test
24870
24871        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24872        if test -d "$BOOT_JDK"; then
24873          BOOT_JDK_FOUND=maybe
24874          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24875$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24876        fi
24877
24878
24879    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24880    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24881      # Do we have a bin/java?
24882      if test ! -x "$BOOT_JDK/bin/java"; then
24883        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24885        BOOT_JDK_FOUND=no
24886      else
24887        # Do we have a bin/javac?
24888        if test ! -x "$BOOT_JDK/bin/javac"; then
24889          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24890$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24891          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24892$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24893          BOOT_JDK_FOUND=no
24894        else
24895          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24896          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24897            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24899            BOOT_JDK_FOUND=no
24900          else
24901            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24902            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24903
24904            # Extra M4 quote needed to protect [] in grep expression.
24905            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24906            if test "x$FOUND_CORRECT_VERSION" = x; then
24907              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24908$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24909              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24910$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24911              BOOT_JDK_FOUND=no
24912            else
24913              # We're done! :-)
24914              BOOT_JDK_FOUND=yes
24915
24916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24917
24918  # Input might be given as Windows format, start by converting to
24919  # unix format.
24920  path="$BOOT_JDK"
24921  new_path=`$CYGPATH -u "$path"`
24922
24923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24926  # "foo.exe" is OK but "foo" is an error.
24927  #
24928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24929  # It is also a way to make sure we got the proper file name for the real test later on.
24930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24931  if test "x$test_shortpath" = x; then
24932    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24933$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24934    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24935  fi
24936
24937  # Call helper function which possibly converts this using DOS-style short mode.
24938  # If so, the updated path is stored in $new_path.
24939
24940  input_path="$new_path"
24941  # Check if we need to convert this using DOS-style short mode. If the path
24942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24943  # take no chances and rewrite it.
24944  # Note: m4 eats our [], so we need to use [ and ] instead.
24945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24946  if test "x$has_forbidden_chars" != x; then
24947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24951      # Going to short mode and back again did indeed matter. Since short mode is
24952      # case insensitive, let's make it lowercase to improve readability.
24953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24954      # Now convert it back to Unix-stile (cygpath)
24955      input_path=`$CYGPATH -u "$shortmode_path"`
24956      new_path="$input_path"
24957    fi
24958  fi
24959
24960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24961  if test "x$test_cygdrive_prefix" = x; then
24962    # As a simple fix, exclude /usr/bin since it's not a real path.
24963    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24965      # a path prefixed by /cygdrive for fixpath to work.
24966      new_path="$CYGWIN_ROOT_PATH$input_path"
24967    fi
24968  fi
24969
24970
24971  if test "x$path" != "x$new_path"; then
24972    BOOT_JDK="$new_path"
24973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24974$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24975  fi
24976
24977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24978
24979  path="$BOOT_JDK"
24980  has_colon=`$ECHO $path | $GREP ^.:`
24981  new_path="$path"
24982  if test "x$has_colon" = x; then
24983    # Not in mixed or Windows style, start by that.
24984    new_path=`cmd //c echo $path`
24985  fi
24986
24987
24988  input_path="$new_path"
24989  # Check if we need to convert this using DOS-style short mode. If the path
24990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24991  # take no chances and rewrite it.
24992  # Note: m4 eats our [], so we need to use [ and ] instead.
24993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24994  if test "x$has_forbidden_chars" != x; then
24995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24997  fi
24998
24999
25000  windows_path="$new_path"
25001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25002    unix_path=`$CYGPATH -u "$windows_path"`
25003    new_path="$unix_path"
25004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25006    new_path="$unix_path"
25007  fi
25008
25009  if test "x$path" != "x$new_path"; then
25010    BOOT_JDK="$new_path"
25011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25012$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25013  fi
25014
25015  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25016  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25017
25018  else
25019    # We're on a posix platform. Hooray! :)
25020    path="$BOOT_JDK"
25021    has_space=`$ECHO "$path" | $GREP " "`
25022    if test "x$has_space" != x; then
25023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25024$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25025      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25026    fi
25027
25028    # Use eval to expand a potential ~
25029    eval path="$path"
25030    if test ! -f "$path" && test ! -d "$path"; then
25031      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25032    fi
25033
25034    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25035  fi
25036
25037              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25038$as_echo_n "checking for Boot JDK... " >&6; }
25039              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25040$as_echo "$BOOT_JDK" >&6; }
25041              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25042$as_echo_n "checking Boot JDK version... " >&6; }
25043              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25044              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25045$as_echo "$BOOT_JDK_VERSION" >&6; }
25046            fi # end check jdk version
25047          fi # end check rt.jar
25048        fi # end check javac
25049      fi # end check java
25050    fi # end check boot jdk found
25051  fi
25052
25053    done
25054  fi
25055
25056
25057    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25058    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25059      # Do we have a bin/java?
25060      if test ! -x "$BOOT_JDK/bin/java"; then
25061        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25063        BOOT_JDK_FOUND=no
25064      else
25065        # Do we have a bin/javac?
25066        if test ! -x "$BOOT_JDK/bin/javac"; then
25067          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25069          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25070$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25071          BOOT_JDK_FOUND=no
25072        else
25073          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25074          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25075            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25077            BOOT_JDK_FOUND=no
25078          else
25079            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25080            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25081
25082            # Extra M4 quote needed to protect [] in grep expression.
25083            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25084            if test "x$FOUND_CORRECT_VERSION" = x; then
25085              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25087              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25088$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25089              BOOT_JDK_FOUND=no
25090            else
25091              # We're done! :-)
25092              BOOT_JDK_FOUND=yes
25093
25094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25095
25096  # Input might be given as Windows format, start by converting to
25097  # unix format.
25098  path="$BOOT_JDK"
25099  new_path=`$CYGPATH -u "$path"`
25100
25101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25104  # "foo.exe" is OK but "foo" is an error.
25105  #
25106  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25107  # It is also a way to make sure we got the proper file name for the real test later on.
25108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25109  if test "x$test_shortpath" = x; then
25110    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25111$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25112    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25113  fi
25114
25115  # Call helper function which possibly converts this using DOS-style short mode.
25116  # If so, the updated path is stored in $new_path.
25117
25118  input_path="$new_path"
25119  # Check if we need to convert this using DOS-style short mode. If the path
25120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25121  # take no chances and rewrite it.
25122  # Note: m4 eats our [], so we need to use [ and ] instead.
25123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25124  if test "x$has_forbidden_chars" != x; then
25125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25129      # Going to short mode and back again did indeed matter. Since short mode is
25130      # case insensitive, let's make it lowercase to improve readability.
25131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25132      # Now convert it back to Unix-stile (cygpath)
25133      input_path=`$CYGPATH -u "$shortmode_path"`
25134      new_path="$input_path"
25135    fi
25136  fi
25137
25138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25139  if test "x$test_cygdrive_prefix" = x; then
25140    # As a simple fix, exclude /usr/bin since it's not a real path.
25141    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25143      # a path prefixed by /cygdrive for fixpath to work.
25144      new_path="$CYGWIN_ROOT_PATH$input_path"
25145    fi
25146  fi
25147
25148
25149  if test "x$path" != "x$new_path"; then
25150    BOOT_JDK="$new_path"
25151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25152$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25153  fi
25154
25155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25156
25157  path="$BOOT_JDK"
25158  has_colon=`$ECHO $path | $GREP ^.:`
25159  new_path="$path"
25160  if test "x$has_colon" = x; then
25161    # Not in mixed or Windows style, start by that.
25162    new_path=`cmd //c echo $path`
25163  fi
25164
25165
25166  input_path="$new_path"
25167  # Check if we need to convert this using DOS-style short mode. If the path
25168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25169  # take no chances and rewrite it.
25170  # Note: m4 eats our [], so we need to use [ and ] instead.
25171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25172  if test "x$has_forbidden_chars" != x; then
25173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25175  fi
25176
25177
25178  windows_path="$new_path"
25179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25180    unix_path=`$CYGPATH -u "$windows_path"`
25181    new_path="$unix_path"
25182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25184    new_path="$unix_path"
25185  fi
25186
25187  if test "x$path" != "x$new_path"; then
25188    BOOT_JDK="$new_path"
25189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25190$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25191  fi
25192
25193  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25194  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25195
25196  else
25197    # We're on a posix platform. Hooray! :)
25198    path="$BOOT_JDK"
25199    has_space=`$ECHO "$path" | $GREP " "`
25200    if test "x$has_space" != x; then
25201      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25202$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25203      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25204    fi
25205
25206    # Use eval to expand a potential ~
25207    eval path="$path"
25208    if test ! -f "$path" && test ! -d "$path"; then
25209      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25210    fi
25211
25212    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25213  fi
25214
25215              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25216$as_echo_n "checking for Boot JDK... " >&6; }
25217              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25218$as_echo "$BOOT_JDK" >&6; }
25219              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25220$as_echo_n "checking Boot JDK version... " >&6; }
25221              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25222              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25223$as_echo "$BOOT_JDK_VERSION" >&6; }
25224            fi # end check jdk version
25225          fi # end check rt.jar
25226        fi # end check javac
25227      fi # end check java
25228    fi # end check boot jdk found
25229  fi
25230
25231  fi
25232
25233
25234    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25235    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25236      # Do we have a bin/java?
25237      if test ! -x "$BOOT_JDK/bin/java"; then
25238        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25239$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25240        BOOT_JDK_FOUND=no
25241      else
25242        # Do we have a bin/javac?
25243        if test ! -x "$BOOT_JDK/bin/javac"; then
25244          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25246          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25247$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25248          BOOT_JDK_FOUND=no
25249        else
25250          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25251          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25252            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25253$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25254            BOOT_JDK_FOUND=no
25255          else
25256            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25257            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25258
25259            # Extra M4 quote needed to protect [] in grep expression.
25260            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25261            if test "x$FOUND_CORRECT_VERSION" = x; then
25262              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25263$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25264              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25265$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25266              BOOT_JDK_FOUND=no
25267            else
25268              # We're done! :-)
25269              BOOT_JDK_FOUND=yes
25270
25271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25272
25273  # Input might be given as Windows format, start by converting to
25274  # unix format.
25275  path="$BOOT_JDK"
25276  new_path=`$CYGPATH -u "$path"`
25277
25278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25281  # "foo.exe" is OK but "foo" is an error.
25282  #
25283  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25284  # It is also a way to make sure we got the proper file name for the real test later on.
25285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25286  if test "x$test_shortpath" = x; then
25287    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25288$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25289    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25290  fi
25291
25292  # Call helper function which possibly converts this using DOS-style short mode.
25293  # If so, the updated path is stored in $new_path.
25294
25295  input_path="$new_path"
25296  # Check if we need to convert this using DOS-style short mode. If the path
25297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25298  # take no chances and rewrite it.
25299  # Note: m4 eats our [], so we need to use [ and ] instead.
25300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25301  if test "x$has_forbidden_chars" != x; then
25302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25306      # Going to short mode and back again did indeed matter. Since short mode is
25307      # case insensitive, let's make it lowercase to improve readability.
25308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25309      # Now convert it back to Unix-stile (cygpath)
25310      input_path=`$CYGPATH -u "$shortmode_path"`
25311      new_path="$input_path"
25312    fi
25313  fi
25314
25315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25316  if test "x$test_cygdrive_prefix" = x; then
25317    # As a simple fix, exclude /usr/bin since it's not a real path.
25318    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25320      # a path prefixed by /cygdrive for fixpath to work.
25321      new_path="$CYGWIN_ROOT_PATH$input_path"
25322    fi
25323  fi
25324
25325
25326  if test "x$path" != "x$new_path"; then
25327    BOOT_JDK="$new_path"
25328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25329$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25330  fi
25331
25332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25333
25334  path="$BOOT_JDK"
25335  has_colon=`$ECHO $path | $GREP ^.:`
25336  new_path="$path"
25337  if test "x$has_colon" = x; then
25338    # Not in mixed or Windows style, start by that.
25339    new_path=`cmd //c echo $path`
25340  fi
25341
25342
25343  input_path="$new_path"
25344  # Check if we need to convert this using DOS-style short mode. If the path
25345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25346  # take no chances and rewrite it.
25347  # Note: m4 eats our [], so we need to use [ and ] instead.
25348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25349  if test "x$has_forbidden_chars" != x; then
25350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25352  fi
25353
25354
25355  windows_path="$new_path"
25356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25357    unix_path=`$CYGPATH -u "$windows_path"`
25358    new_path="$unix_path"
25359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25361    new_path="$unix_path"
25362  fi
25363
25364  if test "x$path" != "x$new_path"; then
25365    BOOT_JDK="$new_path"
25366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25367$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25368  fi
25369
25370  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25371  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25372
25373  else
25374    # We're on a posix platform. Hooray! :)
25375    path="$BOOT_JDK"
25376    has_space=`$ECHO "$path" | $GREP " "`
25377    if test "x$has_space" != x; then
25378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25379$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25380      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25381    fi
25382
25383    # Use eval to expand a potential ~
25384    eval path="$path"
25385    if test ! -f "$path" && test ! -d "$path"; then
25386      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25387    fi
25388
25389    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25390  fi
25391
25392              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25393$as_echo_n "checking for Boot JDK... " >&6; }
25394              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25395$as_echo "$BOOT_JDK" >&6; }
25396              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25397$as_echo_n "checking Boot JDK version... " >&6; }
25398              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25399              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25400$as_echo "$BOOT_JDK_VERSION" >&6; }
25401            fi # end check jdk version
25402          fi # end check rt.jar
25403        fi # end check javac
25404      fi # end check java
25405    fi # end check boot jdk found
25406  fi
25407
25408
25409  # If we haven't found anything yet, we've truly lost. Give up.
25410  if test "x$BOOT_JDK_FOUND" = xno; then
25411
25412  # Print a helpful message on how to acquire the necessary build dependency.
25413  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25414  MISSING_DEPENDENCY=openjdk
25415
25416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25417    cygwin_help $MISSING_DEPENDENCY
25418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25419    msys_help $MISSING_DEPENDENCY
25420  else
25421    PKGHANDLER_COMMAND=
25422
25423    case $PKGHANDLER in
25424      apt-get)
25425        apt_help     $MISSING_DEPENDENCY ;;
25426      yum)
25427        yum_help     $MISSING_DEPENDENCY ;;
25428      port)
25429        port_help    $MISSING_DEPENDENCY ;;
25430      pkgutil)
25431        pkgutil_help $MISSING_DEPENDENCY ;;
25432      pkgadd)
25433        pkgadd_help  $MISSING_DEPENDENCY ;;
25434    esac
25435
25436    if test "x$PKGHANDLER_COMMAND" != x; then
25437      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25438    fi
25439  fi
25440
25441    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25442$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25443    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25444$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25445    as_fn_error $? "Cannot continue" "$LINENO" 5
25446  fi
25447
25448  # Setup proper paths for what we found
25449  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25450  if test ! -f "$BOOT_RTJAR"; then
25451    # On MacOSX it is called classes.jar
25452    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25453    if test -f "$BOOT_RTJAR"; then
25454      # Remove the ..
25455      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25456    fi
25457  fi
25458  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25459  BOOT_JDK="$BOOT_JDK"
25460
25461
25462
25463
25464  # Setup tools from the Boot JDK.
25465
25466  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25467
25468  # Publish this variable in the help.
25469
25470
25471  if test "x$JAVA" = x; then
25472    # The variable is not set by user, try to locate tool using the code snippet
25473
25474      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25475$as_echo_n "checking for java in Boot JDK... " >&6; }
25476      JAVA=$BOOT_JDK/bin/java
25477      if test ! -x $JAVA; then
25478        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25479$as_echo "not found" >&6; }
25480        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25481$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25482        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25483      fi
25484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25485$as_echo "ok" >&6; }
25486
25487
25488  else
25489    # The variable is set, but is it from the command line or the environment?
25490
25491    # Try to remove the string !JAVA! from our list.
25492    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25493    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25494      # If it failed, the variable was not from the command line. Ignore it,
25495      # but warn the user (except for BASH, which is always set by the calling BASH).
25496      if test "xJAVA" != xBASH; then
25497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25498$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25499      fi
25500      # Try to locate tool using the code snippet
25501
25502      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25503$as_echo_n "checking for java in Boot JDK... " >&6; }
25504      JAVA=$BOOT_JDK/bin/java
25505      if test ! -x $JAVA; then
25506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25507$as_echo "not found" >&6; }
25508        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25509$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25510        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25511      fi
25512      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25513$as_echo "ok" >&6; }
25514
25515
25516    else
25517      # If it succeeded, then it was overridden by the user. We will use it
25518      # for the tool.
25519
25520      # First remove it from the list of overridden variables, so we can test
25521      # for unknown variables in the end.
25522      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25523
25524      # Check if the provided tool contains a complete path.
25525      tool_specified="$JAVA"
25526      tool_basename="${tool_specified##*/}"
25527      if test "x$tool_basename" = "x$tool_specified"; then
25528        # A command without a complete path is provided, search $PATH.
25529        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25530$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25531        # Extract the first word of "$tool_basename", so it can be a program name with args.
25532set dummy $tool_basename; ac_word=$2
25533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25534$as_echo_n "checking for $ac_word... " >&6; }
25535if ${ac_cv_path_JAVA+:} false; then :
25536  $as_echo_n "(cached) " >&6
25537else
25538  case $JAVA in
25539  [\\/]* | ?:[\\/]*)
25540  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25541  ;;
25542  *)
25543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25544for as_dir in $PATH
25545do
25546  IFS=$as_save_IFS
25547  test -z "$as_dir" && as_dir=.
25548    for ac_exec_ext in '' $ac_executable_extensions; do
25549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25550    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25552    break 2
25553  fi
25554done
25555  done
25556IFS=$as_save_IFS
25557
25558  ;;
25559esac
25560fi
25561JAVA=$ac_cv_path_JAVA
25562if test -n "$JAVA"; then
25563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25564$as_echo "$JAVA" >&6; }
25565else
25566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25567$as_echo "no" >&6; }
25568fi
25569
25570
25571        if test "x$JAVA" = x; then
25572          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25573        fi
25574      else
25575        # Otherwise we believe it is a complete path. Use it as it is.
25576        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25577$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25578        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25579$as_echo_n "checking for JAVA... " >&6; }
25580        if test ! -x "$tool_specified"; then
25581          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25582$as_echo "not found" >&6; }
25583          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25584        fi
25585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25586$as_echo "$tool_specified" >&6; }
25587      fi
25588    fi
25589  fi
25590
25591
25592
25593  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25594
25595  # Publish this variable in the help.
25596
25597
25598  if test "x$JAVAC" = x; then
25599    # The variable is not set by user, try to locate tool using the code snippet
25600
25601      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25602$as_echo_n "checking for javac in Boot JDK... " >&6; }
25603      JAVAC=$BOOT_JDK/bin/javac
25604      if test ! -x $JAVAC; then
25605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25606$as_echo "not found" >&6; }
25607        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25608$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25609        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25610      fi
25611      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25612$as_echo "ok" >&6; }
25613
25614
25615  else
25616    # The variable is set, but is it from the command line or the environment?
25617
25618    # Try to remove the string !JAVAC! from our list.
25619    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25620    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25621      # If it failed, the variable was not from the command line. Ignore it,
25622      # but warn the user (except for BASH, which is always set by the calling BASH).
25623      if test "xJAVAC" != xBASH; then
25624        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25625$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25626      fi
25627      # Try to locate tool using the code snippet
25628
25629      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25630$as_echo_n "checking for javac in Boot JDK... " >&6; }
25631      JAVAC=$BOOT_JDK/bin/javac
25632      if test ! -x $JAVAC; then
25633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25634$as_echo "not found" >&6; }
25635        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25636$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25637        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25638      fi
25639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25640$as_echo "ok" >&6; }
25641
25642
25643    else
25644      # If it succeeded, then it was overridden by the user. We will use it
25645      # for the tool.
25646
25647      # First remove it from the list of overridden variables, so we can test
25648      # for unknown variables in the end.
25649      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25650
25651      # Check if the provided tool contains a complete path.
25652      tool_specified="$JAVAC"
25653      tool_basename="${tool_specified##*/}"
25654      if test "x$tool_basename" = "x$tool_specified"; then
25655        # A command without a complete path is provided, search $PATH.
25656        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25657$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25658        # Extract the first word of "$tool_basename", so it can be a program name with args.
25659set dummy $tool_basename; ac_word=$2
25660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25661$as_echo_n "checking for $ac_word... " >&6; }
25662if ${ac_cv_path_JAVAC+:} false; then :
25663  $as_echo_n "(cached) " >&6
25664else
25665  case $JAVAC in
25666  [\\/]* | ?:[\\/]*)
25667  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25668  ;;
25669  *)
25670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25671for as_dir in $PATH
25672do
25673  IFS=$as_save_IFS
25674  test -z "$as_dir" && as_dir=.
25675    for ac_exec_ext in '' $ac_executable_extensions; do
25676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25677    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25679    break 2
25680  fi
25681done
25682  done
25683IFS=$as_save_IFS
25684
25685  ;;
25686esac
25687fi
25688JAVAC=$ac_cv_path_JAVAC
25689if test -n "$JAVAC"; then
25690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25691$as_echo "$JAVAC" >&6; }
25692else
25693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25694$as_echo "no" >&6; }
25695fi
25696
25697
25698        if test "x$JAVAC" = x; then
25699          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25700        fi
25701      else
25702        # Otherwise we believe it is a complete path. Use it as it is.
25703        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25704$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25706$as_echo_n "checking for JAVAC... " >&6; }
25707        if test ! -x "$tool_specified"; then
25708          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25709$as_echo "not found" >&6; }
25710          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25711        fi
25712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25713$as_echo "$tool_specified" >&6; }
25714      fi
25715    fi
25716  fi
25717
25718
25719
25720  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25721
25722  # Publish this variable in the help.
25723
25724
25725  if test "x$JAVAH" = x; then
25726    # The variable is not set by user, try to locate tool using the code snippet
25727
25728      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25729$as_echo_n "checking for javah in Boot JDK... " >&6; }
25730      JAVAH=$BOOT_JDK/bin/javah
25731      if test ! -x $JAVAH; then
25732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25733$as_echo "not found" >&6; }
25734        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25735$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25736        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25737      fi
25738      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25739$as_echo "ok" >&6; }
25740
25741
25742  else
25743    # The variable is set, but is it from the command line or the environment?
25744
25745    # Try to remove the string !JAVAH! from our list.
25746    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25747    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25748      # If it failed, the variable was not from the command line. Ignore it,
25749      # but warn the user (except for BASH, which is always set by the calling BASH).
25750      if test "xJAVAH" != xBASH; then
25751        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25752$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25753      fi
25754      # Try to locate tool using the code snippet
25755
25756      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25757$as_echo_n "checking for javah in Boot JDK... " >&6; }
25758      JAVAH=$BOOT_JDK/bin/javah
25759      if test ! -x $JAVAH; then
25760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25761$as_echo "not found" >&6; }
25762        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25763$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25764        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25765      fi
25766      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25767$as_echo "ok" >&6; }
25768
25769
25770    else
25771      # If it succeeded, then it was overridden by the user. We will use it
25772      # for the tool.
25773
25774      # First remove it from the list of overridden variables, so we can test
25775      # for unknown variables in the end.
25776      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25777
25778      # Check if the provided tool contains a complete path.
25779      tool_specified="$JAVAH"
25780      tool_basename="${tool_specified##*/}"
25781      if test "x$tool_basename" = "x$tool_specified"; then
25782        # A command without a complete path is provided, search $PATH.
25783        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25784$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25785        # Extract the first word of "$tool_basename", so it can be a program name with args.
25786set dummy $tool_basename; ac_word=$2
25787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25788$as_echo_n "checking for $ac_word... " >&6; }
25789if ${ac_cv_path_JAVAH+:} false; then :
25790  $as_echo_n "(cached) " >&6
25791else
25792  case $JAVAH in
25793  [\\/]* | ?:[\\/]*)
25794  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25795  ;;
25796  *)
25797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25798for as_dir in $PATH
25799do
25800  IFS=$as_save_IFS
25801  test -z "$as_dir" && as_dir=.
25802    for ac_exec_ext in '' $ac_executable_extensions; do
25803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25804    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25806    break 2
25807  fi
25808done
25809  done
25810IFS=$as_save_IFS
25811
25812  ;;
25813esac
25814fi
25815JAVAH=$ac_cv_path_JAVAH
25816if test -n "$JAVAH"; then
25817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25818$as_echo "$JAVAH" >&6; }
25819else
25820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25821$as_echo "no" >&6; }
25822fi
25823
25824
25825        if test "x$JAVAH" = x; then
25826          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25827        fi
25828      else
25829        # Otherwise we believe it is a complete path. Use it as it is.
25830        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25831$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25833$as_echo_n "checking for JAVAH... " >&6; }
25834        if test ! -x "$tool_specified"; then
25835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25836$as_echo "not found" >&6; }
25837          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25838        fi
25839        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25840$as_echo "$tool_specified" >&6; }
25841      fi
25842    fi
25843  fi
25844
25845
25846
25847  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25848
25849  # Publish this variable in the help.
25850
25851
25852  if test "x$JAR" = x; then
25853    # The variable is not set by user, try to locate tool using the code snippet
25854
25855      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25856$as_echo_n "checking for jar in Boot JDK... " >&6; }
25857      JAR=$BOOT_JDK/bin/jar
25858      if test ! -x $JAR; then
25859        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25860$as_echo "not found" >&6; }
25861        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25862$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25863        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25864      fi
25865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25866$as_echo "ok" >&6; }
25867
25868
25869  else
25870    # The variable is set, but is it from the command line or the environment?
25871
25872    # Try to remove the string !JAR! from our list.
25873    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25874    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25875      # If it failed, the variable was not from the command line. Ignore it,
25876      # but warn the user (except for BASH, which is always set by the calling BASH).
25877      if test "xJAR" != xBASH; then
25878        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25879$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25880      fi
25881      # Try to locate tool using the code snippet
25882
25883      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25884$as_echo_n "checking for jar in Boot JDK... " >&6; }
25885      JAR=$BOOT_JDK/bin/jar
25886      if test ! -x $JAR; then
25887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25888$as_echo "not found" >&6; }
25889        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25890$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25891        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25892      fi
25893      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25894$as_echo "ok" >&6; }
25895
25896
25897    else
25898      # If it succeeded, then it was overridden by the user. We will use it
25899      # for the tool.
25900
25901      # First remove it from the list of overridden variables, so we can test
25902      # for unknown variables in the end.
25903      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25904
25905      # Check if the provided tool contains a complete path.
25906      tool_specified="$JAR"
25907      tool_basename="${tool_specified##*/}"
25908      if test "x$tool_basename" = "x$tool_specified"; then
25909        # A command without a complete path is provided, search $PATH.
25910        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25911$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25912        # Extract the first word of "$tool_basename", so it can be a program name with args.
25913set dummy $tool_basename; ac_word=$2
25914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25915$as_echo_n "checking for $ac_word... " >&6; }
25916if ${ac_cv_path_JAR+:} false; then :
25917  $as_echo_n "(cached) " >&6
25918else
25919  case $JAR in
25920  [\\/]* | ?:[\\/]*)
25921  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25922  ;;
25923  *)
25924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25925for as_dir in $PATH
25926do
25927  IFS=$as_save_IFS
25928  test -z "$as_dir" && as_dir=.
25929    for ac_exec_ext in '' $ac_executable_extensions; do
25930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25931    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25933    break 2
25934  fi
25935done
25936  done
25937IFS=$as_save_IFS
25938
25939  ;;
25940esac
25941fi
25942JAR=$ac_cv_path_JAR
25943if test -n "$JAR"; then
25944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25945$as_echo "$JAR" >&6; }
25946else
25947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25948$as_echo "no" >&6; }
25949fi
25950
25951
25952        if test "x$JAR" = x; then
25953          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25954        fi
25955      else
25956        # Otherwise we believe it is a complete path. Use it as it is.
25957        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25958$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25960$as_echo_n "checking for JAR... " >&6; }
25961        if test ! -x "$tool_specified"; then
25962          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25963$as_echo "not found" >&6; }
25964          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25965        fi
25966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25967$as_echo "$tool_specified" >&6; }
25968      fi
25969    fi
25970  fi
25971
25972
25973
25974  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25975
25976  # Publish this variable in the help.
25977
25978
25979  if test "x$NATIVE2ASCII" = x; then
25980    # The variable is not set by user, try to locate tool using the code snippet
25981
25982      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25983$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25984      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25985      if test ! -x $NATIVE2ASCII; then
25986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25987$as_echo "not found" >&6; }
25988        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25989$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25990        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25991      fi
25992      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25993$as_echo "ok" >&6; }
25994
25995
25996  else
25997    # The variable is set, but is it from the command line or the environment?
25998
25999    # Try to remove the string !NATIVE2ASCII! from our list.
26000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
26001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26002      # If it failed, the variable was not from the command line. Ignore it,
26003      # but warn the user (except for BASH, which is always set by the calling BASH).
26004      if test "xNATIVE2ASCII" != xBASH; then
26005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
26006$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
26007      fi
26008      # Try to locate tool using the code snippet
26009
26010      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26011$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26012      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26013      if test ! -x $NATIVE2ASCII; then
26014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26015$as_echo "not found" >&6; }
26016        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26017$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26018        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26019      fi
26020      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26021$as_echo "ok" >&6; }
26022
26023
26024    else
26025      # If it succeeded, then it was overridden by the user. We will use it
26026      # for the tool.
26027
26028      # First remove it from the list of overridden variables, so we can test
26029      # for unknown variables in the end.
26030      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26031
26032      # Check if the provided tool contains a complete path.
26033      tool_specified="$NATIVE2ASCII"
26034      tool_basename="${tool_specified##*/}"
26035      if test "x$tool_basename" = "x$tool_specified"; then
26036        # A command without a complete path is provided, search $PATH.
26037        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
26038$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
26039        # Extract the first word of "$tool_basename", so it can be a program name with args.
26040set dummy $tool_basename; ac_word=$2
26041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26042$as_echo_n "checking for $ac_word... " >&6; }
26043if ${ac_cv_path_NATIVE2ASCII+:} false; then :
26044  $as_echo_n "(cached) " >&6
26045else
26046  case $NATIVE2ASCII in
26047  [\\/]* | ?:[\\/]*)
26048  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
26049  ;;
26050  *)
26051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26052for as_dir in $PATH
26053do
26054  IFS=$as_save_IFS
26055  test -z "$as_dir" && as_dir=.
26056    for ac_exec_ext in '' $ac_executable_extensions; do
26057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26058    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
26059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26060    break 2
26061  fi
26062done
26063  done
26064IFS=$as_save_IFS
26065
26066  ;;
26067esac
26068fi
26069NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26070if test -n "$NATIVE2ASCII"; then
26071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26072$as_echo "$NATIVE2ASCII" >&6; }
26073else
26074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26075$as_echo "no" >&6; }
26076fi
26077
26078
26079        if test "x$NATIVE2ASCII" = x; then
26080          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26081        fi
26082      else
26083        # Otherwise we believe it is a complete path. Use it as it is.
26084        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26085$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26086        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26087$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26088        if test ! -x "$tool_specified"; then
26089          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26090$as_echo "not found" >&6; }
26091          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26092        fi
26093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26094$as_echo "$tool_specified" >&6; }
26095      fi
26096    fi
26097  fi
26098
26099
26100
26101  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26102
26103  # Publish this variable in the help.
26104
26105
26106  if test "x$JARSIGNER" = x; then
26107    # The variable is not set by user, try to locate tool using the code snippet
26108
26109      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26110$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26111      JARSIGNER=$BOOT_JDK/bin/jarsigner
26112      if test ! -x $JARSIGNER; then
26113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26114$as_echo "not found" >&6; }
26115        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26116$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26117        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26118      fi
26119      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26120$as_echo "ok" >&6; }
26121
26122
26123  else
26124    # The variable is set, but is it from the command line or the environment?
26125
26126    # Try to remove the string !JARSIGNER! from our list.
26127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26129      # If it failed, the variable was not from the command line. Ignore it,
26130      # but warn the user (except for BASH, which is always set by the calling BASH).
26131      if test "xJARSIGNER" != xBASH; then
26132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26133$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26134      fi
26135      # Try to locate tool using the code snippet
26136
26137      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26138$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26139      JARSIGNER=$BOOT_JDK/bin/jarsigner
26140      if test ! -x $JARSIGNER; then
26141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26142$as_echo "not found" >&6; }
26143        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26144$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26145        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26146      fi
26147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26148$as_echo "ok" >&6; }
26149
26150
26151    else
26152      # If it succeeded, then it was overridden by the user. We will use it
26153      # for the tool.
26154
26155      # First remove it from the list of overridden variables, so we can test
26156      # for unknown variables in the end.
26157      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26158
26159      # Check if the provided tool contains a complete path.
26160      tool_specified="$JARSIGNER"
26161      tool_basename="${tool_specified##*/}"
26162      if test "x$tool_basename" = "x$tool_specified"; then
26163        # A command without a complete path is provided, search $PATH.
26164        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26165$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26166        # Extract the first word of "$tool_basename", so it can be a program name with args.
26167set dummy $tool_basename; ac_word=$2
26168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26169$as_echo_n "checking for $ac_word... " >&6; }
26170if ${ac_cv_path_JARSIGNER+:} false; then :
26171  $as_echo_n "(cached) " >&6
26172else
26173  case $JARSIGNER in
26174  [\\/]* | ?:[\\/]*)
26175  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26176  ;;
26177  *)
26178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26179for as_dir in $PATH
26180do
26181  IFS=$as_save_IFS
26182  test -z "$as_dir" && as_dir=.
26183    for ac_exec_ext in '' $ac_executable_extensions; do
26184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26185    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26187    break 2
26188  fi
26189done
26190  done
26191IFS=$as_save_IFS
26192
26193  ;;
26194esac
26195fi
26196JARSIGNER=$ac_cv_path_JARSIGNER
26197if test -n "$JARSIGNER"; then
26198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26199$as_echo "$JARSIGNER" >&6; }
26200else
26201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26202$as_echo "no" >&6; }
26203fi
26204
26205
26206        if test "x$JARSIGNER" = x; then
26207          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26208        fi
26209      else
26210        # Otherwise we believe it is a complete path. Use it as it is.
26211        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26212$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26213        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26214$as_echo_n "checking for JARSIGNER... " >&6; }
26215        if test ! -x "$tool_specified"; then
26216          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26217$as_echo "not found" >&6; }
26218          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26219        fi
26220        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26221$as_echo "$tool_specified" >&6; }
26222      fi
26223    fi
26224  fi
26225
26226
26227
26228  # Finally, set some other options...
26229
26230  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26231  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26232
26233
26234
26235
26236  ##############################################################################
26237  #
26238  # Specify jvm options for anything that is run with the Boot JDK.
26239  # Not all JVM:s accept the same arguments on the command line.
26240  #
26241
26242# Check whether --with-boot-jdk-jvmargs was given.
26243if test "${with_boot_jdk_jvmargs+set}" = set; then :
26244  withval=$with_boot_jdk_jvmargs;
26245fi
26246
26247
26248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
26249$as_echo_n "checking flags for boot jdk java command ... " >&6; }
26250
26251  # Disable special log output when a debug build is used as Boot JDK...
26252
26253  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
26254  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
26255  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
26256  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26257  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26258  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26259    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
26260    JVM_ARG_OK=true
26261  else
26262    $ECHO "Arg failed:" >&5
26263    $ECHO "$OUTPUT" >&5
26264    JVM_ARG_OK=false
26265  fi
26266
26267
26268  # Apply user provided options.
26269
26270  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
26271  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
26272  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
26273  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26274  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26275  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26276    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
26277    JVM_ARG_OK=true
26278  else
26279    $ECHO "Arg failed:" >&5
26280    $ECHO "$OUTPUT" >&5
26281    JVM_ARG_OK=false
26282  fi
26283
26284
26285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
26286$as_echo "$boot_jdk_jvmargs" >&6; }
26287
26288  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
26289  JAVA_FLAGS=$boot_jdk_jvmargs
26290
26291
26292
26293  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
26294$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
26295
26296  # Starting amount of heap memory.
26297
26298  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
26299  $ECHO "Command: $JAVA -Xms64M -version" >&5
26300  OUTPUT=`$JAVA -Xms64M -version 2>&1`
26301  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26302  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26303  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26304    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
26305    JVM_ARG_OK=true
26306  else
26307    $ECHO "Arg failed:" >&5
26308    $ECHO "$OUTPUT" >&5
26309    JVM_ARG_OK=false
26310  fi
26311
26312
26313  # Maximum amount of heap memory.
26314  # Maximum stack size.
26315  if test "x$BUILD_NUM_BITS" = x32; then
26316    JVM_MAX_HEAP=1100M
26317    STACK_SIZE=768
26318  else
26319    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
26320    # pointers are used. Apparently, we need to increase the heap and stack
26321    # space for the jvm. More specifically, when running javac to build huge
26322    # jdk batch
26323    JVM_MAX_HEAP=1600M
26324    STACK_SIZE=1536
26325  fi
26326
26327  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
26328  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
26329  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
26330  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26331  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26332  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26333    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
26334    JVM_ARG_OK=true
26335  else
26336    $ECHO "Arg failed:" >&5
26337    $ECHO "$OUTPUT" >&5
26338    JVM_ARG_OK=false
26339  fi
26340
26341
26342  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
26343  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
26344  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
26345  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26346  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26347  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26348    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
26349    JVM_ARG_OK=true
26350  else
26351    $ECHO "Arg failed:" >&5
26352    $ECHO "$OUTPUT" >&5
26353    JVM_ARG_OK=false
26354  fi
26355
26356
26357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
26358$as_echo "$boot_jdk_jvmargs_big" >&6; }
26359
26360  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
26361
26362
26363
26364  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
26365$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
26366
26367  # Use serial gc for small short lived tools if possible
26368
26369  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
26370  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
26371  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
26372  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26373  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26374  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26375    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
26376    JVM_ARG_OK=true
26377  else
26378    $ECHO "Arg failed:" >&5
26379    $ECHO "$OUTPUT" >&5
26380    JVM_ARG_OK=false
26381  fi
26382
26383
26384  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
26385  $ECHO "Command: $JAVA -Xms32M -version" >&5
26386  OUTPUT=`$JAVA -Xms32M -version 2>&1`
26387  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26388  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26389  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26390    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
26391    JVM_ARG_OK=true
26392  else
26393    $ECHO "Arg failed:" >&5
26394    $ECHO "$OUTPUT" >&5
26395    JVM_ARG_OK=false
26396  fi
26397
26398
26399  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
26400  $ECHO "Command: $JAVA -Xmx512M -version" >&5
26401  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
26402  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26403  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26404  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26405    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
26406    JVM_ARG_OK=true
26407  else
26408    $ECHO "Arg failed:" >&5
26409    $ECHO "$OUTPUT" >&5
26410    JVM_ARG_OK=false
26411  fi
26412
26413
26414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
26415$as_echo "$boot_jdk_jvmargs_small" >&6; }
26416
26417  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
26418
26419
26420  JAVA_TOOL_FLAGS_SMALL=""
26421  for f in $JAVA_FLAGS_SMALL; do
26422    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
26423  done
26424
26425
26426
26427###############################################################################
26428#
26429# Configure the sources to use. We can add or override individual directories.
26430#
26431###############################################################################
26432
26433
26434  # Where are the sources. Any of these can be overridden
26435  # using --with-override-corba and the likes.
26436  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26437  CORBA_TOPDIR="$SRC_ROOT/corba"
26438  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26439  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26440  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26441  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26442  JDK_TOPDIR="$SRC_ROOT/jdk"
26443
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453  ###############################################################################
26454  #
26455  # Pickup additional source for a component from outside of the source root
26456  # or override source for a component.
26457  #
26458
26459# Check whether --with-add-source-root was given.
26460if test "${with_add_source_root+set}" = set; then :
26461  withval=$with_add_source_root;
26462fi
26463
26464
26465
26466# Check whether --with-override-source-root was given.
26467if test "${with_override_source_root+set}" = set; then :
26468  withval=$with_override_source_root;
26469fi
26470
26471
26472
26473# Check whether --with-adds-and-overrides was given.
26474if test "${with_adds_and_overrides+set}" = set; then :
26475  withval=$with_adds_and_overrides;
26476fi
26477
26478
26479  if test "x$with_adds_and_overrides" != x; then
26480    with_add_source_root="$with_adds_and_overrides/adds"
26481    with_override_source_root="$with_adds_and_overrides/overrides"
26482  fi
26483
26484  if test "x$with_add_source_root" != x; then
26485    if ! test -d $with_add_source_root; then
26486      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26487    fi
26488    CURDIR="$PWD"
26489    cd "$with_add_source_root"
26490    ADD_SRC_ROOT="`pwd`"
26491    cd "$CURDIR"
26492    # Verify that the addon source root does not have any root makefiles.
26493    # If it does, then it is usually an error, prevent this.
26494    if test -f $with_add_source_root/langtools/make/Makefile; then
26495      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
26496    fi
26497    if test -f $with_add_source_root/corba/make/Makefile; then
26498      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
26499    fi
26500    if test -f $with_add_source_root/jaxp/make/Makefile; then
26501      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
26502    fi
26503    if test -f $with_add_source_root/jaxws/make/Makefile; then
26504      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
26505    fi
26506    if test -f $with_add_source_root/hotspot/make/Makefile; then
26507      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
26508    fi
26509    if test -f $with_add_source_root/nashorn/make/Makefile; then
26510      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
26511    fi
26512    if test -f $with_add_source_root/jdk/make/Makefile; then
26513      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
26514    fi
26515  fi
26516
26517
26518  if test "x$with_override_source_root" != x; then
26519    if ! test -d $with_override_source_root; then
26520      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26521    fi
26522    CURDIR="$PWD"
26523    cd "$with_override_source_root"
26524    OVERRIDE_SRC_ROOT="`pwd`"
26525    cd "$CURDIR"
26526    if test -f $with_override_source_root/langtools/make/Makefile; then
26527      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
26528    fi
26529    if test -f $with_override_source_root/corba/make/Makefile; then
26530      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
26531    fi
26532    if test -f $with_override_source_root/jaxp/make/Makefile; then
26533      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
26534    fi
26535    if test -f $with_override_source_root/jaxws/make/Makefile; then
26536      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
26537    fi
26538    if test -f $with_override_source_root/hotspot/make/Makefile; then
26539      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
26540    fi
26541    if test -f $with_override_source_root/nashorn/make/Makefile; then
26542      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
26543    fi
26544    if test -f $with_override_source_root/jdk/make/Makefile; then
26545      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
26546    fi
26547  fi
26548
26549
26550  ###############################################################################
26551  #
26552  # Override a repo completely, this is used for example when you have 3 small
26553  # development sandboxes of the langtools sources and want to avoid having 3 full
26554  # OpenJDK sources checked out on disk.
26555  #
26556  # Assuming that the 3 langtools sandboxes are located here:
26557  # /home/fredrik/sandbox1/langtools
26558  # /home/fredrik/sandbox2/langtools
26559  # /home/fredrik/sandbox3/langtools
26560  #
26561  # From the source root you create build subdirs manually:
26562  #     mkdir -p build1 build2 build3
26563  # in each build directory run:
26564  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26565  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26566  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26567  #
26568
26569
26570# Check whether --with-override-langtools was given.
26571if test "${with_override_langtools+set}" = set; then :
26572  withval=$with_override_langtools;
26573fi
26574
26575
26576
26577# Check whether --with-override-corba was given.
26578if test "${with_override_corba+set}" = set; then :
26579  withval=$with_override_corba;
26580fi
26581
26582
26583
26584# Check whether --with-override-jaxp was given.
26585if test "${with_override_jaxp+set}" = set; then :
26586  withval=$with_override_jaxp;
26587fi
26588
26589
26590
26591# Check whether --with-override-jaxws was given.
26592if test "${with_override_jaxws+set}" = set; then :
26593  withval=$with_override_jaxws;
26594fi
26595
26596
26597
26598# Check whether --with-override-hotspot was given.
26599if test "${with_override_hotspot+set}" = set; then :
26600  withval=$with_override_hotspot;
26601fi
26602
26603
26604
26605# Check whether --with-override-nashorn was given.
26606if test "${with_override_nashorn+set}" = set; then :
26607  withval=$with_override_nashorn;
26608fi
26609
26610
26611
26612# Check whether --with-override-jdk was given.
26613if test "${with_override_jdk+set}" = set; then :
26614  withval=$with_override_jdk;
26615fi
26616
26617
26618  if test "x$with_override_langtools" != x; then
26619    CURDIR="$PWD"
26620    cd "$with_override_langtools"
26621    LANGTOOLS_TOPDIR="`pwd`"
26622    cd "$CURDIR"
26623    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26624      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26625    fi
26626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26627$as_echo_n "checking if langtools should be overridden... " >&6; }
26628    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26629$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26630  fi
26631  if test "x$with_override_corba" != x; then
26632    CURDIR="$PWD"
26633    cd "$with_override_corba"
26634    CORBA_TOPDIR="`pwd`"
26635    cd "$CURDIR"
26636    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26637      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26638    fi
26639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26640$as_echo_n "checking if corba should be overridden... " >&6; }
26641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26642$as_echo "yes with $CORBA_TOPDIR" >&6; }
26643  fi
26644  if test "x$with_override_jaxp" != x; then
26645    CURDIR="$PWD"
26646    cd "$with_override_jaxp"
26647    JAXP_TOPDIR="`pwd`"
26648    cd "$CURDIR"
26649    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26650      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26651    fi
26652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26653$as_echo_n "checking if jaxp should be overridden... " >&6; }
26654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26655$as_echo "yes with $JAXP_TOPDIR" >&6; }
26656  fi
26657  if test "x$with_override_jaxws" != x; then
26658    CURDIR="$PWD"
26659    cd "$with_override_jaxws"
26660    JAXWS_TOPDIR="`pwd`"
26661    cd "$CURDIR"
26662    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26663      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26664    fi
26665    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26666$as_echo_n "checking if jaxws should be overridden... " >&6; }
26667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26668$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26669  fi
26670  if test "x$with_override_hotspot" != x; then
26671    CURDIR="$PWD"
26672    cd "$with_override_hotspot"
26673    HOTSPOT_TOPDIR="`pwd`"
26674    cd "$CURDIR"
26675    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26676      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26677    fi
26678    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26679$as_echo_n "checking if hotspot should be overridden... " >&6; }
26680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26681$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26682  fi
26683  if test "x$with_override_nashorn" != x; then
26684    CURDIR="$PWD"
26685    cd "$with_override_nashorn"
26686    NASHORN_TOPDIR="`pwd`"
26687    cd "$CURDIR"
26688    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26689      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26690    fi
26691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26692$as_echo_n "checking if nashorn should be overridden... " >&6; }
26693    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26694$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26695  fi
26696  if test "x$with_override_jdk" != x; then
26697    CURDIR="$PWD"
26698    cd "$with_override_jdk"
26699    JDK_TOPDIR="`pwd`"
26700    cd "$CURDIR"
26701    if ! test -f $JDK_TOPDIR/make/Makefile; then
26702      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26703    fi
26704    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26705$as_echo_n "checking if JDK should be overridden... " >&6; }
26706    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26707$as_echo "yes with $JDK_TOPDIR" >&6; }
26708  fi
26709
26710
26711  BUILD_OUTPUT="$OUTPUT_ROOT"
26712
26713
26714  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26715  BUILD_HOTSPOT=true
26716
26717
26718
26719# Check whether --with-import-hotspot was given.
26720if test "${with_import_hotspot+set}" = set; then :
26721  withval=$with_import_hotspot;
26722fi
26723
26724  if test "x$with_import_hotspot" != x; then
26725    CURDIR="$PWD"
26726    cd "$with_import_hotspot"
26727    HOTSPOT_DIST="`pwd`"
26728    cd "$CURDIR"
26729    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26730      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26731    fi
26732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26733$as_echo_n "checking if hotspot should be imported... " >&6; }
26734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26735$as_echo "yes from $HOTSPOT_DIST" >&6; }
26736    BUILD_HOTSPOT=false
26737  fi
26738
26739  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26740
26741
26742###############################################################################
26743#
26744# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26745# native code.
26746#
26747###############################################################################
26748
26749# First determine the toolchain type (compiler family)
26750
26751
26752# Check whether --with-toolchain-type was given.
26753if test "${with_toolchain_type+set}" = set; then :
26754  withval=$with_toolchain_type;
26755fi
26756
26757
26758  # Use indirect variable referencing
26759  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26760  VALID_TOOLCHAINS=${!toolchain_var_name}
26761
26762  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26763    if test -n "$XCODEBUILD"; then
26764      # On Mac OS X, default toolchain to clang after Xcode 5
26765      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26766      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26767      if test $? -ne 0; then
26768        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26769      fi
26770      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26771          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26772          $CUT -f 1 -d .`
26773      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26774$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26775      if test $XCODE_MAJOR_VERSION -ge 5; then
26776          DEFAULT_TOOLCHAIN="clang"
26777      else
26778          DEFAULT_TOOLCHAIN="gcc"
26779      fi
26780    else
26781      # If Xcode is not installed, but the command line tools are
26782      # then we can't run xcodebuild. On these systems we should
26783      # default to clang
26784      DEFAULT_TOOLCHAIN="clang"
26785    fi
26786  else
26787    # First toolchain type in the list is the default
26788    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26789  fi
26790
26791  if test "x$with_toolchain_type" = xlist; then
26792    # List all toolchains
26793    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26794$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26795    for toolchain in $VALID_TOOLCHAINS; do
26796      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26797      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26798      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26799    done
26800
26801    exit 0
26802  elif test "x$with_toolchain_type" != x; then
26803    # User override; check that it is valid
26804    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26805      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26806$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26807      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26808$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26809      as_fn_error $? "Cannot continue." "$LINENO" 5
26810    fi
26811    TOOLCHAIN_TYPE=$with_toolchain_type
26812  else
26813    # No flag given, use default
26814    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26815  fi
26816
26817
26818  TOOLCHAIN_CC_BINARY_clang="clang"
26819  TOOLCHAIN_CC_BINARY_gcc="gcc"
26820  TOOLCHAIN_CC_BINARY_microsoft="cl"
26821  TOOLCHAIN_CC_BINARY_solstudio="cc"
26822  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26823
26824  TOOLCHAIN_CXX_BINARY_clang="clang++"
26825  TOOLCHAIN_CXX_BINARY_gcc="g++"
26826  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26827  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26828  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26829
26830  # Use indirect variable referencing
26831  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26832  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26833  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26834  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26835  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26836  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26837
26838
26839  # Define filename patterns
26840  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26841    LIBRARY_PREFIX=
26842    SHARED_LIBRARY_SUFFIX='.dll'
26843    STATIC_LIBRARY_SUFFIX='.lib'
26844    SHARED_LIBRARY='$1.dll'
26845    STATIC_LIBRARY='$1.lib'
26846    OBJ_SUFFIX='.obj'
26847    EXE_SUFFIX='.exe'
26848  else
26849    LIBRARY_PREFIX=lib
26850    SHARED_LIBRARY_SUFFIX='.so'
26851    STATIC_LIBRARY_SUFFIX='.a'
26852    SHARED_LIBRARY='lib$1.so'
26853    STATIC_LIBRARY='lib$1.a'
26854    OBJ_SUFFIX='.o'
26855    EXE_SUFFIX=''
26856    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26857      SHARED_LIBRARY='lib$1.dylib'
26858      SHARED_LIBRARY_SUFFIX='.dylib'
26859    fi
26860  fi
26861
26862
26863
26864
26865
26866
26867
26868
26869
26870
26871  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26872    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26873$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26874  else
26875    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26876$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26877  fi
26878
26879
26880# Then detect the actual binaries needed
26881
26882  # FIXME: Is this needed?
26883  ac_ext=cpp
26884ac_cpp='$CXXCPP $CPPFLAGS'
26885ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26886ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26887ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26888
26889
26890  # Store the CFLAGS etc passed to the configure script.
26891  ORG_CFLAGS="$CFLAGS"
26892  ORG_CXXFLAGS="$CXXFLAGS"
26893  ORG_OBJCFLAGS="$OBJCFLAGS"
26894
26895  # On Windows, we need to detect the visual studio installation first.
26896  # This will change the PATH, but we need to keep that new PATH even
26897  # after toolchain detection is done, since the compiler (on x86) uses
26898  # it for DLL resolution in runtime.
26899  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26900
26901  # Store path to cygwin link.exe to help excluding it when searching for
26902  # VS linker. This must be done before changing the PATH when looking for VS.
26903  # Extract the first word of "link", so it can be a program name with args.
26904set dummy link; ac_word=$2
26905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26906$as_echo_n "checking for $ac_word... " >&6; }
26907if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26908  $as_echo_n "(cached) " >&6
26909else
26910  case $CYGWIN_LINK in
26911  [\\/]* | ?:[\\/]*)
26912  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26913  ;;
26914  *)
26915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26916for as_dir in $PATH
26917do
26918  IFS=$as_save_IFS
26919  test -z "$as_dir" && as_dir=.
26920    for ac_exec_ext in '' $ac_executable_extensions; do
26921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26922    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26924    break 2
26925  fi
26926done
26927  done
26928IFS=$as_save_IFS
26929
26930  ;;
26931esac
26932fi
26933CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26934if test -n "$CYGWIN_LINK"; then
26935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26936$as_echo "$CYGWIN_LINK" >&6; }
26937else
26938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26939$as_echo "no" >&6; }
26940fi
26941
26942
26943  if test "x$CYGWIN_LINK" != x; then
26944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26945$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26946    "$CYGWIN_LINK" --version > /dev/null
26947    if test $? -eq 0 ; then
26948      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26949$as_echo "yes" >&6; }
26950    else
26951      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26952$as_echo "no" >&6; }
26953      # This might be the VS linker. Don't exclude it later on.
26954      CYGWIN_LINK=""
26955    fi
26956  fi
26957
26958  # First-hand choice is to locate and run the vsvars bat file.
26959
26960  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26961    VCVARSFILE="vc/bin/vcvars32.bat"
26962  else
26963    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26964  fi
26965
26966  VS_ENV_CMD=""
26967  VS_ENV_ARGS=""
26968  if test "x$with_toolsdir" != x; then
26969
26970  if test "x$VS_ENV_CMD" = x; then
26971    VS100BASE="$with_toolsdir/../.."
26972    METHOD="--with-tools-dir"
26973
26974  windows_path="$VS100BASE"
26975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26976    unix_path=`$CYGPATH -u "$windows_path"`
26977    VS100BASE="$unix_path"
26978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26980    VS100BASE="$unix_path"
26981  fi
26982
26983    if test -d "$VS100BASE"; then
26984      if test -f "$VS100BASE/$VCVARSFILE"; then
26985        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26986$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26987        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26988      else
26989        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26990$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26991        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26992$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26993      fi
26994    fi
26995  fi
26996
26997  fi
26998
26999  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
27000    # Having specified an argument which is incorrect will produce an instant failure;
27001    # we should not go on looking
27002    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
27003$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
27004    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
27005$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
27006    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27007  fi
27008
27009  if test "x$VS100COMNTOOLS" != x; then
27010
27011  if test "x$VS_ENV_CMD" = x; then
27012    VS100BASE="$VS100COMNTOOLS/../.."
27013    METHOD="VS100COMNTOOLS variable"
27014
27015  windows_path="$VS100BASE"
27016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27017    unix_path=`$CYGPATH -u "$windows_path"`
27018    VS100BASE="$unix_path"
27019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27021    VS100BASE="$unix_path"
27022  fi
27023
27024    if test -d "$VS100BASE"; then
27025      if test -f "$VS100BASE/$VCVARSFILE"; then
27026        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27027$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27028        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27029      else
27030        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27031$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27032        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27033$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27034      fi
27035    fi
27036  fi
27037
27038  fi
27039  if test "x$PROGRAMFILES" != x; then
27040
27041  if test "x$VS_ENV_CMD" = x; then
27042    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
27043    METHOD="well-known name"
27044
27045  windows_path="$VS100BASE"
27046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27047    unix_path=`$CYGPATH -u "$windows_path"`
27048    VS100BASE="$unix_path"
27049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27051    VS100BASE="$unix_path"
27052  fi
27053
27054    if test -d "$VS100BASE"; then
27055      if test -f "$VS100BASE/$VCVARSFILE"; then
27056        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27057$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27058        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27059      else
27060        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27061$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27062        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27063$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27064      fi
27065    fi
27066  fi
27067
27068  fi
27069
27070  if test "x$VS_ENV_CMD" = x; then
27071    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
27072    METHOD="well-known name"
27073
27074  windows_path="$VS100BASE"
27075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27076    unix_path=`$CYGPATH -u "$windows_path"`
27077    VS100BASE="$unix_path"
27078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27080    VS100BASE="$unix_path"
27081  fi
27082
27083    if test -d "$VS100BASE"; then
27084      if test -f "$VS100BASE/$VCVARSFILE"; then
27085        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27086$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27087        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27088      else
27089        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27090$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27091        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27092$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27093      fi
27094    fi
27095  fi
27096
27097
27098  if test "x$VS_ENV_CMD" = x; then
27099    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
27100    METHOD="well-known name"
27101
27102  windows_path="$VS100BASE"
27103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27104    unix_path=`$CYGPATH -u "$windows_path"`
27105    VS100BASE="$unix_path"
27106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27108    VS100BASE="$unix_path"
27109  fi
27110
27111    if test -d "$VS100BASE"; then
27112      if test -f "$VS100BASE/$VCVARSFILE"; then
27113        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27114$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27115        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27116      else
27117        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27118$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27119        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27120$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27121      fi
27122    fi
27123  fi
27124
27125
27126  if test "x$ProgramW6432" != x; then
27127
27128  if test "x$VS_ENV_CMD" = x; then
27129    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
27130    METHOD="well-known name"
27131
27132  windows_path="$WIN_SDK_BASE"
27133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27134    unix_path=`$CYGPATH -u "$windows_path"`
27135    WIN_SDK_BASE="$unix_path"
27136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27138    WIN_SDK_BASE="$unix_path"
27139  fi
27140
27141    if test -d "$WIN_SDK_BASE"; then
27142      # There have been cases of partial or broken SDK installations. A missing
27143      # lib dir is not going to work.
27144      if test ! -d "$WIN_SDK_BASE/../lib"; then
27145        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27146$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27147        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27148$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27149      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27150        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27151$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27152        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27153        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27154          VS_ENV_ARGS="/x86"
27155        else
27156          VS_ENV_ARGS="/x64"
27157        fi
27158      else
27159        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27160$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27161        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27162$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27163      fi
27164    fi
27165  fi
27166
27167  fi
27168  if test "x$PROGRAMW6432" != x; then
27169
27170  if test "x$VS_ENV_CMD" = x; then
27171    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
27172    METHOD="well-known name"
27173
27174  windows_path="$WIN_SDK_BASE"
27175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27176    unix_path=`$CYGPATH -u "$windows_path"`
27177    WIN_SDK_BASE="$unix_path"
27178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27180    WIN_SDK_BASE="$unix_path"
27181  fi
27182
27183    if test -d "$WIN_SDK_BASE"; then
27184      # There have been cases of partial or broken SDK installations. A missing
27185      # lib dir is not going to work.
27186      if test ! -d "$WIN_SDK_BASE/../lib"; then
27187        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27188$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27189        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27190$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27191      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27192        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27193$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27194        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27195        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27196          VS_ENV_ARGS="/x86"
27197        else
27198          VS_ENV_ARGS="/x64"
27199        fi
27200      else
27201        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27202$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27203        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27204$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27205      fi
27206    fi
27207  fi
27208
27209  fi
27210  if test "x$PROGRAMFILES" != x; then
27211
27212  if test "x$VS_ENV_CMD" = x; then
27213    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
27214    METHOD="well-known name"
27215
27216  windows_path="$WIN_SDK_BASE"
27217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27218    unix_path=`$CYGPATH -u "$windows_path"`
27219    WIN_SDK_BASE="$unix_path"
27220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27222    WIN_SDK_BASE="$unix_path"
27223  fi
27224
27225    if test -d "$WIN_SDK_BASE"; then
27226      # There have been cases of partial or broken SDK installations. A missing
27227      # lib dir is not going to work.
27228      if test ! -d "$WIN_SDK_BASE/../lib"; then
27229        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27230$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27231        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27232$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27233      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27234        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27235$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27236        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27237        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27238          VS_ENV_ARGS="/x86"
27239        else
27240          VS_ENV_ARGS="/x64"
27241        fi
27242      else
27243        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27244$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27245        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27246$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27247      fi
27248    fi
27249  fi
27250
27251  fi
27252
27253  if test "x$VS_ENV_CMD" = x; then
27254    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27255    METHOD="well-known name"
27256
27257  windows_path="$WIN_SDK_BASE"
27258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27259    unix_path=`$CYGPATH -u "$windows_path"`
27260    WIN_SDK_BASE="$unix_path"
27261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27263    WIN_SDK_BASE="$unix_path"
27264  fi
27265
27266    if test -d "$WIN_SDK_BASE"; then
27267      # There have been cases of partial or broken SDK installations. A missing
27268      # lib dir is not going to work.
27269      if test ! -d "$WIN_SDK_BASE/../lib"; then
27270        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27271$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27272        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27273$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27274      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27275        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27276$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27277        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27278        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27279          VS_ENV_ARGS="/x86"
27280        else
27281          VS_ENV_ARGS="/x64"
27282        fi
27283      else
27284        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27285$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27286        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27287$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27288      fi
27289    fi
27290  fi
27291
27292
27293  if test "x$VS_ENV_CMD" = x; then
27294    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27295    METHOD="well-known name"
27296
27297  windows_path="$WIN_SDK_BASE"
27298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27299    unix_path=`$CYGPATH -u "$windows_path"`
27300    WIN_SDK_BASE="$unix_path"
27301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27303    WIN_SDK_BASE="$unix_path"
27304  fi
27305
27306    if test -d "$WIN_SDK_BASE"; then
27307      # There have been cases of partial or broken SDK installations. A missing
27308      # lib dir is not going to work.
27309      if test ! -d "$WIN_SDK_BASE/../lib"; then
27310        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27311$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27312        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27313$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27314      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27315        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27316$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27317        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27318        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27319          VS_ENV_ARGS="/x86"
27320        else
27321          VS_ENV_ARGS="/x64"
27322        fi
27323      else
27324        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27325$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27326        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27327$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27328      fi
27329    fi
27330  fi
27331
27332
27333  if test "x$VS_ENV_CMD" != x; then
27334    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27335
27336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27337
27338  # First separate the path from the arguments. This will split at the first
27339  # space.
27340  complete="$VS_ENV_CMD"
27341  path="${complete%% *}"
27342  tmp="$complete EOL"
27343  arguments="${tmp#* }"
27344
27345  # Input might be given as Windows format, start by converting to
27346  # unix format.
27347  new_path=`$CYGPATH -u "$path"`
27348
27349  # Now try to locate executable using which
27350  new_path=`$WHICH "$new_path" 2> /dev/null`
27351  # bat and cmd files are not always considered executable in cygwin causing which
27352  # to not find them
27353  if test "x$new_path" = x \
27354      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27355      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27356    new_path=`$CYGPATH -u "$path"`
27357  fi
27358  if test "x$new_path" = x; then
27359    # Oops. Which didn't find the executable.
27360    # The splitting of arguments from the executable at a space might have been incorrect,
27361    # since paths with space are more likely in Windows. Give it another try with the whole
27362    # argument.
27363    path="$complete"
27364    arguments="EOL"
27365    new_path=`$CYGPATH -u "$path"`
27366    new_path=`$WHICH "$new_path" 2> /dev/null`
27367    # bat and cmd files are not always considered executable in cygwin causing which
27368    # to not find them
27369    if test "x$new_path" = x \
27370        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27371        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27372      new_path=`$CYGPATH -u "$path"`
27373    fi
27374    if test "x$new_path" = x; then
27375      # It's still not found. Now this is an unrecoverable error.
27376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27377$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27378      has_space=`$ECHO "$complete" | $GREP " "`
27379      if test "x$has_space" != x; then
27380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27382      fi
27383      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27384    fi
27385  fi
27386
27387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27390  # "foo.exe" is OK but "foo" is an error.
27391  #
27392  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27393  # It is also a way to make sure we got the proper file name for the real test later on.
27394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27395  if test "x$test_shortpath" = x; then
27396    # Short path failed, file does not exist as specified.
27397    # Try adding .exe or .cmd
27398    if test -f "${new_path}.exe"; then
27399      input_to_shortpath="${new_path}.exe"
27400    elif test -f "${new_path}.cmd"; then
27401      input_to_shortpath="${new_path}.cmd"
27402    else
27403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27404$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27405      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27406$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27407      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27408    fi
27409  else
27410    input_to_shortpath="$new_path"
27411  fi
27412
27413  # Call helper function which possibly converts this using DOS-style short mode.
27414  # If so, the updated path is stored in $new_path.
27415  new_path="$input_to_shortpath"
27416
27417  input_path="$input_to_shortpath"
27418  # Check if we need to convert this using DOS-style short mode. If the path
27419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27420  # take no chances and rewrite it.
27421  # Note: m4 eats our [], so we need to use [ and ] instead.
27422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27423  if test "x$has_forbidden_chars" != x; then
27424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27428      # Going to short mode and back again did indeed matter. Since short mode is
27429      # case insensitive, let's make it lowercase to improve readability.
27430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27431      # Now convert it back to Unix-stile (cygpath)
27432      input_path=`$CYGPATH -u "$shortmode_path"`
27433      new_path="$input_path"
27434    fi
27435  fi
27436
27437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27438  if test "x$test_cygdrive_prefix" = x; then
27439    # As a simple fix, exclude /usr/bin since it's not a real path.
27440    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27442      # a path prefixed by /cygdrive for fixpath to work.
27443      new_path="$CYGWIN_ROOT_PATH$input_path"
27444    fi
27445  fi
27446
27447  # remove trailing .exe if any
27448  new_path="${new_path/%.exe/}"
27449
27450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27451
27452  # First separate the path from the arguments. This will split at the first
27453  # space.
27454  complete="$VS_ENV_CMD"
27455  path="${complete%% *}"
27456  tmp="$complete EOL"
27457  arguments="${tmp#* }"
27458
27459  # Input might be given as Windows format, start by converting to
27460  # unix format.
27461  new_path="$path"
27462
27463  windows_path="$new_path"
27464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27465    unix_path=`$CYGPATH -u "$windows_path"`
27466    new_path="$unix_path"
27467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27469    new_path="$unix_path"
27470  fi
27471
27472
27473  # Now try to locate executable using which
27474  new_path=`$WHICH "$new_path" 2> /dev/null`
27475
27476  if test "x$new_path" = x; then
27477    # Oops. Which didn't find the executable.
27478    # The splitting of arguments from the executable at a space might have been incorrect,
27479    # since paths with space are more likely in Windows. Give it another try with the whole
27480    # argument.
27481    path="$complete"
27482    arguments="EOL"
27483    new_path="$path"
27484
27485  windows_path="$new_path"
27486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27487    unix_path=`$CYGPATH -u "$windows_path"`
27488    new_path="$unix_path"
27489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27491    new_path="$unix_path"
27492  fi
27493
27494
27495    new_path=`$WHICH "$new_path" 2> /dev/null`
27496
27497    if test "x$new_path" = x; then
27498      # It's still not found. Now this is an unrecoverable error.
27499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27500$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27501      has_space=`$ECHO "$complete" | $GREP " "`
27502      if test "x$has_space" != x; then
27503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27505      fi
27506      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27507    fi
27508  fi
27509
27510  # Now new_path has a complete unix path to the binary
27511  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27512    # Keep paths in /bin as-is, but remove trailing .exe if any
27513    new_path="${new_path/%.exe/}"
27514    # Do not save /bin paths to all_fixpath_prefixes!
27515  else
27516    # Not in mixed or Windows style, start by that.
27517    new_path=`cmd //c echo $new_path`
27518
27519  input_path="$new_path"
27520  # Check if we need to convert this using DOS-style short mode. If the path
27521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27522  # take no chances and rewrite it.
27523  # Note: m4 eats our [], so we need to use [ and ] instead.
27524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27525  if test "x$has_forbidden_chars" != x; then
27526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27528  fi
27529
27530    # Output is in $new_path
27531
27532  windows_path="$new_path"
27533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27534    unix_path=`$CYGPATH -u "$windows_path"`
27535    new_path="$unix_path"
27536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27538    new_path="$unix_path"
27539  fi
27540
27541    # remove trailing .exe if any
27542    new_path="${new_path/%.exe/}"
27543
27544    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27545    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27546  fi
27547
27548  else
27549    # We're on a posix platform. Hooray! :)
27550    # First separate the path from the arguments. This will split at the first
27551    # space.
27552    complete="$VS_ENV_CMD"
27553    path="${complete%% *}"
27554    tmp="$complete EOL"
27555    arguments="${tmp#* }"
27556
27557    # Cannot rely on the command "which" here since it doesn't always work.
27558    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27559    if test -z "$is_absolute_path"; then
27560      # Path to executable is not absolute. Find it.
27561      IFS_save="$IFS"
27562      IFS=:
27563      for p in $PATH; do
27564        if test -f "$p/$path" && test -x "$p/$path"; then
27565          new_path="$p/$path"
27566          break
27567        fi
27568      done
27569      IFS="$IFS_save"
27570    else
27571      # This is an absolute path, we can use it without further modifications.
27572      new_path="$path"
27573    fi
27574
27575    if test "x$new_path" = x; then
27576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27577$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27578      has_space=`$ECHO "$complete" | $GREP " "`
27579      if test "x$has_space" != x; then
27580        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27581$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27582      fi
27583      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27584    fi
27585  fi
27586
27587  # Now join together the path and the arguments once again
27588  if test "x$arguments" != xEOL; then
27589    new_complete="$new_path ${arguments% *}"
27590  else
27591    new_complete="$new_path"
27592  fi
27593
27594  if test "x$complete" != "x$new_complete"; then
27595    VS_ENV_CMD="$new_complete"
27596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27597$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27598  fi
27599
27600
27601    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27602    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27603$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27604
27605    # We need to create a couple of temporary files.
27606    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27607    $MKDIR -p $VS_ENV_TMP_DIR
27608
27609    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27610    # Instead create a shell script which will set the relevant variables when run.
27611    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27612
27613  unix_path="$WINPATH_VS_ENV_CMD"
27614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27615    windows_path=`$CYGPATH -m "$unix_path"`
27616    WINPATH_VS_ENV_CMD="$windows_path"
27617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27618    windows_path=`cmd //c echo $unix_path`
27619    WINPATH_VS_ENV_CMD="$windows_path"
27620  fi
27621
27622    WINPATH_BASH="$BASH"
27623
27624  unix_path="$WINPATH_BASH"
27625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27626    windows_path=`$CYGPATH -m "$unix_path"`
27627    WINPATH_BASH="$windows_path"
27628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27629    windows_path=`cmd //c echo $unix_path`
27630    WINPATH_BASH="$windows_path"
27631  fi
27632
27633
27634    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27635    # script (executable by bash) that will setup the important variables.
27636    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27637    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27638    # This will end up something like:
27639    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27640    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27641    # These will end up something like:
27642    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27643    # The trailing space for everyone except PATH is no typo, but is needed due
27644    # to trailing \ in the Windows paths. These will be stripped later.
27645    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27646    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27647    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27648    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27649    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27650    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27651
27652    # Now execute the newly created bat file.
27653    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27654    # Change directory so we don't need to mess with Windows paths in redirects.
27655    cd $VS_ENV_TMP_DIR
27656    cmd /c extract-vs-env.bat | $CAT
27657    cd $CURDIR
27658
27659    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27660      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27661$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27662      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27663$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27664      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27665$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27666      as_fn_error $? "Cannot continue" "$LINENO" 5
27667    fi
27668
27669    # Now set all paths and other env variables. This will allow the rest of
27670    # the configure script to find and run the compiler in the proper way.
27671    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27672$as_echo "$as_me: Setting extracted environment variables" >&6;}
27673    . $VS_ENV_TMP_DIR/set-vs-env.sh
27674    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27675    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27676  else
27677    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27678    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27679$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27680  fi
27681
27682  # At this point, we should have correct variables in the environment, or we can't continue.
27683  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27684$as_echo_n "checking for Visual Studio variables... " >&6; }
27685
27686  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27687    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27689$as_echo "present but broken" >&6; }
27690      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27691    else
27692      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27693$as_echo "ok" >&6; }
27694      # Remove any trailing "\" and " " from the variables.
27695      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27696      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27697      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27698      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27699      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27700      # Remove any paths containing # (typically F#) as that messes up make. This
27701      # is needed if visual studio was installed with F# support.
27702      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27703
27704
27705
27706
27707    fi
27708  else
27709    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27710$as_echo "not found" >&6; }
27711
27712    if test "x$VS_ENV_CMD" = x; then
27713      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27714$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27715      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27716$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27717    else
27718      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27719$as_echo "$as_me: Running the extraction script failed." >&6;}
27720    fi
27721    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27722$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27723    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27724$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27725    as_fn_error $? "Cannot continue" "$LINENO" 5
27726  fi
27727
27728    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27729    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27730    PATH="$VS_PATH"
27731    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27732    export INCLUDE="$VS_INCLUDE"
27733    export LIB="$VS_LIB"
27734  fi
27735
27736  # autoconf magic only relies on PATH, so update it if tools dir is specified
27737  OLD_PATH="$PATH"
27738
27739  # For solaris we really need solaris tools, and not the GNU equivalent.
27740  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27741  # so add that to path before starting to probe.
27742  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27743  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27744    PATH="/usr/ccs/bin:$PATH"
27745  fi
27746
27747  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27748  # override all other locations.
27749  if test "x$TOOLCHAIN_PATH" != x; then
27750    PATH=$TOOLCHAIN_PATH:$PATH
27751  fi
27752
27753
27754  #
27755  # Setup the compilers (CC and CXX)
27756  #
27757
27758  COMPILER_NAME=C
27759  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27760
27761  if test "x$CC" != x; then
27762    # User has supplied compiler name already, always let that override.
27763    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27764$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27765    if test "x`basename $CC`" = "x$CC"; then
27766      # A command without a complete path is provided, search $PATH.
27767
27768      for ac_prog in $CC
27769do
27770  # Extract the first word of "$ac_prog", so it can be a program name with args.
27771set dummy $ac_prog; ac_word=$2
27772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27773$as_echo_n "checking for $ac_word... " >&6; }
27774if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27775  $as_echo_n "(cached) " >&6
27776else
27777  case $POTENTIAL_CC in
27778  [\\/]* | ?:[\\/]*)
27779  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27780  ;;
27781  *)
27782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27783for as_dir in $PATH
27784do
27785  IFS=$as_save_IFS
27786  test -z "$as_dir" && as_dir=.
27787    for ac_exec_ext in '' $ac_executable_extensions; do
27788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27789    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27791    break 2
27792  fi
27793done
27794  done
27795IFS=$as_save_IFS
27796
27797  ;;
27798esac
27799fi
27800POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27801if test -n "$POTENTIAL_CC"; then
27802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27803$as_echo "$POTENTIAL_CC" >&6; }
27804else
27805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27806$as_echo "no" >&6; }
27807fi
27808
27809
27810  test -n "$POTENTIAL_CC" && break
27811done
27812
27813      if test "x$POTENTIAL_CC" != x; then
27814        CC=$POTENTIAL_CC
27815      else
27816        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27817      fi
27818    else
27819      # Otherwise it might already be a complete path
27820      if test ! -x "$CC"; then
27821        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27822      fi
27823    fi
27824  else
27825    # No user supplied value. Locate compiler ourselves.
27826
27827    # If we are cross compiling, assume cross compilation tools follows the
27828    # cross compilation standard where they are prefixed with the autoconf
27829    # standard name for the target. For example the binary
27830    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27831    # If we are not cross compiling, then the default compiler name will be
27832    # used.
27833
27834    CC=
27835    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27836    # before checking the rest of the PATH.
27837    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27838    # step, this should not be necessary.
27839    if test -n "$TOOLCHAIN_PATH"; then
27840      PATH_save="$PATH"
27841      PATH="$TOOLCHAIN_PATH"
27842      for ac_prog in $SEARCH_LIST
27843do
27844  # Extract the first word of "$ac_prog", so it can be a program name with args.
27845set dummy $ac_prog; ac_word=$2
27846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27847$as_echo_n "checking for $ac_word... " >&6; }
27848if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27849  $as_echo_n "(cached) " >&6
27850else
27851  case $TOOLCHAIN_PATH_CC in
27852  [\\/]* | ?:[\\/]*)
27853  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27854  ;;
27855  *)
27856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27857for as_dir in $PATH
27858do
27859  IFS=$as_save_IFS
27860  test -z "$as_dir" && as_dir=.
27861    for ac_exec_ext in '' $ac_executable_extensions; do
27862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27863    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27865    break 2
27866  fi
27867done
27868  done
27869IFS=$as_save_IFS
27870
27871  ;;
27872esac
27873fi
27874TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27875if test -n "$TOOLCHAIN_PATH_CC"; then
27876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27877$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27878else
27879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27880$as_echo "no" >&6; }
27881fi
27882
27883
27884  test -n "$TOOLCHAIN_PATH_CC" && break
27885done
27886
27887      CC=$TOOLCHAIN_PATH_CC
27888      PATH="$PATH_save"
27889    fi
27890
27891    # AC_PATH_PROGS can't be run multiple times with the same variable,
27892    # so create a new name for this run.
27893    if test "x$CC" = x; then
27894      for ac_prog in $SEARCH_LIST
27895do
27896  # Extract the first word of "$ac_prog", so it can be a program name with args.
27897set dummy $ac_prog; ac_word=$2
27898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27899$as_echo_n "checking for $ac_word... " >&6; }
27900if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27901  $as_echo_n "(cached) " >&6
27902else
27903  case $POTENTIAL_CC in
27904  [\\/]* | ?:[\\/]*)
27905  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27906  ;;
27907  *)
27908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27909for as_dir in $PATH
27910do
27911  IFS=$as_save_IFS
27912  test -z "$as_dir" && as_dir=.
27913    for ac_exec_ext in '' $ac_executable_extensions; do
27914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27915    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27917    break 2
27918  fi
27919done
27920  done
27921IFS=$as_save_IFS
27922
27923  ;;
27924esac
27925fi
27926POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27927if test -n "$POTENTIAL_CC"; then
27928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27929$as_echo "$POTENTIAL_CC" >&6; }
27930else
27931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27932$as_echo "no" >&6; }
27933fi
27934
27935
27936  test -n "$POTENTIAL_CC" && break
27937done
27938
27939      CC=$POTENTIAL_CC
27940    fi
27941
27942    if test "x$CC" = x; then
27943
27944  # Print a helpful message on how to acquire the necessary build dependency.
27945  # devkit is the help tag: freetype, cups, pulse, alsa etc
27946  MISSING_DEPENDENCY=devkit
27947
27948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27949    cygwin_help $MISSING_DEPENDENCY
27950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27951    msys_help $MISSING_DEPENDENCY
27952  else
27953    PKGHANDLER_COMMAND=
27954
27955    case $PKGHANDLER in
27956      apt-get)
27957        apt_help     $MISSING_DEPENDENCY ;;
27958      yum)
27959        yum_help     $MISSING_DEPENDENCY ;;
27960      port)
27961        port_help    $MISSING_DEPENDENCY ;;
27962      pkgutil)
27963        pkgutil_help $MISSING_DEPENDENCY ;;
27964      pkgadd)
27965        pkgadd_help  $MISSING_DEPENDENCY ;;
27966    esac
27967
27968    if test "x$PKGHANDLER_COMMAND" != x; then
27969      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27970    fi
27971  fi
27972
27973      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27974    fi
27975  fi
27976
27977  # Now we have a compiler binary in CC. Make sure it's okay.
27978
27979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27980
27981  # First separate the path from the arguments. This will split at the first
27982  # space.
27983  complete="$CC"
27984  path="${complete%% *}"
27985  tmp="$complete EOL"
27986  arguments="${tmp#* }"
27987
27988  # Input might be given as Windows format, start by converting to
27989  # unix format.
27990  new_path=`$CYGPATH -u "$path"`
27991
27992  # Now try to locate executable using which
27993  new_path=`$WHICH "$new_path" 2> /dev/null`
27994  # bat and cmd files are not always considered executable in cygwin causing which
27995  # to not find them
27996  if test "x$new_path" = x \
27997      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27998      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27999    new_path=`$CYGPATH -u "$path"`
28000  fi
28001  if test "x$new_path" = x; then
28002    # Oops. Which didn't find the executable.
28003    # The splitting of arguments from the executable at a space might have been incorrect,
28004    # since paths with space are more likely in Windows. Give it another try with the whole
28005    # argument.
28006    path="$complete"
28007    arguments="EOL"
28008    new_path=`$CYGPATH -u "$path"`
28009    new_path=`$WHICH "$new_path" 2> /dev/null`
28010    # bat and cmd files are not always considered executable in cygwin causing which
28011    # to not find them
28012    if test "x$new_path" = x \
28013        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28014        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28015      new_path=`$CYGPATH -u "$path"`
28016    fi
28017    if test "x$new_path" = x; then
28018      # It's still not found. Now this is an unrecoverable error.
28019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28020$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28021      has_space=`$ECHO "$complete" | $GREP " "`
28022      if test "x$has_space" != x; then
28023        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28024$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28025      fi
28026      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28027    fi
28028  fi
28029
28030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28033  # "foo.exe" is OK but "foo" is an error.
28034  #
28035  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28036  # It is also a way to make sure we got the proper file name for the real test later on.
28037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28038  if test "x$test_shortpath" = x; then
28039    # Short path failed, file does not exist as specified.
28040    # Try adding .exe or .cmd
28041    if test -f "${new_path}.exe"; then
28042      input_to_shortpath="${new_path}.exe"
28043    elif test -f "${new_path}.cmd"; then
28044      input_to_shortpath="${new_path}.cmd"
28045    else
28046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28047$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28048      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28049$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28050      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28051    fi
28052  else
28053    input_to_shortpath="$new_path"
28054  fi
28055
28056  # Call helper function which possibly converts this using DOS-style short mode.
28057  # If so, the updated path is stored in $new_path.
28058  new_path="$input_to_shortpath"
28059
28060  input_path="$input_to_shortpath"
28061  # Check if we need to convert this using DOS-style short mode. If the path
28062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28063  # take no chances and rewrite it.
28064  # Note: m4 eats our [], so we need to use [ and ] instead.
28065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28066  if test "x$has_forbidden_chars" != x; then
28067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28071      # Going to short mode and back again did indeed matter. Since short mode is
28072      # case insensitive, let's make it lowercase to improve readability.
28073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28074      # Now convert it back to Unix-stile (cygpath)
28075      input_path=`$CYGPATH -u "$shortmode_path"`
28076      new_path="$input_path"
28077    fi
28078  fi
28079
28080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28081  if test "x$test_cygdrive_prefix" = x; then
28082    # As a simple fix, exclude /usr/bin since it's not a real path.
28083    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28085      # a path prefixed by /cygdrive for fixpath to work.
28086      new_path="$CYGWIN_ROOT_PATH$input_path"
28087    fi
28088  fi
28089
28090  # remove trailing .exe if any
28091  new_path="${new_path/%.exe/}"
28092
28093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28094
28095  # First separate the path from the arguments. This will split at the first
28096  # space.
28097  complete="$CC"
28098  path="${complete%% *}"
28099  tmp="$complete EOL"
28100  arguments="${tmp#* }"
28101
28102  # Input might be given as Windows format, start by converting to
28103  # unix format.
28104  new_path="$path"
28105
28106  windows_path="$new_path"
28107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28108    unix_path=`$CYGPATH -u "$windows_path"`
28109    new_path="$unix_path"
28110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28112    new_path="$unix_path"
28113  fi
28114
28115
28116  # Now try to locate executable using which
28117  new_path=`$WHICH "$new_path" 2> /dev/null`
28118
28119  if test "x$new_path" = x; then
28120    # Oops. Which didn't find the executable.
28121    # The splitting of arguments from the executable at a space might have been incorrect,
28122    # since paths with space are more likely in Windows. Give it another try with the whole
28123    # argument.
28124    path="$complete"
28125    arguments="EOL"
28126    new_path="$path"
28127
28128  windows_path="$new_path"
28129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28130    unix_path=`$CYGPATH -u "$windows_path"`
28131    new_path="$unix_path"
28132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28134    new_path="$unix_path"
28135  fi
28136
28137
28138    new_path=`$WHICH "$new_path" 2> /dev/null`
28139
28140    if test "x$new_path" = x; then
28141      # It's still not found. Now this is an unrecoverable error.
28142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28143$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28144      has_space=`$ECHO "$complete" | $GREP " "`
28145      if test "x$has_space" != x; then
28146        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28147$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28148      fi
28149      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28150    fi
28151  fi
28152
28153  # Now new_path has a complete unix path to the binary
28154  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28155    # Keep paths in /bin as-is, but remove trailing .exe if any
28156    new_path="${new_path/%.exe/}"
28157    # Do not save /bin paths to all_fixpath_prefixes!
28158  else
28159    # Not in mixed or Windows style, start by that.
28160    new_path=`cmd //c echo $new_path`
28161
28162  input_path="$new_path"
28163  # Check if we need to convert this using DOS-style short mode. If the path
28164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28165  # take no chances and rewrite it.
28166  # Note: m4 eats our [], so we need to use [ and ] instead.
28167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28168  if test "x$has_forbidden_chars" != x; then
28169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28171  fi
28172
28173    # Output is in $new_path
28174
28175  windows_path="$new_path"
28176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28177    unix_path=`$CYGPATH -u "$windows_path"`
28178    new_path="$unix_path"
28179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28181    new_path="$unix_path"
28182  fi
28183
28184    # remove trailing .exe if any
28185    new_path="${new_path/%.exe/}"
28186
28187    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28188    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28189  fi
28190
28191  else
28192    # We're on a posix platform. Hooray! :)
28193    # First separate the path from the arguments. This will split at the first
28194    # space.
28195    complete="$CC"
28196    path="${complete%% *}"
28197    tmp="$complete EOL"
28198    arguments="${tmp#* }"
28199
28200    # Cannot rely on the command "which" here since it doesn't always work.
28201    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28202    if test -z "$is_absolute_path"; then
28203      # Path to executable is not absolute. Find it.
28204      IFS_save="$IFS"
28205      IFS=:
28206      for p in $PATH; do
28207        if test -f "$p/$path" && test -x "$p/$path"; then
28208          new_path="$p/$path"
28209          break
28210        fi
28211      done
28212      IFS="$IFS_save"
28213    else
28214      # This is an absolute path, we can use it without further modifications.
28215      new_path="$path"
28216    fi
28217
28218    if test "x$new_path" = x; then
28219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28220$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28221      has_space=`$ECHO "$complete" | $GREP " "`
28222      if test "x$has_space" != x; then
28223        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28224$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28225      fi
28226      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28227    fi
28228  fi
28229
28230  # Now join together the path and the arguments once again
28231  if test "x$arguments" != xEOL; then
28232    new_complete="$new_path ${arguments% *}"
28233  else
28234    new_complete="$new_path"
28235  fi
28236
28237  if test "x$complete" != "x$new_complete"; then
28238    CC="$new_complete"
28239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28240$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28241  fi
28242
28243  TEST_COMPILER="$CC"
28244  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28245  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28246  if test "x$OPENJDK_BUILD_OS" != xaix; then
28247    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28249$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28250
28251  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28252    # Follow a chain of symbolic links. Use readlink
28253    # where it exists, else fall back to horribly
28254    # complicated shell code.
28255    if test "x$READLINK_TESTED" != yes; then
28256      # On MacOSX there is a readlink tool with a different
28257      # purpose than the GNU readlink tool. Check the found readlink.
28258      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28259      if test "x$ISGNU" = x; then
28260        # A readlink that we do not know how to use.
28261        # Are there other non-GNU readlinks out there?
28262        READLINK_TESTED=yes
28263        READLINK=
28264      fi
28265    fi
28266
28267    if test "x$READLINK" != x; then
28268      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28269    else
28270      # Save the current directory for restoring afterwards
28271      STARTDIR=$PWD
28272      COUNTER=0
28273      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28274      sym_link_file=`$BASENAME $TEST_COMPILER`
28275      cd $sym_link_dir
28276      # Use -P flag to resolve symlinks in directories.
28277      cd `$THEPWDCMD -P`
28278      sym_link_dir=`$THEPWDCMD -P`
28279      # Resolve file symlinks
28280      while test $COUNTER -lt 20; do
28281        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28282        if test "x$ISLINK" == x; then
28283          # This is not a symbolic link! We are done!
28284          break
28285        fi
28286        # Again resolve directory symlinks since the target of the just found
28287        # link could be in a different directory
28288        cd `$DIRNAME $ISLINK`
28289        sym_link_dir=`$THEPWDCMD -P`
28290        sym_link_file=`$BASENAME $ISLINK`
28291        let COUNTER=COUNTER+1
28292      done
28293      cd $STARTDIR
28294      TEST_COMPILER=$sym_link_dir/$sym_link_file
28295    fi
28296  fi
28297
28298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28299$as_echo "$TEST_COMPILER" >&6; }
28300  fi
28301  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28302$as_echo_n "checking if CC is disguised ccache... " >&6; }
28303
28304  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28305  if test "x$COMPILER_BASENAME" = "xccache"; then
28306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28307$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28308    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28309    # We want to control ccache invocation ourselves, so ignore this cc and try
28310    # searching again.
28311
28312    # Remove the path to the fake ccache cc from the PATH
28313    RETRY_COMPILER_SAVED_PATH="$PATH"
28314    COMPILER_DIRNAME=`$DIRNAME $CC`
28315    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28316
28317    # Try again looking for our compiler
28318    if test -n "$ac_tool_prefix"; then
28319  for ac_prog in $TOOLCHAIN_CC_BINARY
28320  do
28321    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28322set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28324$as_echo_n "checking for $ac_word... " >&6; }
28325if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28326  $as_echo_n "(cached) " >&6
28327else
28328  if test -n "$PROPER_COMPILER_CC"; then
28329  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28330else
28331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28332for as_dir in $PATH
28333do
28334  IFS=$as_save_IFS
28335  test -z "$as_dir" && as_dir=.
28336    for ac_exec_ext in '' $ac_executable_extensions; do
28337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28338    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28340    break 2
28341  fi
28342done
28343  done
28344IFS=$as_save_IFS
28345
28346fi
28347fi
28348PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28349if test -n "$PROPER_COMPILER_CC"; then
28350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28351$as_echo "$PROPER_COMPILER_CC" >&6; }
28352else
28353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28354$as_echo "no" >&6; }
28355fi
28356
28357
28358    test -n "$PROPER_COMPILER_CC" && break
28359  done
28360fi
28361if test -z "$PROPER_COMPILER_CC"; then
28362  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28363  for ac_prog in $TOOLCHAIN_CC_BINARY
28364do
28365  # Extract the first word of "$ac_prog", so it can be a program name with args.
28366set dummy $ac_prog; ac_word=$2
28367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28368$as_echo_n "checking for $ac_word... " >&6; }
28369if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28370  $as_echo_n "(cached) " >&6
28371else
28372  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28373  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28374else
28375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28376for as_dir in $PATH
28377do
28378  IFS=$as_save_IFS
28379  test -z "$as_dir" && as_dir=.
28380    for ac_exec_ext in '' $ac_executable_extensions; do
28381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28382    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28384    break 2
28385  fi
28386done
28387  done
28388IFS=$as_save_IFS
28389
28390fi
28391fi
28392ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28393if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28395$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28396else
28397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28398$as_echo "no" >&6; }
28399fi
28400
28401
28402  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28403done
28404
28405  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28406    PROPER_COMPILER_CC=""
28407  else
28408    case $cross_compiling:$ac_tool_warned in
28409yes:)
28410{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28411$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28412ac_tool_warned=yes ;;
28413esac
28414    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28415  fi
28416fi
28417
28418
28419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28420
28421  # First separate the path from the arguments. This will split at the first
28422  # space.
28423  complete="$PROPER_COMPILER_CC"
28424  path="${complete%% *}"
28425  tmp="$complete EOL"
28426  arguments="${tmp#* }"
28427
28428  # Input might be given as Windows format, start by converting to
28429  # unix format.
28430  new_path=`$CYGPATH -u "$path"`
28431
28432  # Now try to locate executable using which
28433  new_path=`$WHICH "$new_path" 2> /dev/null`
28434  # bat and cmd files are not always considered executable in cygwin causing which
28435  # to not find them
28436  if test "x$new_path" = x \
28437      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28438      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28439    new_path=`$CYGPATH -u "$path"`
28440  fi
28441  if test "x$new_path" = x; then
28442    # Oops. Which didn't find the executable.
28443    # The splitting of arguments from the executable at a space might have been incorrect,
28444    # since paths with space are more likely in Windows. Give it another try with the whole
28445    # argument.
28446    path="$complete"
28447    arguments="EOL"
28448    new_path=`$CYGPATH -u "$path"`
28449    new_path=`$WHICH "$new_path" 2> /dev/null`
28450    # bat and cmd files are not always considered executable in cygwin causing which
28451    # to not find them
28452    if test "x$new_path" = x \
28453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28455      new_path=`$CYGPATH -u "$path"`
28456    fi
28457    if test "x$new_path" = x; then
28458      # It's still not found. Now this is an unrecoverable error.
28459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28460$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28461      has_space=`$ECHO "$complete" | $GREP " "`
28462      if test "x$has_space" != x; then
28463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28465      fi
28466      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28467    fi
28468  fi
28469
28470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28473  # "foo.exe" is OK but "foo" is an error.
28474  #
28475  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28476  # It is also a way to make sure we got the proper file name for the real test later on.
28477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28478  if test "x$test_shortpath" = x; then
28479    # Short path failed, file does not exist as specified.
28480    # Try adding .exe or .cmd
28481    if test -f "${new_path}.exe"; then
28482      input_to_shortpath="${new_path}.exe"
28483    elif test -f "${new_path}.cmd"; then
28484      input_to_shortpath="${new_path}.cmd"
28485    else
28486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28487$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28488      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28489$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28490      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28491    fi
28492  else
28493    input_to_shortpath="$new_path"
28494  fi
28495
28496  # Call helper function which possibly converts this using DOS-style short mode.
28497  # If so, the updated path is stored in $new_path.
28498  new_path="$input_to_shortpath"
28499
28500  input_path="$input_to_shortpath"
28501  # Check if we need to convert this using DOS-style short mode. If the path
28502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28503  # take no chances and rewrite it.
28504  # Note: m4 eats our [], so we need to use [ and ] instead.
28505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28506  if test "x$has_forbidden_chars" != x; then
28507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28511      # Going to short mode and back again did indeed matter. Since short mode is
28512      # case insensitive, let's make it lowercase to improve readability.
28513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28514      # Now convert it back to Unix-stile (cygpath)
28515      input_path=`$CYGPATH -u "$shortmode_path"`
28516      new_path="$input_path"
28517    fi
28518  fi
28519
28520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28521  if test "x$test_cygdrive_prefix" = x; then
28522    # As a simple fix, exclude /usr/bin since it's not a real path.
28523    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28525      # a path prefixed by /cygdrive for fixpath to work.
28526      new_path="$CYGWIN_ROOT_PATH$input_path"
28527    fi
28528  fi
28529
28530  # remove trailing .exe if any
28531  new_path="${new_path/%.exe/}"
28532
28533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28534
28535  # First separate the path from the arguments. This will split at the first
28536  # space.
28537  complete="$PROPER_COMPILER_CC"
28538  path="${complete%% *}"
28539  tmp="$complete EOL"
28540  arguments="${tmp#* }"
28541
28542  # Input might be given as Windows format, start by converting to
28543  # unix format.
28544  new_path="$path"
28545
28546  windows_path="$new_path"
28547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28548    unix_path=`$CYGPATH -u "$windows_path"`
28549    new_path="$unix_path"
28550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28552    new_path="$unix_path"
28553  fi
28554
28555
28556  # Now try to locate executable using which
28557  new_path=`$WHICH "$new_path" 2> /dev/null`
28558
28559  if test "x$new_path" = x; then
28560    # Oops. Which didn't find the executable.
28561    # The splitting of arguments from the executable at a space might have been incorrect,
28562    # since paths with space are more likely in Windows. Give it another try with the whole
28563    # argument.
28564    path="$complete"
28565    arguments="EOL"
28566    new_path="$path"
28567
28568  windows_path="$new_path"
28569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28570    unix_path=`$CYGPATH -u "$windows_path"`
28571    new_path="$unix_path"
28572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28574    new_path="$unix_path"
28575  fi
28576
28577
28578    new_path=`$WHICH "$new_path" 2> /dev/null`
28579
28580    if test "x$new_path" = x; then
28581      # It's still not found. Now this is an unrecoverable error.
28582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28583$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28584      has_space=`$ECHO "$complete" | $GREP " "`
28585      if test "x$has_space" != x; then
28586        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28587$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28588      fi
28589      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28590    fi
28591  fi
28592
28593  # Now new_path has a complete unix path to the binary
28594  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28595    # Keep paths in /bin as-is, but remove trailing .exe if any
28596    new_path="${new_path/%.exe/}"
28597    # Do not save /bin paths to all_fixpath_prefixes!
28598  else
28599    # Not in mixed or Windows style, start by that.
28600    new_path=`cmd //c echo $new_path`
28601
28602  input_path="$new_path"
28603  # Check if we need to convert this using DOS-style short mode. If the path
28604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28605  # take no chances and rewrite it.
28606  # Note: m4 eats our [], so we need to use [ and ] instead.
28607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28608  if test "x$has_forbidden_chars" != x; then
28609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28611  fi
28612
28613    # Output is in $new_path
28614
28615  windows_path="$new_path"
28616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28617    unix_path=`$CYGPATH -u "$windows_path"`
28618    new_path="$unix_path"
28619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28621    new_path="$unix_path"
28622  fi
28623
28624    # remove trailing .exe if any
28625    new_path="${new_path/%.exe/}"
28626
28627    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28628    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28629  fi
28630
28631  else
28632    # We're on a posix platform. Hooray! :)
28633    # First separate the path from the arguments. This will split at the first
28634    # space.
28635    complete="$PROPER_COMPILER_CC"
28636    path="${complete%% *}"
28637    tmp="$complete EOL"
28638    arguments="${tmp#* }"
28639
28640    # Cannot rely on the command "which" here since it doesn't always work.
28641    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28642    if test -z "$is_absolute_path"; then
28643      # Path to executable is not absolute. Find it.
28644      IFS_save="$IFS"
28645      IFS=:
28646      for p in $PATH; do
28647        if test -f "$p/$path" && test -x "$p/$path"; then
28648          new_path="$p/$path"
28649          break
28650        fi
28651      done
28652      IFS="$IFS_save"
28653    else
28654      # This is an absolute path, we can use it without further modifications.
28655      new_path="$path"
28656    fi
28657
28658    if test "x$new_path" = x; then
28659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28660$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28661      has_space=`$ECHO "$complete" | $GREP " "`
28662      if test "x$has_space" != x; then
28663        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28664$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28665      fi
28666      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28667    fi
28668  fi
28669
28670  # Now join together the path and the arguments once again
28671  if test "x$arguments" != xEOL; then
28672    new_complete="$new_path ${arguments% *}"
28673  else
28674    new_complete="$new_path"
28675  fi
28676
28677  if test "x$complete" != "x$new_complete"; then
28678    PROPER_COMPILER_CC="$new_complete"
28679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28680$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28681  fi
28682
28683    PATH="$RETRY_COMPILER_SAVED_PATH"
28684
28685    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28686$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28687
28688  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28689    # Follow a chain of symbolic links. Use readlink
28690    # where it exists, else fall back to horribly
28691    # complicated shell code.
28692    if test "x$READLINK_TESTED" != yes; then
28693      # On MacOSX there is a readlink tool with a different
28694      # purpose than the GNU readlink tool. Check the found readlink.
28695      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28696      if test "x$ISGNU" = x; then
28697        # A readlink that we do not know how to use.
28698        # Are there other non-GNU readlinks out there?
28699        READLINK_TESTED=yes
28700        READLINK=
28701      fi
28702    fi
28703
28704    if test "x$READLINK" != x; then
28705      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28706    else
28707      # Save the current directory for restoring afterwards
28708      STARTDIR=$PWD
28709      COUNTER=0
28710      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28711      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28712      cd $sym_link_dir
28713      # Use -P flag to resolve symlinks in directories.
28714      cd `$THEPWDCMD -P`
28715      sym_link_dir=`$THEPWDCMD -P`
28716      # Resolve file symlinks
28717      while test $COUNTER -lt 20; do
28718        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28719        if test "x$ISLINK" == x; then
28720          # This is not a symbolic link! We are done!
28721          break
28722        fi
28723        # Again resolve directory symlinks since the target of the just found
28724        # link could be in a different directory
28725        cd `$DIRNAME $ISLINK`
28726        sym_link_dir=`$THEPWDCMD -P`
28727        sym_link_file=`$BASENAME $ISLINK`
28728        let COUNTER=COUNTER+1
28729      done
28730      cd $STARTDIR
28731      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28732    fi
28733  fi
28734
28735    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28736$as_echo "$PROPER_COMPILER_CC" >&6; }
28737    CC="$PROPER_COMPILER_CC"
28738  else
28739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28740$as_echo "no, keeping CC" >&6; }
28741  fi
28742
28743
28744  COMPILER=$CC
28745  COMPILER_NAME=$COMPILER_NAME
28746
28747  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28748    # cc -V output typically looks like
28749    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28750    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28751    # Check that this is likely to be the Solaris Studio cc.
28752    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28753    if test $? -ne 0; then
28754      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28755      { $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
28756$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28757      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28758$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28759      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28760$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28761      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28762    fi
28763    # Remove usage instructions (if present), and
28764    # collapse compiler output into a single line
28765    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28766        $SED -e 's/ *[Uu]sage:.*//'`
28767    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28768        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28769  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28770    # xlc -qversion output typically looks like
28771    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28772    #     Version: 11.01.0000.0015
28773    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28774    # Check that this is likely to be the IBM XL C compiler.
28775    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28776    if test $? -ne 0; then
28777      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28778      { $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
28779$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28780      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28781$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28782      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28783$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28784      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28785    fi
28786    # Collapse compiler output into a single line
28787    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28788    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28789        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28790  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28791    # There is no specific version flag, but all output starts with a version string.
28792    # First line typically looks something like:
28793    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28794    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28795    # Check that this is likely to be Microsoft CL.EXE.
28796    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28797    if test $? -ne 0; then
28798      { $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
28799$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28800      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28801$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28802      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28803    fi
28804    # Collapse compiler output into a single line
28805    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28806    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28807        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28808  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28809    # gcc --version output typically looks like
28810    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28811    #     Copyright (C) 2013 Free Software Foundation, Inc.
28812    #     This is free software; see the source for copying conditions.  There is NO
28813    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28814    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28815    # Check that this is likely to be GCC.
28816    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28817    if test $? -ne 0; then
28818      { $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
28819$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28820      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28821$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28822      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28823    fi
28824    # Remove Copyright and legalese from version string, and
28825    # collapse into a single line
28826    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28827        $SED -e 's/ *Copyright .*//'`
28828    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28829        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28830  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28831    # clang --version output typically looks like
28832    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28833    #    clang version 3.3 (tags/RELEASE_33/final)
28834    # or
28835    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28836    #    Target: x86_64-pc-linux-gnu
28837    #    Thread model: posix
28838    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28839    # Check that this is likely to be clang
28840    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28841    if test $? -ne 0; then
28842      { $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
28843$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28844      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28845$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28846      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28847    fi
28848    # Collapse compiler output into a single line
28849    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28850    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28851        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28852  else
28853      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28854  fi
28855  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28856  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28857  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28858  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28859
28860  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28861$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28862
28863
28864  # Now that we have resolved CC ourself, let autoconf have its go at it
28865  ac_ext=c
28866ac_cpp='$CPP $CPPFLAGS'
28867ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28868ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28869ac_compiler_gnu=$ac_cv_c_compiler_gnu
28870if test -n "$ac_tool_prefix"; then
28871  for ac_prog in $CC
28872  do
28873    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28874set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28876$as_echo_n "checking for $ac_word... " >&6; }
28877if ${ac_cv_prog_CC+:} false; then :
28878  $as_echo_n "(cached) " >&6
28879else
28880  if test -n "$CC"; then
28881  ac_cv_prog_CC="$CC" # Let the user override the test.
28882else
28883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28884for as_dir in $PATH
28885do
28886  IFS=$as_save_IFS
28887  test -z "$as_dir" && as_dir=.
28888    for ac_exec_ext in '' $ac_executable_extensions; do
28889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28890    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28892    break 2
28893  fi
28894done
28895  done
28896IFS=$as_save_IFS
28897
28898fi
28899fi
28900CC=$ac_cv_prog_CC
28901if test -n "$CC"; then
28902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28903$as_echo "$CC" >&6; }
28904else
28905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28906$as_echo "no" >&6; }
28907fi
28908
28909
28910    test -n "$CC" && break
28911  done
28912fi
28913if test -z "$CC"; then
28914  ac_ct_CC=$CC
28915  for ac_prog in $CC
28916do
28917  # Extract the first word of "$ac_prog", so it can be a program name with args.
28918set dummy $ac_prog; ac_word=$2
28919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28920$as_echo_n "checking for $ac_word... " >&6; }
28921if ${ac_cv_prog_ac_ct_CC+:} false; then :
28922  $as_echo_n "(cached) " >&6
28923else
28924  if test -n "$ac_ct_CC"; then
28925  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28926else
28927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28928for as_dir in $PATH
28929do
28930  IFS=$as_save_IFS
28931  test -z "$as_dir" && as_dir=.
28932    for ac_exec_ext in '' $ac_executable_extensions; do
28933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28934    ac_cv_prog_ac_ct_CC="$ac_prog"
28935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28936    break 2
28937  fi
28938done
28939  done
28940IFS=$as_save_IFS
28941
28942fi
28943fi
28944ac_ct_CC=$ac_cv_prog_ac_ct_CC
28945if test -n "$ac_ct_CC"; then
28946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28947$as_echo "$ac_ct_CC" >&6; }
28948else
28949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28950$as_echo "no" >&6; }
28951fi
28952
28953
28954  test -n "$ac_ct_CC" && break
28955done
28956
28957  if test "x$ac_ct_CC" = x; then
28958    CC=""
28959  else
28960    case $cross_compiling:$ac_tool_warned in
28961yes:)
28962{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28963$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28964ac_tool_warned=yes ;;
28965esac
28966    CC=$ac_ct_CC
28967  fi
28968fi
28969
28970
28971test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28972$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28973as_fn_error $? "no acceptable C compiler found in \$PATH
28974See \`config.log' for more details" "$LINENO" 5; }
28975
28976# Provide some information about the compiler.
28977$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28978set X $ac_compile
28979ac_compiler=$2
28980for ac_option in --version -v -V -qversion; do
28981  { { ac_try="$ac_compiler $ac_option >&5"
28982case "(($ac_try" in
28983  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28984  *) ac_try_echo=$ac_try;;
28985esac
28986eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28987$as_echo "$ac_try_echo"; } >&5
28988  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28989  ac_status=$?
28990  if test -s conftest.err; then
28991    sed '10a\
28992... rest of stderr output deleted ...
28993         10q' conftest.err >conftest.er1
28994    cat conftest.er1 >&5
28995  fi
28996  rm -f conftest.er1 conftest.err
28997  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28998  test $ac_status = 0; }
28999done
29000
29001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29002/* end confdefs.h.  */
29003
29004int
29005main ()
29006{
29007
29008  ;
29009  return 0;
29010}
29011_ACEOF
29012ac_clean_files_save=$ac_clean_files
29013ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29014# Try to create an executable without -o first, disregard a.out.
29015# It will help us diagnose broken compilers, and finding out an intuition
29016# of exeext.
29017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29018$as_echo_n "checking whether the C compiler works... " >&6; }
29019ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29020
29021# The possible output files:
29022ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29023
29024ac_rmfiles=
29025for ac_file in $ac_files
29026do
29027  case $ac_file in
29028    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29029    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29030  esac
29031done
29032rm -f $ac_rmfiles
29033
29034if { { ac_try="$ac_link_default"
29035case "(($ac_try" in
29036  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29037  *) ac_try_echo=$ac_try;;
29038esac
29039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29040$as_echo "$ac_try_echo"; } >&5
29041  (eval "$ac_link_default") 2>&5
29042  ac_status=$?
29043  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29044  test $ac_status = 0; }; then :
29045  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29046# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29047# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29048# so that the user can short-circuit this test for compilers unknown to
29049# Autoconf.
29050for ac_file in $ac_files ''
29051do
29052  test -f "$ac_file" || continue
29053  case $ac_file in
29054    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29055	;;
29056    [ab].out )
29057	# We found the default executable, but exeext='' is most
29058	# certainly right.
29059	break;;
29060    *.* )
29061	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29062	then :; else
29063	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29064	fi
29065	# We set ac_cv_exeext here because the later test for it is not
29066	# safe: cross compilers may not add the suffix if given an `-o'
29067	# argument, so we may need to know it at that point already.
29068	# Even if this section looks crufty: it has the advantage of
29069	# actually working.
29070	break;;
29071    * )
29072	break;;
29073  esac
29074done
29075test "$ac_cv_exeext" = no && ac_cv_exeext=
29076
29077else
29078  ac_file=''
29079fi
29080if test -z "$ac_file"; then :
29081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29082$as_echo "no" >&6; }
29083$as_echo "$as_me: failed program was:" >&5
29084sed 's/^/| /' conftest.$ac_ext >&5
29085
29086{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29087$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29088as_fn_error 77 "C compiler cannot create executables
29089See \`config.log' for more details" "$LINENO" 5; }
29090else
29091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29092$as_echo "yes" >&6; }
29093fi
29094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29095$as_echo_n "checking for C compiler default output file name... " >&6; }
29096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29097$as_echo "$ac_file" >&6; }
29098ac_exeext=$ac_cv_exeext
29099
29100rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29101ac_clean_files=$ac_clean_files_save
29102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29103$as_echo_n "checking for suffix of executables... " >&6; }
29104if { { ac_try="$ac_link"
29105case "(($ac_try" in
29106  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29107  *) ac_try_echo=$ac_try;;
29108esac
29109eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29110$as_echo "$ac_try_echo"; } >&5
29111  (eval "$ac_link") 2>&5
29112  ac_status=$?
29113  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29114  test $ac_status = 0; }; then :
29115  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29116# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29117# work properly (i.e., refer to `conftest.exe'), while it won't with
29118# `rm'.
29119for ac_file in conftest.exe conftest conftest.*; do
29120  test -f "$ac_file" || continue
29121  case $ac_file in
29122    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29123    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29124	  break;;
29125    * ) break;;
29126  esac
29127done
29128else
29129  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29131as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29132See \`config.log' for more details" "$LINENO" 5; }
29133fi
29134rm -f conftest conftest$ac_cv_exeext
29135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29136$as_echo "$ac_cv_exeext" >&6; }
29137
29138rm -f conftest.$ac_ext
29139EXEEXT=$ac_cv_exeext
29140ac_exeext=$EXEEXT
29141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29142/* end confdefs.h.  */
29143#include <stdio.h>
29144int
29145main ()
29146{
29147FILE *f = fopen ("conftest.out", "w");
29148 return ferror (f) || fclose (f) != 0;
29149
29150  ;
29151  return 0;
29152}
29153_ACEOF
29154ac_clean_files="$ac_clean_files conftest.out"
29155# Check that the compiler produces executables we can run.  If not, either
29156# the compiler is broken, or we cross compile.
29157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29158$as_echo_n "checking whether we are cross compiling... " >&6; }
29159if test "$cross_compiling" != yes; then
29160  { { ac_try="$ac_link"
29161case "(($ac_try" in
29162  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29163  *) ac_try_echo=$ac_try;;
29164esac
29165eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29166$as_echo "$ac_try_echo"; } >&5
29167  (eval "$ac_link") 2>&5
29168  ac_status=$?
29169  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29170  test $ac_status = 0; }
29171  if { ac_try='./conftest$ac_cv_exeext'
29172  { { case "(($ac_try" in
29173  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29174  *) ac_try_echo=$ac_try;;
29175esac
29176eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29177$as_echo "$ac_try_echo"; } >&5
29178  (eval "$ac_try") 2>&5
29179  ac_status=$?
29180  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29181  test $ac_status = 0; }; }; then
29182    cross_compiling=no
29183  else
29184    if test "$cross_compiling" = maybe; then
29185	cross_compiling=yes
29186    else
29187	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29188$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29189as_fn_error $? "cannot run C compiled programs.
29190If you meant to cross compile, use \`--host'.
29191See \`config.log' for more details" "$LINENO" 5; }
29192    fi
29193  fi
29194fi
29195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29196$as_echo "$cross_compiling" >&6; }
29197
29198rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29199ac_clean_files=$ac_clean_files_save
29200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29201$as_echo_n "checking for suffix of object files... " >&6; }
29202if ${ac_cv_objext+:} false; then :
29203  $as_echo_n "(cached) " >&6
29204else
29205  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29206/* end confdefs.h.  */
29207
29208int
29209main ()
29210{
29211
29212  ;
29213  return 0;
29214}
29215_ACEOF
29216rm -f conftest.o conftest.obj
29217if { { ac_try="$ac_compile"
29218case "(($ac_try" in
29219  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29220  *) ac_try_echo=$ac_try;;
29221esac
29222eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29223$as_echo "$ac_try_echo"; } >&5
29224  (eval "$ac_compile") 2>&5
29225  ac_status=$?
29226  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29227  test $ac_status = 0; }; then :
29228  for ac_file in conftest.o conftest.obj conftest.*; do
29229  test -f "$ac_file" || continue;
29230  case $ac_file in
29231    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29232    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29233       break;;
29234  esac
29235done
29236else
29237  $as_echo "$as_me: failed program was:" >&5
29238sed 's/^/| /' conftest.$ac_ext >&5
29239
29240{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29241$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29242as_fn_error $? "cannot compute suffix of object files: cannot compile
29243See \`config.log' for more details" "$LINENO" 5; }
29244fi
29245rm -f conftest.$ac_cv_objext conftest.$ac_ext
29246fi
29247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29248$as_echo "$ac_cv_objext" >&6; }
29249OBJEXT=$ac_cv_objext
29250ac_objext=$OBJEXT
29251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29252$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29253if ${ac_cv_c_compiler_gnu+:} false; then :
29254  $as_echo_n "(cached) " >&6
29255else
29256  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29257/* end confdefs.h.  */
29258
29259int
29260main ()
29261{
29262#ifndef __GNUC__
29263       choke me
29264#endif
29265
29266  ;
29267  return 0;
29268}
29269_ACEOF
29270if ac_fn_c_try_compile "$LINENO"; then :
29271  ac_compiler_gnu=yes
29272else
29273  ac_compiler_gnu=no
29274fi
29275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29276ac_cv_c_compiler_gnu=$ac_compiler_gnu
29277
29278fi
29279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29280$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29281if test $ac_compiler_gnu = yes; then
29282  GCC=yes
29283else
29284  GCC=
29285fi
29286ac_test_CFLAGS=${CFLAGS+set}
29287ac_save_CFLAGS=$CFLAGS
29288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29289$as_echo_n "checking whether $CC accepts -g... " >&6; }
29290if ${ac_cv_prog_cc_g+:} false; then :
29291  $as_echo_n "(cached) " >&6
29292else
29293  ac_save_c_werror_flag=$ac_c_werror_flag
29294   ac_c_werror_flag=yes
29295   ac_cv_prog_cc_g=no
29296   CFLAGS="-g"
29297   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29298/* end confdefs.h.  */
29299
29300int
29301main ()
29302{
29303
29304  ;
29305  return 0;
29306}
29307_ACEOF
29308if ac_fn_c_try_compile "$LINENO"; then :
29309  ac_cv_prog_cc_g=yes
29310else
29311  CFLAGS=""
29312      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29313/* end confdefs.h.  */
29314
29315int
29316main ()
29317{
29318
29319  ;
29320  return 0;
29321}
29322_ACEOF
29323if ac_fn_c_try_compile "$LINENO"; then :
29324
29325else
29326  ac_c_werror_flag=$ac_save_c_werror_flag
29327	 CFLAGS="-g"
29328	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29329/* end confdefs.h.  */
29330
29331int
29332main ()
29333{
29334
29335  ;
29336  return 0;
29337}
29338_ACEOF
29339if ac_fn_c_try_compile "$LINENO"; then :
29340  ac_cv_prog_cc_g=yes
29341fi
29342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29343fi
29344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29345fi
29346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29347   ac_c_werror_flag=$ac_save_c_werror_flag
29348fi
29349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29350$as_echo "$ac_cv_prog_cc_g" >&6; }
29351if test "$ac_test_CFLAGS" = set; then
29352  CFLAGS=$ac_save_CFLAGS
29353elif test $ac_cv_prog_cc_g = yes; then
29354  if test "$GCC" = yes; then
29355    CFLAGS="-g -O2"
29356  else
29357    CFLAGS="-g"
29358  fi
29359else
29360  if test "$GCC" = yes; then
29361    CFLAGS="-O2"
29362  else
29363    CFLAGS=
29364  fi
29365fi
29366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29367$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29368if ${ac_cv_prog_cc_c89+:} false; then :
29369  $as_echo_n "(cached) " >&6
29370else
29371  ac_cv_prog_cc_c89=no
29372ac_save_CC=$CC
29373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29374/* end confdefs.h.  */
29375#include <stdarg.h>
29376#include <stdio.h>
29377struct stat;
29378/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29379struct buf { int x; };
29380FILE * (*rcsopen) (struct buf *, struct stat *, int);
29381static char *e (p, i)
29382     char **p;
29383     int i;
29384{
29385  return p[i];
29386}
29387static char *f (char * (*g) (char **, int), char **p, ...)
29388{
29389  char *s;
29390  va_list v;
29391  va_start (v,p);
29392  s = g (p, va_arg (v,int));
29393  va_end (v);
29394  return s;
29395}
29396
29397/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29398   function prototypes and stuff, but not '\xHH' hex character constants.
29399   These don't provoke an error unfortunately, instead are silently treated
29400   as 'x'.  The following induces an error, until -std is added to get
29401   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29402   array size at least.  It's necessary to write '\x00'==0 to get something
29403   that's true only with -std.  */
29404int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29405
29406/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29407   inside strings and character constants.  */
29408#define FOO(x) 'x'
29409int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29410
29411int test (int i, double x);
29412struct s1 {int (*f) (int a);};
29413struct s2 {int (*f) (double a);};
29414int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29415int argc;
29416char **argv;
29417int
29418main ()
29419{
29420return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29421  ;
29422  return 0;
29423}
29424_ACEOF
29425for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29426	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29427do
29428  CC="$ac_save_CC $ac_arg"
29429  if ac_fn_c_try_compile "$LINENO"; then :
29430  ac_cv_prog_cc_c89=$ac_arg
29431fi
29432rm -f core conftest.err conftest.$ac_objext
29433  test "x$ac_cv_prog_cc_c89" != "xno" && break
29434done
29435rm -f conftest.$ac_ext
29436CC=$ac_save_CC
29437
29438fi
29439# AC_CACHE_VAL
29440case "x$ac_cv_prog_cc_c89" in
29441  x)
29442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29443$as_echo "none needed" >&6; } ;;
29444  xno)
29445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29446$as_echo "unsupported" >&6; } ;;
29447  *)
29448    CC="$CC $ac_cv_prog_cc_c89"
29449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29450$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29451esac
29452if test "x$ac_cv_prog_cc_c89" != xno; then :
29453
29454fi
29455
29456ac_ext=cpp
29457ac_cpp='$CXXCPP $CPPFLAGS'
29458ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29459ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29460ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29461
29462
29463
29464  COMPILER_NAME=C++
29465  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29466
29467  if test "x$CXX" != x; then
29468    # User has supplied compiler name already, always let that override.
29469    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29470$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29471    if test "x`basename $CXX`" = "x$CXX"; then
29472      # A command without a complete path is provided, search $PATH.
29473
29474      for ac_prog in $CXX
29475do
29476  # Extract the first word of "$ac_prog", so it can be a program name with args.
29477set dummy $ac_prog; ac_word=$2
29478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29479$as_echo_n "checking for $ac_word... " >&6; }
29480if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29481  $as_echo_n "(cached) " >&6
29482else
29483  case $POTENTIAL_CXX in
29484  [\\/]* | ?:[\\/]*)
29485  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29486  ;;
29487  *)
29488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29489for as_dir in $PATH
29490do
29491  IFS=$as_save_IFS
29492  test -z "$as_dir" && as_dir=.
29493    for ac_exec_ext in '' $ac_executable_extensions; do
29494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29495    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29497    break 2
29498  fi
29499done
29500  done
29501IFS=$as_save_IFS
29502
29503  ;;
29504esac
29505fi
29506POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29507if test -n "$POTENTIAL_CXX"; then
29508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29509$as_echo "$POTENTIAL_CXX" >&6; }
29510else
29511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29512$as_echo "no" >&6; }
29513fi
29514
29515
29516  test -n "$POTENTIAL_CXX" && break
29517done
29518
29519      if test "x$POTENTIAL_CXX" != x; then
29520        CXX=$POTENTIAL_CXX
29521      else
29522        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29523      fi
29524    else
29525      # Otherwise it might already be a complete path
29526      if test ! -x "$CXX"; then
29527        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29528      fi
29529    fi
29530  else
29531    # No user supplied value. Locate compiler ourselves.
29532
29533    # If we are cross compiling, assume cross compilation tools follows the
29534    # cross compilation standard where they are prefixed with the autoconf
29535    # standard name for the target. For example the binary
29536    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29537    # If we are not cross compiling, then the default compiler name will be
29538    # used.
29539
29540    CXX=
29541    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29542    # before checking the rest of the PATH.
29543    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29544    # step, this should not be necessary.
29545    if test -n "$TOOLCHAIN_PATH"; then
29546      PATH_save="$PATH"
29547      PATH="$TOOLCHAIN_PATH"
29548      for ac_prog in $SEARCH_LIST
29549do
29550  # Extract the first word of "$ac_prog", so it can be a program name with args.
29551set dummy $ac_prog; ac_word=$2
29552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29553$as_echo_n "checking for $ac_word... " >&6; }
29554if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29555  $as_echo_n "(cached) " >&6
29556else
29557  case $TOOLCHAIN_PATH_CXX in
29558  [\\/]* | ?:[\\/]*)
29559  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29560  ;;
29561  *)
29562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29563for as_dir in $PATH
29564do
29565  IFS=$as_save_IFS
29566  test -z "$as_dir" && as_dir=.
29567    for ac_exec_ext in '' $ac_executable_extensions; do
29568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29569    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29571    break 2
29572  fi
29573done
29574  done
29575IFS=$as_save_IFS
29576
29577  ;;
29578esac
29579fi
29580TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29581if test -n "$TOOLCHAIN_PATH_CXX"; then
29582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29583$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29584else
29585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29586$as_echo "no" >&6; }
29587fi
29588
29589
29590  test -n "$TOOLCHAIN_PATH_CXX" && break
29591done
29592
29593      CXX=$TOOLCHAIN_PATH_CXX
29594      PATH="$PATH_save"
29595    fi
29596
29597    # AC_PATH_PROGS can't be run multiple times with the same variable,
29598    # so create a new name for this run.
29599    if test "x$CXX" = x; then
29600      for ac_prog in $SEARCH_LIST
29601do
29602  # Extract the first word of "$ac_prog", so it can be a program name with args.
29603set dummy $ac_prog; ac_word=$2
29604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29605$as_echo_n "checking for $ac_word... " >&6; }
29606if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29607  $as_echo_n "(cached) " >&6
29608else
29609  case $POTENTIAL_CXX in
29610  [\\/]* | ?:[\\/]*)
29611  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29612  ;;
29613  *)
29614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29615for as_dir in $PATH
29616do
29617  IFS=$as_save_IFS
29618  test -z "$as_dir" && as_dir=.
29619    for ac_exec_ext in '' $ac_executable_extensions; do
29620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29621    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29623    break 2
29624  fi
29625done
29626  done
29627IFS=$as_save_IFS
29628
29629  ;;
29630esac
29631fi
29632POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29633if test -n "$POTENTIAL_CXX"; then
29634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29635$as_echo "$POTENTIAL_CXX" >&6; }
29636else
29637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29638$as_echo "no" >&6; }
29639fi
29640
29641
29642  test -n "$POTENTIAL_CXX" && break
29643done
29644
29645      CXX=$POTENTIAL_CXX
29646    fi
29647
29648    if test "x$CXX" = x; then
29649
29650  # Print a helpful message on how to acquire the necessary build dependency.
29651  # devkit is the help tag: freetype, cups, pulse, alsa etc
29652  MISSING_DEPENDENCY=devkit
29653
29654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29655    cygwin_help $MISSING_DEPENDENCY
29656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29657    msys_help $MISSING_DEPENDENCY
29658  else
29659    PKGHANDLER_COMMAND=
29660
29661    case $PKGHANDLER in
29662      apt-get)
29663        apt_help     $MISSING_DEPENDENCY ;;
29664      yum)
29665        yum_help     $MISSING_DEPENDENCY ;;
29666      port)
29667        port_help    $MISSING_DEPENDENCY ;;
29668      pkgutil)
29669        pkgutil_help $MISSING_DEPENDENCY ;;
29670      pkgadd)
29671        pkgadd_help  $MISSING_DEPENDENCY ;;
29672    esac
29673
29674    if test "x$PKGHANDLER_COMMAND" != x; then
29675      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29676    fi
29677  fi
29678
29679      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29680    fi
29681  fi
29682
29683  # Now we have a compiler binary in CXX. Make sure it's okay.
29684
29685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29686
29687  # First separate the path from the arguments. This will split at the first
29688  # space.
29689  complete="$CXX"
29690  path="${complete%% *}"
29691  tmp="$complete EOL"
29692  arguments="${tmp#* }"
29693
29694  # Input might be given as Windows format, start by converting to
29695  # unix format.
29696  new_path=`$CYGPATH -u "$path"`
29697
29698  # Now try to locate executable using which
29699  new_path=`$WHICH "$new_path" 2> /dev/null`
29700  # bat and cmd files are not always considered executable in cygwin causing which
29701  # to not find them
29702  if test "x$new_path" = x \
29703      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29704      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29705    new_path=`$CYGPATH -u "$path"`
29706  fi
29707  if test "x$new_path" = x; then
29708    # Oops. Which didn't find the executable.
29709    # The splitting of arguments from the executable at a space might have been incorrect,
29710    # since paths with space are more likely in Windows. Give it another try with the whole
29711    # argument.
29712    path="$complete"
29713    arguments="EOL"
29714    new_path=`$CYGPATH -u "$path"`
29715    new_path=`$WHICH "$new_path" 2> /dev/null`
29716    # bat and cmd files are not always considered executable in cygwin causing which
29717    # to not find them
29718    if test "x$new_path" = x \
29719        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29720        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29721      new_path=`$CYGPATH -u "$path"`
29722    fi
29723    if test "x$new_path" = x; then
29724      # It's still not found. Now this is an unrecoverable error.
29725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29726$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29727      has_space=`$ECHO "$complete" | $GREP " "`
29728      if test "x$has_space" != x; then
29729        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29731      fi
29732      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29733    fi
29734  fi
29735
29736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29739  # "foo.exe" is OK but "foo" is an error.
29740  #
29741  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29742  # It is also a way to make sure we got the proper file name for the real test later on.
29743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29744  if test "x$test_shortpath" = x; then
29745    # Short path failed, file does not exist as specified.
29746    # Try adding .exe or .cmd
29747    if test -f "${new_path}.exe"; then
29748      input_to_shortpath="${new_path}.exe"
29749    elif test -f "${new_path}.cmd"; then
29750      input_to_shortpath="${new_path}.cmd"
29751    else
29752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29753$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29754      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29755$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29756      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29757    fi
29758  else
29759    input_to_shortpath="$new_path"
29760  fi
29761
29762  # Call helper function which possibly converts this using DOS-style short mode.
29763  # If so, the updated path is stored in $new_path.
29764  new_path="$input_to_shortpath"
29765
29766  input_path="$input_to_shortpath"
29767  # Check if we need to convert this using DOS-style short mode. If the path
29768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29769  # take no chances and rewrite it.
29770  # Note: m4 eats our [], so we need to use [ and ] instead.
29771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29772  if test "x$has_forbidden_chars" != x; then
29773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29777      # Going to short mode and back again did indeed matter. Since short mode is
29778      # case insensitive, let's make it lowercase to improve readability.
29779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29780      # Now convert it back to Unix-stile (cygpath)
29781      input_path=`$CYGPATH -u "$shortmode_path"`
29782      new_path="$input_path"
29783    fi
29784  fi
29785
29786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29787  if test "x$test_cygdrive_prefix" = x; then
29788    # As a simple fix, exclude /usr/bin since it's not a real path.
29789    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29791      # a path prefixed by /cygdrive for fixpath to work.
29792      new_path="$CYGWIN_ROOT_PATH$input_path"
29793    fi
29794  fi
29795
29796  # remove trailing .exe if any
29797  new_path="${new_path/%.exe/}"
29798
29799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29800
29801  # First separate the path from the arguments. This will split at the first
29802  # space.
29803  complete="$CXX"
29804  path="${complete%% *}"
29805  tmp="$complete EOL"
29806  arguments="${tmp#* }"
29807
29808  # Input might be given as Windows format, start by converting to
29809  # unix format.
29810  new_path="$path"
29811
29812  windows_path="$new_path"
29813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29814    unix_path=`$CYGPATH -u "$windows_path"`
29815    new_path="$unix_path"
29816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29818    new_path="$unix_path"
29819  fi
29820
29821
29822  # Now try to locate executable using which
29823  new_path=`$WHICH "$new_path" 2> /dev/null`
29824
29825  if test "x$new_path" = x; then
29826    # Oops. Which didn't find the executable.
29827    # The splitting of arguments from the executable at a space might have been incorrect,
29828    # since paths with space are more likely in Windows. Give it another try with the whole
29829    # argument.
29830    path="$complete"
29831    arguments="EOL"
29832    new_path="$path"
29833
29834  windows_path="$new_path"
29835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29836    unix_path=`$CYGPATH -u "$windows_path"`
29837    new_path="$unix_path"
29838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29840    new_path="$unix_path"
29841  fi
29842
29843
29844    new_path=`$WHICH "$new_path" 2> /dev/null`
29845
29846    if test "x$new_path" = x; then
29847      # It's still not found. Now this is an unrecoverable error.
29848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29849$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29850      has_space=`$ECHO "$complete" | $GREP " "`
29851      if test "x$has_space" != x; then
29852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29854      fi
29855      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29856    fi
29857  fi
29858
29859  # Now new_path has a complete unix path to the binary
29860  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29861    # Keep paths in /bin as-is, but remove trailing .exe if any
29862    new_path="${new_path/%.exe/}"
29863    # Do not save /bin paths to all_fixpath_prefixes!
29864  else
29865    # Not in mixed or Windows style, start by that.
29866    new_path=`cmd //c echo $new_path`
29867
29868  input_path="$new_path"
29869  # Check if we need to convert this using DOS-style short mode. If the path
29870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29871  # take no chances and rewrite it.
29872  # Note: m4 eats our [], so we need to use [ and ] instead.
29873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29874  if test "x$has_forbidden_chars" != x; then
29875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29877  fi
29878
29879    # Output is in $new_path
29880
29881  windows_path="$new_path"
29882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29883    unix_path=`$CYGPATH -u "$windows_path"`
29884    new_path="$unix_path"
29885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29887    new_path="$unix_path"
29888  fi
29889
29890    # remove trailing .exe if any
29891    new_path="${new_path/%.exe/}"
29892
29893    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29894    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29895  fi
29896
29897  else
29898    # We're on a posix platform. Hooray! :)
29899    # First separate the path from the arguments. This will split at the first
29900    # space.
29901    complete="$CXX"
29902    path="${complete%% *}"
29903    tmp="$complete EOL"
29904    arguments="${tmp#* }"
29905
29906    # Cannot rely on the command "which" here since it doesn't always work.
29907    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29908    if test -z "$is_absolute_path"; then
29909      # Path to executable is not absolute. Find it.
29910      IFS_save="$IFS"
29911      IFS=:
29912      for p in $PATH; do
29913        if test -f "$p/$path" && test -x "$p/$path"; then
29914          new_path="$p/$path"
29915          break
29916        fi
29917      done
29918      IFS="$IFS_save"
29919    else
29920      # This is an absolute path, we can use it without further modifications.
29921      new_path="$path"
29922    fi
29923
29924    if test "x$new_path" = x; then
29925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29926$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29927      has_space=`$ECHO "$complete" | $GREP " "`
29928      if test "x$has_space" != x; then
29929        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29930$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29931      fi
29932      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29933    fi
29934  fi
29935
29936  # Now join together the path and the arguments once again
29937  if test "x$arguments" != xEOL; then
29938    new_complete="$new_path ${arguments% *}"
29939  else
29940    new_complete="$new_path"
29941  fi
29942
29943  if test "x$complete" != "x$new_complete"; then
29944    CXX="$new_complete"
29945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29946$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29947  fi
29948
29949  TEST_COMPILER="$CXX"
29950  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29951  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29952  if test "x$OPENJDK_BUILD_OS" != xaix; then
29953    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29955$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29956
29957  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29958    # Follow a chain of symbolic links. Use readlink
29959    # where it exists, else fall back to horribly
29960    # complicated shell code.
29961    if test "x$READLINK_TESTED" != yes; then
29962      # On MacOSX there is a readlink tool with a different
29963      # purpose than the GNU readlink tool. Check the found readlink.
29964      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29965      if test "x$ISGNU" = x; then
29966        # A readlink that we do not know how to use.
29967        # Are there other non-GNU readlinks out there?
29968        READLINK_TESTED=yes
29969        READLINK=
29970      fi
29971    fi
29972
29973    if test "x$READLINK" != x; then
29974      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29975    else
29976      # Save the current directory for restoring afterwards
29977      STARTDIR=$PWD
29978      COUNTER=0
29979      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29980      sym_link_file=`$BASENAME $TEST_COMPILER`
29981      cd $sym_link_dir
29982      # Use -P flag to resolve symlinks in directories.
29983      cd `$THEPWDCMD -P`
29984      sym_link_dir=`$THEPWDCMD -P`
29985      # Resolve file symlinks
29986      while test $COUNTER -lt 20; do
29987        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29988        if test "x$ISLINK" == x; then
29989          # This is not a symbolic link! We are done!
29990          break
29991        fi
29992        # Again resolve directory symlinks since the target of the just found
29993        # link could be in a different directory
29994        cd `$DIRNAME $ISLINK`
29995        sym_link_dir=`$THEPWDCMD -P`
29996        sym_link_file=`$BASENAME $ISLINK`
29997        let COUNTER=COUNTER+1
29998      done
29999      cd $STARTDIR
30000      TEST_COMPILER=$sym_link_dir/$sym_link_file
30001    fi
30002  fi
30003
30004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30005$as_echo "$TEST_COMPILER" >&6; }
30006  fi
30007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30008$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30009
30010  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30011  if test "x$COMPILER_BASENAME" = "xccache"; then
30012    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30013$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30014    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30015    # We want to control ccache invocation ourselves, so ignore this cc and try
30016    # searching again.
30017
30018    # Remove the path to the fake ccache cc from the PATH
30019    RETRY_COMPILER_SAVED_PATH="$PATH"
30020    COMPILER_DIRNAME=`$DIRNAME $CXX`
30021    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30022
30023    # Try again looking for our compiler
30024    if test -n "$ac_tool_prefix"; then
30025  for ac_prog in $TOOLCHAIN_CXX_BINARY
30026  do
30027    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30028set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30030$as_echo_n "checking for $ac_word... " >&6; }
30031if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30032  $as_echo_n "(cached) " >&6
30033else
30034  if test -n "$PROPER_COMPILER_CXX"; then
30035  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30036else
30037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30038for as_dir in $PATH
30039do
30040  IFS=$as_save_IFS
30041  test -z "$as_dir" && as_dir=.
30042    for ac_exec_ext in '' $ac_executable_extensions; do
30043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30044    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30046    break 2
30047  fi
30048done
30049  done
30050IFS=$as_save_IFS
30051
30052fi
30053fi
30054PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30055if test -n "$PROPER_COMPILER_CXX"; then
30056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30057$as_echo "$PROPER_COMPILER_CXX" >&6; }
30058else
30059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30060$as_echo "no" >&6; }
30061fi
30062
30063
30064    test -n "$PROPER_COMPILER_CXX" && break
30065  done
30066fi
30067if test -z "$PROPER_COMPILER_CXX"; then
30068  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30069  for ac_prog in $TOOLCHAIN_CXX_BINARY
30070do
30071  # Extract the first word of "$ac_prog", so it can be a program name with args.
30072set dummy $ac_prog; ac_word=$2
30073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30074$as_echo_n "checking for $ac_word... " >&6; }
30075if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30076  $as_echo_n "(cached) " >&6
30077else
30078  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30079  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30080else
30081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30082for as_dir in $PATH
30083do
30084  IFS=$as_save_IFS
30085  test -z "$as_dir" && as_dir=.
30086    for ac_exec_ext in '' $ac_executable_extensions; do
30087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30088    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30090    break 2
30091  fi
30092done
30093  done
30094IFS=$as_save_IFS
30095
30096fi
30097fi
30098ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30099if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30101$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30102else
30103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30104$as_echo "no" >&6; }
30105fi
30106
30107
30108  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30109done
30110
30111  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30112    PROPER_COMPILER_CXX=""
30113  else
30114    case $cross_compiling:$ac_tool_warned in
30115yes:)
30116{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30117$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30118ac_tool_warned=yes ;;
30119esac
30120    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30121  fi
30122fi
30123
30124
30125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30126
30127  # First separate the path from the arguments. This will split at the first
30128  # space.
30129  complete="$PROPER_COMPILER_CXX"
30130  path="${complete%% *}"
30131  tmp="$complete EOL"
30132  arguments="${tmp#* }"
30133
30134  # Input might be given as Windows format, start by converting to
30135  # unix format.
30136  new_path=`$CYGPATH -u "$path"`
30137
30138  # Now try to locate executable using which
30139  new_path=`$WHICH "$new_path" 2> /dev/null`
30140  # bat and cmd files are not always considered executable in cygwin causing which
30141  # to not find them
30142  if test "x$new_path" = x \
30143      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30144      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30145    new_path=`$CYGPATH -u "$path"`
30146  fi
30147  if test "x$new_path" = x; then
30148    # Oops. Which didn't find the executable.
30149    # The splitting of arguments from the executable at a space might have been incorrect,
30150    # since paths with space are more likely in Windows. Give it another try with the whole
30151    # argument.
30152    path="$complete"
30153    arguments="EOL"
30154    new_path=`$CYGPATH -u "$path"`
30155    new_path=`$WHICH "$new_path" 2> /dev/null`
30156    # bat and cmd files are not always considered executable in cygwin causing which
30157    # to not find them
30158    if test "x$new_path" = x \
30159        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30160        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30161      new_path=`$CYGPATH -u "$path"`
30162    fi
30163    if test "x$new_path" = x; then
30164      # It's still not found. Now this is an unrecoverable error.
30165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30166$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30167      has_space=`$ECHO "$complete" | $GREP " "`
30168      if test "x$has_space" != x; then
30169        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30170$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30171      fi
30172      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30173    fi
30174  fi
30175
30176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30179  # "foo.exe" is OK but "foo" is an error.
30180  #
30181  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30182  # It is also a way to make sure we got the proper file name for the real test later on.
30183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30184  if test "x$test_shortpath" = x; then
30185    # Short path failed, file does not exist as specified.
30186    # Try adding .exe or .cmd
30187    if test -f "${new_path}.exe"; then
30188      input_to_shortpath="${new_path}.exe"
30189    elif test -f "${new_path}.cmd"; then
30190      input_to_shortpath="${new_path}.cmd"
30191    else
30192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30193$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30194      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30195$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30196      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30197    fi
30198  else
30199    input_to_shortpath="$new_path"
30200  fi
30201
30202  # Call helper function which possibly converts this using DOS-style short mode.
30203  # If so, the updated path is stored in $new_path.
30204  new_path="$input_to_shortpath"
30205
30206  input_path="$input_to_shortpath"
30207  # Check if we need to convert this using DOS-style short mode. If the path
30208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30209  # take no chances and rewrite it.
30210  # Note: m4 eats our [], so we need to use [ and ] instead.
30211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30212  if test "x$has_forbidden_chars" != x; then
30213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30217      # Going to short mode and back again did indeed matter. Since short mode is
30218      # case insensitive, let's make it lowercase to improve readability.
30219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30220      # Now convert it back to Unix-stile (cygpath)
30221      input_path=`$CYGPATH -u "$shortmode_path"`
30222      new_path="$input_path"
30223    fi
30224  fi
30225
30226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30227  if test "x$test_cygdrive_prefix" = x; then
30228    # As a simple fix, exclude /usr/bin since it's not a real path.
30229    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30231      # a path prefixed by /cygdrive for fixpath to work.
30232      new_path="$CYGWIN_ROOT_PATH$input_path"
30233    fi
30234  fi
30235
30236  # remove trailing .exe if any
30237  new_path="${new_path/%.exe/}"
30238
30239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30240
30241  # First separate the path from the arguments. This will split at the first
30242  # space.
30243  complete="$PROPER_COMPILER_CXX"
30244  path="${complete%% *}"
30245  tmp="$complete EOL"
30246  arguments="${tmp#* }"
30247
30248  # Input might be given as Windows format, start by converting to
30249  # unix format.
30250  new_path="$path"
30251
30252  windows_path="$new_path"
30253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30254    unix_path=`$CYGPATH -u "$windows_path"`
30255    new_path="$unix_path"
30256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30258    new_path="$unix_path"
30259  fi
30260
30261
30262  # Now try to locate executable using which
30263  new_path=`$WHICH "$new_path" 2> /dev/null`
30264
30265  if test "x$new_path" = x; then
30266    # Oops. Which didn't find the executable.
30267    # The splitting of arguments from the executable at a space might have been incorrect,
30268    # since paths with space are more likely in Windows. Give it another try with the whole
30269    # argument.
30270    path="$complete"
30271    arguments="EOL"
30272    new_path="$path"
30273
30274  windows_path="$new_path"
30275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30276    unix_path=`$CYGPATH -u "$windows_path"`
30277    new_path="$unix_path"
30278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30280    new_path="$unix_path"
30281  fi
30282
30283
30284    new_path=`$WHICH "$new_path" 2> /dev/null`
30285
30286    if test "x$new_path" = x; then
30287      # It's still not found. Now this is an unrecoverable error.
30288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30289$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30290      has_space=`$ECHO "$complete" | $GREP " "`
30291      if test "x$has_space" != x; then
30292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30294      fi
30295      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30296    fi
30297  fi
30298
30299  # Now new_path has a complete unix path to the binary
30300  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30301    # Keep paths in /bin as-is, but remove trailing .exe if any
30302    new_path="${new_path/%.exe/}"
30303    # Do not save /bin paths to all_fixpath_prefixes!
30304  else
30305    # Not in mixed or Windows style, start by that.
30306    new_path=`cmd //c echo $new_path`
30307
30308  input_path="$new_path"
30309  # Check if we need to convert this using DOS-style short mode. If the path
30310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30311  # take no chances and rewrite it.
30312  # Note: m4 eats our [], so we need to use [ and ] instead.
30313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30314  if test "x$has_forbidden_chars" != x; then
30315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30317  fi
30318
30319    # Output is in $new_path
30320
30321  windows_path="$new_path"
30322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30323    unix_path=`$CYGPATH -u "$windows_path"`
30324    new_path="$unix_path"
30325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30327    new_path="$unix_path"
30328  fi
30329
30330    # remove trailing .exe if any
30331    new_path="${new_path/%.exe/}"
30332
30333    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30334    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30335  fi
30336
30337  else
30338    # We're on a posix platform. Hooray! :)
30339    # First separate the path from the arguments. This will split at the first
30340    # space.
30341    complete="$PROPER_COMPILER_CXX"
30342    path="${complete%% *}"
30343    tmp="$complete EOL"
30344    arguments="${tmp#* }"
30345
30346    # Cannot rely on the command "which" here since it doesn't always work.
30347    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30348    if test -z "$is_absolute_path"; then
30349      # Path to executable is not absolute. Find it.
30350      IFS_save="$IFS"
30351      IFS=:
30352      for p in $PATH; do
30353        if test -f "$p/$path" && test -x "$p/$path"; then
30354          new_path="$p/$path"
30355          break
30356        fi
30357      done
30358      IFS="$IFS_save"
30359    else
30360      # This is an absolute path, we can use it without further modifications.
30361      new_path="$path"
30362    fi
30363
30364    if test "x$new_path" = x; then
30365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30366$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30367      has_space=`$ECHO "$complete" | $GREP " "`
30368      if test "x$has_space" != x; then
30369        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30370$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30371      fi
30372      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30373    fi
30374  fi
30375
30376  # Now join together the path and the arguments once again
30377  if test "x$arguments" != xEOL; then
30378    new_complete="$new_path ${arguments% *}"
30379  else
30380    new_complete="$new_path"
30381  fi
30382
30383  if test "x$complete" != "x$new_complete"; then
30384    PROPER_COMPILER_CXX="$new_complete"
30385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30386$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30387  fi
30388
30389    PATH="$RETRY_COMPILER_SAVED_PATH"
30390
30391    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30392$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30393
30394  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30395    # Follow a chain of symbolic links. Use readlink
30396    # where it exists, else fall back to horribly
30397    # complicated shell code.
30398    if test "x$READLINK_TESTED" != yes; then
30399      # On MacOSX there is a readlink tool with a different
30400      # purpose than the GNU readlink tool. Check the found readlink.
30401      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30402      if test "x$ISGNU" = x; then
30403        # A readlink that we do not know how to use.
30404        # Are there other non-GNU readlinks out there?
30405        READLINK_TESTED=yes
30406        READLINK=
30407      fi
30408    fi
30409
30410    if test "x$READLINK" != x; then
30411      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30412    else
30413      # Save the current directory for restoring afterwards
30414      STARTDIR=$PWD
30415      COUNTER=0
30416      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30417      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30418      cd $sym_link_dir
30419      # Use -P flag to resolve symlinks in directories.
30420      cd `$THEPWDCMD -P`
30421      sym_link_dir=`$THEPWDCMD -P`
30422      # Resolve file symlinks
30423      while test $COUNTER -lt 20; do
30424        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30425        if test "x$ISLINK" == x; then
30426          # This is not a symbolic link! We are done!
30427          break
30428        fi
30429        # Again resolve directory symlinks since the target of the just found
30430        # link could be in a different directory
30431        cd `$DIRNAME $ISLINK`
30432        sym_link_dir=`$THEPWDCMD -P`
30433        sym_link_file=`$BASENAME $ISLINK`
30434        let COUNTER=COUNTER+1
30435      done
30436      cd $STARTDIR
30437      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30438    fi
30439  fi
30440
30441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30442$as_echo "$PROPER_COMPILER_CXX" >&6; }
30443    CXX="$PROPER_COMPILER_CXX"
30444  else
30445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30446$as_echo "no, keeping CXX" >&6; }
30447  fi
30448
30449
30450  COMPILER=$CXX
30451  COMPILER_NAME=$COMPILER_NAME
30452
30453  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30454    # cc -V output typically looks like
30455    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30456    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30457    # Check that this is likely to be the Solaris Studio cc.
30458    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30459    if test $? -ne 0; then
30460      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30461      { $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
30462$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30463      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30464$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30465      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30466$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30467      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30468    fi
30469    # Remove usage instructions (if present), and
30470    # collapse compiler output into a single line
30471    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30472        $SED -e 's/ *[Uu]sage:.*//'`
30473    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30474        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30475  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30476    # xlc -qversion output typically looks like
30477    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30478    #     Version: 11.01.0000.0015
30479    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30480    # Check that this is likely to be the IBM XL C compiler.
30481    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30482    if test $? -ne 0; then
30483      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30484      { $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
30485$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30486      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30487$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30488      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30489$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30490      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30491    fi
30492    # Collapse compiler output into a single line
30493    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30494    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30495        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30496  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30497    # There is no specific version flag, but all output starts with a version string.
30498    # First line typically looks something like:
30499    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30500    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30501    # Check that this is likely to be Microsoft CL.EXE.
30502    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30503    if test $? -ne 0; then
30504      { $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
30505$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30506      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30507$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30508      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30509    fi
30510    # Collapse compiler output into a single line
30511    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30512    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30513        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30514  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30515    # gcc --version output typically looks like
30516    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30517    #     Copyright (C) 2013 Free Software Foundation, Inc.
30518    #     This is free software; see the source for copying conditions.  There is NO
30519    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30520    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30521    # Check that this is likely to be GCC.
30522    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30523    if test $? -ne 0; then
30524      { $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
30525$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30526      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30527$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30528      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30529    fi
30530    # Remove Copyright and legalese from version string, and
30531    # collapse into a single line
30532    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30533        $SED -e 's/ *Copyright .*//'`
30534    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30535        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30536  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30537    # clang --version output typically looks like
30538    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30539    #    clang version 3.3 (tags/RELEASE_33/final)
30540    # or
30541    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30542    #    Target: x86_64-pc-linux-gnu
30543    #    Thread model: posix
30544    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30545    # Check that this is likely to be clang
30546    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30547    if test $? -ne 0; then
30548      { $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
30549$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30550      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30551$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30552      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30553    fi
30554    # Collapse compiler output into a single line
30555    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30556    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30557        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30558  else
30559      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30560  fi
30561  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30562  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30563  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30564  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30565
30566  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30567$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30568
30569
30570  # Now that we have resolved CXX ourself, let autoconf have its go at it
30571  ac_ext=cpp
30572ac_cpp='$CXXCPP $CPPFLAGS'
30573ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30574ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30575ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30576if test -z "$CXX"; then
30577  if test -n "$CCC"; then
30578    CXX=$CCC
30579  else
30580    if test -n "$ac_tool_prefix"; then
30581  for ac_prog in $CXX
30582  do
30583    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30584set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30586$as_echo_n "checking for $ac_word... " >&6; }
30587if ${ac_cv_prog_CXX+:} false; then :
30588  $as_echo_n "(cached) " >&6
30589else
30590  if test -n "$CXX"; then
30591  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30592else
30593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30594for as_dir in $PATH
30595do
30596  IFS=$as_save_IFS
30597  test -z "$as_dir" && as_dir=.
30598    for ac_exec_ext in '' $ac_executable_extensions; do
30599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30600    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30602    break 2
30603  fi
30604done
30605  done
30606IFS=$as_save_IFS
30607
30608fi
30609fi
30610CXX=$ac_cv_prog_CXX
30611if test -n "$CXX"; then
30612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30613$as_echo "$CXX" >&6; }
30614else
30615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30616$as_echo "no" >&6; }
30617fi
30618
30619
30620    test -n "$CXX" && break
30621  done
30622fi
30623if test -z "$CXX"; then
30624  ac_ct_CXX=$CXX
30625  for ac_prog in $CXX
30626do
30627  # Extract the first word of "$ac_prog", so it can be a program name with args.
30628set dummy $ac_prog; ac_word=$2
30629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30630$as_echo_n "checking for $ac_word... " >&6; }
30631if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30632  $as_echo_n "(cached) " >&6
30633else
30634  if test -n "$ac_ct_CXX"; then
30635  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30636else
30637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30638for as_dir in $PATH
30639do
30640  IFS=$as_save_IFS
30641  test -z "$as_dir" && as_dir=.
30642    for ac_exec_ext in '' $ac_executable_extensions; do
30643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30644    ac_cv_prog_ac_ct_CXX="$ac_prog"
30645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30646    break 2
30647  fi
30648done
30649  done
30650IFS=$as_save_IFS
30651
30652fi
30653fi
30654ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30655if test -n "$ac_ct_CXX"; then
30656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30657$as_echo "$ac_ct_CXX" >&6; }
30658else
30659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30660$as_echo "no" >&6; }
30661fi
30662
30663
30664  test -n "$ac_ct_CXX" && break
30665done
30666
30667  if test "x$ac_ct_CXX" = x; then
30668    CXX="g++"
30669  else
30670    case $cross_compiling:$ac_tool_warned in
30671yes:)
30672{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30673$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30674ac_tool_warned=yes ;;
30675esac
30676    CXX=$ac_ct_CXX
30677  fi
30678fi
30679
30680  fi
30681fi
30682# Provide some information about the compiler.
30683$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30684set X $ac_compile
30685ac_compiler=$2
30686for ac_option in --version -v -V -qversion; do
30687  { { ac_try="$ac_compiler $ac_option >&5"
30688case "(($ac_try" in
30689  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30690  *) ac_try_echo=$ac_try;;
30691esac
30692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30693$as_echo "$ac_try_echo"; } >&5
30694  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30695  ac_status=$?
30696  if test -s conftest.err; then
30697    sed '10a\
30698... rest of stderr output deleted ...
30699         10q' conftest.err >conftest.er1
30700    cat conftest.er1 >&5
30701  fi
30702  rm -f conftest.er1 conftest.err
30703  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30704  test $ac_status = 0; }
30705done
30706
30707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30708$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30709if ${ac_cv_cxx_compiler_gnu+:} false; then :
30710  $as_echo_n "(cached) " >&6
30711else
30712  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30713/* end confdefs.h.  */
30714
30715int
30716main ()
30717{
30718#ifndef __GNUC__
30719       choke me
30720#endif
30721
30722  ;
30723  return 0;
30724}
30725_ACEOF
30726if ac_fn_cxx_try_compile "$LINENO"; then :
30727  ac_compiler_gnu=yes
30728else
30729  ac_compiler_gnu=no
30730fi
30731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30732ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30733
30734fi
30735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30736$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30737if test $ac_compiler_gnu = yes; then
30738  GXX=yes
30739else
30740  GXX=
30741fi
30742ac_test_CXXFLAGS=${CXXFLAGS+set}
30743ac_save_CXXFLAGS=$CXXFLAGS
30744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30745$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30746if ${ac_cv_prog_cxx_g+:} false; then :
30747  $as_echo_n "(cached) " >&6
30748else
30749  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30750   ac_cxx_werror_flag=yes
30751   ac_cv_prog_cxx_g=no
30752   CXXFLAGS="-g"
30753   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30754/* end confdefs.h.  */
30755
30756int
30757main ()
30758{
30759
30760  ;
30761  return 0;
30762}
30763_ACEOF
30764if ac_fn_cxx_try_compile "$LINENO"; then :
30765  ac_cv_prog_cxx_g=yes
30766else
30767  CXXFLAGS=""
30768      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30769/* end confdefs.h.  */
30770
30771int
30772main ()
30773{
30774
30775  ;
30776  return 0;
30777}
30778_ACEOF
30779if ac_fn_cxx_try_compile "$LINENO"; then :
30780
30781else
30782  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30783	 CXXFLAGS="-g"
30784	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30785/* end confdefs.h.  */
30786
30787int
30788main ()
30789{
30790
30791  ;
30792  return 0;
30793}
30794_ACEOF
30795if ac_fn_cxx_try_compile "$LINENO"; then :
30796  ac_cv_prog_cxx_g=yes
30797fi
30798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30799fi
30800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30801fi
30802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30803   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30804fi
30805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30806$as_echo "$ac_cv_prog_cxx_g" >&6; }
30807if test "$ac_test_CXXFLAGS" = set; then
30808  CXXFLAGS=$ac_save_CXXFLAGS
30809elif test $ac_cv_prog_cxx_g = yes; then
30810  if test "$GXX" = yes; then
30811    CXXFLAGS="-g -O2"
30812  else
30813    CXXFLAGS="-g"
30814  fi
30815else
30816  if test "$GXX" = yes; then
30817    CXXFLAGS="-O2"
30818  else
30819    CXXFLAGS=
30820  fi
30821fi
30822ac_ext=cpp
30823ac_cpp='$CXXCPP $CPPFLAGS'
30824ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30825ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30826ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30827
30828
30829  #
30830  # Setup the preprocessor (CPP and CXXCPP)
30831  #
30832  ac_ext=c
30833ac_cpp='$CPP $CPPFLAGS'
30834ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30835ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30836ac_compiler_gnu=$ac_cv_c_compiler_gnu
30837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30838$as_echo_n "checking how to run the C preprocessor... " >&6; }
30839# On Suns, sometimes $CPP names a directory.
30840if test -n "$CPP" && test -d "$CPP"; then
30841  CPP=
30842fi
30843if test -z "$CPP"; then
30844  if ${ac_cv_prog_CPP+:} false; then :
30845  $as_echo_n "(cached) " >&6
30846else
30847      # Double quotes because CPP needs to be expanded
30848    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30849    do
30850      ac_preproc_ok=false
30851for ac_c_preproc_warn_flag in '' yes
30852do
30853  # Use a header file that comes with gcc, so configuring glibc
30854  # with a fresh cross-compiler works.
30855  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30856  # <limits.h> exists even on freestanding compilers.
30857  # On the NeXT, cc -E runs the code through the compiler's parser,
30858  # not just through cpp. "Syntax error" is here to catch this case.
30859  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30860/* end confdefs.h.  */
30861#ifdef __STDC__
30862# include <limits.h>
30863#else
30864# include <assert.h>
30865#endif
30866		     Syntax error
30867_ACEOF
30868if ac_fn_c_try_cpp "$LINENO"; then :
30869
30870else
30871  # Broken: fails on valid input.
30872continue
30873fi
30874rm -f conftest.err conftest.i conftest.$ac_ext
30875
30876  # OK, works on sane cases.  Now check whether nonexistent headers
30877  # can be detected and how.
30878  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30879/* end confdefs.h.  */
30880#include <ac_nonexistent.h>
30881_ACEOF
30882if ac_fn_c_try_cpp "$LINENO"; then :
30883  # Broken: success on invalid input.
30884continue
30885else
30886  # Passes both tests.
30887ac_preproc_ok=:
30888break
30889fi
30890rm -f conftest.err conftest.i conftest.$ac_ext
30891
30892done
30893# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30894rm -f conftest.i conftest.err conftest.$ac_ext
30895if $ac_preproc_ok; then :
30896  break
30897fi
30898
30899    done
30900    ac_cv_prog_CPP=$CPP
30901
30902fi
30903  CPP=$ac_cv_prog_CPP
30904else
30905  ac_cv_prog_CPP=$CPP
30906fi
30907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30908$as_echo "$CPP" >&6; }
30909ac_preproc_ok=false
30910for ac_c_preproc_warn_flag in '' yes
30911do
30912  # Use a header file that comes with gcc, so configuring glibc
30913  # with a fresh cross-compiler works.
30914  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30915  # <limits.h> exists even on freestanding compilers.
30916  # On the NeXT, cc -E runs the code through the compiler's parser,
30917  # not just through cpp. "Syntax error" is here to catch this case.
30918  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30919/* end confdefs.h.  */
30920#ifdef __STDC__
30921# include <limits.h>
30922#else
30923# include <assert.h>
30924#endif
30925		     Syntax error
30926_ACEOF
30927if ac_fn_c_try_cpp "$LINENO"; then :
30928
30929else
30930  # Broken: fails on valid input.
30931continue
30932fi
30933rm -f conftest.err conftest.i conftest.$ac_ext
30934
30935  # OK, works on sane cases.  Now check whether nonexistent headers
30936  # can be detected and how.
30937  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30938/* end confdefs.h.  */
30939#include <ac_nonexistent.h>
30940_ACEOF
30941if ac_fn_c_try_cpp "$LINENO"; then :
30942  # Broken: success on invalid input.
30943continue
30944else
30945  # Passes both tests.
30946ac_preproc_ok=:
30947break
30948fi
30949rm -f conftest.err conftest.i conftest.$ac_ext
30950
30951done
30952# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30953rm -f conftest.i conftest.err conftest.$ac_ext
30954if $ac_preproc_ok; then :
30955
30956else
30957  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30958$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30959as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30960See \`config.log' for more details" "$LINENO" 5; }
30961fi
30962
30963ac_ext=cpp
30964ac_cpp='$CXXCPP $CPPFLAGS'
30965ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30966ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30967ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30968
30969
30970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30971
30972  # First separate the path from the arguments. This will split at the first
30973  # space.
30974  complete="$CPP"
30975  path="${complete%% *}"
30976  tmp="$complete EOL"
30977  arguments="${tmp#* }"
30978
30979  # Input might be given as Windows format, start by converting to
30980  # unix format.
30981  new_path=`$CYGPATH -u "$path"`
30982
30983  # Now try to locate executable using which
30984  new_path=`$WHICH "$new_path" 2> /dev/null`
30985  # bat and cmd files are not always considered executable in cygwin causing which
30986  # to not find them
30987  if test "x$new_path" = x \
30988      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30989      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30990    new_path=`$CYGPATH -u "$path"`
30991  fi
30992  if test "x$new_path" = x; then
30993    # Oops. Which didn't find the executable.
30994    # The splitting of arguments from the executable at a space might have been incorrect,
30995    # since paths with space are more likely in Windows. Give it another try with the whole
30996    # argument.
30997    path="$complete"
30998    arguments="EOL"
30999    new_path=`$CYGPATH -u "$path"`
31000    new_path=`$WHICH "$new_path" 2> /dev/null`
31001    # bat and cmd files are not always considered executable in cygwin causing which
31002    # to not find them
31003    if test "x$new_path" = x \
31004        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31005        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31006      new_path=`$CYGPATH -u "$path"`
31007    fi
31008    if test "x$new_path" = x; then
31009      # It's still not found. Now this is an unrecoverable error.
31010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31011$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31012      has_space=`$ECHO "$complete" | $GREP " "`
31013      if test "x$has_space" != x; then
31014        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31015$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31016      fi
31017      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31018    fi
31019  fi
31020
31021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31024  # "foo.exe" is OK but "foo" is an error.
31025  #
31026  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31027  # It is also a way to make sure we got the proper file name for the real test later on.
31028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31029  if test "x$test_shortpath" = x; then
31030    # Short path failed, file does not exist as specified.
31031    # Try adding .exe or .cmd
31032    if test -f "${new_path}.exe"; then
31033      input_to_shortpath="${new_path}.exe"
31034    elif test -f "${new_path}.cmd"; then
31035      input_to_shortpath="${new_path}.cmd"
31036    else
31037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31038$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31039      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31040$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31041      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31042    fi
31043  else
31044    input_to_shortpath="$new_path"
31045  fi
31046
31047  # Call helper function which possibly converts this using DOS-style short mode.
31048  # If so, the updated path is stored in $new_path.
31049  new_path="$input_to_shortpath"
31050
31051  input_path="$input_to_shortpath"
31052  # Check if we need to convert this using DOS-style short mode. If the path
31053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31054  # take no chances and rewrite it.
31055  # Note: m4 eats our [], so we need to use [ and ] instead.
31056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31057  if test "x$has_forbidden_chars" != x; then
31058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31062      # Going to short mode and back again did indeed matter. Since short mode is
31063      # case insensitive, let's make it lowercase to improve readability.
31064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31065      # Now convert it back to Unix-stile (cygpath)
31066      input_path=`$CYGPATH -u "$shortmode_path"`
31067      new_path="$input_path"
31068    fi
31069  fi
31070
31071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31072  if test "x$test_cygdrive_prefix" = x; then
31073    # As a simple fix, exclude /usr/bin since it's not a real path.
31074    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31076      # a path prefixed by /cygdrive for fixpath to work.
31077      new_path="$CYGWIN_ROOT_PATH$input_path"
31078    fi
31079  fi
31080
31081  # remove trailing .exe if any
31082  new_path="${new_path/%.exe/}"
31083
31084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31085
31086  # First separate the path from the arguments. This will split at the first
31087  # space.
31088  complete="$CPP"
31089  path="${complete%% *}"
31090  tmp="$complete EOL"
31091  arguments="${tmp#* }"
31092
31093  # Input might be given as Windows format, start by converting to
31094  # unix format.
31095  new_path="$path"
31096
31097  windows_path="$new_path"
31098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31099    unix_path=`$CYGPATH -u "$windows_path"`
31100    new_path="$unix_path"
31101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31103    new_path="$unix_path"
31104  fi
31105
31106
31107  # Now try to locate executable using which
31108  new_path=`$WHICH "$new_path" 2> /dev/null`
31109
31110  if test "x$new_path" = x; then
31111    # Oops. Which didn't find the executable.
31112    # The splitting of arguments from the executable at a space might have been incorrect,
31113    # since paths with space are more likely in Windows. Give it another try with the whole
31114    # argument.
31115    path="$complete"
31116    arguments="EOL"
31117    new_path="$path"
31118
31119  windows_path="$new_path"
31120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31121    unix_path=`$CYGPATH -u "$windows_path"`
31122    new_path="$unix_path"
31123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31125    new_path="$unix_path"
31126  fi
31127
31128
31129    new_path=`$WHICH "$new_path" 2> /dev/null`
31130
31131    if test "x$new_path" = x; then
31132      # It's still not found. Now this is an unrecoverable error.
31133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31134$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31135      has_space=`$ECHO "$complete" | $GREP " "`
31136      if test "x$has_space" != x; then
31137        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31138$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31139      fi
31140      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31141    fi
31142  fi
31143
31144  # Now new_path has a complete unix path to the binary
31145  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31146    # Keep paths in /bin as-is, but remove trailing .exe if any
31147    new_path="${new_path/%.exe/}"
31148    # Do not save /bin paths to all_fixpath_prefixes!
31149  else
31150    # Not in mixed or Windows style, start by that.
31151    new_path=`cmd //c echo $new_path`
31152
31153  input_path="$new_path"
31154  # Check if we need to convert this using DOS-style short mode. If the path
31155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31156  # take no chances and rewrite it.
31157  # Note: m4 eats our [], so we need to use [ and ] instead.
31158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31159  if test "x$has_forbidden_chars" != x; then
31160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31162  fi
31163
31164    # Output is in $new_path
31165
31166  windows_path="$new_path"
31167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31168    unix_path=`$CYGPATH -u "$windows_path"`
31169    new_path="$unix_path"
31170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31172    new_path="$unix_path"
31173  fi
31174
31175    # remove trailing .exe if any
31176    new_path="${new_path/%.exe/}"
31177
31178    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31179    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31180  fi
31181
31182  else
31183    # We're on a posix platform. Hooray! :)
31184    # First separate the path from the arguments. This will split at the first
31185    # space.
31186    complete="$CPP"
31187    path="${complete%% *}"
31188    tmp="$complete EOL"
31189    arguments="${tmp#* }"
31190
31191    # Cannot rely on the command "which" here since it doesn't always work.
31192    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31193    if test -z "$is_absolute_path"; then
31194      # Path to executable is not absolute. Find it.
31195      IFS_save="$IFS"
31196      IFS=:
31197      for p in $PATH; do
31198        if test -f "$p/$path" && test -x "$p/$path"; then
31199          new_path="$p/$path"
31200          break
31201        fi
31202      done
31203      IFS="$IFS_save"
31204    else
31205      # This is an absolute path, we can use it without further modifications.
31206      new_path="$path"
31207    fi
31208
31209    if test "x$new_path" = x; then
31210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31211$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31212      has_space=`$ECHO "$complete" | $GREP " "`
31213      if test "x$has_space" != x; then
31214        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31215$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31216      fi
31217      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31218    fi
31219  fi
31220
31221  # Now join together the path and the arguments once again
31222  if test "x$arguments" != xEOL; then
31223    new_complete="$new_path ${arguments% *}"
31224  else
31225    new_complete="$new_path"
31226  fi
31227
31228  if test "x$complete" != "x$new_complete"; then
31229    CPP="$new_complete"
31230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31231$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31232  fi
31233
31234  ac_ext=cpp
31235ac_cpp='$CXXCPP $CPPFLAGS'
31236ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31237ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31238ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31240$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31241if test -z "$CXXCPP"; then
31242  if ${ac_cv_prog_CXXCPP+:} false; then :
31243  $as_echo_n "(cached) " >&6
31244else
31245      # Double quotes because CXXCPP needs to be expanded
31246    for CXXCPP in "$CXX -E" "/lib/cpp"
31247    do
31248      ac_preproc_ok=false
31249for ac_cxx_preproc_warn_flag in '' yes
31250do
31251  # Use a header file that comes with gcc, so configuring glibc
31252  # with a fresh cross-compiler works.
31253  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31254  # <limits.h> exists even on freestanding compilers.
31255  # On the NeXT, cc -E runs the code through the compiler's parser,
31256  # not just through cpp. "Syntax error" is here to catch this case.
31257  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31258/* end confdefs.h.  */
31259#ifdef __STDC__
31260# include <limits.h>
31261#else
31262# include <assert.h>
31263#endif
31264		     Syntax error
31265_ACEOF
31266if ac_fn_cxx_try_cpp "$LINENO"; then :
31267
31268else
31269  # Broken: fails on valid input.
31270continue
31271fi
31272rm -f conftest.err conftest.i conftest.$ac_ext
31273
31274  # OK, works on sane cases.  Now check whether nonexistent headers
31275  # can be detected and how.
31276  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31277/* end confdefs.h.  */
31278#include <ac_nonexistent.h>
31279_ACEOF
31280if ac_fn_cxx_try_cpp "$LINENO"; then :
31281  # Broken: success on invalid input.
31282continue
31283else
31284  # Passes both tests.
31285ac_preproc_ok=:
31286break
31287fi
31288rm -f conftest.err conftest.i conftest.$ac_ext
31289
31290done
31291# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31292rm -f conftest.i conftest.err conftest.$ac_ext
31293if $ac_preproc_ok; then :
31294  break
31295fi
31296
31297    done
31298    ac_cv_prog_CXXCPP=$CXXCPP
31299
31300fi
31301  CXXCPP=$ac_cv_prog_CXXCPP
31302else
31303  ac_cv_prog_CXXCPP=$CXXCPP
31304fi
31305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31306$as_echo "$CXXCPP" >&6; }
31307ac_preproc_ok=false
31308for ac_cxx_preproc_warn_flag in '' yes
31309do
31310  # Use a header file that comes with gcc, so configuring glibc
31311  # with a fresh cross-compiler works.
31312  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31313  # <limits.h> exists even on freestanding compilers.
31314  # On the NeXT, cc -E runs the code through the compiler's parser,
31315  # not just through cpp. "Syntax error" is here to catch this case.
31316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31317/* end confdefs.h.  */
31318#ifdef __STDC__
31319# include <limits.h>
31320#else
31321# include <assert.h>
31322#endif
31323		     Syntax error
31324_ACEOF
31325if ac_fn_cxx_try_cpp "$LINENO"; then :
31326
31327else
31328  # Broken: fails on valid input.
31329continue
31330fi
31331rm -f conftest.err conftest.i conftest.$ac_ext
31332
31333  # OK, works on sane cases.  Now check whether nonexistent headers
31334  # can be detected and how.
31335  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31336/* end confdefs.h.  */
31337#include <ac_nonexistent.h>
31338_ACEOF
31339if ac_fn_cxx_try_cpp "$LINENO"; then :
31340  # Broken: success on invalid input.
31341continue
31342else
31343  # Passes both tests.
31344ac_preproc_ok=:
31345break
31346fi
31347rm -f conftest.err conftest.i conftest.$ac_ext
31348
31349done
31350# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31351rm -f conftest.i conftest.err conftest.$ac_ext
31352if $ac_preproc_ok; then :
31353
31354else
31355  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31356$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31357as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31358See \`config.log' for more details" "$LINENO" 5; }
31359fi
31360
31361ac_ext=cpp
31362ac_cpp='$CXXCPP $CPPFLAGS'
31363ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31364ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31365ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31366
31367
31368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31369
31370  # First separate the path from the arguments. This will split at the first
31371  # space.
31372  complete="$CXXCPP"
31373  path="${complete%% *}"
31374  tmp="$complete EOL"
31375  arguments="${tmp#* }"
31376
31377  # Input might be given as Windows format, start by converting to
31378  # unix format.
31379  new_path=`$CYGPATH -u "$path"`
31380
31381  # Now try to locate executable using which
31382  new_path=`$WHICH "$new_path" 2> /dev/null`
31383  # bat and cmd files are not always considered executable in cygwin causing which
31384  # to not find them
31385  if test "x$new_path" = x \
31386      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31387      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31388    new_path=`$CYGPATH -u "$path"`
31389  fi
31390  if test "x$new_path" = x; then
31391    # Oops. Which didn't find the executable.
31392    # The splitting of arguments from the executable at a space might have been incorrect,
31393    # since paths with space are more likely in Windows. Give it another try with the whole
31394    # argument.
31395    path="$complete"
31396    arguments="EOL"
31397    new_path=`$CYGPATH -u "$path"`
31398    new_path=`$WHICH "$new_path" 2> /dev/null`
31399    # bat and cmd files are not always considered executable in cygwin causing which
31400    # to not find them
31401    if test "x$new_path" = x \
31402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31404      new_path=`$CYGPATH -u "$path"`
31405    fi
31406    if test "x$new_path" = x; then
31407      # It's still not found. Now this is an unrecoverable error.
31408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31409$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31410      has_space=`$ECHO "$complete" | $GREP " "`
31411      if test "x$has_space" != x; then
31412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31414      fi
31415      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31416    fi
31417  fi
31418
31419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31422  # "foo.exe" is OK but "foo" is an error.
31423  #
31424  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31425  # It is also a way to make sure we got the proper file name for the real test later on.
31426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31427  if test "x$test_shortpath" = x; then
31428    # Short path failed, file does not exist as specified.
31429    # Try adding .exe or .cmd
31430    if test -f "${new_path}.exe"; then
31431      input_to_shortpath="${new_path}.exe"
31432    elif test -f "${new_path}.cmd"; then
31433      input_to_shortpath="${new_path}.cmd"
31434    else
31435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31436$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31437      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31438$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31439      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31440    fi
31441  else
31442    input_to_shortpath="$new_path"
31443  fi
31444
31445  # Call helper function which possibly converts this using DOS-style short mode.
31446  # If so, the updated path is stored in $new_path.
31447  new_path="$input_to_shortpath"
31448
31449  input_path="$input_to_shortpath"
31450  # Check if we need to convert this using DOS-style short mode. If the path
31451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31452  # take no chances and rewrite it.
31453  # Note: m4 eats our [], so we need to use [ and ] instead.
31454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31455  if test "x$has_forbidden_chars" != x; then
31456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31460      # Going to short mode and back again did indeed matter. Since short mode is
31461      # case insensitive, let's make it lowercase to improve readability.
31462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31463      # Now convert it back to Unix-stile (cygpath)
31464      input_path=`$CYGPATH -u "$shortmode_path"`
31465      new_path="$input_path"
31466    fi
31467  fi
31468
31469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31470  if test "x$test_cygdrive_prefix" = x; then
31471    # As a simple fix, exclude /usr/bin since it's not a real path.
31472    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31474      # a path prefixed by /cygdrive for fixpath to work.
31475      new_path="$CYGWIN_ROOT_PATH$input_path"
31476    fi
31477  fi
31478
31479  # remove trailing .exe if any
31480  new_path="${new_path/%.exe/}"
31481
31482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31483
31484  # First separate the path from the arguments. This will split at the first
31485  # space.
31486  complete="$CXXCPP"
31487  path="${complete%% *}"
31488  tmp="$complete EOL"
31489  arguments="${tmp#* }"
31490
31491  # Input might be given as Windows format, start by converting to
31492  # unix format.
31493  new_path="$path"
31494
31495  windows_path="$new_path"
31496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31497    unix_path=`$CYGPATH -u "$windows_path"`
31498    new_path="$unix_path"
31499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31501    new_path="$unix_path"
31502  fi
31503
31504
31505  # Now try to locate executable using which
31506  new_path=`$WHICH "$new_path" 2> /dev/null`
31507
31508  if test "x$new_path" = x; then
31509    # Oops. Which didn't find the executable.
31510    # The splitting of arguments from the executable at a space might have been incorrect,
31511    # since paths with space are more likely in Windows. Give it another try with the whole
31512    # argument.
31513    path="$complete"
31514    arguments="EOL"
31515    new_path="$path"
31516
31517  windows_path="$new_path"
31518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31519    unix_path=`$CYGPATH -u "$windows_path"`
31520    new_path="$unix_path"
31521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31523    new_path="$unix_path"
31524  fi
31525
31526
31527    new_path=`$WHICH "$new_path" 2> /dev/null`
31528
31529    if test "x$new_path" = x; then
31530      # It's still not found. Now this is an unrecoverable error.
31531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31532$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31533      has_space=`$ECHO "$complete" | $GREP " "`
31534      if test "x$has_space" != x; then
31535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31537      fi
31538      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31539    fi
31540  fi
31541
31542  # Now new_path has a complete unix path to the binary
31543  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31544    # Keep paths in /bin as-is, but remove trailing .exe if any
31545    new_path="${new_path/%.exe/}"
31546    # Do not save /bin paths to all_fixpath_prefixes!
31547  else
31548    # Not in mixed or Windows style, start by that.
31549    new_path=`cmd //c echo $new_path`
31550
31551  input_path="$new_path"
31552  # Check if we need to convert this using DOS-style short mode. If the path
31553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31554  # take no chances and rewrite it.
31555  # Note: m4 eats our [], so we need to use [ and ] instead.
31556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31557  if test "x$has_forbidden_chars" != x; then
31558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31560  fi
31561
31562    # Output is in $new_path
31563
31564  windows_path="$new_path"
31565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31566    unix_path=`$CYGPATH -u "$windows_path"`
31567    new_path="$unix_path"
31568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31570    new_path="$unix_path"
31571  fi
31572
31573    # remove trailing .exe if any
31574    new_path="${new_path/%.exe/}"
31575
31576    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31577    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31578  fi
31579
31580  else
31581    # We're on a posix platform. Hooray! :)
31582    # First separate the path from the arguments. This will split at the first
31583    # space.
31584    complete="$CXXCPP"
31585    path="${complete%% *}"
31586    tmp="$complete EOL"
31587    arguments="${tmp#* }"
31588
31589    # Cannot rely on the command "which" here since it doesn't always work.
31590    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31591    if test -z "$is_absolute_path"; then
31592      # Path to executable is not absolute. Find it.
31593      IFS_save="$IFS"
31594      IFS=:
31595      for p in $PATH; do
31596        if test -f "$p/$path" && test -x "$p/$path"; then
31597          new_path="$p/$path"
31598          break
31599        fi
31600      done
31601      IFS="$IFS_save"
31602    else
31603      # This is an absolute path, we can use it without further modifications.
31604      new_path="$path"
31605    fi
31606
31607    if test "x$new_path" = x; then
31608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31609$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31610      has_space=`$ECHO "$complete" | $GREP " "`
31611      if test "x$has_space" != x; then
31612        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31613$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31614      fi
31615      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31616    fi
31617  fi
31618
31619  # Now join together the path and the arguments once again
31620  if test "x$arguments" != xEOL; then
31621    new_complete="$new_path ${arguments% *}"
31622  else
31623    new_complete="$new_path"
31624  fi
31625
31626  if test "x$complete" != "x$new_complete"; then
31627    CXXCPP="$new_complete"
31628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31629$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31630  fi
31631
31632
31633  #
31634  # Setup the linker (LD)
31635  #
31636  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31637    # In the Microsoft toolchain we have a separate LD command "link".
31638    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31639    # a cygwin program for something completely different.
31640    # Extract the first word of "link", so it can be a program name with args.
31641set dummy link; ac_word=$2
31642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31643$as_echo_n "checking for $ac_word... " >&6; }
31644if ${ac_cv_prog_LD+:} false; then :
31645  $as_echo_n "(cached) " >&6
31646else
31647  if test -n "$LD"; then
31648  ac_cv_prog_LD="$LD" # Let the user override the test.
31649else
31650  ac_prog_rejected=no
31651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31652for as_dir in $PATH
31653do
31654  IFS=$as_save_IFS
31655  test -z "$as_dir" && as_dir=.
31656    for ac_exec_ext in '' $ac_executable_extensions; do
31657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31658    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31659       ac_prog_rejected=yes
31660       continue
31661     fi
31662    ac_cv_prog_LD="link"
31663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31664    break 2
31665  fi
31666done
31667  done
31668IFS=$as_save_IFS
31669
31670if test $ac_prog_rejected = yes; then
31671  # We found a bogon in the path, so make sure we never use it.
31672  set dummy $ac_cv_prog_LD
31673  shift
31674  if test $# != 0; then
31675    # We chose a different compiler from the bogus one.
31676    # However, it has the same basename, so the bogon will be chosen
31677    # first if we set LD to just the basename; use the full file name.
31678    shift
31679    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31680  fi
31681fi
31682fi
31683fi
31684LD=$ac_cv_prog_LD
31685if test -n "$LD"; then
31686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31687$as_echo "$LD" >&6; }
31688else
31689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31690$as_echo "no" >&6; }
31691fi
31692
31693
31694
31695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31696
31697  # First separate the path from the arguments. This will split at the first
31698  # space.
31699  complete="$LD"
31700  path="${complete%% *}"
31701  tmp="$complete EOL"
31702  arguments="${tmp#* }"
31703
31704  # Input might be given as Windows format, start by converting to
31705  # unix format.
31706  new_path=`$CYGPATH -u "$path"`
31707
31708  # Now try to locate executable using which
31709  new_path=`$WHICH "$new_path" 2> /dev/null`
31710  # bat and cmd files are not always considered executable in cygwin causing which
31711  # to not find them
31712  if test "x$new_path" = x \
31713      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31714      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31715    new_path=`$CYGPATH -u "$path"`
31716  fi
31717  if test "x$new_path" = x; then
31718    # Oops. Which didn't find the executable.
31719    # The splitting of arguments from the executable at a space might have been incorrect,
31720    # since paths with space are more likely in Windows. Give it another try with the whole
31721    # argument.
31722    path="$complete"
31723    arguments="EOL"
31724    new_path=`$CYGPATH -u "$path"`
31725    new_path=`$WHICH "$new_path" 2> /dev/null`
31726    # bat and cmd files are not always considered executable in cygwin causing which
31727    # to not find them
31728    if test "x$new_path" = x \
31729        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31730        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31731      new_path=`$CYGPATH -u "$path"`
31732    fi
31733    if test "x$new_path" = x; then
31734      # It's still not found. Now this is an unrecoverable error.
31735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31736$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31737      has_space=`$ECHO "$complete" | $GREP " "`
31738      if test "x$has_space" != x; then
31739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31741      fi
31742      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31743    fi
31744  fi
31745
31746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31749  # "foo.exe" is OK but "foo" is an error.
31750  #
31751  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31752  # It is also a way to make sure we got the proper file name for the real test later on.
31753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31754  if test "x$test_shortpath" = x; then
31755    # Short path failed, file does not exist as specified.
31756    # Try adding .exe or .cmd
31757    if test -f "${new_path}.exe"; then
31758      input_to_shortpath="${new_path}.exe"
31759    elif test -f "${new_path}.cmd"; then
31760      input_to_shortpath="${new_path}.cmd"
31761    else
31762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31763$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31764      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31765$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31766      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31767    fi
31768  else
31769    input_to_shortpath="$new_path"
31770  fi
31771
31772  # Call helper function which possibly converts this using DOS-style short mode.
31773  # If so, the updated path is stored in $new_path.
31774  new_path="$input_to_shortpath"
31775
31776  input_path="$input_to_shortpath"
31777  # Check if we need to convert this using DOS-style short mode. If the path
31778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31779  # take no chances and rewrite it.
31780  # Note: m4 eats our [], so we need to use [ and ] instead.
31781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31782  if test "x$has_forbidden_chars" != x; then
31783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31787      # Going to short mode and back again did indeed matter. Since short mode is
31788      # case insensitive, let's make it lowercase to improve readability.
31789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31790      # Now convert it back to Unix-stile (cygpath)
31791      input_path=`$CYGPATH -u "$shortmode_path"`
31792      new_path="$input_path"
31793    fi
31794  fi
31795
31796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31797  if test "x$test_cygdrive_prefix" = x; then
31798    # As a simple fix, exclude /usr/bin since it's not a real path.
31799    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31801      # a path prefixed by /cygdrive for fixpath to work.
31802      new_path="$CYGWIN_ROOT_PATH$input_path"
31803    fi
31804  fi
31805
31806  # remove trailing .exe if any
31807  new_path="${new_path/%.exe/}"
31808
31809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31810
31811  # First separate the path from the arguments. This will split at the first
31812  # space.
31813  complete="$LD"
31814  path="${complete%% *}"
31815  tmp="$complete EOL"
31816  arguments="${tmp#* }"
31817
31818  # Input might be given as Windows format, start by converting to
31819  # unix format.
31820  new_path="$path"
31821
31822  windows_path="$new_path"
31823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31824    unix_path=`$CYGPATH -u "$windows_path"`
31825    new_path="$unix_path"
31826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31828    new_path="$unix_path"
31829  fi
31830
31831
31832  # Now try to locate executable using which
31833  new_path=`$WHICH "$new_path" 2> /dev/null`
31834
31835  if test "x$new_path" = x; then
31836    # Oops. Which didn't find the executable.
31837    # The splitting of arguments from the executable at a space might have been incorrect,
31838    # since paths with space are more likely in Windows. Give it another try with the whole
31839    # argument.
31840    path="$complete"
31841    arguments="EOL"
31842    new_path="$path"
31843
31844  windows_path="$new_path"
31845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31846    unix_path=`$CYGPATH -u "$windows_path"`
31847    new_path="$unix_path"
31848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31850    new_path="$unix_path"
31851  fi
31852
31853
31854    new_path=`$WHICH "$new_path" 2> /dev/null`
31855
31856    if test "x$new_path" = x; then
31857      # It's still not found. Now this is an unrecoverable error.
31858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31859$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31860      has_space=`$ECHO "$complete" | $GREP " "`
31861      if test "x$has_space" != x; then
31862        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31863$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31864      fi
31865      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31866    fi
31867  fi
31868
31869  # Now new_path has a complete unix path to the binary
31870  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31871    # Keep paths in /bin as-is, but remove trailing .exe if any
31872    new_path="${new_path/%.exe/}"
31873    # Do not save /bin paths to all_fixpath_prefixes!
31874  else
31875    # Not in mixed or Windows style, start by that.
31876    new_path=`cmd //c echo $new_path`
31877
31878  input_path="$new_path"
31879  # Check if we need to convert this using DOS-style short mode. If the path
31880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31881  # take no chances and rewrite it.
31882  # Note: m4 eats our [], so we need to use [ and ] instead.
31883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31884  if test "x$has_forbidden_chars" != x; then
31885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31887  fi
31888
31889    # Output is in $new_path
31890
31891  windows_path="$new_path"
31892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31893    unix_path=`$CYGPATH -u "$windows_path"`
31894    new_path="$unix_path"
31895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31897    new_path="$unix_path"
31898  fi
31899
31900    # remove trailing .exe if any
31901    new_path="${new_path/%.exe/}"
31902
31903    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31904    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31905  fi
31906
31907  else
31908    # We're on a posix platform. Hooray! :)
31909    # First separate the path from the arguments. This will split at the first
31910    # space.
31911    complete="$LD"
31912    path="${complete%% *}"
31913    tmp="$complete EOL"
31914    arguments="${tmp#* }"
31915
31916    # Cannot rely on the command "which" here since it doesn't always work.
31917    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31918    if test -z "$is_absolute_path"; then
31919      # Path to executable is not absolute. Find it.
31920      IFS_save="$IFS"
31921      IFS=:
31922      for p in $PATH; do
31923        if test -f "$p/$path" && test -x "$p/$path"; then
31924          new_path="$p/$path"
31925          break
31926        fi
31927      done
31928      IFS="$IFS_save"
31929    else
31930      # This is an absolute path, we can use it without further modifications.
31931      new_path="$path"
31932    fi
31933
31934    if test "x$new_path" = x; then
31935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31936$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31937      has_space=`$ECHO "$complete" | $GREP " "`
31938      if test "x$has_space" != x; then
31939        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31940$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31941      fi
31942      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31943    fi
31944  fi
31945
31946  # Now join together the path and the arguments once again
31947  if test "x$arguments" != xEOL; then
31948    new_complete="$new_path ${arguments% *}"
31949  else
31950    new_complete="$new_path"
31951  fi
31952
31953  if test "x$complete" != "x$new_complete"; then
31954    LD="$new_complete"
31955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31956$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31957  fi
31958
31959    # Verify that we indeed succeeded with this trick.
31960    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31961$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31962    "$LD" --version > /dev/null
31963    if test $? -eq 0 ; then
31964      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31965$as_echo "no" >&6; }
31966      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31967    else
31968      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31969$as_echo "yes" >&6; }
31970    fi
31971    LDCXX="$LD"
31972  else
31973    # All other toolchains use the compiler to link.
31974    LD="$CC"
31975    LDCXX="$CXX"
31976  fi
31977
31978  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31979
31980
31981  #
31982  # Setup the assembler (AS)
31983  #
31984  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31985    # FIXME: should this really be solaris, or solstudio?
31986
31987
31988  # Publish this variable in the help.
31989
31990
31991  if test "x$AS" = x; then
31992    # The variable is not set by user, try to locate tool using the code snippet
31993    for ac_prog in as
31994do
31995  # Extract the first word of "$ac_prog", so it can be a program name with args.
31996set dummy $ac_prog; ac_word=$2
31997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31998$as_echo_n "checking for $ac_word... " >&6; }
31999if ${ac_cv_path_AS+:} false; then :
32000  $as_echo_n "(cached) " >&6
32001else
32002  case $AS in
32003  [\\/]* | ?:[\\/]*)
32004  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32005  ;;
32006  *)
32007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32008for as_dir in $PATH
32009do
32010  IFS=$as_save_IFS
32011  test -z "$as_dir" && as_dir=.
32012    for ac_exec_ext in '' $ac_executable_extensions; do
32013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32014    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32016    break 2
32017  fi
32018done
32019  done
32020IFS=$as_save_IFS
32021
32022  ;;
32023esac
32024fi
32025AS=$ac_cv_path_AS
32026if test -n "$AS"; then
32027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32028$as_echo "$AS" >&6; }
32029else
32030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32031$as_echo "no" >&6; }
32032fi
32033
32034
32035  test -n "$AS" && break
32036done
32037
32038  else
32039    # The variable is set, but is it from the command line or the environment?
32040
32041    # Try to remove the string !AS! from our list.
32042    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32043    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32044      # If it failed, the variable was not from the command line. Ignore it,
32045      # but warn the user (except for BASH, which is always set by the calling BASH).
32046      if test "xAS" != xBASH; then
32047        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32048$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32049      fi
32050      # Try to locate tool using the code snippet
32051      for ac_prog in as
32052do
32053  # Extract the first word of "$ac_prog", so it can be a program name with args.
32054set dummy $ac_prog; ac_word=$2
32055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32056$as_echo_n "checking for $ac_word... " >&6; }
32057if ${ac_cv_path_AS+:} false; then :
32058  $as_echo_n "(cached) " >&6
32059else
32060  case $AS in
32061  [\\/]* | ?:[\\/]*)
32062  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32063  ;;
32064  *)
32065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32066for as_dir in $PATH
32067do
32068  IFS=$as_save_IFS
32069  test -z "$as_dir" && as_dir=.
32070    for ac_exec_ext in '' $ac_executable_extensions; do
32071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32072    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32074    break 2
32075  fi
32076done
32077  done
32078IFS=$as_save_IFS
32079
32080  ;;
32081esac
32082fi
32083AS=$ac_cv_path_AS
32084if test -n "$AS"; then
32085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32086$as_echo "$AS" >&6; }
32087else
32088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32089$as_echo "no" >&6; }
32090fi
32091
32092
32093  test -n "$AS" && break
32094done
32095
32096    else
32097      # If it succeeded, then it was overridden by the user. We will use it
32098      # for the tool.
32099
32100      # First remove it from the list of overridden variables, so we can test
32101      # for unknown variables in the end.
32102      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32103
32104      # Check if the provided tool contains a complete path.
32105      tool_specified="$AS"
32106      tool_basename="${tool_specified##*/}"
32107      if test "x$tool_basename" = "x$tool_specified"; then
32108        # A command without a complete path is provided, search $PATH.
32109        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32110$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32111        # Extract the first word of "$tool_basename", so it can be a program name with args.
32112set dummy $tool_basename; ac_word=$2
32113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32114$as_echo_n "checking for $ac_word... " >&6; }
32115if ${ac_cv_path_AS+:} false; then :
32116  $as_echo_n "(cached) " >&6
32117else
32118  case $AS in
32119  [\\/]* | ?:[\\/]*)
32120  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32121  ;;
32122  *)
32123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32124for as_dir in $PATH
32125do
32126  IFS=$as_save_IFS
32127  test -z "$as_dir" && as_dir=.
32128    for ac_exec_ext in '' $ac_executable_extensions; do
32129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32130    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32132    break 2
32133  fi
32134done
32135  done
32136IFS=$as_save_IFS
32137
32138  ;;
32139esac
32140fi
32141AS=$ac_cv_path_AS
32142if test -n "$AS"; then
32143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32144$as_echo "$AS" >&6; }
32145else
32146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32147$as_echo "no" >&6; }
32148fi
32149
32150
32151        if test "x$AS" = x; then
32152          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32153        fi
32154      else
32155        # Otherwise we believe it is a complete path. Use it as it is.
32156        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32157$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32158        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32159$as_echo_n "checking for AS... " >&6; }
32160        if test ! -x "$tool_specified"; then
32161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32162$as_echo "not found" >&6; }
32163          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32164        fi
32165        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32166$as_echo "$tool_specified" >&6; }
32167      fi
32168    fi
32169  fi
32170
32171
32172
32173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32174
32175  # First separate the path from the arguments. This will split at the first
32176  # space.
32177  complete="$AS"
32178  path="${complete%% *}"
32179  tmp="$complete EOL"
32180  arguments="${tmp#* }"
32181
32182  # Input might be given as Windows format, start by converting to
32183  # unix format.
32184  new_path=`$CYGPATH -u "$path"`
32185
32186  # Now try to locate executable using which
32187  new_path=`$WHICH "$new_path" 2> /dev/null`
32188  # bat and cmd files are not always considered executable in cygwin causing which
32189  # to not find them
32190  if test "x$new_path" = x \
32191      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32192      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32193    new_path=`$CYGPATH -u "$path"`
32194  fi
32195  if test "x$new_path" = x; then
32196    # Oops. Which didn't find the executable.
32197    # The splitting of arguments from the executable at a space might have been incorrect,
32198    # since paths with space are more likely in Windows. Give it another try with the whole
32199    # argument.
32200    path="$complete"
32201    arguments="EOL"
32202    new_path=`$CYGPATH -u "$path"`
32203    new_path=`$WHICH "$new_path" 2> /dev/null`
32204    # bat and cmd files are not always considered executable in cygwin causing which
32205    # to not find them
32206    if test "x$new_path" = x \
32207        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32208        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32209      new_path=`$CYGPATH -u "$path"`
32210    fi
32211    if test "x$new_path" = x; then
32212      # It's still not found. Now this is an unrecoverable error.
32213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32214$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32215      has_space=`$ECHO "$complete" | $GREP " "`
32216      if test "x$has_space" != x; then
32217        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32218$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32219      fi
32220      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32221    fi
32222  fi
32223
32224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32227  # "foo.exe" is OK but "foo" is an error.
32228  #
32229  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32230  # It is also a way to make sure we got the proper file name for the real test later on.
32231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32232  if test "x$test_shortpath" = x; then
32233    # Short path failed, file does not exist as specified.
32234    # Try adding .exe or .cmd
32235    if test -f "${new_path}.exe"; then
32236      input_to_shortpath="${new_path}.exe"
32237    elif test -f "${new_path}.cmd"; then
32238      input_to_shortpath="${new_path}.cmd"
32239    else
32240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32241$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32242      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32243$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32244      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32245    fi
32246  else
32247    input_to_shortpath="$new_path"
32248  fi
32249
32250  # Call helper function which possibly converts this using DOS-style short mode.
32251  # If so, the updated path is stored in $new_path.
32252  new_path="$input_to_shortpath"
32253
32254  input_path="$input_to_shortpath"
32255  # Check if we need to convert this using DOS-style short mode. If the path
32256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32257  # take no chances and rewrite it.
32258  # Note: m4 eats our [], so we need to use [ and ] instead.
32259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32260  if test "x$has_forbidden_chars" != x; then
32261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32265      # Going to short mode and back again did indeed matter. Since short mode is
32266      # case insensitive, let's make it lowercase to improve readability.
32267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32268      # Now convert it back to Unix-stile (cygpath)
32269      input_path=`$CYGPATH -u "$shortmode_path"`
32270      new_path="$input_path"
32271    fi
32272  fi
32273
32274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32275  if test "x$test_cygdrive_prefix" = x; then
32276    # As a simple fix, exclude /usr/bin since it's not a real path.
32277    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32279      # a path prefixed by /cygdrive for fixpath to work.
32280      new_path="$CYGWIN_ROOT_PATH$input_path"
32281    fi
32282  fi
32283
32284  # remove trailing .exe if any
32285  new_path="${new_path/%.exe/}"
32286
32287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32288
32289  # First separate the path from the arguments. This will split at the first
32290  # space.
32291  complete="$AS"
32292  path="${complete%% *}"
32293  tmp="$complete EOL"
32294  arguments="${tmp#* }"
32295
32296  # Input might be given as Windows format, start by converting to
32297  # unix format.
32298  new_path="$path"
32299
32300  windows_path="$new_path"
32301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32302    unix_path=`$CYGPATH -u "$windows_path"`
32303    new_path="$unix_path"
32304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32306    new_path="$unix_path"
32307  fi
32308
32309
32310  # Now try to locate executable using which
32311  new_path=`$WHICH "$new_path" 2> /dev/null`
32312
32313  if test "x$new_path" = x; then
32314    # Oops. Which didn't find the executable.
32315    # The splitting of arguments from the executable at a space might have been incorrect,
32316    # since paths with space are more likely in Windows. Give it another try with the whole
32317    # argument.
32318    path="$complete"
32319    arguments="EOL"
32320    new_path="$path"
32321
32322  windows_path="$new_path"
32323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32324    unix_path=`$CYGPATH -u "$windows_path"`
32325    new_path="$unix_path"
32326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32328    new_path="$unix_path"
32329  fi
32330
32331
32332    new_path=`$WHICH "$new_path" 2> /dev/null`
32333
32334    if test "x$new_path" = x; then
32335      # It's still not found. Now this is an unrecoverable error.
32336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32337$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32338      has_space=`$ECHO "$complete" | $GREP " "`
32339      if test "x$has_space" != x; then
32340        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32341$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32342      fi
32343      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32344    fi
32345  fi
32346
32347  # Now new_path has a complete unix path to the binary
32348  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32349    # Keep paths in /bin as-is, but remove trailing .exe if any
32350    new_path="${new_path/%.exe/}"
32351    # Do not save /bin paths to all_fixpath_prefixes!
32352  else
32353    # Not in mixed or Windows style, start by that.
32354    new_path=`cmd //c echo $new_path`
32355
32356  input_path="$new_path"
32357  # Check if we need to convert this using DOS-style short mode. If the path
32358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32359  # take no chances and rewrite it.
32360  # Note: m4 eats our [], so we need to use [ and ] instead.
32361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32362  if test "x$has_forbidden_chars" != x; then
32363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32365  fi
32366
32367    # Output is in $new_path
32368
32369  windows_path="$new_path"
32370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32371    unix_path=`$CYGPATH -u "$windows_path"`
32372    new_path="$unix_path"
32373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32375    new_path="$unix_path"
32376  fi
32377
32378    # remove trailing .exe if any
32379    new_path="${new_path/%.exe/}"
32380
32381    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32382    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32383  fi
32384
32385  else
32386    # We're on a posix platform. Hooray! :)
32387    # First separate the path from the arguments. This will split at the first
32388    # space.
32389    complete="$AS"
32390    path="${complete%% *}"
32391    tmp="$complete EOL"
32392    arguments="${tmp#* }"
32393
32394    # Cannot rely on the command "which" here since it doesn't always work.
32395    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32396    if test -z "$is_absolute_path"; then
32397      # Path to executable is not absolute. Find it.
32398      IFS_save="$IFS"
32399      IFS=:
32400      for p in $PATH; do
32401        if test -f "$p/$path" && test -x "$p/$path"; then
32402          new_path="$p/$path"
32403          break
32404        fi
32405      done
32406      IFS="$IFS_save"
32407    else
32408      # This is an absolute path, we can use it without further modifications.
32409      new_path="$path"
32410    fi
32411
32412    if test "x$new_path" = x; then
32413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32414$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32415      has_space=`$ECHO "$complete" | $GREP " "`
32416      if test "x$has_space" != x; then
32417        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32418$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32419      fi
32420      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32421    fi
32422  fi
32423
32424  # Now join together the path and the arguments once again
32425  if test "x$arguments" != xEOL; then
32426    new_complete="$new_path ${arguments% *}"
32427  else
32428    new_complete="$new_path"
32429  fi
32430
32431  if test "x$complete" != "x$new_complete"; then
32432    AS="$new_complete"
32433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32434$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32435  fi
32436
32437  else
32438    # FIXME: is this correct for microsoft?
32439    AS="$CC -c"
32440  fi
32441
32442
32443  #
32444  # Setup the archiver (AR)
32445  #
32446  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32447    # The corresponding ar tool is lib.exe (used to create static libraries)
32448    # Extract the first word of "lib", so it can be a program name with args.
32449set dummy lib; ac_word=$2
32450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32451$as_echo_n "checking for $ac_word... " >&6; }
32452if ${ac_cv_prog_AR+:} false; then :
32453  $as_echo_n "(cached) " >&6
32454else
32455  if test -n "$AR"; then
32456  ac_cv_prog_AR="$AR" # Let the user override the test.
32457else
32458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32459for as_dir in $PATH
32460do
32461  IFS=$as_save_IFS
32462  test -z "$as_dir" && as_dir=.
32463    for ac_exec_ext in '' $ac_executable_extensions; do
32464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32465    ac_cv_prog_AR="lib"
32466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32467    break 2
32468  fi
32469done
32470  done
32471IFS=$as_save_IFS
32472
32473fi
32474fi
32475AR=$ac_cv_prog_AR
32476if test -n "$AR"; then
32477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32478$as_echo "$AR" >&6; }
32479else
32480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32481$as_echo "no" >&6; }
32482fi
32483
32484
32485  else
32486
32487
32488  # Publish this variable in the help.
32489
32490
32491  if test "x$AR" = x; then
32492    # The variable is not set by user, try to locate tool using the code snippet
32493    if test -n "$ac_tool_prefix"; then
32494  for ac_prog in ar
32495  do
32496    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32497set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32499$as_echo_n "checking for $ac_word... " >&6; }
32500if ${ac_cv_prog_AR+:} false; then :
32501  $as_echo_n "(cached) " >&6
32502else
32503  if test -n "$AR"; then
32504  ac_cv_prog_AR="$AR" # Let the user override the test.
32505else
32506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32507for as_dir in $PATH
32508do
32509  IFS=$as_save_IFS
32510  test -z "$as_dir" && as_dir=.
32511    for ac_exec_ext in '' $ac_executable_extensions; do
32512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32513    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32515    break 2
32516  fi
32517done
32518  done
32519IFS=$as_save_IFS
32520
32521fi
32522fi
32523AR=$ac_cv_prog_AR
32524if test -n "$AR"; then
32525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32526$as_echo "$AR" >&6; }
32527else
32528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32529$as_echo "no" >&6; }
32530fi
32531
32532
32533    test -n "$AR" && break
32534  done
32535fi
32536if test -z "$AR"; then
32537  ac_ct_AR=$AR
32538  for ac_prog in ar
32539do
32540  # Extract the first word of "$ac_prog", so it can be a program name with args.
32541set dummy $ac_prog; ac_word=$2
32542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32543$as_echo_n "checking for $ac_word... " >&6; }
32544if ${ac_cv_prog_ac_ct_AR+:} false; then :
32545  $as_echo_n "(cached) " >&6
32546else
32547  if test -n "$ac_ct_AR"; then
32548  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32549else
32550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32551for as_dir in $PATH
32552do
32553  IFS=$as_save_IFS
32554  test -z "$as_dir" && as_dir=.
32555    for ac_exec_ext in '' $ac_executable_extensions; do
32556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32557    ac_cv_prog_ac_ct_AR="$ac_prog"
32558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32559    break 2
32560  fi
32561done
32562  done
32563IFS=$as_save_IFS
32564
32565fi
32566fi
32567ac_ct_AR=$ac_cv_prog_ac_ct_AR
32568if test -n "$ac_ct_AR"; then
32569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32570$as_echo "$ac_ct_AR" >&6; }
32571else
32572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32573$as_echo "no" >&6; }
32574fi
32575
32576
32577  test -n "$ac_ct_AR" && break
32578done
32579
32580  if test "x$ac_ct_AR" = x; then
32581    AR=""
32582  else
32583    case $cross_compiling:$ac_tool_warned in
32584yes:)
32585{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32586$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32587ac_tool_warned=yes ;;
32588esac
32589    AR=$ac_ct_AR
32590  fi
32591fi
32592
32593  else
32594    # The variable is set, but is it from the command line or the environment?
32595
32596    # Try to remove the string !AR! from our list.
32597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32599      # If it failed, the variable was not from the command line. Ignore it,
32600      # but warn the user (except for BASH, which is always set by the calling BASH).
32601      if test "xAR" != xBASH; then
32602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32603$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32604      fi
32605      # Try to locate tool using the code snippet
32606      if test -n "$ac_tool_prefix"; then
32607  for ac_prog in ar
32608  do
32609    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32610set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32612$as_echo_n "checking for $ac_word... " >&6; }
32613if ${ac_cv_prog_AR+:} false; then :
32614  $as_echo_n "(cached) " >&6
32615else
32616  if test -n "$AR"; then
32617  ac_cv_prog_AR="$AR" # Let the user override the test.
32618else
32619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32620for as_dir in $PATH
32621do
32622  IFS=$as_save_IFS
32623  test -z "$as_dir" && as_dir=.
32624    for ac_exec_ext in '' $ac_executable_extensions; do
32625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32626    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32628    break 2
32629  fi
32630done
32631  done
32632IFS=$as_save_IFS
32633
32634fi
32635fi
32636AR=$ac_cv_prog_AR
32637if test -n "$AR"; then
32638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32639$as_echo "$AR" >&6; }
32640else
32641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32642$as_echo "no" >&6; }
32643fi
32644
32645
32646    test -n "$AR" && break
32647  done
32648fi
32649if test -z "$AR"; then
32650  ac_ct_AR=$AR
32651  for ac_prog in ar
32652do
32653  # Extract the first word of "$ac_prog", so it can be a program name with args.
32654set dummy $ac_prog; ac_word=$2
32655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32656$as_echo_n "checking for $ac_word... " >&6; }
32657if ${ac_cv_prog_ac_ct_AR+:} false; then :
32658  $as_echo_n "(cached) " >&6
32659else
32660  if test -n "$ac_ct_AR"; then
32661  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32662else
32663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32664for as_dir in $PATH
32665do
32666  IFS=$as_save_IFS
32667  test -z "$as_dir" && as_dir=.
32668    for ac_exec_ext in '' $ac_executable_extensions; do
32669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32670    ac_cv_prog_ac_ct_AR="$ac_prog"
32671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32672    break 2
32673  fi
32674done
32675  done
32676IFS=$as_save_IFS
32677
32678fi
32679fi
32680ac_ct_AR=$ac_cv_prog_ac_ct_AR
32681if test -n "$ac_ct_AR"; then
32682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32683$as_echo "$ac_ct_AR" >&6; }
32684else
32685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32686$as_echo "no" >&6; }
32687fi
32688
32689
32690  test -n "$ac_ct_AR" && break
32691done
32692
32693  if test "x$ac_ct_AR" = x; then
32694    AR=""
32695  else
32696    case $cross_compiling:$ac_tool_warned in
32697yes:)
32698{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32699$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32700ac_tool_warned=yes ;;
32701esac
32702    AR=$ac_ct_AR
32703  fi
32704fi
32705
32706    else
32707      # If it succeeded, then it was overridden by the user. We will use it
32708      # for the tool.
32709
32710      # First remove it from the list of overridden variables, so we can test
32711      # for unknown variables in the end.
32712      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32713
32714      # Check if the provided tool contains a complete path.
32715      tool_specified="$AR"
32716      tool_basename="${tool_specified##*/}"
32717      if test "x$tool_basename" = "x$tool_specified"; then
32718        # A command without a complete path is provided, search $PATH.
32719        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32720$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32721        # Extract the first word of "$tool_basename", so it can be a program name with args.
32722set dummy $tool_basename; ac_word=$2
32723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32724$as_echo_n "checking for $ac_word... " >&6; }
32725if ${ac_cv_path_AR+:} false; then :
32726  $as_echo_n "(cached) " >&6
32727else
32728  case $AR in
32729  [\\/]* | ?:[\\/]*)
32730  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32731  ;;
32732  *)
32733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32734for as_dir in $PATH
32735do
32736  IFS=$as_save_IFS
32737  test -z "$as_dir" && as_dir=.
32738    for ac_exec_ext in '' $ac_executable_extensions; do
32739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32740    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32742    break 2
32743  fi
32744done
32745  done
32746IFS=$as_save_IFS
32747
32748  ;;
32749esac
32750fi
32751AR=$ac_cv_path_AR
32752if test -n "$AR"; then
32753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32754$as_echo "$AR" >&6; }
32755else
32756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32757$as_echo "no" >&6; }
32758fi
32759
32760
32761        if test "x$AR" = x; then
32762          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32763        fi
32764      else
32765        # Otherwise we believe it is a complete path. Use it as it is.
32766        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32767$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32769$as_echo_n "checking for AR... " >&6; }
32770        if test ! -x "$tool_specified"; then
32771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32772$as_echo "not found" >&6; }
32773          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32774        fi
32775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32776$as_echo "$tool_specified" >&6; }
32777      fi
32778    fi
32779  fi
32780
32781
32782  fi
32783
32784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32785
32786  # First separate the path from the arguments. This will split at the first
32787  # space.
32788  complete="$AR"
32789  path="${complete%% *}"
32790  tmp="$complete EOL"
32791  arguments="${tmp#* }"
32792
32793  # Input might be given as Windows format, start by converting to
32794  # unix format.
32795  new_path=`$CYGPATH -u "$path"`
32796
32797  # Now try to locate executable using which
32798  new_path=`$WHICH "$new_path" 2> /dev/null`
32799  # bat and cmd files are not always considered executable in cygwin causing which
32800  # to not find them
32801  if test "x$new_path" = x \
32802      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32803      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32804    new_path=`$CYGPATH -u "$path"`
32805  fi
32806  if test "x$new_path" = x; then
32807    # Oops. Which didn't find the executable.
32808    # The splitting of arguments from the executable at a space might have been incorrect,
32809    # since paths with space are more likely in Windows. Give it another try with the whole
32810    # argument.
32811    path="$complete"
32812    arguments="EOL"
32813    new_path=`$CYGPATH -u "$path"`
32814    new_path=`$WHICH "$new_path" 2> /dev/null`
32815    # bat and cmd files are not always considered executable in cygwin causing which
32816    # to not find them
32817    if test "x$new_path" = x \
32818        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32819        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32820      new_path=`$CYGPATH -u "$path"`
32821    fi
32822    if test "x$new_path" = x; then
32823      # It's still not found. Now this is an unrecoverable error.
32824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32825$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32826      has_space=`$ECHO "$complete" | $GREP " "`
32827      if test "x$has_space" != x; then
32828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32830      fi
32831      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32832    fi
32833  fi
32834
32835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32838  # "foo.exe" is OK but "foo" is an error.
32839  #
32840  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32841  # It is also a way to make sure we got the proper file name for the real test later on.
32842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32843  if test "x$test_shortpath" = x; then
32844    # Short path failed, file does not exist as specified.
32845    # Try adding .exe or .cmd
32846    if test -f "${new_path}.exe"; then
32847      input_to_shortpath="${new_path}.exe"
32848    elif test -f "${new_path}.cmd"; then
32849      input_to_shortpath="${new_path}.cmd"
32850    else
32851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32852$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32853      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32854$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32855      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32856    fi
32857  else
32858    input_to_shortpath="$new_path"
32859  fi
32860
32861  # Call helper function which possibly converts this using DOS-style short mode.
32862  # If so, the updated path is stored in $new_path.
32863  new_path="$input_to_shortpath"
32864
32865  input_path="$input_to_shortpath"
32866  # Check if we need to convert this using DOS-style short mode. If the path
32867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32868  # take no chances and rewrite it.
32869  # Note: m4 eats our [], so we need to use [ and ] instead.
32870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32871  if test "x$has_forbidden_chars" != x; then
32872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32876      # Going to short mode and back again did indeed matter. Since short mode is
32877      # case insensitive, let's make it lowercase to improve readability.
32878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32879      # Now convert it back to Unix-stile (cygpath)
32880      input_path=`$CYGPATH -u "$shortmode_path"`
32881      new_path="$input_path"
32882    fi
32883  fi
32884
32885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32886  if test "x$test_cygdrive_prefix" = x; then
32887    # As a simple fix, exclude /usr/bin since it's not a real path.
32888    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32890      # a path prefixed by /cygdrive for fixpath to work.
32891      new_path="$CYGWIN_ROOT_PATH$input_path"
32892    fi
32893  fi
32894
32895  # remove trailing .exe if any
32896  new_path="${new_path/%.exe/}"
32897
32898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32899
32900  # First separate the path from the arguments. This will split at the first
32901  # space.
32902  complete="$AR"
32903  path="${complete%% *}"
32904  tmp="$complete EOL"
32905  arguments="${tmp#* }"
32906
32907  # Input might be given as Windows format, start by converting to
32908  # unix format.
32909  new_path="$path"
32910
32911  windows_path="$new_path"
32912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32913    unix_path=`$CYGPATH -u "$windows_path"`
32914    new_path="$unix_path"
32915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32917    new_path="$unix_path"
32918  fi
32919
32920
32921  # Now try to locate executable using which
32922  new_path=`$WHICH "$new_path" 2> /dev/null`
32923
32924  if test "x$new_path" = x; then
32925    # Oops. Which didn't find the executable.
32926    # The splitting of arguments from the executable at a space might have been incorrect,
32927    # since paths with space are more likely in Windows. Give it another try with the whole
32928    # argument.
32929    path="$complete"
32930    arguments="EOL"
32931    new_path="$path"
32932
32933  windows_path="$new_path"
32934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32935    unix_path=`$CYGPATH -u "$windows_path"`
32936    new_path="$unix_path"
32937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32939    new_path="$unix_path"
32940  fi
32941
32942
32943    new_path=`$WHICH "$new_path" 2> /dev/null`
32944
32945    if test "x$new_path" = x; then
32946      # It's still not found. Now this is an unrecoverable error.
32947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32948$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32949      has_space=`$ECHO "$complete" | $GREP " "`
32950      if test "x$has_space" != x; then
32951        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32952$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32953      fi
32954      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32955    fi
32956  fi
32957
32958  # Now new_path has a complete unix path to the binary
32959  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32960    # Keep paths in /bin as-is, but remove trailing .exe if any
32961    new_path="${new_path/%.exe/}"
32962    # Do not save /bin paths to all_fixpath_prefixes!
32963  else
32964    # Not in mixed or Windows style, start by that.
32965    new_path=`cmd //c echo $new_path`
32966
32967  input_path="$new_path"
32968  # Check if we need to convert this using DOS-style short mode. If the path
32969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32970  # take no chances and rewrite it.
32971  # Note: m4 eats our [], so we need to use [ and ] instead.
32972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32973  if test "x$has_forbidden_chars" != x; then
32974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32976  fi
32977
32978    # Output is in $new_path
32979
32980  windows_path="$new_path"
32981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32982    unix_path=`$CYGPATH -u "$windows_path"`
32983    new_path="$unix_path"
32984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32986    new_path="$unix_path"
32987  fi
32988
32989    # remove trailing .exe if any
32990    new_path="${new_path/%.exe/}"
32991
32992    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32993    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32994  fi
32995
32996  else
32997    # We're on a posix platform. Hooray! :)
32998    # First separate the path from the arguments. This will split at the first
32999    # space.
33000    complete="$AR"
33001    path="${complete%% *}"
33002    tmp="$complete EOL"
33003    arguments="${tmp#* }"
33004
33005    # Cannot rely on the command "which" here since it doesn't always work.
33006    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33007    if test -z "$is_absolute_path"; then
33008      # Path to executable is not absolute. Find it.
33009      IFS_save="$IFS"
33010      IFS=:
33011      for p in $PATH; do
33012        if test -f "$p/$path" && test -x "$p/$path"; then
33013          new_path="$p/$path"
33014          break
33015        fi
33016      done
33017      IFS="$IFS_save"
33018    else
33019      # This is an absolute path, we can use it without further modifications.
33020      new_path="$path"
33021    fi
33022
33023    if test "x$new_path" = x; then
33024      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33025$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33026      has_space=`$ECHO "$complete" | $GREP " "`
33027      if test "x$has_space" != x; then
33028        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33029$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33030      fi
33031      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33032    fi
33033  fi
33034
33035  # Now join together the path and the arguments once again
33036  if test "x$arguments" != xEOL; then
33037    new_complete="$new_path ${arguments% *}"
33038  else
33039    new_complete="$new_path"
33040  fi
33041
33042  if test "x$complete" != "x$new_complete"; then
33043    AR="$new_complete"
33044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33045$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33046  fi
33047
33048
33049
33050  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33051    ac_ext=m
33052ac_cpp='$OBJCPP $CPPFLAGS'
33053ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33054ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33055ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33056if test -n "$ac_tool_prefix"; then
33057  for ac_prog in gcc objcc objc cc CC
33058  do
33059    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33060set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33062$as_echo_n "checking for $ac_word... " >&6; }
33063if ${ac_cv_prog_OBJC+:} false; then :
33064  $as_echo_n "(cached) " >&6
33065else
33066  if test -n "$OBJC"; then
33067  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33068else
33069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33070for as_dir in $PATH
33071do
33072  IFS=$as_save_IFS
33073  test -z "$as_dir" && as_dir=.
33074    for ac_exec_ext in '' $ac_executable_extensions; do
33075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33076    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33078    break 2
33079  fi
33080done
33081  done
33082IFS=$as_save_IFS
33083
33084fi
33085fi
33086OBJC=$ac_cv_prog_OBJC
33087if test -n "$OBJC"; then
33088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33089$as_echo "$OBJC" >&6; }
33090else
33091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33092$as_echo "no" >&6; }
33093fi
33094
33095
33096    test -n "$OBJC" && break
33097  done
33098fi
33099if test -z "$OBJC"; then
33100  ac_ct_OBJC=$OBJC
33101  for ac_prog in gcc objcc objc cc CC
33102do
33103  # Extract the first word of "$ac_prog", so it can be a program name with args.
33104set dummy $ac_prog; ac_word=$2
33105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33106$as_echo_n "checking for $ac_word... " >&6; }
33107if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33108  $as_echo_n "(cached) " >&6
33109else
33110  if test -n "$ac_ct_OBJC"; then
33111  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33112else
33113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33114for as_dir in $PATH
33115do
33116  IFS=$as_save_IFS
33117  test -z "$as_dir" && as_dir=.
33118    for ac_exec_ext in '' $ac_executable_extensions; do
33119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33120    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33122    break 2
33123  fi
33124done
33125  done
33126IFS=$as_save_IFS
33127
33128fi
33129fi
33130ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33131if test -n "$ac_ct_OBJC"; then
33132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33133$as_echo "$ac_ct_OBJC" >&6; }
33134else
33135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33136$as_echo "no" >&6; }
33137fi
33138
33139
33140  test -n "$ac_ct_OBJC" && break
33141done
33142
33143  if test "x$ac_ct_OBJC" = x; then
33144    OBJC="gcc"
33145  else
33146    case $cross_compiling:$ac_tool_warned in
33147yes:)
33148{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33149$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33150ac_tool_warned=yes ;;
33151esac
33152    OBJC=$ac_ct_OBJC
33153  fi
33154fi
33155
33156# Provide some information about the compiler.
33157$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33158set X $ac_compile
33159ac_compiler=$2
33160for ac_option in --version -v -V -qversion; do
33161  { { ac_try="$ac_compiler $ac_option >&5"
33162case "(($ac_try" in
33163  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33164  *) ac_try_echo=$ac_try;;
33165esac
33166eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33167$as_echo "$ac_try_echo"; } >&5
33168  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33169  ac_status=$?
33170  if test -s conftest.err; then
33171    sed '10a\
33172... rest of stderr output deleted ...
33173         10q' conftest.err >conftest.er1
33174    cat conftest.er1 >&5
33175  fi
33176  rm -f conftest.er1 conftest.err
33177  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33178  test $ac_status = 0; }
33179done
33180
33181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33182$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33183if ${ac_cv_objc_compiler_gnu+:} false; then :
33184  $as_echo_n "(cached) " >&6
33185else
33186  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33187/* end confdefs.h.  */
33188
33189int
33190main ()
33191{
33192#ifndef __GNUC__
33193       choke me
33194#endif
33195
33196  ;
33197  return 0;
33198}
33199_ACEOF
33200if ac_fn_objc_try_compile "$LINENO"; then :
33201  ac_compiler_gnu=yes
33202else
33203  ac_compiler_gnu=no
33204fi
33205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33206ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33207
33208fi
33209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33210$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33211if test $ac_compiler_gnu = yes; then
33212  GOBJC=yes
33213else
33214  GOBJC=
33215fi
33216ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33217ac_save_OBJCFLAGS=$OBJCFLAGS
33218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33219$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33220if ${ac_cv_prog_objc_g+:} false; then :
33221  $as_echo_n "(cached) " >&6
33222else
33223  ac_save_objc_werror_flag=$ac_objc_werror_flag
33224   ac_objc_werror_flag=yes
33225   ac_cv_prog_objc_g=no
33226   OBJCFLAGS="-g"
33227   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33228/* end confdefs.h.  */
33229
33230int
33231main ()
33232{
33233
33234  ;
33235  return 0;
33236}
33237_ACEOF
33238if ac_fn_objc_try_compile "$LINENO"; then :
33239  ac_cv_prog_objc_g=yes
33240else
33241  OBJCFLAGS=""
33242      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33243/* end confdefs.h.  */
33244
33245int
33246main ()
33247{
33248
33249  ;
33250  return 0;
33251}
33252_ACEOF
33253if ac_fn_objc_try_compile "$LINENO"; then :
33254
33255else
33256  ac_objc_werror_flag=$ac_save_objc_werror_flag
33257	 OBJCFLAGS="-g"
33258	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33259/* end confdefs.h.  */
33260
33261int
33262main ()
33263{
33264
33265  ;
33266  return 0;
33267}
33268_ACEOF
33269if ac_fn_objc_try_compile "$LINENO"; then :
33270  ac_cv_prog_objc_g=yes
33271fi
33272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33273fi
33274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33275fi
33276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33277   ac_objc_werror_flag=$ac_save_objc_werror_flag
33278fi
33279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33280$as_echo "$ac_cv_prog_objc_g" >&6; }
33281if test "$ac_test_OBJCFLAGS" = set; then
33282  OBJCFLAGS=$ac_save_OBJCFLAGS
33283elif test $ac_cv_prog_objc_g = yes; then
33284  if test "$GOBJC" = yes; then
33285    OBJCFLAGS="-g -O2"
33286  else
33287    OBJCFLAGS="-g"
33288  fi
33289else
33290  if test "$GOBJC" = yes; then
33291    OBJCFLAGS="-O2"
33292  else
33293    OBJCFLAGS=
33294  fi
33295fi
33296ac_ext=cpp
33297ac_cpp='$CXXCPP $CPPFLAGS'
33298ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33299ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33300ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33301
33302
33303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33304
33305  # First separate the path from the arguments. This will split at the first
33306  # space.
33307  complete="$OBJC"
33308  path="${complete%% *}"
33309  tmp="$complete EOL"
33310  arguments="${tmp#* }"
33311
33312  # Input might be given as Windows format, start by converting to
33313  # unix format.
33314  new_path=`$CYGPATH -u "$path"`
33315
33316  # Now try to locate executable using which
33317  new_path=`$WHICH "$new_path" 2> /dev/null`
33318  # bat and cmd files are not always considered executable in cygwin causing which
33319  # to not find them
33320  if test "x$new_path" = x \
33321      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33322      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33323    new_path=`$CYGPATH -u "$path"`
33324  fi
33325  if test "x$new_path" = x; then
33326    # Oops. Which didn't find the executable.
33327    # The splitting of arguments from the executable at a space might have been incorrect,
33328    # since paths with space are more likely in Windows. Give it another try with the whole
33329    # argument.
33330    path="$complete"
33331    arguments="EOL"
33332    new_path=`$CYGPATH -u "$path"`
33333    new_path=`$WHICH "$new_path" 2> /dev/null`
33334    # bat and cmd files are not always considered executable in cygwin causing which
33335    # to not find them
33336    if test "x$new_path" = x \
33337        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33338        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33339      new_path=`$CYGPATH -u "$path"`
33340    fi
33341    if test "x$new_path" = x; then
33342      # It's still not found. Now this is an unrecoverable error.
33343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33344$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33345      has_space=`$ECHO "$complete" | $GREP " "`
33346      if test "x$has_space" != x; then
33347        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33348$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33349      fi
33350      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33351    fi
33352  fi
33353
33354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33357  # "foo.exe" is OK but "foo" is an error.
33358  #
33359  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33360  # It is also a way to make sure we got the proper file name for the real test later on.
33361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33362  if test "x$test_shortpath" = x; then
33363    # Short path failed, file does not exist as specified.
33364    # Try adding .exe or .cmd
33365    if test -f "${new_path}.exe"; then
33366      input_to_shortpath="${new_path}.exe"
33367    elif test -f "${new_path}.cmd"; then
33368      input_to_shortpath="${new_path}.cmd"
33369    else
33370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33371$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33372      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33373$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33374      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33375    fi
33376  else
33377    input_to_shortpath="$new_path"
33378  fi
33379
33380  # Call helper function which possibly converts this using DOS-style short mode.
33381  # If so, the updated path is stored in $new_path.
33382  new_path="$input_to_shortpath"
33383
33384  input_path="$input_to_shortpath"
33385  # Check if we need to convert this using DOS-style short mode. If the path
33386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33387  # take no chances and rewrite it.
33388  # Note: m4 eats our [], so we need to use [ and ] instead.
33389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33390  if test "x$has_forbidden_chars" != x; then
33391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33395      # Going to short mode and back again did indeed matter. Since short mode is
33396      # case insensitive, let's make it lowercase to improve readability.
33397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33398      # Now convert it back to Unix-stile (cygpath)
33399      input_path=`$CYGPATH -u "$shortmode_path"`
33400      new_path="$input_path"
33401    fi
33402  fi
33403
33404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33405  if test "x$test_cygdrive_prefix" = x; then
33406    # As a simple fix, exclude /usr/bin since it's not a real path.
33407    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33409      # a path prefixed by /cygdrive for fixpath to work.
33410      new_path="$CYGWIN_ROOT_PATH$input_path"
33411    fi
33412  fi
33413
33414  # remove trailing .exe if any
33415  new_path="${new_path/%.exe/}"
33416
33417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33418
33419  # First separate the path from the arguments. This will split at the first
33420  # space.
33421  complete="$OBJC"
33422  path="${complete%% *}"
33423  tmp="$complete EOL"
33424  arguments="${tmp#* }"
33425
33426  # Input might be given as Windows format, start by converting to
33427  # unix format.
33428  new_path="$path"
33429
33430  windows_path="$new_path"
33431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33432    unix_path=`$CYGPATH -u "$windows_path"`
33433    new_path="$unix_path"
33434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33436    new_path="$unix_path"
33437  fi
33438
33439
33440  # Now try to locate executable using which
33441  new_path=`$WHICH "$new_path" 2> /dev/null`
33442
33443  if test "x$new_path" = x; then
33444    # Oops. Which didn't find the executable.
33445    # The splitting of arguments from the executable at a space might have been incorrect,
33446    # since paths with space are more likely in Windows. Give it another try with the whole
33447    # argument.
33448    path="$complete"
33449    arguments="EOL"
33450    new_path="$path"
33451
33452  windows_path="$new_path"
33453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33454    unix_path=`$CYGPATH -u "$windows_path"`
33455    new_path="$unix_path"
33456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33458    new_path="$unix_path"
33459  fi
33460
33461
33462    new_path=`$WHICH "$new_path" 2> /dev/null`
33463
33464    if test "x$new_path" = x; then
33465      # It's still not found. Now this is an unrecoverable error.
33466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33467$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33468      has_space=`$ECHO "$complete" | $GREP " "`
33469      if test "x$has_space" != x; then
33470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33472      fi
33473      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33474    fi
33475  fi
33476
33477  # Now new_path has a complete unix path to the binary
33478  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33479    # Keep paths in /bin as-is, but remove trailing .exe if any
33480    new_path="${new_path/%.exe/}"
33481    # Do not save /bin paths to all_fixpath_prefixes!
33482  else
33483    # Not in mixed or Windows style, start by that.
33484    new_path=`cmd //c echo $new_path`
33485
33486  input_path="$new_path"
33487  # Check if we need to convert this using DOS-style short mode. If the path
33488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33489  # take no chances and rewrite it.
33490  # Note: m4 eats our [], so we need to use [ and ] instead.
33491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33492  if test "x$has_forbidden_chars" != x; then
33493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33495  fi
33496
33497    # Output is in $new_path
33498
33499  windows_path="$new_path"
33500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33501    unix_path=`$CYGPATH -u "$windows_path"`
33502    new_path="$unix_path"
33503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33505    new_path="$unix_path"
33506  fi
33507
33508    # remove trailing .exe if any
33509    new_path="${new_path/%.exe/}"
33510
33511    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33512    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33513  fi
33514
33515  else
33516    # We're on a posix platform. Hooray! :)
33517    # First separate the path from the arguments. This will split at the first
33518    # space.
33519    complete="$OBJC"
33520    path="${complete%% *}"
33521    tmp="$complete EOL"
33522    arguments="${tmp#* }"
33523
33524    # Cannot rely on the command "which" here since it doesn't always work.
33525    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33526    if test -z "$is_absolute_path"; then
33527      # Path to executable is not absolute. Find it.
33528      IFS_save="$IFS"
33529      IFS=:
33530      for p in $PATH; do
33531        if test -f "$p/$path" && test -x "$p/$path"; then
33532          new_path="$p/$path"
33533          break
33534        fi
33535      done
33536      IFS="$IFS_save"
33537    else
33538      # This is an absolute path, we can use it without further modifications.
33539      new_path="$path"
33540    fi
33541
33542    if test "x$new_path" = x; then
33543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33544$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33545      has_space=`$ECHO "$complete" | $GREP " "`
33546      if test "x$has_space" != x; then
33547        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33548$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33549      fi
33550      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33551    fi
33552  fi
33553
33554  # Now join together the path and the arguments once again
33555  if test "x$arguments" != xEOL; then
33556    new_complete="$new_path ${arguments% *}"
33557  else
33558    new_complete="$new_path"
33559  fi
33560
33561  if test "x$complete" != "x$new_complete"; then
33562    OBJC="$new_complete"
33563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33564$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33565  fi
33566
33567
33568
33569  # Publish this variable in the help.
33570
33571
33572  if test "x$LIPO" = x; then
33573    # The variable is not set by user, try to locate tool using the code snippet
33574    for ac_prog in lipo
33575do
33576  # Extract the first word of "$ac_prog", so it can be a program name with args.
33577set dummy $ac_prog; ac_word=$2
33578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33579$as_echo_n "checking for $ac_word... " >&6; }
33580if ${ac_cv_path_LIPO+:} false; then :
33581  $as_echo_n "(cached) " >&6
33582else
33583  case $LIPO in
33584  [\\/]* | ?:[\\/]*)
33585  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33586  ;;
33587  *)
33588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33589for as_dir in $PATH
33590do
33591  IFS=$as_save_IFS
33592  test -z "$as_dir" && as_dir=.
33593    for ac_exec_ext in '' $ac_executable_extensions; do
33594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33595    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33597    break 2
33598  fi
33599done
33600  done
33601IFS=$as_save_IFS
33602
33603  ;;
33604esac
33605fi
33606LIPO=$ac_cv_path_LIPO
33607if test -n "$LIPO"; then
33608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33609$as_echo "$LIPO" >&6; }
33610else
33611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33612$as_echo "no" >&6; }
33613fi
33614
33615
33616  test -n "$LIPO" && break
33617done
33618
33619  else
33620    # The variable is set, but is it from the command line or the environment?
33621
33622    # Try to remove the string !LIPO! from our list.
33623    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33624    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33625      # If it failed, the variable was not from the command line. Ignore it,
33626      # but warn the user (except for BASH, which is always set by the calling BASH).
33627      if test "xLIPO" != xBASH; then
33628        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33629$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33630      fi
33631      # Try to locate tool using the code snippet
33632      for ac_prog in lipo
33633do
33634  # Extract the first word of "$ac_prog", so it can be a program name with args.
33635set dummy $ac_prog; ac_word=$2
33636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33637$as_echo_n "checking for $ac_word... " >&6; }
33638if ${ac_cv_path_LIPO+:} false; then :
33639  $as_echo_n "(cached) " >&6
33640else
33641  case $LIPO in
33642  [\\/]* | ?:[\\/]*)
33643  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33644  ;;
33645  *)
33646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33647for as_dir in $PATH
33648do
33649  IFS=$as_save_IFS
33650  test -z "$as_dir" && as_dir=.
33651    for ac_exec_ext in '' $ac_executable_extensions; do
33652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33653    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33655    break 2
33656  fi
33657done
33658  done
33659IFS=$as_save_IFS
33660
33661  ;;
33662esac
33663fi
33664LIPO=$ac_cv_path_LIPO
33665if test -n "$LIPO"; then
33666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33667$as_echo "$LIPO" >&6; }
33668else
33669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33670$as_echo "no" >&6; }
33671fi
33672
33673
33674  test -n "$LIPO" && break
33675done
33676
33677    else
33678      # If it succeeded, then it was overridden by the user. We will use it
33679      # for the tool.
33680
33681      # First remove it from the list of overridden variables, so we can test
33682      # for unknown variables in the end.
33683      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33684
33685      # Check if the provided tool contains a complete path.
33686      tool_specified="$LIPO"
33687      tool_basename="${tool_specified##*/}"
33688      if test "x$tool_basename" = "x$tool_specified"; then
33689        # A command without a complete path is provided, search $PATH.
33690        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33691$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33692        # Extract the first word of "$tool_basename", so it can be a program name with args.
33693set dummy $tool_basename; ac_word=$2
33694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33695$as_echo_n "checking for $ac_word... " >&6; }
33696if ${ac_cv_path_LIPO+:} false; then :
33697  $as_echo_n "(cached) " >&6
33698else
33699  case $LIPO in
33700  [\\/]* | ?:[\\/]*)
33701  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33702  ;;
33703  *)
33704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33705for as_dir in $PATH
33706do
33707  IFS=$as_save_IFS
33708  test -z "$as_dir" && as_dir=.
33709    for ac_exec_ext in '' $ac_executable_extensions; do
33710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33711    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33713    break 2
33714  fi
33715done
33716  done
33717IFS=$as_save_IFS
33718
33719  ;;
33720esac
33721fi
33722LIPO=$ac_cv_path_LIPO
33723if test -n "$LIPO"; then
33724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33725$as_echo "$LIPO" >&6; }
33726else
33727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33728$as_echo "no" >&6; }
33729fi
33730
33731
33732        if test "x$LIPO" = x; then
33733          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33734        fi
33735      else
33736        # Otherwise we believe it is a complete path. Use it as it is.
33737        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33738$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33739        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33740$as_echo_n "checking for LIPO... " >&6; }
33741        if test ! -x "$tool_specified"; then
33742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33743$as_echo "not found" >&6; }
33744          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33745        fi
33746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33747$as_echo "$tool_specified" >&6; }
33748      fi
33749    fi
33750  fi
33751
33752
33753
33754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33755
33756  # First separate the path from the arguments. This will split at the first
33757  # space.
33758  complete="$LIPO"
33759  path="${complete%% *}"
33760  tmp="$complete EOL"
33761  arguments="${tmp#* }"
33762
33763  # Input might be given as Windows format, start by converting to
33764  # unix format.
33765  new_path=`$CYGPATH -u "$path"`
33766
33767  # Now try to locate executable using which
33768  new_path=`$WHICH "$new_path" 2> /dev/null`
33769  # bat and cmd files are not always considered executable in cygwin causing which
33770  # to not find them
33771  if test "x$new_path" = x \
33772      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33773      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33774    new_path=`$CYGPATH -u "$path"`
33775  fi
33776  if test "x$new_path" = x; then
33777    # Oops. Which didn't find the executable.
33778    # The splitting of arguments from the executable at a space might have been incorrect,
33779    # since paths with space are more likely in Windows. Give it another try with the whole
33780    # argument.
33781    path="$complete"
33782    arguments="EOL"
33783    new_path=`$CYGPATH -u "$path"`
33784    new_path=`$WHICH "$new_path" 2> /dev/null`
33785    # bat and cmd files are not always considered executable in cygwin causing which
33786    # to not find them
33787    if test "x$new_path" = x \
33788        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33789        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33790      new_path=`$CYGPATH -u "$path"`
33791    fi
33792    if test "x$new_path" = x; then
33793      # It's still not found. Now this is an unrecoverable error.
33794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33795$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33796      has_space=`$ECHO "$complete" | $GREP " "`
33797      if test "x$has_space" != x; then
33798        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33799$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33800      fi
33801      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33802    fi
33803  fi
33804
33805  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33806  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33807  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33808  # "foo.exe" is OK but "foo" is an error.
33809  #
33810  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33811  # It is also a way to make sure we got the proper file name for the real test later on.
33812  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33813  if test "x$test_shortpath" = x; then
33814    # Short path failed, file does not exist as specified.
33815    # Try adding .exe or .cmd
33816    if test -f "${new_path}.exe"; then
33817      input_to_shortpath="${new_path}.exe"
33818    elif test -f "${new_path}.cmd"; then
33819      input_to_shortpath="${new_path}.cmd"
33820    else
33821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33822$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33823      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33824$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33825      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33826    fi
33827  else
33828    input_to_shortpath="$new_path"
33829  fi
33830
33831  # Call helper function which possibly converts this using DOS-style short mode.
33832  # If so, the updated path is stored in $new_path.
33833  new_path="$input_to_shortpath"
33834
33835  input_path="$input_to_shortpath"
33836  # Check if we need to convert this using DOS-style short mode. If the path
33837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33838  # take no chances and rewrite it.
33839  # Note: m4 eats our [], so we need to use [ and ] instead.
33840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33841  if test "x$has_forbidden_chars" != x; then
33842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33846      # Going to short mode and back again did indeed matter. Since short mode is
33847      # case insensitive, let's make it lowercase to improve readability.
33848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33849      # Now convert it back to Unix-stile (cygpath)
33850      input_path=`$CYGPATH -u "$shortmode_path"`
33851      new_path="$input_path"
33852    fi
33853  fi
33854
33855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33856  if test "x$test_cygdrive_prefix" = x; then
33857    # As a simple fix, exclude /usr/bin since it's not a real path.
33858    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33860      # a path prefixed by /cygdrive for fixpath to work.
33861      new_path="$CYGWIN_ROOT_PATH$input_path"
33862    fi
33863  fi
33864
33865  # remove trailing .exe if any
33866  new_path="${new_path/%.exe/}"
33867
33868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33869
33870  # First separate the path from the arguments. This will split at the first
33871  # space.
33872  complete="$LIPO"
33873  path="${complete%% *}"
33874  tmp="$complete EOL"
33875  arguments="${tmp#* }"
33876
33877  # Input might be given as Windows format, start by converting to
33878  # unix format.
33879  new_path="$path"
33880
33881  windows_path="$new_path"
33882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33883    unix_path=`$CYGPATH -u "$windows_path"`
33884    new_path="$unix_path"
33885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33887    new_path="$unix_path"
33888  fi
33889
33890
33891  # Now try to locate executable using which
33892  new_path=`$WHICH "$new_path" 2> /dev/null`
33893
33894  if test "x$new_path" = x; then
33895    # Oops. Which didn't find the executable.
33896    # The splitting of arguments from the executable at a space might have been incorrect,
33897    # since paths with space are more likely in Windows. Give it another try with the whole
33898    # argument.
33899    path="$complete"
33900    arguments="EOL"
33901    new_path="$path"
33902
33903  windows_path="$new_path"
33904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33905    unix_path=`$CYGPATH -u "$windows_path"`
33906    new_path="$unix_path"
33907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33909    new_path="$unix_path"
33910  fi
33911
33912
33913    new_path=`$WHICH "$new_path" 2> /dev/null`
33914
33915    if test "x$new_path" = x; then
33916      # It's still not found. Now this is an unrecoverable error.
33917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33918$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33919      has_space=`$ECHO "$complete" | $GREP " "`
33920      if test "x$has_space" != x; then
33921        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33922$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33923      fi
33924      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33925    fi
33926  fi
33927
33928  # Now new_path has a complete unix path to the binary
33929  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33930    # Keep paths in /bin as-is, but remove trailing .exe if any
33931    new_path="${new_path/%.exe/}"
33932    # Do not save /bin paths to all_fixpath_prefixes!
33933  else
33934    # Not in mixed or Windows style, start by that.
33935    new_path=`cmd //c echo $new_path`
33936
33937  input_path="$new_path"
33938  # Check if we need to convert this using DOS-style short mode. If the path
33939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33940  # take no chances and rewrite it.
33941  # Note: m4 eats our [], so we need to use [ and ] instead.
33942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33943  if test "x$has_forbidden_chars" != x; then
33944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33946  fi
33947
33948    # Output is in $new_path
33949
33950  windows_path="$new_path"
33951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33952    unix_path=`$CYGPATH -u "$windows_path"`
33953    new_path="$unix_path"
33954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33956    new_path="$unix_path"
33957  fi
33958
33959    # remove trailing .exe if any
33960    new_path="${new_path/%.exe/}"
33961
33962    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33963    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33964  fi
33965
33966  else
33967    # We're on a posix platform. Hooray! :)
33968    # First separate the path from the arguments. This will split at the first
33969    # space.
33970    complete="$LIPO"
33971    path="${complete%% *}"
33972    tmp="$complete EOL"
33973    arguments="${tmp#* }"
33974
33975    # Cannot rely on the command "which" here since it doesn't always work.
33976    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33977    if test -z "$is_absolute_path"; then
33978      # Path to executable is not absolute. Find it.
33979      IFS_save="$IFS"
33980      IFS=:
33981      for p in $PATH; do
33982        if test -f "$p/$path" && test -x "$p/$path"; then
33983          new_path="$p/$path"
33984          break
33985        fi
33986      done
33987      IFS="$IFS_save"
33988    else
33989      # This is an absolute path, we can use it without further modifications.
33990      new_path="$path"
33991    fi
33992
33993    if test "x$new_path" = x; then
33994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33995$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33996      has_space=`$ECHO "$complete" | $GREP " "`
33997      if test "x$has_space" != x; then
33998        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33999$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34000      fi
34001      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34002    fi
34003  fi
34004
34005  # Now join together the path and the arguments once again
34006  if test "x$arguments" != xEOL; then
34007    new_complete="$new_path ${arguments% *}"
34008  else
34009    new_complete="$new_path"
34010  fi
34011
34012  if test "x$complete" != "x$new_complete"; then
34013    LIPO="$new_complete"
34014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34015$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34016  fi
34017
34018  else
34019    OBJC=
34020  fi
34021
34022  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34023    # Extract the first word of "mt", so it can be a program name with args.
34024set dummy mt; ac_word=$2
34025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34026$as_echo_n "checking for $ac_word... " >&6; }
34027if ${ac_cv_prog_MT+:} false; then :
34028  $as_echo_n "(cached) " >&6
34029else
34030  if test -n "$MT"; then
34031  ac_cv_prog_MT="$MT" # Let the user override the test.
34032else
34033  ac_prog_rejected=no
34034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34035for as_dir in $PATH
34036do
34037  IFS=$as_save_IFS
34038  test -z "$as_dir" && as_dir=.
34039    for ac_exec_ext in '' $ac_executable_extensions; do
34040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34041    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34042       ac_prog_rejected=yes
34043       continue
34044     fi
34045    ac_cv_prog_MT="mt"
34046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34047    break 2
34048  fi
34049done
34050  done
34051IFS=$as_save_IFS
34052
34053if test $ac_prog_rejected = yes; then
34054  # We found a bogon in the path, so make sure we never use it.
34055  set dummy $ac_cv_prog_MT
34056  shift
34057  if test $# != 0; then
34058    # We chose a different compiler from the bogus one.
34059    # However, it has the same basename, so the bogon will be chosen
34060    # first if we set MT to just the basename; use the full file name.
34061    shift
34062    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34063  fi
34064fi
34065fi
34066fi
34067MT=$ac_cv_prog_MT
34068if test -n "$MT"; then
34069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34070$as_echo "$MT" >&6; }
34071else
34072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34073$as_echo "no" >&6; }
34074fi
34075
34076
34077
34078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34079
34080  # First separate the path from the arguments. This will split at the first
34081  # space.
34082  complete="$MT"
34083  path="${complete%% *}"
34084  tmp="$complete EOL"
34085  arguments="${tmp#* }"
34086
34087  # Input might be given as Windows format, start by converting to
34088  # unix format.
34089  new_path=`$CYGPATH -u "$path"`
34090
34091  # Now try to locate executable using which
34092  new_path=`$WHICH "$new_path" 2> /dev/null`
34093  # bat and cmd files are not always considered executable in cygwin causing which
34094  # to not find them
34095  if test "x$new_path" = x \
34096      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34097      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34098    new_path=`$CYGPATH -u "$path"`
34099  fi
34100  if test "x$new_path" = x; then
34101    # Oops. Which didn't find the executable.
34102    # The splitting of arguments from the executable at a space might have been incorrect,
34103    # since paths with space are more likely in Windows. Give it another try with the whole
34104    # argument.
34105    path="$complete"
34106    arguments="EOL"
34107    new_path=`$CYGPATH -u "$path"`
34108    new_path=`$WHICH "$new_path" 2> /dev/null`
34109    # bat and cmd files are not always considered executable in cygwin causing which
34110    # to not find them
34111    if test "x$new_path" = x \
34112        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34113        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34114      new_path=`$CYGPATH -u "$path"`
34115    fi
34116    if test "x$new_path" = x; then
34117      # It's still not found. Now this is an unrecoverable error.
34118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34119$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34120      has_space=`$ECHO "$complete" | $GREP " "`
34121      if test "x$has_space" != x; then
34122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34124      fi
34125      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34126    fi
34127  fi
34128
34129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34132  # "foo.exe" is OK but "foo" is an error.
34133  #
34134  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34135  # It is also a way to make sure we got the proper file name for the real test later on.
34136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34137  if test "x$test_shortpath" = x; then
34138    # Short path failed, file does not exist as specified.
34139    # Try adding .exe or .cmd
34140    if test -f "${new_path}.exe"; then
34141      input_to_shortpath="${new_path}.exe"
34142    elif test -f "${new_path}.cmd"; then
34143      input_to_shortpath="${new_path}.cmd"
34144    else
34145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34146$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34147      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34148$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34149      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34150    fi
34151  else
34152    input_to_shortpath="$new_path"
34153  fi
34154
34155  # Call helper function which possibly converts this using DOS-style short mode.
34156  # If so, the updated path is stored in $new_path.
34157  new_path="$input_to_shortpath"
34158
34159  input_path="$input_to_shortpath"
34160  # Check if we need to convert this using DOS-style short mode. If the path
34161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34162  # take no chances and rewrite it.
34163  # Note: m4 eats our [], so we need to use [ and ] instead.
34164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34165  if test "x$has_forbidden_chars" != x; then
34166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34170      # Going to short mode and back again did indeed matter. Since short mode is
34171      # case insensitive, let's make it lowercase to improve readability.
34172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34173      # Now convert it back to Unix-stile (cygpath)
34174      input_path=`$CYGPATH -u "$shortmode_path"`
34175      new_path="$input_path"
34176    fi
34177  fi
34178
34179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34180  if test "x$test_cygdrive_prefix" = x; then
34181    # As a simple fix, exclude /usr/bin since it's not a real path.
34182    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34184      # a path prefixed by /cygdrive for fixpath to work.
34185      new_path="$CYGWIN_ROOT_PATH$input_path"
34186    fi
34187  fi
34188
34189  # remove trailing .exe if any
34190  new_path="${new_path/%.exe/}"
34191
34192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34193
34194  # First separate the path from the arguments. This will split at the first
34195  # space.
34196  complete="$MT"
34197  path="${complete%% *}"
34198  tmp="$complete EOL"
34199  arguments="${tmp#* }"
34200
34201  # Input might be given as Windows format, start by converting to
34202  # unix format.
34203  new_path="$path"
34204
34205  windows_path="$new_path"
34206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34207    unix_path=`$CYGPATH -u "$windows_path"`
34208    new_path="$unix_path"
34209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34211    new_path="$unix_path"
34212  fi
34213
34214
34215  # Now try to locate executable using which
34216  new_path=`$WHICH "$new_path" 2> /dev/null`
34217
34218  if test "x$new_path" = x; then
34219    # Oops. Which didn't find the executable.
34220    # The splitting of arguments from the executable at a space might have been incorrect,
34221    # since paths with space are more likely in Windows. Give it another try with the whole
34222    # argument.
34223    path="$complete"
34224    arguments="EOL"
34225    new_path="$path"
34226
34227  windows_path="$new_path"
34228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34229    unix_path=`$CYGPATH -u "$windows_path"`
34230    new_path="$unix_path"
34231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34233    new_path="$unix_path"
34234  fi
34235
34236
34237    new_path=`$WHICH "$new_path" 2> /dev/null`
34238
34239    if test "x$new_path" = x; then
34240      # It's still not found. Now this is an unrecoverable error.
34241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34242$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34243      has_space=`$ECHO "$complete" | $GREP " "`
34244      if test "x$has_space" != x; then
34245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34247      fi
34248      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34249    fi
34250  fi
34251
34252  # Now new_path has a complete unix path to the binary
34253  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34254    # Keep paths in /bin as-is, but remove trailing .exe if any
34255    new_path="${new_path/%.exe/}"
34256    # Do not save /bin paths to all_fixpath_prefixes!
34257  else
34258    # Not in mixed or Windows style, start by that.
34259    new_path=`cmd //c echo $new_path`
34260
34261  input_path="$new_path"
34262  # Check if we need to convert this using DOS-style short mode. If the path
34263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34264  # take no chances and rewrite it.
34265  # Note: m4 eats our [], so we need to use [ and ] instead.
34266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34267  if test "x$has_forbidden_chars" != x; then
34268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34270  fi
34271
34272    # Output is in $new_path
34273
34274  windows_path="$new_path"
34275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34276    unix_path=`$CYGPATH -u "$windows_path"`
34277    new_path="$unix_path"
34278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34280    new_path="$unix_path"
34281  fi
34282
34283    # remove trailing .exe if any
34284    new_path="${new_path/%.exe/}"
34285
34286    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34287    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34288  fi
34289
34290  else
34291    # We're on a posix platform. Hooray! :)
34292    # First separate the path from the arguments. This will split at the first
34293    # space.
34294    complete="$MT"
34295    path="${complete%% *}"
34296    tmp="$complete EOL"
34297    arguments="${tmp#* }"
34298
34299    # Cannot rely on the command "which" here since it doesn't always work.
34300    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34301    if test -z "$is_absolute_path"; then
34302      # Path to executable is not absolute. Find it.
34303      IFS_save="$IFS"
34304      IFS=:
34305      for p in $PATH; do
34306        if test -f "$p/$path" && test -x "$p/$path"; then
34307          new_path="$p/$path"
34308          break
34309        fi
34310      done
34311      IFS="$IFS_save"
34312    else
34313      # This is an absolute path, we can use it without further modifications.
34314      new_path="$path"
34315    fi
34316
34317    if test "x$new_path" = x; then
34318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34319$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34320      has_space=`$ECHO "$complete" | $GREP " "`
34321      if test "x$has_space" != x; then
34322        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34323$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34324      fi
34325      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34326    fi
34327  fi
34328
34329  # Now join together the path and the arguments once again
34330  if test "x$arguments" != xEOL; then
34331    new_complete="$new_path ${arguments% *}"
34332  else
34333    new_complete="$new_path"
34334  fi
34335
34336  if test "x$complete" != "x$new_complete"; then
34337    MT="$new_complete"
34338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34339$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34340  fi
34341
34342    # Setup the resource compiler (RC)
34343    # Extract the first word of "rc", so it can be a program name with args.
34344set dummy rc; ac_word=$2
34345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34346$as_echo_n "checking for $ac_word... " >&6; }
34347if ${ac_cv_prog_RC+:} false; then :
34348  $as_echo_n "(cached) " >&6
34349else
34350  if test -n "$RC"; then
34351  ac_cv_prog_RC="$RC" # Let the user override the test.
34352else
34353  ac_prog_rejected=no
34354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34355for as_dir in $PATH
34356do
34357  IFS=$as_save_IFS
34358  test -z "$as_dir" && as_dir=.
34359    for ac_exec_ext in '' $ac_executable_extensions; do
34360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34361    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34362       ac_prog_rejected=yes
34363       continue
34364     fi
34365    ac_cv_prog_RC="rc"
34366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34367    break 2
34368  fi
34369done
34370  done
34371IFS=$as_save_IFS
34372
34373if test $ac_prog_rejected = yes; then
34374  # We found a bogon in the path, so make sure we never use it.
34375  set dummy $ac_cv_prog_RC
34376  shift
34377  if test $# != 0; then
34378    # We chose a different compiler from the bogus one.
34379    # However, it has the same basename, so the bogon will be chosen
34380    # first if we set RC to just the basename; use the full file name.
34381    shift
34382    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34383  fi
34384fi
34385fi
34386fi
34387RC=$ac_cv_prog_RC
34388if test -n "$RC"; then
34389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34390$as_echo "$RC" >&6; }
34391else
34392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34393$as_echo "no" >&6; }
34394fi
34395
34396
34397
34398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34399
34400  # First separate the path from the arguments. This will split at the first
34401  # space.
34402  complete="$RC"
34403  path="${complete%% *}"
34404  tmp="$complete EOL"
34405  arguments="${tmp#* }"
34406
34407  # Input might be given as Windows format, start by converting to
34408  # unix format.
34409  new_path=`$CYGPATH -u "$path"`
34410
34411  # Now try to locate executable using which
34412  new_path=`$WHICH "$new_path" 2> /dev/null`
34413  # bat and cmd files are not always considered executable in cygwin causing which
34414  # to not find them
34415  if test "x$new_path" = x \
34416      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34417      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34418    new_path=`$CYGPATH -u "$path"`
34419  fi
34420  if test "x$new_path" = x; then
34421    # Oops. Which didn't find the executable.
34422    # The splitting of arguments from the executable at a space might have been incorrect,
34423    # since paths with space are more likely in Windows. Give it another try with the whole
34424    # argument.
34425    path="$complete"
34426    arguments="EOL"
34427    new_path=`$CYGPATH -u "$path"`
34428    new_path=`$WHICH "$new_path" 2> /dev/null`
34429    # bat and cmd files are not always considered executable in cygwin causing which
34430    # to not find them
34431    if test "x$new_path" = x \
34432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34434      new_path=`$CYGPATH -u "$path"`
34435    fi
34436    if test "x$new_path" = x; then
34437      # It's still not found. Now this is an unrecoverable error.
34438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34439$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34440      has_space=`$ECHO "$complete" | $GREP " "`
34441      if test "x$has_space" != x; then
34442        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34443$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34444      fi
34445      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34446    fi
34447  fi
34448
34449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34452  # "foo.exe" is OK but "foo" is an error.
34453  #
34454  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34455  # It is also a way to make sure we got the proper file name for the real test later on.
34456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34457  if test "x$test_shortpath" = x; then
34458    # Short path failed, file does not exist as specified.
34459    # Try adding .exe or .cmd
34460    if test -f "${new_path}.exe"; then
34461      input_to_shortpath="${new_path}.exe"
34462    elif test -f "${new_path}.cmd"; then
34463      input_to_shortpath="${new_path}.cmd"
34464    else
34465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34466$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34467      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34468$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34469      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34470    fi
34471  else
34472    input_to_shortpath="$new_path"
34473  fi
34474
34475  # Call helper function which possibly converts this using DOS-style short mode.
34476  # If so, the updated path is stored in $new_path.
34477  new_path="$input_to_shortpath"
34478
34479  input_path="$input_to_shortpath"
34480  # Check if we need to convert this using DOS-style short mode. If the path
34481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34482  # take no chances and rewrite it.
34483  # Note: m4 eats our [], so we need to use [ and ] instead.
34484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34485  if test "x$has_forbidden_chars" != x; then
34486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34490      # Going to short mode and back again did indeed matter. Since short mode is
34491      # case insensitive, let's make it lowercase to improve readability.
34492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34493      # Now convert it back to Unix-stile (cygpath)
34494      input_path=`$CYGPATH -u "$shortmode_path"`
34495      new_path="$input_path"
34496    fi
34497  fi
34498
34499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34500  if test "x$test_cygdrive_prefix" = x; then
34501    # As a simple fix, exclude /usr/bin since it's not a real path.
34502    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34504      # a path prefixed by /cygdrive for fixpath to work.
34505      new_path="$CYGWIN_ROOT_PATH$input_path"
34506    fi
34507  fi
34508
34509  # remove trailing .exe if any
34510  new_path="${new_path/%.exe/}"
34511
34512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34513
34514  # First separate the path from the arguments. This will split at the first
34515  # space.
34516  complete="$RC"
34517  path="${complete%% *}"
34518  tmp="$complete EOL"
34519  arguments="${tmp#* }"
34520
34521  # Input might be given as Windows format, start by converting to
34522  # unix format.
34523  new_path="$path"
34524
34525  windows_path="$new_path"
34526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34527    unix_path=`$CYGPATH -u "$windows_path"`
34528    new_path="$unix_path"
34529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34531    new_path="$unix_path"
34532  fi
34533
34534
34535  # Now try to locate executable using which
34536  new_path=`$WHICH "$new_path" 2> /dev/null`
34537
34538  if test "x$new_path" = x; then
34539    # Oops. Which didn't find the executable.
34540    # The splitting of arguments from the executable at a space might have been incorrect,
34541    # since paths with space are more likely in Windows. Give it another try with the whole
34542    # argument.
34543    path="$complete"
34544    arguments="EOL"
34545    new_path="$path"
34546
34547  windows_path="$new_path"
34548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34549    unix_path=`$CYGPATH -u "$windows_path"`
34550    new_path="$unix_path"
34551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34553    new_path="$unix_path"
34554  fi
34555
34556
34557    new_path=`$WHICH "$new_path" 2> /dev/null`
34558
34559    if test "x$new_path" = x; then
34560      # It's still not found. Now this is an unrecoverable error.
34561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34562$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34563      has_space=`$ECHO "$complete" | $GREP " "`
34564      if test "x$has_space" != x; then
34565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34567      fi
34568      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34569    fi
34570  fi
34571
34572  # Now new_path has a complete unix path to the binary
34573  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34574    # Keep paths in /bin as-is, but remove trailing .exe if any
34575    new_path="${new_path/%.exe/}"
34576    # Do not save /bin paths to all_fixpath_prefixes!
34577  else
34578    # Not in mixed or Windows style, start by that.
34579    new_path=`cmd //c echo $new_path`
34580
34581  input_path="$new_path"
34582  # Check if we need to convert this using DOS-style short mode. If the path
34583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34584  # take no chances and rewrite it.
34585  # Note: m4 eats our [], so we need to use [ and ] instead.
34586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34587  if test "x$has_forbidden_chars" != x; then
34588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34590  fi
34591
34592    # Output is in $new_path
34593
34594  windows_path="$new_path"
34595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34596    unix_path=`$CYGPATH -u "$windows_path"`
34597    new_path="$unix_path"
34598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34600    new_path="$unix_path"
34601  fi
34602
34603    # remove trailing .exe if any
34604    new_path="${new_path/%.exe/}"
34605
34606    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34607    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34608  fi
34609
34610  else
34611    # We're on a posix platform. Hooray! :)
34612    # First separate the path from the arguments. This will split at the first
34613    # space.
34614    complete="$RC"
34615    path="${complete%% *}"
34616    tmp="$complete EOL"
34617    arguments="${tmp#* }"
34618
34619    # Cannot rely on the command "which" here since it doesn't always work.
34620    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34621    if test -z "$is_absolute_path"; then
34622      # Path to executable is not absolute. Find it.
34623      IFS_save="$IFS"
34624      IFS=:
34625      for p in $PATH; do
34626        if test -f "$p/$path" && test -x "$p/$path"; then
34627          new_path="$p/$path"
34628          break
34629        fi
34630      done
34631      IFS="$IFS_save"
34632    else
34633      # This is an absolute path, we can use it without further modifications.
34634      new_path="$path"
34635    fi
34636
34637    if test "x$new_path" = x; then
34638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34639$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34640      has_space=`$ECHO "$complete" | $GREP " "`
34641      if test "x$has_space" != x; then
34642        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34643$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34644      fi
34645      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34646    fi
34647  fi
34648
34649  # Now join together the path and the arguments once again
34650  if test "x$arguments" != xEOL; then
34651    new_complete="$new_path ${arguments% *}"
34652  else
34653    new_complete="$new_path"
34654  fi
34655
34656  if test "x$complete" != "x$new_complete"; then
34657    RC="$new_complete"
34658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34659$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34660  fi
34661
34662    # Extract the first word of "dumpbin", so it can be a program name with args.
34663set dummy dumpbin; ac_word=$2
34664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34665$as_echo_n "checking for $ac_word... " >&6; }
34666if ${ac_cv_prog_DUMPBIN+:} false; then :
34667  $as_echo_n "(cached) " >&6
34668else
34669  if test -n "$DUMPBIN"; then
34670  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34671else
34672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34673for as_dir in $PATH
34674do
34675  IFS=$as_save_IFS
34676  test -z "$as_dir" && as_dir=.
34677    for ac_exec_ext in '' $ac_executable_extensions; do
34678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34679    ac_cv_prog_DUMPBIN="dumpbin"
34680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34681    break 2
34682  fi
34683done
34684  done
34685IFS=$as_save_IFS
34686
34687fi
34688fi
34689DUMPBIN=$ac_cv_prog_DUMPBIN
34690if test -n "$DUMPBIN"; then
34691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34692$as_echo "$DUMPBIN" >&6; }
34693else
34694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34695$as_echo "no" >&6; }
34696fi
34697
34698
34699
34700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34701
34702  # First separate the path from the arguments. This will split at the first
34703  # space.
34704  complete="$DUMPBIN"
34705  path="${complete%% *}"
34706  tmp="$complete EOL"
34707  arguments="${tmp#* }"
34708
34709  # Input might be given as Windows format, start by converting to
34710  # unix format.
34711  new_path=`$CYGPATH -u "$path"`
34712
34713  # Now try to locate executable using which
34714  new_path=`$WHICH "$new_path" 2> /dev/null`
34715  # bat and cmd files are not always considered executable in cygwin causing which
34716  # to not find them
34717  if test "x$new_path" = x \
34718      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34719      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34720    new_path=`$CYGPATH -u "$path"`
34721  fi
34722  if test "x$new_path" = x; then
34723    # Oops. Which didn't find the executable.
34724    # The splitting of arguments from the executable at a space might have been incorrect,
34725    # since paths with space are more likely in Windows. Give it another try with the whole
34726    # argument.
34727    path="$complete"
34728    arguments="EOL"
34729    new_path=`$CYGPATH -u "$path"`
34730    new_path=`$WHICH "$new_path" 2> /dev/null`
34731    # bat and cmd files are not always considered executable in cygwin causing which
34732    # to not find them
34733    if test "x$new_path" = x \
34734        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34735        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34736      new_path=`$CYGPATH -u "$path"`
34737    fi
34738    if test "x$new_path" = x; then
34739      # It's still not found. Now this is an unrecoverable error.
34740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34741$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34742      has_space=`$ECHO "$complete" | $GREP " "`
34743      if test "x$has_space" != x; then
34744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34746      fi
34747      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34748    fi
34749  fi
34750
34751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34754  # "foo.exe" is OK but "foo" is an error.
34755  #
34756  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34757  # It is also a way to make sure we got the proper file name for the real test later on.
34758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34759  if test "x$test_shortpath" = x; then
34760    # Short path failed, file does not exist as specified.
34761    # Try adding .exe or .cmd
34762    if test -f "${new_path}.exe"; then
34763      input_to_shortpath="${new_path}.exe"
34764    elif test -f "${new_path}.cmd"; then
34765      input_to_shortpath="${new_path}.cmd"
34766    else
34767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34768$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34769      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34770$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34771      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34772    fi
34773  else
34774    input_to_shortpath="$new_path"
34775  fi
34776
34777  # Call helper function which possibly converts this using DOS-style short mode.
34778  # If so, the updated path is stored in $new_path.
34779  new_path="$input_to_shortpath"
34780
34781  input_path="$input_to_shortpath"
34782  # Check if we need to convert this using DOS-style short mode. If the path
34783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34784  # take no chances and rewrite it.
34785  # Note: m4 eats our [], so we need to use [ and ] instead.
34786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34787  if test "x$has_forbidden_chars" != x; then
34788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34792      # Going to short mode and back again did indeed matter. Since short mode is
34793      # case insensitive, let's make it lowercase to improve readability.
34794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34795      # Now convert it back to Unix-stile (cygpath)
34796      input_path=`$CYGPATH -u "$shortmode_path"`
34797      new_path="$input_path"
34798    fi
34799  fi
34800
34801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34802  if test "x$test_cygdrive_prefix" = x; then
34803    # As a simple fix, exclude /usr/bin since it's not a real path.
34804    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34806      # a path prefixed by /cygdrive for fixpath to work.
34807      new_path="$CYGWIN_ROOT_PATH$input_path"
34808    fi
34809  fi
34810
34811  # remove trailing .exe if any
34812  new_path="${new_path/%.exe/}"
34813
34814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34815
34816  # First separate the path from the arguments. This will split at the first
34817  # space.
34818  complete="$DUMPBIN"
34819  path="${complete%% *}"
34820  tmp="$complete EOL"
34821  arguments="${tmp#* }"
34822
34823  # Input might be given as Windows format, start by converting to
34824  # unix format.
34825  new_path="$path"
34826
34827  windows_path="$new_path"
34828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34829    unix_path=`$CYGPATH -u "$windows_path"`
34830    new_path="$unix_path"
34831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34833    new_path="$unix_path"
34834  fi
34835
34836
34837  # Now try to locate executable using which
34838  new_path=`$WHICH "$new_path" 2> /dev/null`
34839
34840  if test "x$new_path" = x; then
34841    # Oops. Which didn't find the executable.
34842    # The splitting of arguments from the executable at a space might have been incorrect,
34843    # since paths with space are more likely in Windows. Give it another try with the whole
34844    # argument.
34845    path="$complete"
34846    arguments="EOL"
34847    new_path="$path"
34848
34849  windows_path="$new_path"
34850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34851    unix_path=`$CYGPATH -u "$windows_path"`
34852    new_path="$unix_path"
34853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34855    new_path="$unix_path"
34856  fi
34857
34858
34859    new_path=`$WHICH "$new_path" 2> /dev/null`
34860
34861    if test "x$new_path" = x; then
34862      # It's still not found. Now this is an unrecoverable error.
34863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34864$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34865      has_space=`$ECHO "$complete" | $GREP " "`
34866      if test "x$has_space" != x; then
34867        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34868$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34869      fi
34870      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34871    fi
34872  fi
34873
34874  # Now new_path has a complete unix path to the binary
34875  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34876    # Keep paths in /bin as-is, but remove trailing .exe if any
34877    new_path="${new_path/%.exe/}"
34878    # Do not save /bin paths to all_fixpath_prefixes!
34879  else
34880    # Not in mixed or Windows style, start by that.
34881    new_path=`cmd //c echo $new_path`
34882
34883  input_path="$new_path"
34884  # Check if we need to convert this using DOS-style short mode. If the path
34885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34886  # take no chances and rewrite it.
34887  # Note: m4 eats our [], so we need to use [ and ] instead.
34888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34889  if test "x$has_forbidden_chars" != x; then
34890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34892  fi
34893
34894    # Output is in $new_path
34895
34896  windows_path="$new_path"
34897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34898    unix_path=`$CYGPATH -u "$windows_path"`
34899    new_path="$unix_path"
34900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34902    new_path="$unix_path"
34903  fi
34904
34905    # remove trailing .exe if any
34906    new_path="${new_path/%.exe/}"
34907
34908    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34909    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34910  fi
34911
34912  else
34913    # We're on a posix platform. Hooray! :)
34914    # First separate the path from the arguments. This will split at the first
34915    # space.
34916    complete="$DUMPBIN"
34917    path="${complete%% *}"
34918    tmp="$complete EOL"
34919    arguments="${tmp#* }"
34920
34921    # Cannot rely on the command "which" here since it doesn't always work.
34922    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34923    if test -z "$is_absolute_path"; then
34924      # Path to executable is not absolute. Find it.
34925      IFS_save="$IFS"
34926      IFS=:
34927      for p in $PATH; do
34928        if test -f "$p/$path" && test -x "$p/$path"; then
34929          new_path="$p/$path"
34930          break
34931        fi
34932      done
34933      IFS="$IFS_save"
34934    else
34935      # This is an absolute path, we can use it without further modifications.
34936      new_path="$path"
34937    fi
34938
34939    if test "x$new_path" = x; then
34940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34941$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34942      has_space=`$ECHO "$complete" | $GREP " "`
34943      if test "x$has_space" != x; then
34944        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34945$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34946      fi
34947      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34948    fi
34949  fi
34950
34951  # Now join together the path and the arguments once again
34952  if test "x$arguments" != xEOL; then
34953    new_complete="$new_path ${arguments% *}"
34954  else
34955    new_complete="$new_path"
34956  fi
34957
34958  if test "x$complete" != "x$new_complete"; then
34959    DUMPBIN="$new_complete"
34960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34961$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34962  fi
34963
34964  fi
34965
34966  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34967
34968
34969  # Publish this variable in the help.
34970
34971
34972  if test "x$STRIP" = x; then
34973    # The variable is not set by user, try to locate tool using the code snippet
34974    for ac_prog in strip
34975do
34976  # Extract the first word of "$ac_prog", so it can be a program name with args.
34977set dummy $ac_prog; ac_word=$2
34978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34979$as_echo_n "checking for $ac_word... " >&6; }
34980if ${ac_cv_path_STRIP+:} false; then :
34981  $as_echo_n "(cached) " >&6
34982else
34983  case $STRIP in
34984  [\\/]* | ?:[\\/]*)
34985  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34986  ;;
34987  *)
34988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34989for as_dir in $PATH
34990do
34991  IFS=$as_save_IFS
34992  test -z "$as_dir" && as_dir=.
34993    for ac_exec_ext in '' $ac_executable_extensions; do
34994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34995    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34997    break 2
34998  fi
34999done
35000  done
35001IFS=$as_save_IFS
35002
35003  ;;
35004esac
35005fi
35006STRIP=$ac_cv_path_STRIP
35007if test -n "$STRIP"; then
35008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35009$as_echo "$STRIP" >&6; }
35010else
35011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35012$as_echo "no" >&6; }
35013fi
35014
35015
35016  test -n "$STRIP" && break
35017done
35018
35019  else
35020    # The variable is set, but is it from the command line or the environment?
35021
35022    # Try to remove the string !STRIP! from our list.
35023    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35024    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35025      # If it failed, the variable was not from the command line. Ignore it,
35026      # but warn the user (except for BASH, which is always set by the calling BASH).
35027      if test "xSTRIP" != xBASH; then
35028        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35029$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35030      fi
35031      # Try to locate tool using the code snippet
35032      for ac_prog in strip
35033do
35034  # Extract the first word of "$ac_prog", so it can be a program name with args.
35035set dummy $ac_prog; ac_word=$2
35036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35037$as_echo_n "checking for $ac_word... " >&6; }
35038if ${ac_cv_path_STRIP+:} false; then :
35039  $as_echo_n "(cached) " >&6
35040else
35041  case $STRIP in
35042  [\\/]* | ?:[\\/]*)
35043  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35044  ;;
35045  *)
35046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35047for as_dir in $PATH
35048do
35049  IFS=$as_save_IFS
35050  test -z "$as_dir" && as_dir=.
35051    for ac_exec_ext in '' $ac_executable_extensions; do
35052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35053    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35055    break 2
35056  fi
35057done
35058  done
35059IFS=$as_save_IFS
35060
35061  ;;
35062esac
35063fi
35064STRIP=$ac_cv_path_STRIP
35065if test -n "$STRIP"; then
35066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35067$as_echo "$STRIP" >&6; }
35068else
35069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35070$as_echo "no" >&6; }
35071fi
35072
35073
35074  test -n "$STRIP" && break
35075done
35076
35077    else
35078      # If it succeeded, then it was overridden by the user. We will use it
35079      # for the tool.
35080
35081      # First remove it from the list of overridden variables, so we can test
35082      # for unknown variables in the end.
35083      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35084
35085      # Check if the provided tool contains a complete path.
35086      tool_specified="$STRIP"
35087      tool_basename="${tool_specified##*/}"
35088      if test "x$tool_basename" = "x$tool_specified"; then
35089        # A command without a complete path is provided, search $PATH.
35090        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35091$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35092        # Extract the first word of "$tool_basename", so it can be a program name with args.
35093set dummy $tool_basename; ac_word=$2
35094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35095$as_echo_n "checking for $ac_word... " >&6; }
35096if ${ac_cv_path_STRIP+:} false; then :
35097  $as_echo_n "(cached) " >&6
35098else
35099  case $STRIP in
35100  [\\/]* | ?:[\\/]*)
35101  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35102  ;;
35103  *)
35104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35105for as_dir in $PATH
35106do
35107  IFS=$as_save_IFS
35108  test -z "$as_dir" && as_dir=.
35109    for ac_exec_ext in '' $ac_executable_extensions; do
35110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35111    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35113    break 2
35114  fi
35115done
35116  done
35117IFS=$as_save_IFS
35118
35119  ;;
35120esac
35121fi
35122STRIP=$ac_cv_path_STRIP
35123if test -n "$STRIP"; then
35124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35125$as_echo "$STRIP" >&6; }
35126else
35127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35128$as_echo "no" >&6; }
35129fi
35130
35131
35132        if test "x$STRIP" = x; then
35133          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35134        fi
35135      else
35136        # Otherwise we believe it is a complete path. Use it as it is.
35137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35138$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35139        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35140$as_echo_n "checking for STRIP... " >&6; }
35141        if test ! -x "$tool_specified"; then
35142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35143$as_echo "not found" >&6; }
35144          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35145        fi
35146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35147$as_echo "$tool_specified" >&6; }
35148      fi
35149    fi
35150  fi
35151
35152
35153
35154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35155
35156  # First separate the path from the arguments. This will split at the first
35157  # space.
35158  complete="$STRIP"
35159  path="${complete%% *}"
35160  tmp="$complete EOL"
35161  arguments="${tmp#* }"
35162
35163  # Input might be given as Windows format, start by converting to
35164  # unix format.
35165  new_path=`$CYGPATH -u "$path"`
35166
35167  # Now try to locate executable using which
35168  new_path=`$WHICH "$new_path" 2> /dev/null`
35169  # bat and cmd files are not always considered executable in cygwin causing which
35170  # to not find them
35171  if test "x$new_path" = x \
35172      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35173      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35174    new_path=`$CYGPATH -u "$path"`
35175  fi
35176  if test "x$new_path" = x; then
35177    # Oops. Which didn't find the executable.
35178    # The splitting of arguments from the executable at a space might have been incorrect,
35179    # since paths with space are more likely in Windows. Give it another try with the whole
35180    # argument.
35181    path="$complete"
35182    arguments="EOL"
35183    new_path=`$CYGPATH -u "$path"`
35184    new_path=`$WHICH "$new_path" 2> /dev/null`
35185    # bat and cmd files are not always considered executable in cygwin causing which
35186    # to not find them
35187    if test "x$new_path" = x \
35188        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35189        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35190      new_path=`$CYGPATH -u "$path"`
35191    fi
35192    if test "x$new_path" = x; then
35193      # It's still not found. Now this is an unrecoverable error.
35194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35195$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35196      has_space=`$ECHO "$complete" | $GREP " "`
35197      if test "x$has_space" != x; then
35198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35200      fi
35201      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35202    fi
35203  fi
35204
35205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35208  # "foo.exe" is OK but "foo" is an error.
35209  #
35210  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35211  # It is also a way to make sure we got the proper file name for the real test later on.
35212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35213  if test "x$test_shortpath" = x; then
35214    # Short path failed, file does not exist as specified.
35215    # Try adding .exe or .cmd
35216    if test -f "${new_path}.exe"; then
35217      input_to_shortpath="${new_path}.exe"
35218    elif test -f "${new_path}.cmd"; then
35219      input_to_shortpath="${new_path}.cmd"
35220    else
35221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35222$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35223      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35224$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35225      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35226    fi
35227  else
35228    input_to_shortpath="$new_path"
35229  fi
35230
35231  # Call helper function which possibly converts this using DOS-style short mode.
35232  # If so, the updated path is stored in $new_path.
35233  new_path="$input_to_shortpath"
35234
35235  input_path="$input_to_shortpath"
35236  # Check if we need to convert this using DOS-style short mode. If the path
35237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35238  # take no chances and rewrite it.
35239  # Note: m4 eats our [], so we need to use [ and ] instead.
35240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35241  if test "x$has_forbidden_chars" != x; then
35242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35246      # Going to short mode and back again did indeed matter. Since short mode is
35247      # case insensitive, let's make it lowercase to improve readability.
35248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35249      # Now convert it back to Unix-stile (cygpath)
35250      input_path=`$CYGPATH -u "$shortmode_path"`
35251      new_path="$input_path"
35252    fi
35253  fi
35254
35255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35256  if test "x$test_cygdrive_prefix" = x; then
35257    # As a simple fix, exclude /usr/bin since it's not a real path.
35258    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35260      # a path prefixed by /cygdrive for fixpath to work.
35261      new_path="$CYGWIN_ROOT_PATH$input_path"
35262    fi
35263  fi
35264
35265  # remove trailing .exe if any
35266  new_path="${new_path/%.exe/}"
35267
35268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35269
35270  # First separate the path from the arguments. This will split at the first
35271  # space.
35272  complete="$STRIP"
35273  path="${complete%% *}"
35274  tmp="$complete EOL"
35275  arguments="${tmp#* }"
35276
35277  # Input might be given as Windows format, start by converting to
35278  # unix format.
35279  new_path="$path"
35280
35281  windows_path="$new_path"
35282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35283    unix_path=`$CYGPATH -u "$windows_path"`
35284    new_path="$unix_path"
35285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35287    new_path="$unix_path"
35288  fi
35289
35290
35291  # Now try to locate executable using which
35292  new_path=`$WHICH "$new_path" 2> /dev/null`
35293
35294  if test "x$new_path" = x; then
35295    # Oops. Which didn't find the executable.
35296    # The splitting of arguments from the executable at a space might have been incorrect,
35297    # since paths with space are more likely in Windows. Give it another try with the whole
35298    # argument.
35299    path="$complete"
35300    arguments="EOL"
35301    new_path="$path"
35302
35303  windows_path="$new_path"
35304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35305    unix_path=`$CYGPATH -u "$windows_path"`
35306    new_path="$unix_path"
35307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35309    new_path="$unix_path"
35310  fi
35311
35312
35313    new_path=`$WHICH "$new_path" 2> /dev/null`
35314
35315    if test "x$new_path" = x; then
35316      # It's still not found. Now this is an unrecoverable error.
35317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35318$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35319      has_space=`$ECHO "$complete" | $GREP " "`
35320      if test "x$has_space" != x; then
35321        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35322$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35323      fi
35324      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35325    fi
35326  fi
35327
35328  # Now new_path has a complete unix path to the binary
35329  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35330    # Keep paths in /bin as-is, but remove trailing .exe if any
35331    new_path="${new_path/%.exe/}"
35332    # Do not save /bin paths to all_fixpath_prefixes!
35333  else
35334    # Not in mixed or Windows style, start by that.
35335    new_path=`cmd //c echo $new_path`
35336
35337  input_path="$new_path"
35338  # Check if we need to convert this using DOS-style short mode. If the path
35339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35340  # take no chances and rewrite it.
35341  # Note: m4 eats our [], so we need to use [ and ] instead.
35342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35343  if test "x$has_forbidden_chars" != x; then
35344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35346  fi
35347
35348    # Output is in $new_path
35349
35350  windows_path="$new_path"
35351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35352    unix_path=`$CYGPATH -u "$windows_path"`
35353    new_path="$unix_path"
35354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35356    new_path="$unix_path"
35357  fi
35358
35359    # remove trailing .exe if any
35360    new_path="${new_path/%.exe/}"
35361
35362    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35363    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35364  fi
35365
35366  else
35367    # We're on a posix platform. Hooray! :)
35368    # First separate the path from the arguments. This will split at the first
35369    # space.
35370    complete="$STRIP"
35371    path="${complete%% *}"
35372    tmp="$complete EOL"
35373    arguments="${tmp#* }"
35374
35375    # Cannot rely on the command "which" here since it doesn't always work.
35376    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35377    if test -z "$is_absolute_path"; then
35378      # Path to executable is not absolute. Find it.
35379      IFS_save="$IFS"
35380      IFS=:
35381      for p in $PATH; do
35382        if test -f "$p/$path" && test -x "$p/$path"; then
35383          new_path="$p/$path"
35384          break
35385        fi
35386      done
35387      IFS="$IFS_save"
35388    else
35389      # This is an absolute path, we can use it without further modifications.
35390      new_path="$path"
35391    fi
35392
35393    if test "x$new_path" = x; then
35394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35395$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35396      has_space=`$ECHO "$complete" | $GREP " "`
35397      if test "x$has_space" != x; then
35398        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35399$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35400      fi
35401      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35402    fi
35403  fi
35404
35405  # Now join together the path and the arguments once again
35406  if test "x$arguments" != xEOL; then
35407    new_complete="$new_path ${arguments% *}"
35408  else
35409    new_complete="$new_path"
35410  fi
35411
35412  if test "x$complete" != "x$new_complete"; then
35413    STRIP="$new_complete"
35414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35415$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35416  fi
35417
35418
35419
35420  # Publish this variable in the help.
35421
35422
35423  if test "x$NM" = x; then
35424    # The variable is not set by user, try to locate tool using the code snippet
35425    for ac_prog in nm
35426do
35427  # Extract the first word of "$ac_prog", so it can be a program name with args.
35428set dummy $ac_prog; ac_word=$2
35429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35430$as_echo_n "checking for $ac_word... " >&6; }
35431if ${ac_cv_path_NM+:} false; then :
35432  $as_echo_n "(cached) " >&6
35433else
35434  case $NM in
35435  [\\/]* | ?:[\\/]*)
35436  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35437  ;;
35438  *)
35439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35440for as_dir in $PATH
35441do
35442  IFS=$as_save_IFS
35443  test -z "$as_dir" && as_dir=.
35444    for ac_exec_ext in '' $ac_executable_extensions; do
35445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35446    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35448    break 2
35449  fi
35450done
35451  done
35452IFS=$as_save_IFS
35453
35454  ;;
35455esac
35456fi
35457NM=$ac_cv_path_NM
35458if test -n "$NM"; then
35459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35460$as_echo "$NM" >&6; }
35461else
35462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35463$as_echo "no" >&6; }
35464fi
35465
35466
35467  test -n "$NM" && break
35468done
35469
35470  else
35471    # The variable is set, but is it from the command line or the environment?
35472
35473    # Try to remove the string !NM! from our list.
35474    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35475    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35476      # If it failed, the variable was not from the command line. Ignore it,
35477      # but warn the user (except for BASH, which is always set by the calling BASH).
35478      if test "xNM" != xBASH; then
35479        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35480$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35481      fi
35482      # Try to locate tool using the code snippet
35483      for ac_prog in nm
35484do
35485  # Extract the first word of "$ac_prog", so it can be a program name with args.
35486set dummy $ac_prog; ac_word=$2
35487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35488$as_echo_n "checking for $ac_word... " >&6; }
35489if ${ac_cv_path_NM+:} false; then :
35490  $as_echo_n "(cached) " >&6
35491else
35492  case $NM in
35493  [\\/]* | ?:[\\/]*)
35494  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35495  ;;
35496  *)
35497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35498for as_dir in $PATH
35499do
35500  IFS=$as_save_IFS
35501  test -z "$as_dir" && as_dir=.
35502    for ac_exec_ext in '' $ac_executable_extensions; do
35503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35504    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35506    break 2
35507  fi
35508done
35509  done
35510IFS=$as_save_IFS
35511
35512  ;;
35513esac
35514fi
35515NM=$ac_cv_path_NM
35516if test -n "$NM"; then
35517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35518$as_echo "$NM" >&6; }
35519else
35520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35521$as_echo "no" >&6; }
35522fi
35523
35524
35525  test -n "$NM" && break
35526done
35527
35528    else
35529      # If it succeeded, then it was overridden by the user. We will use it
35530      # for the tool.
35531
35532      # First remove it from the list of overridden variables, so we can test
35533      # for unknown variables in the end.
35534      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35535
35536      # Check if the provided tool contains a complete path.
35537      tool_specified="$NM"
35538      tool_basename="${tool_specified##*/}"
35539      if test "x$tool_basename" = "x$tool_specified"; then
35540        # A command without a complete path is provided, search $PATH.
35541        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35542$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35543        # Extract the first word of "$tool_basename", so it can be a program name with args.
35544set dummy $tool_basename; ac_word=$2
35545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35546$as_echo_n "checking for $ac_word... " >&6; }
35547if ${ac_cv_path_NM+:} false; then :
35548  $as_echo_n "(cached) " >&6
35549else
35550  case $NM in
35551  [\\/]* | ?:[\\/]*)
35552  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35553  ;;
35554  *)
35555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35556for as_dir in $PATH
35557do
35558  IFS=$as_save_IFS
35559  test -z "$as_dir" && as_dir=.
35560    for ac_exec_ext in '' $ac_executable_extensions; do
35561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35562    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35564    break 2
35565  fi
35566done
35567  done
35568IFS=$as_save_IFS
35569
35570  ;;
35571esac
35572fi
35573NM=$ac_cv_path_NM
35574if test -n "$NM"; then
35575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35576$as_echo "$NM" >&6; }
35577else
35578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35579$as_echo "no" >&6; }
35580fi
35581
35582
35583        if test "x$NM" = x; then
35584          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35585        fi
35586      else
35587        # Otherwise we believe it is a complete path. Use it as it is.
35588        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35589$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35590        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35591$as_echo_n "checking for NM... " >&6; }
35592        if test ! -x "$tool_specified"; then
35593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35594$as_echo "not found" >&6; }
35595          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35596        fi
35597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35598$as_echo "$tool_specified" >&6; }
35599      fi
35600    fi
35601  fi
35602
35603
35604
35605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35606
35607  # First separate the path from the arguments. This will split at the first
35608  # space.
35609  complete="$NM"
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=`$CYGPATH -u "$path"`
35617
35618  # Now try to locate executable using which
35619  new_path=`$WHICH "$new_path" 2> /dev/null`
35620  # bat and cmd files are not always considered executable in cygwin causing which
35621  # to not find them
35622  if test "x$new_path" = x \
35623      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35624      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35625    new_path=`$CYGPATH -u "$path"`
35626  fi
35627  if test "x$new_path" = x; then
35628    # Oops. Which didn't find the executable.
35629    # The splitting of arguments from the executable at a space might have been incorrect,
35630    # since paths with space are more likely in Windows. Give it another try with the whole
35631    # argument.
35632    path="$complete"
35633    arguments="EOL"
35634    new_path=`$CYGPATH -u "$path"`
35635    new_path=`$WHICH "$new_path" 2> /dev/null`
35636    # bat and cmd files are not always considered executable in cygwin causing which
35637    # to not find them
35638    if test "x$new_path" = x \
35639        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35640        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35641      new_path=`$CYGPATH -u "$path"`
35642    fi
35643    if test "x$new_path" = x; then
35644      # It's still not found. Now this is an unrecoverable error.
35645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35646$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35647      has_space=`$ECHO "$complete" | $GREP " "`
35648      if test "x$has_space" != x; then
35649        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35650$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35651      fi
35652      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35653    fi
35654  fi
35655
35656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35659  # "foo.exe" is OK but "foo" is an error.
35660  #
35661  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35662  # It is also a way to make sure we got the proper file name for the real test later on.
35663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35664  if test "x$test_shortpath" = x; then
35665    # Short path failed, file does not exist as specified.
35666    # Try adding .exe or .cmd
35667    if test -f "${new_path}.exe"; then
35668      input_to_shortpath="${new_path}.exe"
35669    elif test -f "${new_path}.cmd"; then
35670      input_to_shortpath="${new_path}.cmd"
35671    else
35672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35673$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35674      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35675$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35676      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35677    fi
35678  else
35679    input_to_shortpath="$new_path"
35680  fi
35681
35682  # Call helper function which possibly converts this using DOS-style short mode.
35683  # If so, the updated path is stored in $new_path.
35684  new_path="$input_to_shortpath"
35685
35686  input_path="$input_to_shortpath"
35687  # Check if we need to convert this using DOS-style short mode. If the path
35688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35689  # take no chances and rewrite it.
35690  # Note: m4 eats our [], so we need to use [ and ] instead.
35691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35692  if test "x$has_forbidden_chars" != x; then
35693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35697      # Going to short mode and back again did indeed matter. Since short mode is
35698      # case insensitive, let's make it lowercase to improve readability.
35699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35700      # Now convert it back to Unix-stile (cygpath)
35701      input_path=`$CYGPATH -u "$shortmode_path"`
35702      new_path="$input_path"
35703    fi
35704  fi
35705
35706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35707  if test "x$test_cygdrive_prefix" = x; then
35708    # As a simple fix, exclude /usr/bin since it's not a real path.
35709    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35711      # a path prefixed by /cygdrive for fixpath to work.
35712      new_path="$CYGWIN_ROOT_PATH$input_path"
35713    fi
35714  fi
35715
35716  # remove trailing .exe if any
35717  new_path="${new_path/%.exe/}"
35718
35719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35720
35721  # First separate the path from the arguments. This will split at the first
35722  # space.
35723  complete="$NM"
35724  path="${complete%% *}"
35725  tmp="$complete EOL"
35726  arguments="${tmp#* }"
35727
35728  # Input might be given as Windows format, start by converting to
35729  # unix format.
35730  new_path="$path"
35731
35732  windows_path="$new_path"
35733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35734    unix_path=`$CYGPATH -u "$windows_path"`
35735    new_path="$unix_path"
35736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35738    new_path="$unix_path"
35739  fi
35740
35741
35742  # Now try to locate executable using which
35743  new_path=`$WHICH "$new_path" 2> /dev/null`
35744
35745  if test "x$new_path" = x; then
35746    # Oops. Which didn't find the executable.
35747    # The splitting of arguments from the executable at a space might have been incorrect,
35748    # since paths with space are more likely in Windows. Give it another try with the whole
35749    # argument.
35750    path="$complete"
35751    arguments="EOL"
35752    new_path="$path"
35753
35754  windows_path="$new_path"
35755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35756    unix_path=`$CYGPATH -u "$windows_path"`
35757    new_path="$unix_path"
35758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35760    new_path="$unix_path"
35761  fi
35762
35763
35764    new_path=`$WHICH "$new_path" 2> /dev/null`
35765
35766    if test "x$new_path" = x; then
35767      # It's still not found. Now this is an unrecoverable error.
35768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35769$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35770      has_space=`$ECHO "$complete" | $GREP " "`
35771      if test "x$has_space" != x; then
35772        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35773$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35774      fi
35775      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35776    fi
35777  fi
35778
35779  # Now new_path has a complete unix path to the binary
35780  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35781    # Keep paths in /bin as-is, but remove trailing .exe if any
35782    new_path="${new_path/%.exe/}"
35783    # Do not save /bin paths to all_fixpath_prefixes!
35784  else
35785    # Not in mixed or Windows style, start by that.
35786    new_path=`cmd //c echo $new_path`
35787
35788  input_path="$new_path"
35789  # Check if we need to convert this using DOS-style short mode. If the path
35790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35791  # take no chances and rewrite it.
35792  # Note: m4 eats our [], so we need to use [ and ] instead.
35793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35794  if test "x$has_forbidden_chars" != x; then
35795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35797  fi
35798
35799    # Output is in $new_path
35800
35801  windows_path="$new_path"
35802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35803    unix_path=`$CYGPATH -u "$windows_path"`
35804    new_path="$unix_path"
35805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35807    new_path="$unix_path"
35808  fi
35809
35810    # remove trailing .exe if any
35811    new_path="${new_path/%.exe/}"
35812
35813    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35814    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35815  fi
35816
35817  else
35818    # We're on a posix platform. Hooray! :)
35819    # First separate the path from the arguments. This will split at the first
35820    # space.
35821    complete="$NM"
35822    path="${complete%% *}"
35823    tmp="$complete EOL"
35824    arguments="${tmp#* }"
35825
35826    # Cannot rely on the command "which" here since it doesn't always work.
35827    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35828    if test -z "$is_absolute_path"; then
35829      # Path to executable is not absolute. Find it.
35830      IFS_save="$IFS"
35831      IFS=:
35832      for p in $PATH; do
35833        if test -f "$p/$path" && test -x "$p/$path"; then
35834          new_path="$p/$path"
35835          break
35836        fi
35837      done
35838      IFS="$IFS_save"
35839    else
35840      # This is an absolute path, we can use it without further modifications.
35841      new_path="$path"
35842    fi
35843
35844    if test "x$new_path" = x; then
35845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35846$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35847      has_space=`$ECHO "$complete" | $GREP " "`
35848      if test "x$has_space" != x; then
35849        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35850$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35851      fi
35852      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35853    fi
35854  fi
35855
35856  # Now join together the path and the arguments once again
35857  if test "x$arguments" != xEOL; then
35858    new_complete="$new_path ${arguments% *}"
35859  else
35860    new_complete="$new_path"
35861  fi
35862
35863  if test "x$complete" != "x$new_complete"; then
35864    NM="$new_complete"
35865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35866$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35867  fi
35868
35869
35870
35871  # Publish this variable in the help.
35872
35873
35874  if test "x$GNM" = x; then
35875    # The variable is not set by user, try to locate tool using the code snippet
35876    for ac_prog in gnm
35877do
35878  # Extract the first word of "$ac_prog", so it can be a program name with args.
35879set dummy $ac_prog; ac_word=$2
35880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35881$as_echo_n "checking for $ac_word... " >&6; }
35882if ${ac_cv_path_GNM+:} false; then :
35883  $as_echo_n "(cached) " >&6
35884else
35885  case $GNM in
35886  [\\/]* | ?:[\\/]*)
35887  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35888  ;;
35889  *)
35890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35891for as_dir in $PATH
35892do
35893  IFS=$as_save_IFS
35894  test -z "$as_dir" && as_dir=.
35895    for ac_exec_ext in '' $ac_executable_extensions; do
35896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35897    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35899    break 2
35900  fi
35901done
35902  done
35903IFS=$as_save_IFS
35904
35905  ;;
35906esac
35907fi
35908GNM=$ac_cv_path_GNM
35909if test -n "$GNM"; then
35910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35911$as_echo "$GNM" >&6; }
35912else
35913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35914$as_echo "no" >&6; }
35915fi
35916
35917
35918  test -n "$GNM" && break
35919done
35920
35921  else
35922    # The variable is set, but is it from the command line or the environment?
35923
35924    # Try to remove the string !GNM! from our list.
35925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35927      # If it failed, the variable was not from the command line. Ignore it,
35928      # but warn the user (except for BASH, which is always set by the calling BASH).
35929      if test "xGNM" != xBASH; then
35930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35931$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35932      fi
35933      # Try to locate tool using the code snippet
35934      for ac_prog in gnm
35935do
35936  # Extract the first word of "$ac_prog", so it can be a program name with args.
35937set dummy $ac_prog; ac_word=$2
35938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35939$as_echo_n "checking for $ac_word... " >&6; }
35940if ${ac_cv_path_GNM+:} false; then :
35941  $as_echo_n "(cached) " >&6
35942else
35943  case $GNM in
35944  [\\/]* | ?:[\\/]*)
35945  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35946  ;;
35947  *)
35948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35949for as_dir in $PATH
35950do
35951  IFS=$as_save_IFS
35952  test -z "$as_dir" && as_dir=.
35953    for ac_exec_ext in '' $ac_executable_extensions; do
35954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35955    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35957    break 2
35958  fi
35959done
35960  done
35961IFS=$as_save_IFS
35962
35963  ;;
35964esac
35965fi
35966GNM=$ac_cv_path_GNM
35967if test -n "$GNM"; then
35968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35969$as_echo "$GNM" >&6; }
35970else
35971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35972$as_echo "no" >&6; }
35973fi
35974
35975
35976  test -n "$GNM" && break
35977done
35978
35979    else
35980      # If it succeeded, then it was overridden by the user. We will use it
35981      # for the tool.
35982
35983      # First remove it from the list of overridden variables, so we can test
35984      # for unknown variables in the end.
35985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35986
35987      # Check if the provided tool contains a complete path.
35988      tool_specified="$GNM"
35989      tool_basename="${tool_specified##*/}"
35990      if test "x$tool_basename" = "x$tool_specified"; then
35991        # A command without a complete path is provided, search $PATH.
35992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35993$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35994        # Extract the first word of "$tool_basename", so it can be a program name with args.
35995set dummy $tool_basename; ac_word=$2
35996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35997$as_echo_n "checking for $ac_word... " >&6; }
35998if ${ac_cv_path_GNM+:} false; then :
35999  $as_echo_n "(cached) " >&6
36000else
36001  case $GNM in
36002  [\\/]* | ?:[\\/]*)
36003  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36004  ;;
36005  *)
36006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36007for as_dir in $PATH
36008do
36009  IFS=$as_save_IFS
36010  test -z "$as_dir" && as_dir=.
36011    for ac_exec_ext in '' $ac_executable_extensions; do
36012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36013    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36015    break 2
36016  fi
36017done
36018  done
36019IFS=$as_save_IFS
36020
36021  ;;
36022esac
36023fi
36024GNM=$ac_cv_path_GNM
36025if test -n "$GNM"; then
36026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36027$as_echo "$GNM" >&6; }
36028else
36029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36030$as_echo "no" >&6; }
36031fi
36032
36033
36034        if test "x$GNM" = x; then
36035          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36036        fi
36037      else
36038        # Otherwise we believe it is a complete path. Use it as it is.
36039        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36040$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36042$as_echo_n "checking for GNM... " >&6; }
36043        if test ! -x "$tool_specified"; then
36044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36045$as_echo "not found" >&6; }
36046          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36047        fi
36048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36049$as_echo "$tool_specified" >&6; }
36050      fi
36051    fi
36052  fi
36053
36054
36055
36056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36057
36058  # First separate the path from the arguments. This will split at the first
36059  # space.
36060  complete="$GNM"
36061  path="${complete%% *}"
36062  tmp="$complete EOL"
36063  arguments="${tmp#* }"
36064
36065  # Input might be given as Windows format, start by converting to
36066  # unix format.
36067  new_path=`$CYGPATH -u "$path"`
36068
36069  # Now try to locate executable using which
36070  new_path=`$WHICH "$new_path" 2> /dev/null`
36071  # bat and cmd files are not always considered executable in cygwin causing which
36072  # to not find them
36073  if test "x$new_path" = x \
36074      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36075      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36076    new_path=`$CYGPATH -u "$path"`
36077  fi
36078  if test "x$new_path" = x; then
36079    # Oops. Which didn't find the executable.
36080    # The splitting of arguments from the executable at a space might have been incorrect,
36081    # since paths with space are more likely in Windows. Give it another try with the whole
36082    # argument.
36083    path="$complete"
36084    arguments="EOL"
36085    new_path=`$CYGPATH -u "$path"`
36086    new_path=`$WHICH "$new_path" 2> /dev/null`
36087    # bat and cmd files are not always considered executable in cygwin causing which
36088    # to not find them
36089    if test "x$new_path" = x \
36090        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36091        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36092      new_path=`$CYGPATH -u "$path"`
36093    fi
36094    if test "x$new_path" = x; then
36095      # It's still not found. Now this is an unrecoverable error.
36096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36097$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36098      has_space=`$ECHO "$complete" | $GREP " "`
36099      if test "x$has_space" != x; then
36100        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36101$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36102      fi
36103      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36104    fi
36105  fi
36106
36107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36110  # "foo.exe" is OK but "foo" is an error.
36111  #
36112  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36113  # It is also a way to make sure we got the proper file name for the real test later on.
36114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36115  if test "x$test_shortpath" = x; then
36116    # Short path failed, file does not exist as specified.
36117    # Try adding .exe or .cmd
36118    if test -f "${new_path}.exe"; then
36119      input_to_shortpath="${new_path}.exe"
36120    elif test -f "${new_path}.cmd"; then
36121      input_to_shortpath="${new_path}.cmd"
36122    else
36123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36124$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36125      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36126$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36127      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36128    fi
36129  else
36130    input_to_shortpath="$new_path"
36131  fi
36132
36133  # Call helper function which possibly converts this using DOS-style short mode.
36134  # If so, the updated path is stored in $new_path.
36135  new_path="$input_to_shortpath"
36136
36137  input_path="$input_to_shortpath"
36138  # Check if we need to convert this using DOS-style short mode. If the path
36139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36140  # take no chances and rewrite it.
36141  # Note: m4 eats our [], so we need to use [ and ] instead.
36142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36143  if test "x$has_forbidden_chars" != x; then
36144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36148      # Going to short mode and back again did indeed matter. Since short mode is
36149      # case insensitive, let's make it lowercase to improve readability.
36150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36151      # Now convert it back to Unix-stile (cygpath)
36152      input_path=`$CYGPATH -u "$shortmode_path"`
36153      new_path="$input_path"
36154    fi
36155  fi
36156
36157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36158  if test "x$test_cygdrive_prefix" = x; then
36159    # As a simple fix, exclude /usr/bin since it's not a real path.
36160    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36162      # a path prefixed by /cygdrive for fixpath to work.
36163      new_path="$CYGWIN_ROOT_PATH$input_path"
36164    fi
36165  fi
36166
36167  # remove trailing .exe if any
36168  new_path="${new_path/%.exe/}"
36169
36170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36171
36172  # First separate the path from the arguments. This will split at the first
36173  # space.
36174  complete="$GNM"
36175  path="${complete%% *}"
36176  tmp="$complete EOL"
36177  arguments="${tmp#* }"
36178
36179  # Input might be given as Windows format, start by converting to
36180  # unix format.
36181  new_path="$path"
36182
36183  windows_path="$new_path"
36184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36185    unix_path=`$CYGPATH -u "$windows_path"`
36186    new_path="$unix_path"
36187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36189    new_path="$unix_path"
36190  fi
36191
36192
36193  # Now try to locate executable using which
36194  new_path=`$WHICH "$new_path" 2> /dev/null`
36195
36196  if test "x$new_path" = x; then
36197    # Oops. Which didn't find the executable.
36198    # The splitting of arguments from the executable at a space might have been incorrect,
36199    # since paths with space are more likely in Windows. Give it another try with the whole
36200    # argument.
36201    path="$complete"
36202    arguments="EOL"
36203    new_path="$path"
36204
36205  windows_path="$new_path"
36206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36207    unix_path=`$CYGPATH -u "$windows_path"`
36208    new_path="$unix_path"
36209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36211    new_path="$unix_path"
36212  fi
36213
36214
36215    new_path=`$WHICH "$new_path" 2> /dev/null`
36216
36217    if test "x$new_path" = x; then
36218      # It's still not found. Now this is an unrecoverable error.
36219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36220$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36221      has_space=`$ECHO "$complete" | $GREP " "`
36222      if test "x$has_space" != x; then
36223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36225      fi
36226      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36227    fi
36228  fi
36229
36230  # Now new_path has a complete unix path to the binary
36231  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36232    # Keep paths in /bin as-is, but remove trailing .exe if any
36233    new_path="${new_path/%.exe/}"
36234    # Do not save /bin paths to all_fixpath_prefixes!
36235  else
36236    # Not in mixed or Windows style, start by that.
36237    new_path=`cmd //c echo $new_path`
36238
36239  input_path="$new_path"
36240  # Check if we need to convert this using DOS-style short mode. If the path
36241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36242  # take no chances and rewrite it.
36243  # Note: m4 eats our [], so we need to use [ and ] instead.
36244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36245  if test "x$has_forbidden_chars" != x; then
36246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36247    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36248  fi
36249
36250    # Output is in $new_path
36251
36252  windows_path="$new_path"
36253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36254    unix_path=`$CYGPATH -u "$windows_path"`
36255    new_path="$unix_path"
36256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36258    new_path="$unix_path"
36259  fi
36260
36261    # remove trailing .exe if any
36262    new_path="${new_path/%.exe/}"
36263
36264    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36265    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36266  fi
36267
36268  else
36269    # We're on a posix platform. Hooray! :)
36270    # First separate the path from the arguments. This will split at the first
36271    # space.
36272    complete="$GNM"
36273    path="${complete%% *}"
36274    tmp="$complete EOL"
36275    arguments="${tmp#* }"
36276
36277    # Cannot rely on the command "which" here since it doesn't always work.
36278    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36279    if test -z "$is_absolute_path"; then
36280      # Path to executable is not absolute. Find it.
36281      IFS_save="$IFS"
36282      IFS=:
36283      for p in $PATH; do
36284        if test -f "$p/$path" && test -x "$p/$path"; then
36285          new_path="$p/$path"
36286          break
36287        fi
36288      done
36289      IFS="$IFS_save"
36290    else
36291      # This is an absolute path, we can use it without further modifications.
36292      new_path="$path"
36293    fi
36294
36295    if test "x$new_path" = x; then
36296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36297$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36298      has_space=`$ECHO "$complete" | $GREP " "`
36299      if test "x$has_space" != x; then
36300        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36301$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36302      fi
36303      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36304    fi
36305  fi
36306
36307  # Now join together the path and the arguments once again
36308  if test "x$arguments" != xEOL; then
36309    new_complete="$new_path ${arguments% *}"
36310  else
36311    new_complete="$new_path"
36312  fi
36313
36314  if test "x$complete" != "x$new_complete"; then
36315    GNM="$new_complete"
36316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36317$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36318  fi
36319
36320
36321
36322
36323  # Publish this variable in the help.
36324
36325
36326  if test "x$MCS" = x; then
36327    # The variable is not set by user, try to locate tool using the code snippet
36328    for ac_prog in mcs
36329do
36330  # Extract the first word of "$ac_prog", so it can be a program name with args.
36331set dummy $ac_prog; ac_word=$2
36332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36333$as_echo_n "checking for $ac_word... " >&6; }
36334if ${ac_cv_path_MCS+:} false; then :
36335  $as_echo_n "(cached) " >&6
36336else
36337  case $MCS in
36338  [\\/]* | ?:[\\/]*)
36339  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36340  ;;
36341  *)
36342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36343for as_dir in $PATH
36344do
36345  IFS=$as_save_IFS
36346  test -z "$as_dir" && as_dir=.
36347    for ac_exec_ext in '' $ac_executable_extensions; do
36348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36349    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36351    break 2
36352  fi
36353done
36354  done
36355IFS=$as_save_IFS
36356
36357  ;;
36358esac
36359fi
36360MCS=$ac_cv_path_MCS
36361if test -n "$MCS"; then
36362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36363$as_echo "$MCS" >&6; }
36364else
36365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36366$as_echo "no" >&6; }
36367fi
36368
36369
36370  test -n "$MCS" && break
36371done
36372
36373  else
36374    # The variable is set, but is it from the command line or the environment?
36375
36376    # Try to remove the string !MCS! from our list.
36377    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36378    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36379      # If it failed, the variable was not from the command line. Ignore it,
36380      # but warn the user (except for BASH, which is always set by the calling BASH).
36381      if test "xMCS" != xBASH; then
36382        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36383$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36384      fi
36385      # Try to locate tool using the code snippet
36386      for ac_prog in mcs
36387do
36388  # Extract the first word of "$ac_prog", so it can be a program name with args.
36389set dummy $ac_prog; ac_word=$2
36390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36391$as_echo_n "checking for $ac_word... " >&6; }
36392if ${ac_cv_path_MCS+:} false; then :
36393  $as_echo_n "(cached) " >&6
36394else
36395  case $MCS in
36396  [\\/]* | ?:[\\/]*)
36397  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36398  ;;
36399  *)
36400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36401for as_dir in $PATH
36402do
36403  IFS=$as_save_IFS
36404  test -z "$as_dir" && as_dir=.
36405    for ac_exec_ext in '' $ac_executable_extensions; do
36406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36407    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36409    break 2
36410  fi
36411done
36412  done
36413IFS=$as_save_IFS
36414
36415  ;;
36416esac
36417fi
36418MCS=$ac_cv_path_MCS
36419if test -n "$MCS"; then
36420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36421$as_echo "$MCS" >&6; }
36422else
36423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36424$as_echo "no" >&6; }
36425fi
36426
36427
36428  test -n "$MCS" && break
36429done
36430
36431    else
36432      # If it succeeded, then it was overridden by the user. We will use it
36433      # for the tool.
36434
36435      # First remove it from the list of overridden variables, so we can test
36436      # for unknown variables in the end.
36437      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36438
36439      # Check if the provided tool contains a complete path.
36440      tool_specified="$MCS"
36441      tool_basename="${tool_specified##*/}"
36442      if test "x$tool_basename" = "x$tool_specified"; then
36443        # A command without a complete path is provided, search $PATH.
36444        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36445$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36446        # Extract the first word of "$tool_basename", so it can be a program name with args.
36447set dummy $tool_basename; ac_word=$2
36448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36449$as_echo_n "checking for $ac_word... " >&6; }
36450if ${ac_cv_path_MCS+:} false; then :
36451  $as_echo_n "(cached) " >&6
36452else
36453  case $MCS in
36454  [\\/]* | ?:[\\/]*)
36455  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36456  ;;
36457  *)
36458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36459for as_dir in $PATH
36460do
36461  IFS=$as_save_IFS
36462  test -z "$as_dir" && as_dir=.
36463    for ac_exec_ext in '' $ac_executable_extensions; do
36464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36465    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36467    break 2
36468  fi
36469done
36470  done
36471IFS=$as_save_IFS
36472
36473  ;;
36474esac
36475fi
36476MCS=$ac_cv_path_MCS
36477if test -n "$MCS"; then
36478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36479$as_echo "$MCS" >&6; }
36480else
36481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36482$as_echo "no" >&6; }
36483fi
36484
36485
36486        if test "x$MCS" = x; then
36487          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36488        fi
36489      else
36490        # Otherwise we believe it is a complete path. Use it as it is.
36491        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36492$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36493        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36494$as_echo_n "checking for MCS... " >&6; }
36495        if test ! -x "$tool_specified"; then
36496          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36497$as_echo "not found" >&6; }
36498          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36499        fi
36500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36501$as_echo "$tool_specified" >&6; }
36502      fi
36503    fi
36504  fi
36505
36506
36507
36508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36509
36510  # First separate the path from the arguments. This will split at the first
36511  # space.
36512  complete="$MCS"
36513  path="${complete%% *}"
36514  tmp="$complete EOL"
36515  arguments="${tmp#* }"
36516
36517  # Input might be given as Windows format, start by converting to
36518  # unix format.
36519  new_path=`$CYGPATH -u "$path"`
36520
36521  # Now try to locate executable using which
36522  new_path=`$WHICH "$new_path" 2> /dev/null`
36523  # bat and cmd files are not always considered executable in cygwin causing which
36524  # to not find them
36525  if test "x$new_path" = x \
36526      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36527      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36528    new_path=`$CYGPATH -u "$path"`
36529  fi
36530  if test "x$new_path" = x; then
36531    # Oops. Which didn't find the executable.
36532    # The splitting of arguments from the executable at a space might have been incorrect,
36533    # since paths with space are more likely in Windows. Give it another try with the whole
36534    # argument.
36535    path="$complete"
36536    arguments="EOL"
36537    new_path=`$CYGPATH -u "$path"`
36538    new_path=`$WHICH "$new_path" 2> /dev/null`
36539    # bat and cmd files are not always considered executable in cygwin causing which
36540    # to not find them
36541    if test "x$new_path" = x \
36542        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36543        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36544      new_path=`$CYGPATH -u "$path"`
36545    fi
36546    if test "x$new_path" = x; then
36547      # It's still not found. Now this is an unrecoverable error.
36548      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36549$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36550      has_space=`$ECHO "$complete" | $GREP " "`
36551      if test "x$has_space" != x; then
36552        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36553$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36554      fi
36555      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36556    fi
36557  fi
36558
36559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36562  # "foo.exe" is OK but "foo" is an error.
36563  #
36564  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36565  # It is also a way to make sure we got the proper file name for the real test later on.
36566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36567  if test "x$test_shortpath" = x; then
36568    # Short path failed, file does not exist as specified.
36569    # Try adding .exe or .cmd
36570    if test -f "${new_path}.exe"; then
36571      input_to_shortpath="${new_path}.exe"
36572    elif test -f "${new_path}.cmd"; then
36573      input_to_shortpath="${new_path}.cmd"
36574    else
36575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36576$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36577      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36578$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36579      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36580    fi
36581  else
36582    input_to_shortpath="$new_path"
36583  fi
36584
36585  # Call helper function which possibly converts this using DOS-style short mode.
36586  # If so, the updated path is stored in $new_path.
36587  new_path="$input_to_shortpath"
36588
36589  input_path="$input_to_shortpath"
36590  # Check if we need to convert this using DOS-style short mode. If the path
36591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36592  # take no chances and rewrite it.
36593  # Note: m4 eats our [], so we need to use [ and ] instead.
36594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36595  if test "x$has_forbidden_chars" != x; then
36596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36600      # Going to short mode and back again did indeed matter. Since short mode is
36601      # case insensitive, let's make it lowercase to improve readability.
36602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36603      # Now convert it back to Unix-stile (cygpath)
36604      input_path=`$CYGPATH -u "$shortmode_path"`
36605      new_path="$input_path"
36606    fi
36607  fi
36608
36609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36610  if test "x$test_cygdrive_prefix" = x; then
36611    # As a simple fix, exclude /usr/bin since it's not a real path.
36612    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36614      # a path prefixed by /cygdrive for fixpath to work.
36615      new_path="$CYGWIN_ROOT_PATH$input_path"
36616    fi
36617  fi
36618
36619  # remove trailing .exe if any
36620  new_path="${new_path/%.exe/}"
36621
36622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36623
36624  # First separate the path from the arguments. This will split at the first
36625  # space.
36626  complete="$MCS"
36627  path="${complete%% *}"
36628  tmp="$complete EOL"
36629  arguments="${tmp#* }"
36630
36631  # Input might be given as Windows format, start by converting to
36632  # unix format.
36633  new_path="$path"
36634
36635  windows_path="$new_path"
36636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36637    unix_path=`$CYGPATH -u "$windows_path"`
36638    new_path="$unix_path"
36639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36641    new_path="$unix_path"
36642  fi
36643
36644
36645  # Now try to locate executable using which
36646  new_path=`$WHICH "$new_path" 2> /dev/null`
36647
36648  if test "x$new_path" = x; then
36649    # Oops. Which didn't find the executable.
36650    # The splitting of arguments from the executable at a space might have been incorrect,
36651    # since paths with space are more likely in Windows. Give it another try with the whole
36652    # argument.
36653    path="$complete"
36654    arguments="EOL"
36655    new_path="$path"
36656
36657  windows_path="$new_path"
36658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36659    unix_path=`$CYGPATH -u "$windows_path"`
36660    new_path="$unix_path"
36661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36663    new_path="$unix_path"
36664  fi
36665
36666
36667    new_path=`$WHICH "$new_path" 2> /dev/null`
36668
36669    if test "x$new_path" = x; then
36670      # It's still not found. Now this is an unrecoverable error.
36671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36672$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36673      has_space=`$ECHO "$complete" | $GREP " "`
36674      if test "x$has_space" != x; then
36675        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36676$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36677      fi
36678      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36679    fi
36680  fi
36681
36682  # Now new_path has a complete unix path to the binary
36683  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36684    # Keep paths in /bin as-is, but remove trailing .exe if any
36685    new_path="${new_path/%.exe/}"
36686    # Do not save /bin paths to all_fixpath_prefixes!
36687  else
36688    # Not in mixed or Windows style, start by that.
36689    new_path=`cmd //c echo $new_path`
36690
36691  input_path="$new_path"
36692  # Check if we need to convert this using DOS-style short mode. If the path
36693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36694  # take no chances and rewrite it.
36695  # Note: m4 eats our [], so we need to use [ and ] instead.
36696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36697  if test "x$has_forbidden_chars" != x; then
36698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36699    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36700  fi
36701
36702    # Output is in $new_path
36703
36704  windows_path="$new_path"
36705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36706    unix_path=`$CYGPATH -u "$windows_path"`
36707    new_path="$unix_path"
36708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36710    new_path="$unix_path"
36711  fi
36712
36713    # remove trailing .exe if any
36714    new_path="${new_path/%.exe/}"
36715
36716    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36717    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36718  fi
36719
36720  else
36721    # We're on a posix platform. Hooray! :)
36722    # First separate the path from the arguments. This will split at the first
36723    # space.
36724    complete="$MCS"
36725    path="${complete%% *}"
36726    tmp="$complete EOL"
36727    arguments="${tmp#* }"
36728
36729    # Cannot rely on the command "which" here since it doesn't always work.
36730    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36731    if test -z "$is_absolute_path"; then
36732      # Path to executable is not absolute. Find it.
36733      IFS_save="$IFS"
36734      IFS=:
36735      for p in $PATH; do
36736        if test -f "$p/$path" && test -x "$p/$path"; then
36737          new_path="$p/$path"
36738          break
36739        fi
36740      done
36741      IFS="$IFS_save"
36742    else
36743      # This is an absolute path, we can use it without further modifications.
36744      new_path="$path"
36745    fi
36746
36747    if test "x$new_path" = x; then
36748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36749$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36750      has_space=`$ECHO "$complete" | $GREP " "`
36751      if test "x$has_space" != x; then
36752        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36753$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36754      fi
36755      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36756    fi
36757  fi
36758
36759  # Now join together the path and the arguments once again
36760  if test "x$arguments" != xEOL; then
36761    new_complete="$new_path ${arguments% *}"
36762  else
36763    new_complete="$new_path"
36764  fi
36765
36766  if test "x$complete" != "x$new_complete"; then
36767    MCS="$new_complete"
36768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36769$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36770  fi
36771
36772  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36773    # FIXME: we should unify this with the solaris case above.
36774
36775
36776  # Publish this variable in the help.
36777
36778
36779  if test "x$STRIP" = x; then
36780    # The variable is not set by user, try to locate tool using the code snippet
36781    if test -n "$ac_tool_prefix"; then
36782  for ac_prog in strip
36783  do
36784    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36785set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36787$as_echo_n "checking for $ac_word... " >&6; }
36788if ${ac_cv_prog_STRIP+:} false; then :
36789  $as_echo_n "(cached) " >&6
36790else
36791  if test -n "$STRIP"; then
36792  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36793else
36794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36795for as_dir in $PATH
36796do
36797  IFS=$as_save_IFS
36798  test -z "$as_dir" && as_dir=.
36799    for ac_exec_ext in '' $ac_executable_extensions; do
36800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36801    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36803    break 2
36804  fi
36805done
36806  done
36807IFS=$as_save_IFS
36808
36809fi
36810fi
36811STRIP=$ac_cv_prog_STRIP
36812if test -n "$STRIP"; then
36813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36814$as_echo "$STRIP" >&6; }
36815else
36816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36817$as_echo "no" >&6; }
36818fi
36819
36820
36821    test -n "$STRIP" && break
36822  done
36823fi
36824if test -z "$STRIP"; then
36825  ac_ct_STRIP=$STRIP
36826  for ac_prog in strip
36827do
36828  # Extract the first word of "$ac_prog", so it can be a program name with args.
36829set dummy $ac_prog; ac_word=$2
36830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36831$as_echo_n "checking for $ac_word... " >&6; }
36832if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36833  $as_echo_n "(cached) " >&6
36834else
36835  if test -n "$ac_ct_STRIP"; then
36836  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36837else
36838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36839for as_dir in $PATH
36840do
36841  IFS=$as_save_IFS
36842  test -z "$as_dir" && as_dir=.
36843    for ac_exec_ext in '' $ac_executable_extensions; do
36844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36845    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36847    break 2
36848  fi
36849done
36850  done
36851IFS=$as_save_IFS
36852
36853fi
36854fi
36855ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36856if test -n "$ac_ct_STRIP"; then
36857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36858$as_echo "$ac_ct_STRIP" >&6; }
36859else
36860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36861$as_echo "no" >&6; }
36862fi
36863
36864
36865  test -n "$ac_ct_STRIP" && break
36866done
36867
36868  if test "x$ac_ct_STRIP" = x; then
36869    STRIP=""
36870  else
36871    case $cross_compiling:$ac_tool_warned in
36872yes:)
36873{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36874$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36875ac_tool_warned=yes ;;
36876esac
36877    STRIP=$ac_ct_STRIP
36878  fi
36879fi
36880
36881  else
36882    # The variable is set, but is it from the command line or the environment?
36883
36884    # Try to remove the string !STRIP! from our list.
36885    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36886    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36887      # If it failed, the variable was not from the command line. Ignore it,
36888      # but warn the user (except for BASH, which is always set by the calling BASH).
36889      if test "xSTRIP" != xBASH; then
36890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36891$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36892      fi
36893      # Try to locate tool using the code snippet
36894      if test -n "$ac_tool_prefix"; then
36895  for ac_prog in strip
36896  do
36897    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36898set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36900$as_echo_n "checking for $ac_word... " >&6; }
36901if ${ac_cv_prog_STRIP+:} false; then :
36902  $as_echo_n "(cached) " >&6
36903else
36904  if test -n "$STRIP"; then
36905  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36906else
36907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36908for as_dir in $PATH
36909do
36910  IFS=$as_save_IFS
36911  test -z "$as_dir" && as_dir=.
36912    for ac_exec_ext in '' $ac_executable_extensions; do
36913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36914    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36916    break 2
36917  fi
36918done
36919  done
36920IFS=$as_save_IFS
36921
36922fi
36923fi
36924STRIP=$ac_cv_prog_STRIP
36925if test -n "$STRIP"; then
36926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36927$as_echo "$STRIP" >&6; }
36928else
36929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36930$as_echo "no" >&6; }
36931fi
36932
36933
36934    test -n "$STRIP" && break
36935  done
36936fi
36937if test -z "$STRIP"; then
36938  ac_ct_STRIP=$STRIP
36939  for ac_prog in strip
36940do
36941  # Extract the first word of "$ac_prog", so it can be a program name with args.
36942set dummy $ac_prog; ac_word=$2
36943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36944$as_echo_n "checking for $ac_word... " >&6; }
36945if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36946  $as_echo_n "(cached) " >&6
36947else
36948  if test -n "$ac_ct_STRIP"; then
36949  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36950else
36951as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36952for as_dir in $PATH
36953do
36954  IFS=$as_save_IFS
36955  test -z "$as_dir" && as_dir=.
36956    for ac_exec_ext in '' $ac_executable_extensions; do
36957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36958    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36960    break 2
36961  fi
36962done
36963  done
36964IFS=$as_save_IFS
36965
36966fi
36967fi
36968ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36969if test -n "$ac_ct_STRIP"; then
36970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36971$as_echo "$ac_ct_STRIP" >&6; }
36972else
36973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36974$as_echo "no" >&6; }
36975fi
36976
36977
36978  test -n "$ac_ct_STRIP" && break
36979done
36980
36981  if test "x$ac_ct_STRIP" = x; then
36982    STRIP=""
36983  else
36984    case $cross_compiling:$ac_tool_warned in
36985yes:)
36986{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36987$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36988ac_tool_warned=yes ;;
36989esac
36990    STRIP=$ac_ct_STRIP
36991  fi
36992fi
36993
36994    else
36995      # If it succeeded, then it was overridden by the user. We will use it
36996      # for the tool.
36997
36998      # First remove it from the list of overridden variables, so we can test
36999      # for unknown variables in the end.
37000      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37001
37002      # Check if the provided tool contains a complete path.
37003      tool_specified="$STRIP"
37004      tool_basename="${tool_specified##*/}"
37005      if test "x$tool_basename" = "x$tool_specified"; then
37006        # A command without a complete path is provided, search $PATH.
37007        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37008$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37009        # Extract the first word of "$tool_basename", so it can be a program name with args.
37010set dummy $tool_basename; ac_word=$2
37011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37012$as_echo_n "checking for $ac_word... " >&6; }
37013if ${ac_cv_path_STRIP+:} false; then :
37014  $as_echo_n "(cached) " >&6
37015else
37016  case $STRIP in
37017  [\\/]* | ?:[\\/]*)
37018  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37019  ;;
37020  *)
37021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37022for as_dir in $PATH
37023do
37024  IFS=$as_save_IFS
37025  test -z "$as_dir" && as_dir=.
37026    for ac_exec_ext in '' $ac_executable_extensions; do
37027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37028    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37030    break 2
37031  fi
37032done
37033  done
37034IFS=$as_save_IFS
37035
37036  ;;
37037esac
37038fi
37039STRIP=$ac_cv_path_STRIP
37040if test -n "$STRIP"; then
37041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37042$as_echo "$STRIP" >&6; }
37043else
37044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37045$as_echo "no" >&6; }
37046fi
37047
37048
37049        if test "x$STRIP" = x; then
37050          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37051        fi
37052      else
37053        # Otherwise we believe it is a complete path. Use it as it is.
37054        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37055$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37057$as_echo_n "checking for STRIP... " >&6; }
37058        if test ! -x "$tool_specified"; then
37059          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37060$as_echo "not found" >&6; }
37061          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37062        fi
37063        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37064$as_echo "$tool_specified" >&6; }
37065      fi
37066    fi
37067  fi
37068
37069
37070
37071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37072
37073  # First separate the path from the arguments. This will split at the first
37074  # space.
37075  complete="$STRIP"
37076  path="${complete%% *}"
37077  tmp="$complete EOL"
37078  arguments="${tmp#* }"
37079
37080  # Input might be given as Windows format, start by converting to
37081  # unix format.
37082  new_path=`$CYGPATH -u "$path"`
37083
37084  # Now try to locate executable using which
37085  new_path=`$WHICH "$new_path" 2> /dev/null`
37086  # bat and cmd files are not always considered executable in cygwin causing which
37087  # to not find them
37088  if test "x$new_path" = x \
37089      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37090      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37091    new_path=`$CYGPATH -u "$path"`
37092  fi
37093  if test "x$new_path" = x; then
37094    # Oops. Which didn't find the executable.
37095    # The splitting of arguments from the executable at a space might have been incorrect,
37096    # since paths with space are more likely in Windows. Give it another try with the whole
37097    # argument.
37098    path="$complete"
37099    arguments="EOL"
37100    new_path=`$CYGPATH -u "$path"`
37101    new_path=`$WHICH "$new_path" 2> /dev/null`
37102    # bat and cmd files are not always considered executable in cygwin causing which
37103    # to not find them
37104    if test "x$new_path" = x \
37105        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37106        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37107      new_path=`$CYGPATH -u "$path"`
37108    fi
37109    if test "x$new_path" = x; then
37110      # It's still not found. Now this is an unrecoverable error.
37111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37112$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37113      has_space=`$ECHO "$complete" | $GREP " "`
37114      if test "x$has_space" != x; then
37115        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37116$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37117      fi
37118      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37119    fi
37120  fi
37121
37122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37125  # "foo.exe" is OK but "foo" is an error.
37126  #
37127  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37128  # It is also a way to make sure we got the proper file name for the real test later on.
37129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37130  if test "x$test_shortpath" = x; then
37131    # Short path failed, file does not exist as specified.
37132    # Try adding .exe or .cmd
37133    if test -f "${new_path}.exe"; then
37134      input_to_shortpath="${new_path}.exe"
37135    elif test -f "${new_path}.cmd"; then
37136      input_to_shortpath="${new_path}.cmd"
37137    else
37138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37139$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37140      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37141$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37142      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37143    fi
37144  else
37145    input_to_shortpath="$new_path"
37146  fi
37147
37148  # Call helper function which possibly converts this using DOS-style short mode.
37149  # If so, the updated path is stored in $new_path.
37150  new_path="$input_to_shortpath"
37151
37152  input_path="$input_to_shortpath"
37153  # Check if we need to convert this using DOS-style short mode. If the path
37154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37155  # take no chances and rewrite it.
37156  # Note: m4 eats our [], so we need to use [ and ] instead.
37157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37158  if test "x$has_forbidden_chars" != x; then
37159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37163      # Going to short mode and back again did indeed matter. Since short mode is
37164      # case insensitive, let's make it lowercase to improve readability.
37165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37166      # Now convert it back to Unix-stile (cygpath)
37167      input_path=`$CYGPATH -u "$shortmode_path"`
37168      new_path="$input_path"
37169    fi
37170  fi
37171
37172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37173  if test "x$test_cygdrive_prefix" = x; then
37174    # As a simple fix, exclude /usr/bin since it's not a real path.
37175    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37177      # a path prefixed by /cygdrive for fixpath to work.
37178      new_path="$CYGWIN_ROOT_PATH$input_path"
37179    fi
37180  fi
37181
37182  # remove trailing .exe if any
37183  new_path="${new_path/%.exe/}"
37184
37185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37186
37187  # First separate the path from the arguments. This will split at the first
37188  # space.
37189  complete="$STRIP"
37190  path="${complete%% *}"
37191  tmp="$complete EOL"
37192  arguments="${tmp#* }"
37193
37194  # Input might be given as Windows format, start by converting to
37195  # unix format.
37196  new_path="$path"
37197
37198  windows_path="$new_path"
37199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37200    unix_path=`$CYGPATH -u "$windows_path"`
37201    new_path="$unix_path"
37202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37204    new_path="$unix_path"
37205  fi
37206
37207
37208  # Now try to locate executable using which
37209  new_path=`$WHICH "$new_path" 2> /dev/null`
37210
37211  if test "x$new_path" = x; then
37212    # Oops. Which didn't find the executable.
37213    # The splitting of arguments from the executable at a space might have been incorrect,
37214    # since paths with space are more likely in Windows. Give it another try with the whole
37215    # argument.
37216    path="$complete"
37217    arguments="EOL"
37218    new_path="$path"
37219
37220  windows_path="$new_path"
37221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37222    unix_path=`$CYGPATH -u "$windows_path"`
37223    new_path="$unix_path"
37224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37226    new_path="$unix_path"
37227  fi
37228
37229
37230    new_path=`$WHICH "$new_path" 2> /dev/null`
37231
37232    if test "x$new_path" = x; then
37233      # It's still not found. Now this is an unrecoverable error.
37234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37235$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37236      has_space=`$ECHO "$complete" | $GREP " "`
37237      if test "x$has_space" != x; then
37238        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37239$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37240      fi
37241      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37242    fi
37243  fi
37244
37245  # Now new_path has a complete unix path to the binary
37246  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37247    # Keep paths in /bin as-is, but remove trailing .exe if any
37248    new_path="${new_path/%.exe/}"
37249    # Do not save /bin paths to all_fixpath_prefixes!
37250  else
37251    # Not in mixed or Windows style, start by that.
37252    new_path=`cmd //c echo $new_path`
37253
37254  input_path="$new_path"
37255  # Check if we need to convert this using DOS-style short mode. If the path
37256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37257  # take no chances and rewrite it.
37258  # Note: m4 eats our [], so we need to use [ and ] instead.
37259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37260  if test "x$has_forbidden_chars" != x; then
37261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37263  fi
37264
37265    # Output is in $new_path
37266
37267  windows_path="$new_path"
37268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37269    unix_path=`$CYGPATH -u "$windows_path"`
37270    new_path="$unix_path"
37271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37273    new_path="$unix_path"
37274  fi
37275
37276    # remove trailing .exe if any
37277    new_path="${new_path/%.exe/}"
37278
37279    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37280    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37281  fi
37282
37283  else
37284    # We're on a posix platform. Hooray! :)
37285    # First separate the path from the arguments. This will split at the first
37286    # space.
37287    complete="$STRIP"
37288    path="${complete%% *}"
37289    tmp="$complete EOL"
37290    arguments="${tmp#* }"
37291
37292    # Cannot rely on the command "which" here since it doesn't always work.
37293    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37294    if test -z "$is_absolute_path"; then
37295      # Path to executable is not absolute. Find it.
37296      IFS_save="$IFS"
37297      IFS=:
37298      for p in $PATH; do
37299        if test -f "$p/$path" && test -x "$p/$path"; then
37300          new_path="$p/$path"
37301          break
37302        fi
37303      done
37304      IFS="$IFS_save"
37305    else
37306      # This is an absolute path, we can use it without further modifications.
37307      new_path="$path"
37308    fi
37309
37310    if test "x$new_path" = x; then
37311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37312$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37313      has_space=`$ECHO "$complete" | $GREP " "`
37314      if test "x$has_space" != x; then
37315        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37316$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37317      fi
37318      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37319    fi
37320  fi
37321
37322  # Now join together the path and the arguments once again
37323  if test "x$arguments" != xEOL; then
37324    new_complete="$new_path ${arguments% *}"
37325  else
37326    new_complete="$new_path"
37327  fi
37328
37329  if test "x$complete" != "x$new_complete"; then
37330    STRIP="$new_complete"
37331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37332$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37333  fi
37334
37335
37336
37337  # Publish this variable in the help.
37338
37339
37340  if test "x$NM" = x; then
37341    # The variable is not set by user, try to locate tool using the code snippet
37342    if test -n "$ac_tool_prefix"; then
37343  for ac_prog in nm
37344  do
37345    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37346set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37348$as_echo_n "checking for $ac_word... " >&6; }
37349if ${ac_cv_prog_NM+:} false; then :
37350  $as_echo_n "(cached) " >&6
37351else
37352  if test -n "$NM"; then
37353  ac_cv_prog_NM="$NM" # Let the user override the test.
37354else
37355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37356for as_dir in $PATH
37357do
37358  IFS=$as_save_IFS
37359  test -z "$as_dir" && as_dir=.
37360    for ac_exec_ext in '' $ac_executable_extensions; do
37361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37362    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37364    break 2
37365  fi
37366done
37367  done
37368IFS=$as_save_IFS
37369
37370fi
37371fi
37372NM=$ac_cv_prog_NM
37373if test -n "$NM"; then
37374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37375$as_echo "$NM" >&6; }
37376else
37377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37378$as_echo "no" >&6; }
37379fi
37380
37381
37382    test -n "$NM" && break
37383  done
37384fi
37385if test -z "$NM"; then
37386  ac_ct_NM=$NM
37387  for ac_prog in nm
37388do
37389  # Extract the first word of "$ac_prog", so it can be a program name with args.
37390set dummy $ac_prog; ac_word=$2
37391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37392$as_echo_n "checking for $ac_word... " >&6; }
37393if ${ac_cv_prog_ac_ct_NM+:} false; then :
37394  $as_echo_n "(cached) " >&6
37395else
37396  if test -n "$ac_ct_NM"; then
37397  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37398else
37399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37400for as_dir in $PATH
37401do
37402  IFS=$as_save_IFS
37403  test -z "$as_dir" && as_dir=.
37404    for ac_exec_ext in '' $ac_executable_extensions; do
37405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37406    ac_cv_prog_ac_ct_NM="$ac_prog"
37407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37408    break 2
37409  fi
37410done
37411  done
37412IFS=$as_save_IFS
37413
37414fi
37415fi
37416ac_ct_NM=$ac_cv_prog_ac_ct_NM
37417if test -n "$ac_ct_NM"; then
37418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37419$as_echo "$ac_ct_NM" >&6; }
37420else
37421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37422$as_echo "no" >&6; }
37423fi
37424
37425
37426  test -n "$ac_ct_NM" && break
37427done
37428
37429  if test "x$ac_ct_NM" = x; then
37430    NM=""
37431  else
37432    case $cross_compiling:$ac_tool_warned in
37433yes:)
37434{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37435$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37436ac_tool_warned=yes ;;
37437esac
37438    NM=$ac_ct_NM
37439  fi
37440fi
37441
37442  else
37443    # The variable is set, but is it from the command line or the environment?
37444
37445    # Try to remove the string !NM! from our list.
37446    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37447    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37448      # If it failed, the variable was not from the command line. Ignore it,
37449      # but warn the user (except for BASH, which is always set by the calling BASH).
37450      if test "xNM" != xBASH; then
37451        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37452$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37453      fi
37454      # Try to locate tool using the code snippet
37455      if test -n "$ac_tool_prefix"; then
37456  for ac_prog in nm
37457  do
37458    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37459set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37461$as_echo_n "checking for $ac_word... " >&6; }
37462if ${ac_cv_prog_NM+:} false; then :
37463  $as_echo_n "(cached) " >&6
37464else
37465  if test -n "$NM"; then
37466  ac_cv_prog_NM="$NM" # Let the user override the test.
37467else
37468as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37469for as_dir in $PATH
37470do
37471  IFS=$as_save_IFS
37472  test -z "$as_dir" && as_dir=.
37473    for ac_exec_ext in '' $ac_executable_extensions; do
37474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37475    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37477    break 2
37478  fi
37479done
37480  done
37481IFS=$as_save_IFS
37482
37483fi
37484fi
37485NM=$ac_cv_prog_NM
37486if test -n "$NM"; then
37487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37488$as_echo "$NM" >&6; }
37489else
37490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37491$as_echo "no" >&6; }
37492fi
37493
37494
37495    test -n "$NM" && break
37496  done
37497fi
37498if test -z "$NM"; then
37499  ac_ct_NM=$NM
37500  for ac_prog in nm
37501do
37502  # Extract the first word of "$ac_prog", so it can be a program name with args.
37503set dummy $ac_prog; ac_word=$2
37504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37505$as_echo_n "checking for $ac_word... " >&6; }
37506if ${ac_cv_prog_ac_ct_NM+:} false; then :
37507  $as_echo_n "(cached) " >&6
37508else
37509  if test -n "$ac_ct_NM"; then
37510  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37511else
37512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37513for as_dir in $PATH
37514do
37515  IFS=$as_save_IFS
37516  test -z "$as_dir" && as_dir=.
37517    for ac_exec_ext in '' $ac_executable_extensions; do
37518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37519    ac_cv_prog_ac_ct_NM="$ac_prog"
37520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37521    break 2
37522  fi
37523done
37524  done
37525IFS=$as_save_IFS
37526
37527fi
37528fi
37529ac_ct_NM=$ac_cv_prog_ac_ct_NM
37530if test -n "$ac_ct_NM"; then
37531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37532$as_echo "$ac_ct_NM" >&6; }
37533else
37534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37535$as_echo "no" >&6; }
37536fi
37537
37538
37539  test -n "$ac_ct_NM" && break
37540done
37541
37542  if test "x$ac_ct_NM" = x; then
37543    NM=""
37544  else
37545    case $cross_compiling:$ac_tool_warned in
37546yes:)
37547{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37548$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37549ac_tool_warned=yes ;;
37550esac
37551    NM=$ac_ct_NM
37552  fi
37553fi
37554
37555    else
37556      # If it succeeded, then it was overridden by the user. We will use it
37557      # for the tool.
37558
37559      # First remove it from the list of overridden variables, so we can test
37560      # for unknown variables in the end.
37561      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37562
37563      # Check if the provided tool contains a complete path.
37564      tool_specified="$NM"
37565      tool_basename="${tool_specified##*/}"
37566      if test "x$tool_basename" = "x$tool_specified"; then
37567        # A command without a complete path is provided, search $PATH.
37568        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37569$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37570        # Extract the first word of "$tool_basename", so it can be a program name with args.
37571set dummy $tool_basename; ac_word=$2
37572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37573$as_echo_n "checking for $ac_word... " >&6; }
37574if ${ac_cv_path_NM+:} false; then :
37575  $as_echo_n "(cached) " >&6
37576else
37577  case $NM in
37578  [\\/]* | ?:[\\/]*)
37579  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37580  ;;
37581  *)
37582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37583for as_dir in $PATH
37584do
37585  IFS=$as_save_IFS
37586  test -z "$as_dir" && as_dir=.
37587    for ac_exec_ext in '' $ac_executable_extensions; do
37588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37589    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37591    break 2
37592  fi
37593done
37594  done
37595IFS=$as_save_IFS
37596
37597  ;;
37598esac
37599fi
37600NM=$ac_cv_path_NM
37601if test -n "$NM"; then
37602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37603$as_echo "$NM" >&6; }
37604else
37605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37606$as_echo "no" >&6; }
37607fi
37608
37609
37610        if test "x$NM" = x; then
37611          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37612        fi
37613      else
37614        # Otherwise we believe it is a complete path. Use it as it is.
37615        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37616$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37617        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37618$as_echo_n "checking for NM... " >&6; }
37619        if test ! -x "$tool_specified"; then
37620          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37621$as_echo "not found" >&6; }
37622          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37623        fi
37624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37625$as_echo "$tool_specified" >&6; }
37626      fi
37627    fi
37628  fi
37629
37630
37631
37632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37633
37634  # First separate the path from the arguments. This will split at the first
37635  # space.
37636  complete="$NM"
37637  path="${complete%% *}"
37638  tmp="$complete EOL"
37639  arguments="${tmp#* }"
37640
37641  # Input might be given as Windows format, start by converting to
37642  # unix format.
37643  new_path=`$CYGPATH -u "$path"`
37644
37645  # Now try to locate executable using which
37646  new_path=`$WHICH "$new_path" 2> /dev/null`
37647  # bat and cmd files are not always considered executable in cygwin causing which
37648  # to not find them
37649  if test "x$new_path" = x \
37650      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37651      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37652    new_path=`$CYGPATH -u "$path"`
37653  fi
37654  if test "x$new_path" = x; then
37655    # Oops. Which didn't find the executable.
37656    # The splitting of arguments from the executable at a space might have been incorrect,
37657    # since paths with space are more likely in Windows. Give it another try with the whole
37658    # argument.
37659    path="$complete"
37660    arguments="EOL"
37661    new_path=`$CYGPATH -u "$path"`
37662    new_path=`$WHICH "$new_path" 2> /dev/null`
37663    # bat and cmd files are not always considered executable in cygwin causing which
37664    # to not find them
37665    if test "x$new_path" = x \
37666        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37667        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37668      new_path=`$CYGPATH -u "$path"`
37669    fi
37670    if test "x$new_path" = x; then
37671      # It's still not found. Now this is an unrecoverable error.
37672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37673$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37674      has_space=`$ECHO "$complete" | $GREP " "`
37675      if test "x$has_space" != x; then
37676        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37677$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37678      fi
37679      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37680    fi
37681  fi
37682
37683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37686  # "foo.exe" is OK but "foo" is an error.
37687  #
37688  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37689  # It is also a way to make sure we got the proper file name for the real test later on.
37690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37691  if test "x$test_shortpath" = x; then
37692    # Short path failed, file does not exist as specified.
37693    # Try adding .exe or .cmd
37694    if test -f "${new_path}.exe"; then
37695      input_to_shortpath="${new_path}.exe"
37696    elif test -f "${new_path}.cmd"; then
37697      input_to_shortpath="${new_path}.cmd"
37698    else
37699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37700$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37701      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37702$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37703      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37704    fi
37705  else
37706    input_to_shortpath="$new_path"
37707  fi
37708
37709  # Call helper function which possibly converts this using DOS-style short mode.
37710  # If so, the updated path is stored in $new_path.
37711  new_path="$input_to_shortpath"
37712
37713  input_path="$input_to_shortpath"
37714  # Check if we need to convert this using DOS-style short mode. If the path
37715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37716  # take no chances and rewrite it.
37717  # Note: m4 eats our [], so we need to use [ and ] instead.
37718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37719  if test "x$has_forbidden_chars" != x; then
37720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37724      # Going to short mode and back again did indeed matter. Since short mode is
37725      # case insensitive, let's make it lowercase to improve readability.
37726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37727      # Now convert it back to Unix-stile (cygpath)
37728      input_path=`$CYGPATH -u "$shortmode_path"`
37729      new_path="$input_path"
37730    fi
37731  fi
37732
37733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37734  if test "x$test_cygdrive_prefix" = x; then
37735    # As a simple fix, exclude /usr/bin since it's not a real path.
37736    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37738      # a path prefixed by /cygdrive for fixpath to work.
37739      new_path="$CYGWIN_ROOT_PATH$input_path"
37740    fi
37741  fi
37742
37743  # remove trailing .exe if any
37744  new_path="${new_path/%.exe/}"
37745
37746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37747
37748  # First separate the path from the arguments. This will split at the first
37749  # space.
37750  complete="$NM"
37751  path="${complete%% *}"
37752  tmp="$complete EOL"
37753  arguments="${tmp#* }"
37754
37755  # Input might be given as Windows format, start by converting to
37756  # unix format.
37757  new_path="$path"
37758
37759  windows_path="$new_path"
37760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37761    unix_path=`$CYGPATH -u "$windows_path"`
37762    new_path="$unix_path"
37763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37765    new_path="$unix_path"
37766  fi
37767
37768
37769  # Now try to locate executable using which
37770  new_path=`$WHICH "$new_path" 2> /dev/null`
37771
37772  if test "x$new_path" = x; then
37773    # Oops. Which didn't find the executable.
37774    # The splitting of arguments from the executable at a space might have been incorrect,
37775    # since paths with space are more likely in Windows. Give it another try with the whole
37776    # argument.
37777    path="$complete"
37778    arguments="EOL"
37779    new_path="$path"
37780
37781  windows_path="$new_path"
37782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37783    unix_path=`$CYGPATH -u "$windows_path"`
37784    new_path="$unix_path"
37785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37787    new_path="$unix_path"
37788  fi
37789
37790
37791    new_path=`$WHICH "$new_path" 2> /dev/null`
37792
37793    if test "x$new_path" = x; then
37794      # It's still not found. Now this is an unrecoverable error.
37795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37796$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37797      has_space=`$ECHO "$complete" | $GREP " "`
37798      if test "x$has_space" != x; then
37799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37801      fi
37802      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37803    fi
37804  fi
37805
37806  # Now new_path has a complete unix path to the binary
37807  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37808    # Keep paths in /bin as-is, but remove trailing .exe if any
37809    new_path="${new_path/%.exe/}"
37810    # Do not save /bin paths to all_fixpath_prefixes!
37811  else
37812    # Not in mixed or Windows style, start by that.
37813    new_path=`cmd //c echo $new_path`
37814
37815  input_path="$new_path"
37816  # Check if we need to convert this using DOS-style short mode. If the path
37817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37818  # take no chances and rewrite it.
37819  # Note: m4 eats our [], so we need to use [ and ] instead.
37820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37821  if test "x$has_forbidden_chars" != x; then
37822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37824  fi
37825
37826    # Output is in $new_path
37827
37828  windows_path="$new_path"
37829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37830    unix_path=`$CYGPATH -u "$windows_path"`
37831    new_path="$unix_path"
37832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37834    new_path="$unix_path"
37835  fi
37836
37837    # remove trailing .exe if any
37838    new_path="${new_path/%.exe/}"
37839
37840    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37841    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37842  fi
37843
37844  else
37845    # We're on a posix platform. Hooray! :)
37846    # First separate the path from the arguments. This will split at the first
37847    # space.
37848    complete="$NM"
37849    path="${complete%% *}"
37850    tmp="$complete EOL"
37851    arguments="${tmp#* }"
37852
37853    # Cannot rely on the command "which" here since it doesn't always work.
37854    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37855    if test -z "$is_absolute_path"; then
37856      # Path to executable is not absolute. Find it.
37857      IFS_save="$IFS"
37858      IFS=:
37859      for p in $PATH; do
37860        if test -f "$p/$path" && test -x "$p/$path"; then
37861          new_path="$p/$path"
37862          break
37863        fi
37864      done
37865      IFS="$IFS_save"
37866    else
37867      # This is an absolute path, we can use it without further modifications.
37868      new_path="$path"
37869    fi
37870
37871    if test "x$new_path" = x; then
37872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37873$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37874      has_space=`$ECHO "$complete" | $GREP " "`
37875      if test "x$has_space" != x; then
37876        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37877$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37878      fi
37879      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37880    fi
37881  fi
37882
37883  # Now join together the path and the arguments once again
37884  if test "x$arguments" != xEOL; then
37885    new_complete="$new_path ${arguments% *}"
37886  else
37887    new_complete="$new_path"
37888  fi
37889
37890  if test "x$complete" != "x$new_complete"; then
37891    NM="$new_complete"
37892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37893$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37894  fi
37895
37896    GNM="$NM"
37897
37898  fi
37899
37900  # objcopy is used for moving debug symbols to separate files when
37901  # full debug symbols are enabled.
37902  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37903
37904
37905  # Publish this variable in the help.
37906
37907
37908  if test "x$OBJCOPY" = x; then
37909    # The variable is not set by user, try to locate tool using the code snippet
37910    if test -n "$ac_tool_prefix"; then
37911  for ac_prog in gobjcopy objcopy
37912  do
37913    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37914set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37916$as_echo_n "checking for $ac_word... " >&6; }
37917if ${ac_cv_prog_OBJCOPY+:} false; then :
37918  $as_echo_n "(cached) " >&6
37919else
37920  if test -n "$OBJCOPY"; then
37921  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37922else
37923as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37924for as_dir in $PATH
37925do
37926  IFS=$as_save_IFS
37927  test -z "$as_dir" && as_dir=.
37928    for ac_exec_ext in '' $ac_executable_extensions; do
37929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37930    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37932    break 2
37933  fi
37934done
37935  done
37936IFS=$as_save_IFS
37937
37938fi
37939fi
37940OBJCOPY=$ac_cv_prog_OBJCOPY
37941if test -n "$OBJCOPY"; then
37942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37943$as_echo "$OBJCOPY" >&6; }
37944else
37945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37946$as_echo "no" >&6; }
37947fi
37948
37949
37950    test -n "$OBJCOPY" && break
37951  done
37952fi
37953if test -z "$OBJCOPY"; then
37954  ac_ct_OBJCOPY=$OBJCOPY
37955  for ac_prog in gobjcopy objcopy
37956do
37957  # Extract the first word of "$ac_prog", so it can be a program name with args.
37958set dummy $ac_prog; ac_word=$2
37959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37960$as_echo_n "checking for $ac_word... " >&6; }
37961if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37962  $as_echo_n "(cached) " >&6
37963else
37964  if test -n "$ac_ct_OBJCOPY"; then
37965  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37966else
37967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37968for as_dir in $PATH
37969do
37970  IFS=$as_save_IFS
37971  test -z "$as_dir" && as_dir=.
37972    for ac_exec_ext in '' $ac_executable_extensions; do
37973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37974    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37976    break 2
37977  fi
37978done
37979  done
37980IFS=$as_save_IFS
37981
37982fi
37983fi
37984ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37985if test -n "$ac_ct_OBJCOPY"; then
37986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37987$as_echo "$ac_ct_OBJCOPY" >&6; }
37988else
37989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37990$as_echo "no" >&6; }
37991fi
37992
37993
37994  test -n "$ac_ct_OBJCOPY" && break
37995done
37996
37997  if test "x$ac_ct_OBJCOPY" = x; then
37998    OBJCOPY=""
37999  else
38000    case $cross_compiling:$ac_tool_warned in
38001yes:)
38002{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38003$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38004ac_tool_warned=yes ;;
38005esac
38006    OBJCOPY=$ac_ct_OBJCOPY
38007  fi
38008fi
38009
38010  else
38011    # The variable is set, but is it from the command line or the environment?
38012
38013    # Try to remove the string !OBJCOPY! from our list.
38014    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38015    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38016      # If it failed, the variable was not from the command line. Ignore it,
38017      # but warn the user (except for BASH, which is always set by the calling BASH).
38018      if test "xOBJCOPY" != xBASH; then
38019        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38020$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38021      fi
38022      # Try to locate tool using the code snippet
38023      if test -n "$ac_tool_prefix"; then
38024  for ac_prog in gobjcopy objcopy
38025  do
38026    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38027set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38029$as_echo_n "checking for $ac_word... " >&6; }
38030if ${ac_cv_prog_OBJCOPY+:} false; then :
38031  $as_echo_n "(cached) " >&6
38032else
38033  if test -n "$OBJCOPY"; then
38034  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38035else
38036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38037for as_dir in $PATH
38038do
38039  IFS=$as_save_IFS
38040  test -z "$as_dir" && as_dir=.
38041    for ac_exec_ext in '' $ac_executable_extensions; do
38042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38043    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38045    break 2
38046  fi
38047done
38048  done
38049IFS=$as_save_IFS
38050
38051fi
38052fi
38053OBJCOPY=$ac_cv_prog_OBJCOPY
38054if test -n "$OBJCOPY"; then
38055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38056$as_echo "$OBJCOPY" >&6; }
38057else
38058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38059$as_echo "no" >&6; }
38060fi
38061
38062
38063    test -n "$OBJCOPY" && break
38064  done
38065fi
38066if test -z "$OBJCOPY"; then
38067  ac_ct_OBJCOPY=$OBJCOPY
38068  for ac_prog in gobjcopy objcopy
38069do
38070  # Extract the first word of "$ac_prog", so it can be a program name with args.
38071set dummy $ac_prog; ac_word=$2
38072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38073$as_echo_n "checking for $ac_word... " >&6; }
38074if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38075  $as_echo_n "(cached) " >&6
38076else
38077  if test -n "$ac_ct_OBJCOPY"; then
38078  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38079else
38080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38081for as_dir in $PATH
38082do
38083  IFS=$as_save_IFS
38084  test -z "$as_dir" && as_dir=.
38085    for ac_exec_ext in '' $ac_executable_extensions; do
38086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38087    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38089    break 2
38090  fi
38091done
38092  done
38093IFS=$as_save_IFS
38094
38095fi
38096fi
38097ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38098if test -n "$ac_ct_OBJCOPY"; then
38099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38100$as_echo "$ac_ct_OBJCOPY" >&6; }
38101else
38102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38103$as_echo "no" >&6; }
38104fi
38105
38106
38107  test -n "$ac_ct_OBJCOPY" && break
38108done
38109
38110  if test "x$ac_ct_OBJCOPY" = x; then
38111    OBJCOPY=""
38112  else
38113    case $cross_compiling:$ac_tool_warned in
38114yes:)
38115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38117ac_tool_warned=yes ;;
38118esac
38119    OBJCOPY=$ac_ct_OBJCOPY
38120  fi
38121fi
38122
38123    else
38124      # If it succeeded, then it was overridden by the user. We will use it
38125      # for the tool.
38126
38127      # First remove it from the list of overridden variables, so we can test
38128      # for unknown variables in the end.
38129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38130
38131      # Check if the provided tool contains a complete path.
38132      tool_specified="$OBJCOPY"
38133      tool_basename="${tool_specified##*/}"
38134      if test "x$tool_basename" = "x$tool_specified"; then
38135        # A command without a complete path is provided, search $PATH.
38136        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38137$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38138        # Extract the first word of "$tool_basename", so it can be a program name with args.
38139set dummy $tool_basename; ac_word=$2
38140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38141$as_echo_n "checking for $ac_word... " >&6; }
38142if ${ac_cv_path_OBJCOPY+:} false; then :
38143  $as_echo_n "(cached) " >&6
38144else
38145  case $OBJCOPY in
38146  [\\/]* | ?:[\\/]*)
38147  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38148  ;;
38149  *)
38150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38151for as_dir in $PATH
38152do
38153  IFS=$as_save_IFS
38154  test -z "$as_dir" && as_dir=.
38155    for ac_exec_ext in '' $ac_executable_extensions; do
38156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38157    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38159    break 2
38160  fi
38161done
38162  done
38163IFS=$as_save_IFS
38164
38165  ;;
38166esac
38167fi
38168OBJCOPY=$ac_cv_path_OBJCOPY
38169if test -n "$OBJCOPY"; then
38170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38171$as_echo "$OBJCOPY" >&6; }
38172else
38173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38174$as_echo "no" >&6; }
38175fi
38176
38177
38178        if test "x$OBJCOPY" = x; then
38179          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38180        fi
38181      else
38182        # Otherwise we believe it is a complete path. Use it as it is.
38183        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38184$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38186$as_echo_n "checking for OBJCOPY... " >&6; }
38187        if test ! -x "$tool_specified"; then
38188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38189$as_echo "not found" >&6; }
38190          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38191        fi
38192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38193$as_echo "$tool_specified" >&6; }
38194      fi
38195    fi
38196  fi
38197
38198
38199    # Only call fixup if objcopy was found.
38200    if test -n "$OBJCOPY"; then
38201
38202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38203
38204  # First separate the path from the arguments. This will split at the first
38205  # space.
38206  complete="$OBJCOPY"
38207  path="${complete%% *}"
38208  tmp="$complete EOL"
38209  arguments="${tmp#* }"
38210
38211  # Input might be given as Windows format, start by converting to
38212  # unix format.
38213  new_path=`$CYGPATH -u "$path"`
38214
38215  # Now try to locate executable using which
38216  new_path=`$WHICH "$new_path" 2> /dev/null`
38217  # bat and cmd files are not always considered executable in cygwin causing which
38218  # to not find them
38219  if test "x$new_path" = x \
38220      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38221      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38222    new_path=`$CYGPATH -u "$path"`
38223  fi
38224  if test "x$new_path" = x; then
38225    # Oops. Which didn't find the executable.
38226    # The splitting of arguments from the executable at a space might have been incorrect,
38227    # since paths with space are more likely in Windows. Give it another try with the whole
38228    # argument.
38229    path="$complete"
38230    arguments="EOL"
38231    new_path=`$CYGPATH -u "$path"`
38232    new_path=`$WHICH "$new_path" 2> /dev/null`
38233    # bat and cmd files are not always considered executable in cygwin causing which
38234    # to not find them
38235    if test "x$new_path" = x \
38236        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38237        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38238      new_path=`$CYGPATH -u "$path"`
38239    fi
38240    if test "x$new_path" = x; then
38241      # It's still not found. Now this is an unrecoverable error.
38242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38243$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38244      has_space=`$ECHO "$complete" | $GREP " "`
38245      if test "x$has_space" != x; then
38246        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38247$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38248      fi
38249      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38250    fi
38251  fi
38252
38253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38256  # "foo.exe" is OK but "foo" is an error.
38257  #
38258  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38259  # It is also a way to make sure we got the proper file name for the real test later on.
38260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38261  if test "x$test_shortpath" = x; then
38262    # Short path failed, file does not exist as specified.
38263    # Try adding .exe or .cmd
38264    if test -f "${new_path}.exe"; then
38265      input_to_shortpath="${new_path}.exe"
38266    elif test -f "${new_path}.cmd"; then
38267      input_to_shortpath="${new_path}.cmd"
38268    else
38269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38270$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38271      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38272$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38273      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38274    fi
38275  else
38276    input_to_shortpath="$new_path"
38277  fi
38278
38279  # Call helper function which possibly converts this using DOS-style short mode.
38280  # If so, the updated path is stored in $new_path.
38281  new_path="$input_to_shortpath"
38282
38283  input_path="$input_to_shortpath"
38284  # Check if we need to convert this using DOS-style short mode. If the path
38285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38286  # take no chances and rewrite it.
38287  # Note: m4 eats our [], so we need to use [ and ] instead.
38288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38289  if test "x$has_forbidden_chars" != x; then
38290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38294      # Going to short mode and back again did indeed matter. Since short mode is
38295      # case insensitive, let's make it lowercase to improve readability.
38296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38297      # Now convert it back to Unix-stile (cygpath)
38298      input_path=`$CYGPATH -u "$shortmode_path"`
38299      new_path="$input_path"
38300    fi
38301  fi
38302
38303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38304  if test "x$test_cygdrive_prefix" = x; then
38305    # As a simple fix, exclude /usr/bin since it's not a real path.
38306    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38308      # a path prefixed by /cygdrive for fixpath to work.
38309      new_path="$CYGWIN_ROOT_PATH$input_path"
38310    fi
38311  fi
38312
38313  # remove trailing .exe if any
38314  new_path="${new_path/%.exe/}"
38315
38316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38317
38318  # First separate the path from the arguments. This will split at the first
38319  # space.
38320  complete="$OBJCOPY"
38321  path="${complete%% *}"
38322  tmp="$complete EOL"
38323  arguments="${tmp#* }"
38324
38325  # Input might be given as Windows format, start by converting to
38326  # unix format.
38327  new_path="$path"
38328
38329  windows_path="$new_path"
38330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38331    unix_path=`$CYGPATH -u "$windows_path"`
38332    new_path="$unix_path"
38333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38335    new_path="$unix_path"
38336  fi
38337
38338
38339  # Now try to locate executable using which
38340  new_path=`$WHICH "$new_path" 2> /dev/null`
38341
38342  if test "x$new_path" = x; then
38343    # Oops. Which didn't find the executable.
38344    # The splitting of arguments from the executable at a space might have been incorrect,
38345    # since paths with space are more likely in Windows. Give it another try with the whole
38346    # argument.
38347    path="$complete"
38348    arguments="EOL"
38349    new_path="$path"
38350
38351  windows_path="$new_path"
38352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38353    unix_path=`$CYGPATH -u "$windows_path"`
38354    new_path="$unix_path"
38355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38357    new_path="$unix_path"
38358  fi
38359
38360
38361    new_path=`$WHICH "$new_path" 2> /dev/null`
38362
38363    if test "x$new_path" = x; then
38364      # It's still not found. Now this is an unrecoverable error.
38365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38366$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38367      has_space=`$ECHO "$complete" | $GREP " "`
38368      if test "x$has_space" != x; then
38369        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38371      fi
38372      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38373    fi
38374  fi
38375
38376  # Now new_path has a complete unix path to the binary
38377  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38378    # Keep paths in /bin as-is, but remove trailing .exe if any
38379    new_path="${new_path/%.exe/}"
38380    # Do not save /bin paths to all_fixpath_prefixes!
38381  else
38382    # Not in mixed or Windows style, start by that.
38383    new_path=`cmd //c echo $new_path`
38384
38385  input_path="$new_path"
38386  # Check if we need to convert this using DOS-style short mode. If the path
38387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38388  # take no chances and rewrite it.
38389  # Note: m4 eats our [], so we need to use [ and ] instead.
38390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38391  if test "x$has_forbidden_chars" != x; then
38392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38394  fi
38395
38396    # Output is in $new_path
38397
38398  windows_path="$new_path"
38399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38400    unix_path=`$CYGPATH -u "$windows_path"`
38401    new_path="$unix_path"
38402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38404    new_path="$unix_path"
38405  fi
38406
38407    # remove trailing .exe if any
38408    new_path="${new_path/%.exe/}"
38409
38410    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38411    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38412  fi
38413
38414  else
38415    # We're on a posix platform. Hooray! :)
38416    # First separate the path from the arguments. This will split at the first
38417    # space.
38418    complete="$OBJCOPY"
38419    path="${complete%% *}"
38420    tmp="$complete EOL"
38421    arguments="${tmp#* }"
38422
38423    # Cannot rely on the command "which" here since it doesn't always work.
38424    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38425    if test -z "$is_absolute_path"; then
38426      # Path to executable is not absolute. Find it.
38427      IFS_save="$IFS"
38428      IFS=:
38429      for p in $PATH; do
38430        if test -f "$p/$path" && test -x "$p/$path"; then
38431          new_path="$p/$path"
38432          break
38433        fi
38434      done
38435      IFS="$IFS_save"
38436    else
38437      # This is an absolute path, we can use it without further modifications.
38438      new_path="$path"
38439    fi
38440
38441    if test "x$new_path" = x; then
38442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38443$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38444      has_space=`$ECHO "$complete" | $GREP " "`
38445      if test "x$has_space" != x; then
38446        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38447$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38448      fi
38449      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38450    fi
38451  fi
38452
38453  # Now join together the path and the arguments once again
38454  if test "x$arguments" != xEOL; then
38455    new_complete="$new_path ${arguments% *}"
38456  else
38457    new_complete="$new_path"
38458  fi
38459
38460  if test "x$complete" != "x$new_complete"; then
38461    OBJCOPY="$new_complete"
38462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38463$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38464  fi
38465
38466    fi
38467  fi
38468
38469
38470
38471  # Publish this variable in the help.
38472
38473
38474  if test "x$OBJDUMP" = x; then
38475    # The variable is not set by user, try to locate tool using the code snippet
38476    if test -n "$ac_tool_prefix"; then
38477  for ac_prog in gobjdump objdump
38478  do
38479    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38480set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38482$as_echo_n "checking for $ac_word... " >&6; }
38483if ${ac_cv_prog_OBJDUMP+:} false; then :
38484  $as_echo_n "(cached) " >&6
38485else
38486  if test -n "$OBJDUMP"; then
38487  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38488else
38489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38490for as_dir in $PATH
38491do
38492  IFS=$as_save_IFS
38493  test -z "$as_dir" && as_dir=.
38494    for ac_exec_ext in '' $ac_executable_extensions; do
38495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38496    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38498    break 2
38499  fi
38500done
38501  done
38502IFS=$as_save_IFS
38503
38504fi
38505fi
38506OBJDUMP=$ac_cv_prog_OBJDUMP
38507if test -n "$OBJDUMP"; then
38508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38509$as_echo "$OBJDUMP" >&6; }
38510else
38511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38512$as_echo "no" >&6; }
38513fi
38514
38515
38516    test -n "$OBJDUMP" && break
38517  done
38518fi
38519if test -z "$OBJDUMP"; then
38520  ac_ct_OBJDUMP=$OBJDUMP
38521  for ac_prog in gobjdump objdump
38522do
38523  # Extract the first word of "$ac_prog", so it can be a program name with args.
38524set dummy $ac_prog; ac_word=$2
38525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38526$as_echo_n "checking for $ac_word... " >&6; }
38527if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38528  $as_echo_n "(cached) " >&6
38529else
38530  if test -n "$ac_ct_OBJDUMP"; then
38531  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38532else
38533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38534for as_dir in $PATH
38535do
38536  IFS=$as_save_IFS
38537  test -z "$as_dir" && as_dir=.
38538    for ac_exec_ext in '' $ac_executable_extensions; do
38539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38540    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38542    break 2
38543  fi
38544done
38545  done
38546IFS=$as_save_IFS
38547
38548fi
38549fi
38550ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38551if test -n "$ac_ct_OBJDUMP"; then
38552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38553$as_echo "$ac_ct_OBJDUMP" >&6; }
38554else
38555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38556$as_echo "no" >&6; }
38557fi
38558
38559
38560  test -n "$ac_ct_OBJDUMP" && break
38561done
38562
38563  if test "x$ac_ct_OBJDUMP" = x; then
38564    OBJDUMP=""
38565  else
38566    case $cross_compiling:$ac_tool_warned in
38567yes:)
38568{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38569$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38570ac_tool_warned=yes ;;
38571esac
38572    OBJDUMP=$ac_ct_OBJDUMP
38573  fi
38574fi
38575
38576  else
38577    # The variable is set, but is it from the command line or the environment?
38578
38579    # Try to remove the string !OBJDUMP! from our list.
38580    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38581    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38582      # If it failed, the variable was not from the command line. Ignore it,
38583      # but warn the user (except for BASH, which is always set by the calling BASH).
38584      if test "xOBJDUMP" != xBASH; then
38585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38586$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38587      fi
38588      # Try to locate tool using the code snippet
38589      if test -n "$ac_tool_prefix"; then
38590  for ac_prog in gobjdump objdump
38591  do
38592    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38593set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38595$as_echo_n "checking for $ac_word... " >&6; }
38596if ${ac_cv_prog_OBJDUMP+:} false; then :
38597  $as_echo_n "(cached) " >&6
38598else
38599  if test -n "$OBJDUMP"; then
38600  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38601else
38602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38603for as_dir in $PATH
38604do
38605  IFS=$as_save_IFS
38606  test -z "$as_dir" && as_dir=.
38607    for ac_exec_ext in '' $ac_executable_extensions; do
38608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38609    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38611    break 2
38612  fi
38613done
38614  done
38615IFS=$as_save_IFS
38616
38617fi
38618fi
38619OBJDUMP=$ac_cv_prog_OBJDUMP
38620if test -n "$OBJDUMP"; then
38621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38622$as_echo "$OBJDUMP" >&6; }
38623else
38624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38625$as_echo "no" >&6; }
38626fi
38627
38628
38629    test -n "$OBJDUMP" && break
38630  done
38631fi
38632if test -z "$OBJDUMP"; then
38633  ac_ct_OBJDUMP=$OBJDUMP
38634  for ac_prog in gobjdump objdump
38635do
38636  # Extract the first word of "$ac_prog", so it can be a program name with args.
38637set dummy $ac_prog; ac_word=$2
38638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38639$as_echo_n "checking for $ac_word... " >&6; }
38640if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38641  $as_echo_n "(cached) " >&6
38642else
38643  if test -n "$ac_ct_OBJDUMP"; then
38644  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38645else
38646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38647for as_dir in $PATH
38648do
38649  IFS=$as_save_IFS
38650  test -z "$as_dir" && as_dir=.
38651    for ac_exec_ext in '' $ac_executable_extensions; do
38652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38653    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38655    break 2
38656  fi
38657done
38658  done
38659IFS=$as_save_IFS
38660
38661fi
38662fi
38663ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38664if test -n "$ac_ct_OBJDUMP"; then
38665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38666$as_echo "$ac_ct_OBJDUMP" >&6; }
38667else
38668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38669$as_echo "no" >&6; }
38670fi
38671
38672
38673  test -n "$ac_ct_OBJDUMP" && break
38674done
38675
38676  if test "x$ac_ct_OBJDUMP" = x; then
38677    OBJDUMP=""
38678  else
38679    case $cross_compiling:$ac_tool_warned in
38680yes:)
38681{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38682$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38683ac_tool_warned=yes ;;
38684esac
38685    OBJDUMP=$ac_ct_OBJDUMP
38686  fi
38687fi
38688
38689    else
38690      # If it succeeded, then it was overridden by the user. We will use it
38691      # for the tool.
38692
38693      # First remove it from the list of overridden variables, so we can test
38694      # for unknown variables in the end.
38695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38696
38697      # Check if the provided tool contains a complete path.
38698      tool_specified="$OBJDUMP"
38699      tool_basename="${tool_specified##*/}"
38700      if test "x$tool_basename" = "x$tool_specified"; then
38701        # A command without a complete path is provided, search $PATH.
38702        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38703$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38704        # Extract the first word of "$tool_basename", so it can be a program name with args.
38705set dummy $tool_basename; ac_word=$2
38706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38707$as_echo_n "checking for $ac_word... " >&6; }
38708if ${ac_cv_path_OBJDUMP+:} false; then :
38709  $as_echo_n "(cached) " >&6
38710else
38711  case $OBJDUMP in
38712  [\\/]* | ?:[\\/]*)
38713  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38714  ;;
38715  *)
38716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38717for as_dir in $PATH
38718do
38719  IFS=$as_save_IFS
38720  test -z "$as_dir" && as_dir=.
38721    for ac_exec_ext in '' $ac_executable_extensions; do
38722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38723    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38725    break 2
38726  fi
38727done
38728  done
38729IFS=$as_save_IFS
38730
38731  ;;
38732esac
38733fi
38734OBJDUMP=$ac_cv_path_OBJDUMP
38735if test -n "$OBJDUMP"; then
38736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38737$as_echo "$OBJDUMP" >&6; }
38738else
38739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38740$as_echo "no" >&6; }
38741fi
38742
38743
38744        if test "x$OBJDUMP" = x; then
38745          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38746        fi
38747      else
38748        # Otherwise we believe it is a complete path. Use it as it is.
38749        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38750$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38751        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38752$as_echo_n "checking for OBJDUMP... " >&6; }
38753        if test ! -x "$tool_specified"; then
38754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38755$as_echo "not found" >&6; }
38756          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38757        fi
38758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38759$as_echo "$tool_specified" >&6; }
38760      fi
38761    fi
38762  fi
38763
38764
38765  if test "x$OBJDUMP" != x; then
38766    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38767    # bails if argument is missing.
38768
38769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38770
38771  # First separate the path from the arguments. This will split at the first
38772  # space.
38773  complete="$OBJDUMP"
38774  path="${complete%% *}"
38775  tmp="$complete EOL"
38776  arguments="${tmp#* }"
38777
38778  # Input might be given as Windows format, start by converting to
38779  # unix format.
38780  new_path=`$CYGPATH -u "$path"`
38781
38782  # Now try to locate executable using which
38783  new_path=`$WHICH "$new_path" 2> /dev/null`
38784  # bat and cmd files are not always considered executable in cygwin causing which
38785  # to not find them
38786  if test "x$new_path" = x \
38787      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38788      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38789    new_path=`$CYGPATH -u "$path"`
38790  fi
38791  if test "x$new_path" = x; then
38792    # Oops. Which didn't find the executable.
38793    # The splitting of arguments from the executable at a space might have been incorrect,
38794    # since paths with space are more likely in Windows. Give it another try with the whole
38795    # argument.
38796    path="$complete"
38797    arguments="EOL"
38798    new_path=`$CYGPATH -u "$path"`
38799    new_path=`$WHICH "$new_path" 2> /dev/null`
38800    # bat and cmd files are not always considered executable in cygwin causing which
38801    # to not find them
38802    if test "x$new_path" = x \
38803        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38804        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38805      new_path=`$CYGPATH -u "$path"`
38806    fi
38807    if test "x$new_path" = x; then
38808      # It's still not found. Now this is an unrecoverable error.
38809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38810$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38811      has_space=`$ECHO "$complete" | $GREP " "`
38812      if test "x$has_space" != x; then
38813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38815      fi
38816      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38817    fi
38818  fi
38819
38820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38823  # "foo.exe" is OK but "foo" is an error.
38824  #
38825  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38826  # It is also a way to make sure we got the proper file name for the real test later on.
38827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38828  if test "x$test_shortpath" = x; then
38829    # Short path failed, file does not exist as specified.
38830    # Try adding .exe or .cmd
38831    if test -f "${new_path}.exe"; then
38832      input_to_shortpath="${new_path}.exe"
38833    elif test -f "${new_path}.cmd"; then
38834      input_to_shortpath="${new_path}.cmd"
38835    else
38836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38837$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38838      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38839$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38840      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38841    fi
38842  else
38843    input_to_shortpath="$new_path"
38844  fi
38845
38846  # Call helper function which possibly converts this using DOS-style short mode.
38847  # If so, the updated path is stored in $new_path.
38848  new_path="$input_to_shortpath"
38849
38850  input_path="$input_to_shortpath"
38851  # Check if we need to convert this using DOS-style short mode. If the path
38852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38853  # take no chances and rewrite it.
38854  # Note: m4 eats our [], so we need to use [ and ] instead.
38855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38856  if test "x$has_forbidden_chars" != x; then
38857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38861      # Going to short mode and back again did indeed matter. Since short mode is
38862      # case insensitive, let's make it lowercase to improve readability.
38863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38864      # Now convert it back to Unix-stile (cygpath)
38865      input_path=`$CYGPATH -u "$shortmode_path"`
38866      new_path="$input_path"
38867    fi
38868  fi
38869
38870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38871  if test "x$test_cygdrive_prefix" = x; then
38872    # As a simple fix, exclude /usr/bin since it's not a real path.
38873    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38875      # a path prefixed by /cygdrive for fixpath to work.
38876      new_path="$CYGWIN_ROOT_PATH$input_path"
38877    fi
38878  fi
38879
38880  # remove trailing .exe if any
38881  new_path="${new_path/%.exe/}"
38882
38883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38884
38885  # First separate the path from the arguments. This will split at the first
38886  # space.
38887  complete="$OBJDUMP"
38888  path="${complete%% *}"
38889  tmp="$complete EOL"
38890  arguments="${tmp#* }"
38891
38892  # Input might be given as Windows format, start by converting to
38893  # unix format.
38894  new_path="$path"
38895
38896  windows_path="$new_path"
38897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38898    unix_path=`$CYGPATH -u "$windows_path"`
38899    new_path="$unix_path"
38900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38902    new_path="$unix_path"
38903  fi
38904
38905
38906  # Now try to locate executable using which
38907  new_path=`$WHICH "$new_path" 2> /dev/null`
38908
38909  if test "x$new_path" = x; then
38910    # Oops. Which didn't find the executable.
38911    # The splitting of arguments from the executable at a space might have been incorrect,
38912    # since paths with space are more likely in Windows. Give it another try with the whole
38913    # argument.
38914    path="$complete"
38915    arguments="EOL"
38916    new_path="$path"
38917
38918  windows_path="$new_path"
38919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38920    unix_path=`$CYGPATH -u "$windows_path"`
38921    new_path="$unix_path"
38922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38924    new_path="$unix_path"
38925  fi
38926
38927
38928    new_path=`$WHICH "$new_path" 2> /dev/null`
38929
38930    if test "x$new_path" = x; then
38931      # It's still not found. Now this is an unrecoverable error.
38932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38933$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38934      has_space=`$ECHO "$complete" | $GREP " "`
38935      if test "x$has_space" != x; then
38936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38938      fi
38939      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38940    fi
38941  fi
38942
38943  # Now new_path has a complete unix path to the binary
38944  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38945    # Keep paths in /bin as-is, but remove trailing .exe if any
38946    new_path="${new_path/%.exe/}"
38947    # Do not save /bin paths to all_fixpath_prefixes!
38948  else
38949    # Not in mixed or Windows style, start by that.
38950    new_path=`cmd //c echo $new_path`
38951
38952  input_path="$new_path"
38953  # Check if we need to convert this using DOS-style short mode. If the path
38954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38955  # take no chances and rewrite it.
38956  # Note: m4 eats our [], so we need to use [ and ] instead.
38957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38958  if test "x$has_forbidden_chars" != x; then
38959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38961  fi
38962
38963    # Output is in $new_path
38964
38965  windows_path="$new_path"
38966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38967    unix_path=`$CYGPATH -u "$windows_path"`
38968    new_path="$unix_path"
38969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38971    new_path="$unix_path"
38972  fi
38973
38974    # remove trailing .exe if any
38975    new_path="${new_path/%.exe/}"
38976
38977    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38978    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38979  fi
38980
38981  else
38982    # We're on a posix platform. Hooray! :)
38983    # First separate the path from the arguments. This will split at the first
38984    # space.
38985    complete="$OBJDUMP"
38986    path="${complete%% *}"
38987    tmp="$complete EOL"
38988    arguments="${tmp#* }"
38989
38990    # Cannot rely on the command "which" here since it doesn't always work.
38991    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38992    if test -z "$is_absolute_path"; then
38993      # Path to executable is not absolute. Find it.
38994      IFS_save="$IFS"
38995      IFS=:
38996      for p in $PATH; do
38997        if test -f "$p/$path" && test -x "$p/$path"; then
38998          new_path="$p/$path"
38999          break
39000        fi
39001      done
39002      IFS="$IFS_save"
39003    else
39004      # This is an absolute path, we can use it without further modifications.
39005      new_path="$path"
39006    fi
39007
39008    if test "x$new_path" = x; then
39009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39010$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39011      has_space=`$ECHO "$complete" | $GREP " "`
39012      if test "x$has_space" != x; then
39013        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39014$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39015      fi
39016      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39017    fi
39018  fi
39019
39020  # Now join together the path and the arguments once again
39021  if test "x$arguments" != xEOL; then
39022    new_complete="$new_path ${arguments% *}"
39023  else
39024    new_complete="$new_path"
39025  fi
39026
39027  if test "x$complete" != "x$new_complete"; then
39028    OBJDUMP="$new_complete"
39029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39030$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39031  fi
39032
39033  fi
39034
39035
39036  # Restore old path.
39037  PATH="$OLD_PATH"
39038
39039  # Restore the flags to the user specified values.
39040  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39041  CFLAGS="$ORG_CFLAGS"
39042  CXXFLAGS="$ORG_CXXFLAGS"
39043  OBJCFLAGS="$ORG_OBJCFLAGS"
39044
39045
39046# Finally do some processing after the detection phase
39047
39048  if test "x$COMPILE_TYPE" = "xcross"; then
39049    # Now we need to find a C/C++ compiler that can build executables for the
39050    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39051    # used once. Also, we need to do this without adding a tools dir to the
39052    # path, otherwise we might pick up cross-compilers which don't use standard
39053    # naming.
39054
39055    # FIXME: we should list the discovered compilers as an exclude pattern!
39056    # If we do that, we can do this detection before POST_DETECTION, and still
39057    # find the build compilers in the tools dir, if needed.
39058
39059
39060  # Publish this variable in the help.
39061
39062
39063  if test "x$BUILD_CC" = x; then
39064    # The variable is not set by user, try to locate tool using the code snippet
39065    for ac_prog in cl cc gcc
39066do
39067  # Extract the first word of "$ac_prog", so it can be a program name with args.
39068set dummy $ac_prog; ac_word=$2
39069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39070$as_echo_n "checking for $ac_word... " >&6; }
39071if ${ac_cv_path_BUILD_CC+:} false; then :
39072  $as_echo_n "(cached) " >&6
39073else
39074  case $BUILD_CC in
39075  [\\/]* | ?:[\\/]*)
39076  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39077  ;;
39078  *)
39079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39080for as_dir in $PATH
39081do
39082  IFS=$as_save_IFS
39083  test -z "$as_dir" && as_dir=.
39084    for ac_exec_ext in '' $ac_executable_extensions; do
39085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39086    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39088    break 2
39089  fi
39090done
39091  done
39092IFS=$as_save_IFS
39093
39094  ;;
39095esac
39096fi
39097BUILD_CC=$ac_cv_path_BUILD_CC
39098if test -n "$BUILD_CC"; then
39099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39100$as_echo "$BUILD_CC" >&6; }
39101else
39102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39103$as_echo "no" >&6; }
39104fi
39105
39106
39107  test -n "$BUILD_CC" && break
39108done
39109
39110  else
39111    # The variable is set, but is it from the command line or the environment?
39112
39113    # Try to remove the string !BUILD_CC! from our list.
39114    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39115    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39116      # If it failed, the variable was not from the command line. Ignore it,
39117      # but warn the user (except for BASH, which is always set by the calling BASH).
39118      if test "xBUILD_CC" != xBASH; then
39119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39120$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39121      fi
39122      # Try to locate tool using the code snippet
39123      for ac_prog in cl cc gcc
39124do
39125  # Extract the first word of "$ac_prog", so it can be a program name with args.
39126set dummy $ac_prog; ac_word=$2
39127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39128$as_echo_n "checking for $ac_word... " >&6; }
39129if ${ac_cv_path_BUILD_CC+:} false; then :
39130  $as_echo_n "(cached) " >&6
39131else
39132  case $BUILD_CC in
39133  [\\/]* | ?:[\\/]*)
39134  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39135  ;;
39136  *)
39137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39138for as_dir in $PATH
39139do
39140  IFS=$as_save_IFS
39141  test -z "$as_dir" && as_dir=.
39142    for ac_exec_ext in '' $ac_executable_extensions; do
39143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39144    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39146    break 2
39147  fi
39148done
39149  done
39150IFS=$as_save_IFS
39151
39152  ;;
39153esac
39154fi
39155BUILD_CC=$ac_cv_path_BUILD_CC
39156if test -n "$BUILD_CC"; then
39157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39158$as_echo "$BUILD_CC" >&6; }
39159else
39160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39161$as_echo "no" >&6; }
39162fi
39163
39164
39165  test -n "$BUILD_CC" && break
39166done
39167
39168    else
39169      # If it succeeded, then it was overridden by the user. We will use it
39170      # for the tool.
39171
39172      # First remove it from the list of overridden variables, so we can test
39173      # for unknown variables in the end.
39174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39175
39176      # Check if the provided tool contains a complete path.
39177      tool_specified="$BUILD_CC"
39178      tool_basename="${tool_specified##*/}"
39179      if test "x$tool_basename" = "x$tool_specified"; then
39180        # A command without a complete path is provided, search $PATH.
39181        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39182$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39183        # Extract the first word of "$tool_basename", so it can be a program name with args.
39184set dummy $tool_basename; ac_word=$2
39185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39186$as_echo_n "checking for $ac_word... " >&6; }
39187if ${ac_cv_path_BUILD_CC+:} false; then :
39188  $as_echo_n "(cached) " >&6
39189else
39190  case $BUILD_CC in
39191  [\\/]* | ?:[\\/]*)
39192  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39193  ;;
39194  *)
39195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39196for as_dir in $PATH
39197do
39198  IFS=$as_save_IFS
39199  test -z "$as_dir" && as_dir=.
39200    for ac_exec_ext in '' $ac_executable_extensions; do
39201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39202    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39204    break 2
39205  fi
39206done
39207  done
39208IFS=$as_save_IFS
39209
39210  ;;
39211esac
39212fi
39213BUILD_CC=$ac_cv_path_BUILD_CC
39214if test -n "$BUILD_CC"; then
39215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39216$as_echo "$BUILD_CC" >&6; }
39217else
39218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39219$as_echo "no" >&6; }
39220fi
39221
39222
39223        if test "x$BUILD_CC" = x; then
39224          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39225        fi
39226      else
39227        # Otherwise we believe it is a complete path. Use it as it is.
39228        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39229$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39231$as_echo_n "checking for BUILD_CC... " >&6; }
39232        if test ! -x "$tool_specified"; then
39233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39234$as_echo "not found" >&6; }
39235          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39236        fi
39237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39238$as_echo "$tool_specified" >&6; }
39239      fi
39240    fi
39241  fi
39242
39243
39244
39245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39246
39247  # First separate the path from the arguments. This will split at the first
39248  # space.
39249  complete="$BUILD_CC"
39250  path="${complete%% *}"
39251  tmp="$complete EOL"
39252  arguments="${tmp#* }"
39253
39254  # Input might be given as Windows format, start by converting to
39255  # unix format.
39256  new_path=`$CYGPATH -u "$path"`
39257
39258  # Now try to locate executable using which
39259  new_path=`$WHICH "$new_path" 2> /dev/null`
39260  # bat and cmd files are not always considered executable in cygwin causing which
39261  # to not find them
39262  if test "x$new_path" = x \
39263      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39264      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39265    new_path=`$CYGPATH -u "$path"`
39266  fi
39267  if test "x$new_path" = x; then
39268    # Oops. Which didn't find the executable.
39269    # The splitting of arguments from the executable at a space might have been incorrect,
39270    # since paths with space are more likely in Windows. Give it another try with the whole
39271    # argument.
39272    path="$complete"
39273    arguments="EOL"
39274    new_path=`$CYGPATH -u "$path"`
39275    new_path=`$WHICH "$new_path" 2> /dev/null`
39276    # bat and cmd files are not always considered executable in cygwin causing which
39277    # to not find them
39278    if test "x$new_path" = x \
39279        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39280        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39281      new_path=`$CYGPATH -u "$path"`
39282    fi
39283    if test "x$new_path" = x; then
39284      # It's still not found. Now this is an unrecoverable error.
39285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39286$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39287      has_space=`$ECHO "$complete" | $GREP " "`
39288      if test "x$has_space" != x; then
39289        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39290$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39291      fi
39292      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39293    fi
39294  fi
39295
39296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39299  # "foo.exe" is OK but "foo" is an error.
39300  #
39301  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39302  # It is also a way to make sure we got the proper file name for the real test later on.
39303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39304  if test "x$test_shortpath" = x; then
39305    # Short path failed, file does not exist as specified.
39306    # Try adding .exe or .cmd
39307    if test -f "${new_path}.exe"; then
39308      input_to_shortpath="${new_path}.exe"
39309    elif test -f "${new_path}.cmd"; then
39310      input_to_shortpath="${new_path}.cmd"
39311    else
39312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39313$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39314      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39315$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39316      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39317    fi
39318  else
39319    input_to_shortpath="$new_path"
39320  fi
39321
39322  # Call helper function which possibly converts this using DOS-style short mode.
39323  # If so, the updated path is stored in $new_path.
39324  new_path="$input_to_shortpath"
39325
39326  input_path="$input_to_shortpath"
39327  # Check if we need to convert this using DOS-style short mode. If the path
39328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39329  # take no chances and rewrite it.
39330  # Note: m4 eats our [], so we need to use [ and ] instead.
39331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39332  if test "x$has_forbidden_chars" != x; then
39333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39337      # Going to short mode and back again did indeed matter. Since short mode is
39338      # case insensitive, let's make it lowercase to improve readability.
39339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39340      # Now convert it back to Unix-stile (cygpath)
39341      input_path=`$CYGPATH -u "$shortmode_path"`
39342      new_path="$input_path"
39343    fi
39344  fi
39345
39346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39347  if test "x$test_cygdrive_prefix" = x; then
39348    # As a simple fix, exclude /usr/bin since it's not a real path.
39349    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39351      # a path prefixed by /cygdrive for fixpath to work.
39352      new_path="$CYGWIN_ROOT_PATH$input_path"
39353    fi
39354  fi
39355
39356  # remove trailing .exe if any
39357  new_path="${new_path/%.exe/}"
39358
39359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39360
39361  # First separate the path from the arguments. This will split at the first
39362  # space.
39363  complete="$BUILD_CC"
39364  path="${complete%% *}"
39365  tmp="$complete EOL"
39366  arguments="${tmp#* }"
39367
39368  # Input might be given as Windows format, start by converting to
39369  # unix format.
39370  new_path="$path"
39371
39372  windows_path="$new_path"
39373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39374    unix_path=`$CYGPATH -u "$windows_path"`
39375    new_path="$unix_path"
39376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39378    new_path="$unix_path"
39379  fi
39380
39381
39382  # Now try to locate executable using which
39383  new_path=`$WHICH "$new_path" 2> /dev/null`
39384
39385  if test "x$new_path" = x; then
39386    # Oops. Which didn't find the executable.
39387    # The splitting of arguments from the executable at a space might have been incorrect,
39388    # since paths with space are more likely in Windows. Give it another try with the whole
39389    # argument.
39390    path="$complete"
39391    arguments="EOL"
39392    new_path="$path"
39393
39394  windows_path="$new_path"
39395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39396    unix_path=`$CYGPATH -u "$windows_path"`
39397    new_path="$unix_path"
39398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39400    new_path="$unix_path"
39401  fi
39402
39403
39404    new_path=`$WHICH "$new_path" 2> /dev/null`
39405
39406    if test "x$new_path" = x; then
39407      # It's still not found. Now this is an unrecoverable error.
39408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39409$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39410      has_space=`$ECHO "$complete" | $GREP " "`
39411      if test "x$has_space" != x; then
39412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39414      fi
39415      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39416    fi
39417  fi
39418
39419  # Now new_path has a complete unix path to the binary
39420  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39421    # Keep paths in /bin as-is, but remove trailing .exe if any
39422    new_path="${new_path/%.exe/}"
39423    # Do not save /bin paths to all_fixpath_prefixes!
39424  else
39425    # Not in mixed or Windows style, start by that.
39426    new_path=`cmd //c echo $new_path`
39427
39428  input_path="$new_path"
39429  # Check if we need to convert this using DOS-style short mode. If the path
39430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39431  # take no chances and rewrite it.
39432  # Note: m4 eats our [], so we need to use [ and ] instead.
39433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39434  if test "x$has_forbidden_chars" != x; then
39435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39437  fi
39438
39439    # Output is in $new_path
39440
39441  windows_path="$new_path"
39442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39443    unix_path=`$CYGPATH -u "$windows_path"`
39444    new_path="$unix_path"
39445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39447    new_path="$unix_path"
39448  fi
39449
39450    # remove trailing .exe if any
39451    new_path="${new_path/%.exe/}"
39452
39453    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39454    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39455  fi
39456
39457  else
39458    # We're on a posix platform. Hooray! :)
39459    # First separate the path from the arguments. This will split at the first
39460    # space.
39461    complete="$BUILD_CC"
39462    path="${complete%% *}"
39463    tmp="$complete EOL"
39464    arguments="${tmp#* }"
39465
39466    # Cannot rely on the command "which" here since it doesn't always work.
39467    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39468    if test -z "$is_absolute_path"; then
39469      # Path to executable is not absolute. Find it.
39470      IFS_save="$IFS"
39471      IFS=:
39472      for p in $PATH; do
39473        if test -f "$p/$path" && test -x "$p/$path"; then
39474          new_path="$p/$path"
39475          break
39476        fi
39477      done
39478      IFS="$IFS_save"
39479    else
39480      # This is an absolute path, we can use it without further modifications.
39481      new_path="$path"
39482    fi
39483
39484    if test "x$new_path" = x; then
39485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39486$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39487      has_space=`$ECHO "$complete" | $GREP " "`
39488      if test "x$has_space" != x; then
39489        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39490$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39491      fi
39492      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39493    fi
39494  fi
39495
39496  # Now join together the path and the arguments once again
39497  if test "x$arguments" != xEOL; then
39498    new_complete="$new_path ${arguments% *}"
39499  else
39500    new_complete="$new_path"
39501  fi
39502
39503  if test "x$complete" != "x$new_complete"; then
39504    BUILD_CC="$new_complete"
39505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39506$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39507  fi
39508
39509
39510
39511  # Publish this variable in the help.
39512
39513
39514  if test "x$BUILD_CXX" = x; then
39515    # The variable is not set by user, try to locate tool using the code snippet
39516    for ac_prog in cl CC g++
39517do
39518  # Extract the first word of "$ac_prog", so it can be a program name with args.
39519set dummy $ac_prog; ac_word=$2
39520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39521$as_echo_n "checking for $ac_word... " >&6; }
39522if ${ac_cv_path_BUILD_CXX+:} false; then :
39523  $as_echo_n "(cached) " >&6
39524else
39525  case $BUILD_CXX in
39526  [\\/]* | ?:[\\/]*)
39527  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39528  ;;
39529  *)
39530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39531for as_dir in $PATH
39532do
39533  IFS=$as_save_IFS
39534  test -z "$as_dir" && as_dir=.
39535    for ac_exec_ext in '' $ac_executable_extensions; do
39536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39537    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39539    break 2
39540  fi
39541done
39542  done
39543IFS=$as_save_IFS
39544
39545  ;;
39546esac
39547fi
39548BUILD_CXX=$ac_cv_path_BUILD_CXX
39549if test -n "$BUILD_CXX"; then
39550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39551$as_echo "$BUILD_CXX" >&6; }
39552else
39553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39554$as_echo "no" >&6; }
39555fi
39556
39557
39558  test -n "$BUILD_CXX" && break
39559done
39560
39561  else
39562    # The variable is set, but is it from the command line or the environment?
39563
39564    # Try to remove the string !BUILD_CXX! from our list.
39565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39567      # If it failed, the variable was not from the command line. Ignore it,
39568      # but warn the user (except for BASH, which is always set by the calling BASH).
39569      if test "xBUILD_CXX" != xBASH; then
39570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39571$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39572      fi
39573      # Try to locate tool using the code snippet
39574      for ac_prog in cl CC g++
39575do
39576  # Extract the first word of "$ac_prog", so it can be a program name with args.
39577set dummy $ac_prog; ac_word=$2
39578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39579$as_echo_n "checking for $ac_word... " >&6; }
39580if ${ac_cv_path_BUILD_CXX+:} false; then :
39581  $as_echo_n "(cached) " >&6
39582else
39583  case $BUILD_CXX in
39584  [\\/]* | ?:[\\/]*)
39585  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39586  ;;
39587  *)
39588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39589for as_dir in $PATH
39590do
39591  IFS=$as_save_IFS
39592  test -z "$as_dir" && as_dir=.
39593    for ac_exec_ext in '' $ac_executable_extensions; do
39594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39595    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39597    break 2
39598  fi
39599done
39600  done
39601IFS=$as_save_IFS
39602
39603  ;;
39604esac
39605fi
39606BUILD_CXX=$ac_cv_path_BUILD_CXX
39607if test -n "$BUILD_CXX"; then
39608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39609$as_echo "$BUILD_CXX" >&6; }
39610else
39611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39612$as_echo "no" >&6; }
39613fi
39614
39615
39616  test -n "$BUILD_CXX" && break
39617done
39618
39619    else
39620      # If it succeeded, then it was overridden by the user. We will use it
39621      # for the tool.
39622
39623      # First remove it from the list of overridden variables, so we can test
39624      # for unknown variables in the end.
39625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39626
39627      # Check if the provided tool contains a complete path.
39628      tool_specified="$BUILD_CXX"
39629      tool_basename="${tool_specified##*/}"
39630      if test "x$tool_basename" = "x$tool_specified"; then
39631        # A command without a complete path is provided, search $PATH.
39632        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39633$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39634        # Extract the first word of "$tool_basename", so it can be a program name with args.
39635set dummy $tool_basename; ac_word=$2
39636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39637$as_echo_n "checking for $ac_word... " >&6; }
39638if ${ac_cv_path_BUILD_CXX+:} false; then :
39639  $as_echo_n "(cached) " >&6
39640else
39641  case $BUILD_CXX in
39642  [\\/]* | ?:[\\/]*)
39643  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39644  ;;
39645  *)
39646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39647for as_dir in $PATH
39648do
39649  IFS=$as_save_IFS
39650  test -z "$as_dir" && as_dir=.
39651    for ac_exec_ext in '' $ac_executable_extensions; do
39652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39653    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39655    break 2
39656  fi
39657done
39658  done
39659IFS=$as_save_IFS
39660
39661  ;;
39662esac
39663fi
39664BUILD_CXX=$ac_cv_path_BUILD_CXX
39665if test -n "$BUILD_CXX"; then
39666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39667$as_echo "$BUILD_CXX" >&6; }
39668else
39669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39670$as_echo "no" >&6; }
39671fi
39672
39673
39674        if test "x$BUILD_CXX" = x; then
39675          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39676        fi
39677      else
39678        # Otherwise we believe it is a complete path. Use it as it is.
39679        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39680$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39682$as_echo_n "checking for BUILD_CXX... " >&6; }
39683        if test ! -x "$tool_specified"; then
39684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39685$as_echo "not found" >&6; }
39686          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39687        fi
39688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39689$as_echo "$tool_specified" >&6; }
39690      fi
39691    fi
39692  fi
39693
39694
39695
39696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39697
39698  # First separate the path from the arguments. This will split at the first
39699  # space.
39700  complete="$BUILD_CXX"
39701  path="${complete%% *}"
39702  tmp="$complete EOL"
39703  arguments="${tmp#* }"
39704
39705  # Input might be given as Windows format, start by converting to
39706  # unix format.
39707  new_path=`$CYGPATH -u "$path"`
39708
39709  # Now try to locate executable using which
39710  new_path=`$WHICH "$new_path" 2> /dev/null`
39711  # bat and cmd files are not always considered executable in cygwin causing which
39712  # to not find them
39713  if test "x$new_path" = x \
39714      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39715      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39716    new_path=`$CYGPATH -u "$path"`
39717  fi
39718  if test "x$new_path" = x; then
39719    # Oops. Which didn't find the executable.
39720    # The splitting of arguments from the executable at a space might have been incorrect,
39721    # since paths with space are more likely in Windows. Give it another try with the whole
39722    # argument.
39723    path="$complete"
39724    arguments="EOL"
39725    new_path=`$CYGPATH -u "$path"`
39726    new_path=`$WHICH "$new_path" 2> /dev/null`
39727    # bat and cmd files are not always considered executable in cygwin causing which
39728    # to not find them
39729    if test "x$new_path" = x \
39730        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39731        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39732      new_path=`$CYGPATH -u "$path"`
39733    fi
39734    if test "x$new_path" = x; then
39735      # It's still not found. Now this is an unrecoverable error.
39736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39737$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39738      has_space=`$ECHO "$complete" | $GREP " "`
39739      if test "x$has_space" != x; then
39740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39742      fi
39743      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39744    fi
39745  fi
39746
39747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39750  # "foo.exe" is OK but "foo" is an error.
39751  #
39752  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39753  # It is also a way to make sure we got the proper file name for the real test later on.
39754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39755  if test "x$test_shortpath" = x; then
39756    # Short path failed, file does not exist as specified.
39757    # Try adding .exe or .cmd
39758    if test -f "${new_path}.exe"; then
39759      input_to_shortpath="${new_path}.exe"
39760    elif test -f "${new_path}.cmd"; then
39761      input_to_shortpath="${new_path}.cmd"
39762    else
39763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39764$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39765      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39766$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39767      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39768    fi
39769  else
39770    input_to_shortpath="$new_path"
39771  fi
39772
39773  # Call helper function which possibly converts this using DOS-style short mode.
39774  # If so, the updated path is stored in $new_path.
39775  new_path="$input_to_shortpath"
39776
39777  input_path="$input_to_shortpath"
39778  # Check if we need to convert this using DOS-style short mode. If the path
39779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39780  # take no chances and rewrite it.
39781  # Note: m4 eats our [], so we need to use [ and ] instead.
39782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39783  if test "x$has_forbidden_chars" != x; then
39784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39788      # Going to short mode and back again did indeed matter. Since short mode is
39789      # case insensitive, let's make it lowercase to improve readability.
39790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39791      # Now convert it back to Unix-stile (cygpath)
39792      input_path=`$CYGPATH -u "$shortmode_path"`
39793      new_path="$input_path"
39794    fi
39795  fi
39796
39797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39798  if test "x$test_cygdrive_prefix" = x; then
39799    # As a simple fix, exclude /usr/bin since it's not a real path.
39800    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39802      # a path prefixed by /cygdrive for fixpath to work.
39803      new_path="$CYGWIN_ROOT_PATH$input_path"
39804    fi
39805  fi
39806
39807  # remove trailing .exe if any
39808  new_path="${new_path/%.exe/}"
39809
39810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39811
39812  # First separate the path from the arguments. This will split at the first
39813  # space.
39814  complete="$BUILD_CXX"
39815  path="${complete%% *}"
39816  tmp="$complete EOL"
39817  arguments="${tmp#* }"
39818
39819  # Input might be given as Windows format, start by converting to
39820  # unix format.
39821  new_path="$path"
39822
39823  windows_path="$new_path"
39824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39825    unix_path=`$CYGPATH -u "$windows_path"`
39826    new_path="$unix_path"
39827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39829    new_path="$unix_path"
39830  fi
39831
39832
39833  # Now try to locate executable using which
39834  new_path=`$WHICH "$new_path" 2> /dev/null`
39835
39836  if test "x$new_path" = x; then
39837    # Oops. Which didn't find the executable.
39838    # The splitting of arguments from the executable at a space might have been incorrect,
39839    # since paths with space are more likely in Windows. Give it another try with the whole
39840    # argument.
39841    path="$complete"
39842    arguments="EOL"
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    new_path=`$WHICH "$new_path" 2> /dev/null`
39856
39857    if test "x$new_path" = x; then
39858      # It's still not found. Now this is an unrecoverable error.
39859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39860$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39861      has_space=`$ECHO "$complete" | $GREP " "`
39862      if test "x$has_space" != x; then
39863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39865      fi
39866      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39867    fi
39868  fi
39869
39870  # Now new_path has a complete unix path to the binary
39871  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39872    # Keep paths in /bin as-is, but remove trailing .exe if any
39873    new_path="${new_path/%.exe/}"
39874    # Do not save /bin paths to all_fixpath_prefixes!
39875  else
39876    # Not in mixed or Windows style, start by that.
39877    new_path=`cmd //c echo $new_path`
39878
39879  input_path="$new_path"
39880  # Check if we need to convert this using DOS-style short mode. If the path
39881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39882  # take no chances and rewrite it.
39883  # Note: m4 eats our [], so we need to use [ and ] instead.
39884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39885  if test "x$has_forbidden_chars" != x; then
39886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39888  fi
39889
39890    # Output is in $new_path
39891
39892  windows_path="$new_path"
39893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39894    unix_path=`$CYGPATH -u "$windows_path"`
39895    new_path="$unix_path"
39896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39898    new_path="$unix_path"
39899  fi
39900
39901    # remove trailing .exe if any
39902    new_path="${new_path/%.exe/}"
39903
39904    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39905    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39906  fi
39907
39908  else
39909    # We're on a posix platform. Hooray! :)
39910    # First separate the path from the arguments. This will split at the first
39911    # space.
39912    complete="$BUILD_CXX"
39913    path="${complete%% *}"
39914    tmp="$complete EOL"
39915    arguments="${tmp#* }"
39916
39917    # Cannot rely on the command "which" here since it doesn't always work.
39918    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39919    if test -z "$is_absolute_path"; then
39920      # Path to executable is not absolute. Find it.
39921      IFS_save="$IFS"
39922      IFS=:
39923      for p in $PATH; do
39924        if test -f "$p/$path" && test -x "$p/$path"; then
39925          new_path="$p/$path"
39926          break
39927        fi
39928      done
39929      IFS="$IFS_save"
39930    else
39931      # This is an absolute path, we can use it without further modifications.
39932      new_path="$path"
39933    fi
39934
39935    if test "x$new_path" = x; then
39936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39937$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39938      has_space=`$ECHO "$complete" | $GREP " "`
39939      if test "x$has_space" != x; then
39940        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39941$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39942      fi
39943      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39944    fi
39945  fi
39946
39947  # Now join together the path and the arguments once again
39948  if test "x$arguments" != xEOL; then
39949    new_complete="$new_path ${arguments% *}"
39950  else
39951    new_complete="$new_path"
39952  fi
39953
39954  if test "x$complete" != "x$new_complete"; then
39955    BUILD_CXX="$new_complete"
39956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39957$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39958  fi
39959
39960
39961
39962  # Publish this variable in the help.
39963
39964
39965  if test "x$BUILD_LD" = x; then
39966    # The variable is not set by user, try to locate tool using the code snippet
39967    for ac_prog in ld
39968do
39969  # Extract the first word of "$ac_prog", so it can be a program name with args.
39970set dummy $ac_prog; ac_word=$2
39971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39972$as_echo_n "checking for $ac_word... " >&6; }
39973if ${ac_cv_path_BUILD_LD+:} false; then :
39974  $as_echo_n "(cached) " >&6
39975else
39976  case $BUILD_LD in
39977  [\\/]* | ?:[\\/]*)
39978  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39979  ;;
39980  *)
39981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39982for as_dir in $PATH
39983do
39984  IFS=$as_save_IFS
39985  test -z "$as_dir" && as_dir=.
39986    for ac_exec_ext in '' $ac_executable_extensions; do
39987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39988    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39990    break 2
39991  fi
39992done
39993  done
39994IFS=$as_save_IFS
39995
39996  ;;
39997esac
39998fi
39999BUILD_LD=$ac_cv_path_BUILD_LD
40000if test -n "$BUILD_LD"; then
40001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40002$as_echo "$BUILD_LD" >&6; }
40003else
40004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40005$as_echo "no" >&6; }
40006fi
40007
40008
40009  test -n "$BUILD_LD" && break
40010done
40011
40012  else
40013    # The variable is set, but is it from the command line or the environment?
40014
40015    # Try to remove the string !BUILD_LD! from our list.
40016    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40017    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40018      # If it failed, the variable was not from the command line. Ignore it,
40019      # but warn the user (except for BASH, which is always set by the calling BASH).
40020      if test "xBUILD_LD" != xBASH; then
40021        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40022$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40023      fi
40024      # Try to locate tool using the code snippet
40025      for ac_prog in ld
40026do
40027  # Extract the first word of "$ac_prog", so it can be a program name with args.
40028set dummy $ac_prog; ac_word=$2
40029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40030$as_echo_n "checking for $ac_word... " >&6; }
40031if ${ac_cv_path_BUILD_LD+:} false; then :
40032  $as_echo_n "(cached) " >&6
40033else
40034  case $BUILD_LD in
40035  [\\/]* | ?:[\\/]*)
40036  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40037  ;;
40038  *)
40039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40040for as_dir in $PATH
40041do
40042  IFS=$as_save_IFS
40043  test -z "$as_dir" && as_dir=.
40044    for ac_exec_ext in '' $ac_executable_extensions; do
40045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40046    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40048    break 2
40049  fi
40050done
40051  done
40052IFS=$as_save_IFS
40053
40054  ;;
40055esac
40056fi
40057BUILD_LD=$ac_cv_path_BUILD_LD
40058if test -n "$BUILD_LD"; then
40059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40060$as_echo "$BUILD_LD" >&6; }
40061else
40062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40063$as_echo "no" >&6; }
40064fi
40065
40066
40067  test -n "$BUILD_LD" && break
40068done
40069
40070    else
40071      # If it succeeded, then it was overridden by the user. We will use it
40072      # for the tool.
40073
40074      # First remove it from the list of overridden variables, so we can test
40075      # for unknown variables in the end.
40076      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40077
40078      # Check if the provided tool contains a complete path.
40079      tool_specified="$BUILD_LD"
40080      tool_basename="${tool_specified##*/}"
40081      if test "x$tool_basename" = "x$tool_specified"; then
40082        # A command without a complete path is provided, search $PATH.
40083        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40084$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40085        # Extract the first word of "$tool_basename", so it can be a program name with args.
40086set dummy $tool_basename; ac_word=$2
40087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40088$as_echo_n "checking for $ac_word... " >&6; }
40089if ${ac_cv_path_BUILD_LD+:} false; then :
40090  $as_echo_n "(cached) " >&6
40091else
40092  case $BUILD_LD in
40093  [\\/]* | ?:[\\/]*)
40094  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40095  ;;
40096  *)
40097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40098for as_dir in $PATH
40099do
40100  IFS=$as_save_IFS
40101  test -z "$as_dir" && as_dir=.
40102    for ac_exec_ext in '' $ac_executable_extensions; do
40103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40104    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40106    break 2
40107  fi
40108done
40109  done
40110IFS=$as_save_IFS
40111
40112  ;;
40113esac
40114fi
40115BUILD_LD=$ac_cv_path_BUILD_LD
40116if test -n "$BUILD_LD"; then
40117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40118$as_echo "$BUILD_LD" >&6; }
40119else
40120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40121$as_echo "no" >&6; }
40122fi
40123
40124
40125        if test "x$BUILD_LD" = x; then
40126          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40127        fi
40128      else
40129        # Otherwise we believe it is a complete path. Use it as it is.
40130        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40131$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40132        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40133$as_echo_n "checking for BUILD_LD... " >&6; }
40134        if test ! -x "$tool_specified"; then
40135          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40136$as_echo "not found" >&6; }
40137          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40138        fi
40139        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40140$as_echo "$tool_specified" >&6; }
40141      fi
40142    fi
40143  fi
40144
40145
40146
40147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40148
40149  # First separate the path from the arguments. This will split at the first
40150  # space.
40151  complete="$BUILD_LD"
40152  path="${complete%% *}"
40153  tmp="$complete EOL"
40154  arguments="${tmp#* }"
40155
40156  # Input might be given as Windows format, start by converting to
40157  # unix format.
40158  new_path=`$CYGPATH -u "$path"`
40159
40160  # Now try to locate executable using which
40161  new_path=`$WHICH "$new_path" 2> /dev/null`
40162  # bat and cmd files are not always considered executable in cygwin causing which
40163  # to not find them
40164  if test "x$new_path" = x \
40165      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40166      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40167    new_path=`$CYGPATH -u "$path"`
40168  fi
40169  if test "x$new_path" = x; then
40170    # Oops. Which didn't find the executable.
40171    # The splitting of arguments from the executable at a space might have been incorrect,
40172    # since paths with space are more likely in Windows. Give it another try with the whole
40173    # argument.
40174    path="$complete"
40175    arguments="EOL"
40176    new_path=`$CYGPATH -u "$path"`
40177    new_path=`$WHICH "$new_path" 2> /dev/null`
40178    # bat and cmd files are not always considered executable in cygwin causing which
40179    # to not find them
40180    if test "x$new_path" = x \
40181        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40182        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40183      new_path=`$CYGPATH -u "$path"`
40184    fi
40185    if test "x$new_path" = x; then
40186      # It's still not found. Now this is an unrecoverable error.
40187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40188$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40189      has_space=`$ECHO "$complete" | $GREP " "`
40190      if test "x$has_space" != x; then
40191        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40192$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40193      fi
40194      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40195    fi
40196  fi
40197
40198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40201  # "foo.exe" is OK but "foo" is an error.
40202  #
40203  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40204  # It is also a way to make sure we got the proper file name for the real test later on.
40205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40206  if test "x$test_shortpath" = x; then
40207    # Short path failed, file does not exist as specified.
40208    # Try adding .exe or .cmd
40209    if test -f "${new_path}.exe"; then
40210      input_to_shortpath="${new_path}.exe"
40211    elif test -f "${new_path}.cmd"; then
40212      input_to_shortpath="${new_path}.cmd"
40213    else
40214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40215$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40216      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40217$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40218      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40219    fi
40220  else
40221    input_to_shortpath="$new_path"
40222  fi
40223
40224  # Call helper function which possibly converts this using DOS-style short mode.
40225  # If so, the updated path is stored in $new_path.
40226  new_path="$input_to_shortpath"
40227
40228  input_path="$input_to_shortpath"
40229  # Check if we need to convert this using DOS-style short mode. If the path
40230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40231  # take no chances and rewrite it.
40232  # Note: m4 eats our [], so we need to use [ and ] instead.
40233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40234  if test "x$has_forbidden_chars" != x; then
40235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40239      # Going to short mode and back again did indeed matter. Since short mode is
40240      # case insensitive, let's make it lowercase to improve readability.
40241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40242      # Now convert it back to Unix-stile (cygpath)
40243      input_path=`$CYGPATH -u "$shortmode_path"`
40244      new_path="$input_path"
40245    fi
40246  fi
40247
40248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40249  if test "x$test_cygdrive_prefix" = x; then
40250    # As a simple fix, exclude /usr/bin since it's not a real path.
40251    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40253      # a path prefixed by /cygdrive for fixpath to work.
40254      new_path="$CYGWIN_ROOT_PATH$input_path"
40255    fi
40256  fi
40257
40258  # remove trailing .exe if any
40259  new_path="${new_path/%.exe/}"
40260
40261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40262
40263  # First separate the path from the arguments. This will split at the first
40264  # space.
40265  complete="$BUILD_LD"
40266  path="${complete%% *}"
40267  tmp="$complete EOL"
40268  arguments="${tmp#* }"
40269
40270  # Input might be given as Windows format, start by converting to
40271  # unix format.
40272  new_path="$path"
40273
40274  windows_path="$new_path"
40275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40276    unix_path=`$CYGPATH -u "$windows_path"`
40277    new_path="$unix_path"
40278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40280    new_path="$unix_path"
40281  fi
40282
40283
40284  # Now try to locate executable using which
40285  new_path=`$WHICH "$new_path" 2> /dev/null`
40286
40287  if test "x$new_path" = x; then
40288    # Oops. Which didn't find the executable.
40289    # The splitting of arguments from the executable at a space might have been incorrect,
40290    # since paths with space are more likely in Windows. Give it another try with the whole
40291    # argument.
40292    path="$complete"
40293    arguments="EOL"
40294    new_path="$path"
40295
40296  windows_path="$new_path"
40297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40298    unix_path=`$CYGPATH -u "$windows_path"`
40299    new_path="$unix_path"
40300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40302    new_path="$unix_path"
40303  fi
40304
40305
40306    new_path=`$WHICH "$new_path" 2> /dev/null`
40307
40308    if test "x$new_path" = x; then
40309      # It's still not found. Now this is an unrecoverable error.
40310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40311$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40312      has_space=`$ECHO "$complete" | $GREP " "`
40313      if test "x$has_space" != x; then
40314        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40315$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40316      fi
40317      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40318    fi
40319  fi
40320
40321  # Now new_path has a complete unix path to the binary
40322  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40323    # Keep paths in /bin as-is, but remove trailing .exe if any
40324    new_path="${new_path/%.exe/}"
40325    # Do not save /bin paths to all_fixpath_prefixes!
40326  else
40327    # Not in mixed or Windows style, start by that.
40328    new_path=`cmd //c echo $new_path`
40329
40330  input_path="$new_path"
40331  # Check if we need to convert this using DOS-style short mode. If the path
40332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40333  # take no chances and rewrite it.
40334  # Note: m4 eats our [], so we need to use [ and ] instead.
40335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40336  if test "x$has_forbidden_chars" != x; then
40337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40339  fi
40340
40341    # Output is in $new_path
40342
40343  windows_path="$new_path"
40344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40345    unix_path=`$CYGPATH -u "$windows_path"`
40346    new_path="$unix_path"
40347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40349    new_path="$unix_path"
40350  fi
40351
40352    # remove trailing .exe if any
40353    new_path="${new_path/%.exe/}"
40354
40355    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40356    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40357  fi
40358
40359  else
40360    # We're on a posix platform. Hooray! :)
40361    # First separate the path from the arguments. This will split at the first
40362    # space.
40363    complete="$BUILD_LD"
40364    path="${complete%% *}"
40365    tmp="$complete EOL"
40366    arguments="${tmp#* }"
40367
40368    # Cannot rely on the command "which" here since it doesn't always work.
40369    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40370    if test -z "$is_absolute_path"; then
40371      # Path to executable is not absolute. Find it.
40372      IFS_save="$IFS"
40373      IFS=:
40374      for p in $PATH; do
40375        if test -f "$p/$path" && test -x "$p/$path"; then
40376          new_path="$p/$path"
40377          break
40378        fi
40379      done
40380      IFS="$IFS_save"
40381    else
40382      # This is an absolute path, we can use it without further modifications.
40383      new_path="$path"
40384    fi
40385
40386    if test "x$new_path" = x; then
40387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40388$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40389      has_space=`$ECHO "$complete" | $GREP " "`
40390      if test "x$has_space" != x; then
40391        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40392$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40393      fi
40394      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40395    fi
40396  fi
40397
40398  # Now join together the path and the arguments once again
40399  if test "x$arguments" != xEOL; then
40400    new_complete="$new_path ${arguments% *}"
40401  else
40402    new_complete="$new_path"
40403  fi
40404
40405  if test "x$complete" != "x$new_complete"; then
40406    BUILD_LD="$new_complete"
40407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40408$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40409  fi
40410
40411  else
40412    # If we are not cross compiling, use the normal target compilers for
40413    # building the build platform executables.
40414    BUILD_CC="$CC"
40415    BUILD_CXX="$CXX"
40416    BUILD_LD="$LD"
40417  fi
40418
40419
40420
40421
40422
40423
40424  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40425    # For hotspot, we need these in Windows mixed path,
40426    # so rewrite them all. Need added .exe suffix.
40427    HOTSPOT_CXX="$CXX.exe"
40428    HOTSPOT_LD="$LD.exe"
40429    HOTSPOT_MT="$MT.exe"
40430    HOTSPOT_RC="$RC.exe"
40431
40432  unix_path="$HOTSPOT_CXX"
40433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40434    windows_path=`$CYGPATH -m "$unix_path"`
40435    HOTSPOT_CXX="$windows_path"
40436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40437    windows_path=`cmd //c echo $unix_path`
40438    HOTSPOT_CXX="$windows_path"
40439  fi
40440
40441
40442  unix_path="$HOTSPOT_LD"
40443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40444    windows_path=`$CYGPATH -m "$unix_path"`
40445    HOTSPOT_LD="$windows_path"
40446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40447    windows_path=`cmd //c echo $unix_path`
40448    HOTSPOT_LD="$windows_path"
40449  fi
40450
40451
40452  unix_path="$HOTSPOT_MT"
40453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40454    windows_path=`$CYGPATH -m "$unix_path"`
40455    HOTSPOT_MT="$windows_path"
40456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40457    windows_path=`cmd //c echo $unix_path`
40458    HOTSPOT_MT="$windows_path"
40459  fi
40460
40461
40462  unix_path="$HOTSPOT_RC"
40463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40464    windows_path=`$CYGPATH -m "$unix_path"`
40465    HOTSPOT_RC="$windows_path"
40466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40467    windows_path=`cmd //c echo $unix_path`
40468    HOTSPOT_RC="$windows_path"
40469  fi
40470
40471
40472
40473  else
40474    HOTSPOT_CXX="$CXX"
40475    HOTSPOT_LD="$LD"
40476  fi
40477
40478
40479
40480  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40481    USE_CLANG=true
40482  fi
40483
40484
40485  # LDEXE is the linker to use, when creating executables. Not really used.
40486  # FIXME: These should just be removed!
40487  LDEXE="$LD"
40488  LDEXECXX="$LDCXX"
40489
40490
40491
40492
40493
40494
40495  # The package path is used only on macosx?
40496  # FIXME: clean this up, and/or move it elsewhere.
40497  PACKAGE_PATH=/opt/local
40498
40499
40500  # Check for extra potential brokenness.
40501  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40502    # On Windows, double-check that we got the right compiler.
40503    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40504    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40505    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40506      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40507        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40508      fi
40509    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40510      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40511        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40512      fi
40513    fi
40514  fi
40515
40516  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40517    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40518    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40519    # This is later checked when setting flags.
40520
40521    # "-Og" suppported for GCC 4.8 and later
40522    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40523
40524  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40525$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40526  supports=yes
40527
40528  saved_cflags="$CFLAGS"
40529  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40530  ac_ext=c
40531ac_cpp='$CPP $CPPFLAGS'
40532ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40533ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40534ac_compiler_gnu=$ac_cv_c_compiler_gnu
40535
40536  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40537/* end confdefs.h.  */
40538int i;
40539_ACEOF
40540if ac_fn_c_try_compile "$LINENO"; then :
40541
40542else
40543  supports=no
40544fi
40545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40546  ac_ext=cpp
40547ac_cpp='$CXXCPP $CPPFLAGS'
40548ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40549ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40550ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40551
40552  CFLAGS="$saved_cflags"
40553
40554  saved_cxxflags="$CXXFLAGS"
40555  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40556  ac_ext=cpp
40557ac_cpp='$CXXCPP $CPPFLAGS'
40558ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40559ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40560ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40561
40562  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40563/* end confdefs.h.  */
40564int i;
40565_ACEOF
40566if ac_fn_cxx_try_compile "$LINENO"; then :
40567
40568else
40569  supports=no
40570fi
40571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40572  ac_ext=cpp
40573ac_cpp='$CXXCPP $CPPFLAGS'
40574ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40575ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40576ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40577
40578  CXXFLAGS="$saved_cxxflags"
40579
40580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40581$as_echo "$supports" >&6; }
40582  if test "x$supports" = "xyes" ; then
40583    HAS_CFLAG_OPTIMIZE_DEBUG=true
40584  else
40585    HAS_CFLAG_OPTIMIZE_DEBUG=false
40586  fi
40587
40588
40589    # "-fsanitize=undefined" supported for GCC 4.9 and later
40590    CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG="-fsanitize=undefined -fsanitize-recover"
40591
40592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"" >&5
40593$as_echo_n "checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"... " >&6; }
40594  supports=yes
40595
40596  saved_cflags="$CFLAGS"
40597  CFLAGS="$CFLAGS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
40598  ac_ext=c
40599ac_cpp='$CPP $CPPFLAGS'
40600ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40601ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40602ac_compiler_gnu=$ac_cv_c_compiler_gnu
40603
40604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40605/* end confdefs.h.  */
40606int i;
40607_ACEOF
40608if ac_fn_c_try_compile "$LINENO"; then :
40609
40610else
40611  supports=no
40612fi
40613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40614  ac_ext=cpp
40615ac_cpp='$CXXCPP $CPPFLAGS'
40616ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40617ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40618ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40619
40620  CFLAGS="$saved_cflags"
40621
40622  saved_cxxflags="$CXXFLAGS"
40623  CXXFLAGS="$CXXFLAG $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
40624  ac_ext=cpp
40625ac_cpp='$CXXCPP $CPPFLAGS'
40626ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40627ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40628ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40629
40630  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40631/* end confdefs.h.  */
40632int i;
40633_ACEOF
40634if ac_fn_cxx_try_compile "$LINENO"; then :
40635
40636else
40637  supports=no
40638fi
40639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40640  ac_ext=cpp
40641ac_cpp='$CXXCPP $CPPFLAGS'
40642ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40643ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40644ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40645
40646  CXXFLAGS="$saved_cxxflags"
40647
40648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40649$as_echo "$supports" >&6; }
40650  if test "x$supports" = "xyes" ; then
40651    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=true
40652  else
40653    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=false
40654  fi
40655
40656
40657    # "-z relro" supported in GNU binutils 2.17 and later
40658    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40659
40660  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40661$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40662  supports=yes
40663
40664  saved_ldflags="$LDFLAGS"
40665  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40666  ac_ext=c
40667ac_cpp='$CPP $CPPFLAGS'
40668ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40669ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40670ac_compiler_gnu=$ac_cv_c_compiler_gnu
40671
40672  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40673/* end confdefs.h.  */
40674
40675int
40676main ()
40677{
40678
40679  ;
40680  return 0;
40681}
40682_ACEOF
40683if ac_fn_c_try_link "$LINENO"; then :
40684
40685else
40686  supports=no
40687fi
40688rm -f core conftest.err conftest.$ac_objext \
40689    conftest$ac_exeext conftest.$ac_ext
40690  ac_ext=cpp
40691ac_cpp='$CXXCPP $CPPFLAGS'
40692ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40693ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40694ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40695
40696  LDFLAGS="$saved_ldflags"
40697
40698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40699$as_echo "$supports" >&6; }
40700  if test "x$supports" = "xyes" ; then
40701    HAS_LINKER_RELRO=true
40702  else
40703    HAS_LINKER_RELRO=false
40704  fi
40705
40706
40707    # "-z now" supported in GNU binutils 2.11 and later
40708    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40709
40710  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40711$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40712  supports=yes
40713
40714  saved_ldflags="$LDFLAGS"
40715  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40716  ac_ext=c
40717ac_cpp='$CPP $CPPFLAGS'
40718ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40719ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40720ac_compiler_gnu=$ac_cv_c_compiler_gnu
40721
40722  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40723/* end confdefs.h.  */
40724
40725int
40726main ()
40727{
40728
40729  ;
40730  return 0;
40731}
40732_ACEOF
40733if ac_fn_c_try_link "$LINENO"; then :
40734
40735else
40736  supports=no
40737fi
40738rm -f core conftest.err conftest.$ac_objext \
40739    conftest$ac_exeext conftest.$ac_ext
40740  ac_ext=cpp
40741ac_cpp='$CXXCPP $CPPFLAGS'
40742ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40743ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40744ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40745
40746  LDFLAGS="$saved_ldflags"
40747
40748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40749$as_echo "$supports" >&6; }
40750  if test "x$supports" = "xyes" ; then
40751    HAS_LINKER_NOW=true
40752  else
40753    HAS_LINKER_NOW=false
40754  fi
40755
40756  fi
40757
40758  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40759  # in executable.'
40760  USING_BROKEN_SUSE_LD=no
40761  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40763$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40764    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40765    $ECHO "int main() { }" > main.c
40766    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40767      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40768$as_echo "no" >&6; }
40769      USING_BROKEN_SUSE_LD=no
40770    else
40771      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40772$as_echo "yes" >&6; }
40773      USING_BROKEN_SUSE_LD=yes
40774    fi
40775    rm -rf version-script.map main.c a.out
40776  fi
40777
40778
40779
40780# Setup the JTReg Regression Test Harness.
40781
40782
40783# Check whether --with-jtreg was given.
40784if test "${with_jtreg+set}" = set; then :
40785  withval=$with_jtreg;
40786else
40787  with_jtreg=no
40788fi
40789
40790
40791  if test "x$with_jtreg" = xno; then
40792    # jtreg disabled
40793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40794$as_echo_n "checking for jtreg... " >&6; }
40795    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40796$as_echo "no" >&6; }
40797  else
40798    if test "x$with_jtreg" != xyes; then
40799      # with path specified.
40800      JT_HOME="$with_jtreg"
40801    fi
40802
40803    if test "x$JT_HOME" != x; then
40804      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40805$as_echo_n "checking for jtreg... " >&6; }
40806
40807      # use JT_HOME enviroment var.
40808
40809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40810
40811  # Input might be given as Windows format, start by converting to
40812  # unix format.
40813  path="$JT_HOME"
40814  new_path=`$CYGPATH -u "$path"`
40815
40816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40819  # "foo.exe" is OK but "foo" is an error.
40820  #
40821  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40822  # It is also a way to make sure we got the proper file name for the real test later on.
40823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40824  if test "x$test_shortpath" = x; then
40825    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40826$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40827    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40828  fi
40829
40830  # Call helper function which possibly converts this using DOS-style short mode.
40831  # If so, the updated path is stored in $new_path.
40832
40833  input_path="$new_path"
40834  # Check if we need to convert this using DOS-style short mode. If the path
40835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40836  # take no chances and rewrite it.
40837  # Note: m4 eats our [], so we need to use [ and ] instead.
40838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40839  if test "x$has_forbidden_chars" != x; then
40840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40844      # Going to short mode and back again did indeed matter. Since short mode is
40845      # case insensitive, let's make it lowercase to improve readability.
40846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40847      # Now convert it back to Unix-stile (cygpath)
40848      input_path=`$CYGPATH -u "$shortmode_path"`
40849      new_path="$input_path"
40850    fi
40851  fi
40852
40853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40854  if test "x$test_cygdrive_prefix" = x; then
40855    # As a simple fix, exclude /usr/bin since it's not a real path.
40856    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40858      # a path prefixed by /cygdrive for fixpath to work.
40859      new_path="$CYGWIN_ROOT_PATH$input_path"
40860    fi
40861  fi
40862
40863
40864  if test "x$path" != "x$new_path"; then
40865    JT_HOME="$new_path"
40866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40867$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40868  fi
40869
40870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40871
40872  path="$JT_HOME"
40873  has_colon=`$ECHO $path | $GREP ^.:`
40874  new_path="$path"
40875  if test "x$has_colon" = x; then
40876    # Not in mixed or Windows style, start by that.
40877    new_path=`cmd //c echo $path`
40878  fi
40879
40880
40881  input_path="$new_path"
40882  # Check if we need to convert this using DOS-style short mode. If the path
40883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40884  # take no chances and rewrite it.
40885  # Note: m4 eats our [], so we need to use [ and ] instead.
40886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40887  if test "x$has_forbidden_chars" != x; then
40888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40890  fi
40891
40892
40893  windows_path="$new_path"
40894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40895    unix_path=`$CYGPATH -u "$windows_path"`
40896    new_path="$unix_path"
40897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40899    new_path="$unix_path"
40900  fi
40901
40902  if test "x$path" != "x$new_path"; then
40903    JT_HOME="$new_path"
40904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40905$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40906  fi
40907
40908  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40909  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40910
40911  else
40912    # We're on a posix platform. Hooray! :)
40913    path="$JT_HOME"
40914    has_space=`$ECHO "$path" | $GREP " "`
40915    if test "x$has_space" != x; then
40916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40917$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40918      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40919    fi
40920
40921    # Use eval to expand a potential ~
40922    eval path="$path"
40923    if test ! -f "$path" && test ! -d "$path"; then
40924      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40925    fi
40926
40927    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40928  fi
40929
40930
40931      # jtreg win32 script works for everybody
40932      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40933
40934      if test ! -f "$JTREGEXE"; then
40935        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40936      fi
40937
40938      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40939$as_echo "$JTREGEXE" >&6; }
40940    else
40941      # try to find jtreg on path
40942
40943
40944
40945  # Publish this variable in the help.
40946
40947
40948  if test "x$JTREGEXE" = x; then
40949    # The variable is not set by user, try to locate tool using the code snippet
40950    for ac_prog in jtreg
40951do
40952  # Extract the first word of "$ac_prog", so it can be a program name with args.
40953set dummy $ac_prog; ac_word=$2
40954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40955$as_echo_n "checking for $ac_word... " >&6; }
40956if ${ac_cv_path_JTREGEXE+:} false; then :
40957  $as_echo_n "(cached) " >&6
40958else
40959  case $JTREGEXE in
40960  [\\/]* | ?:[\\/]*)
40961  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40962  ;;
40963  *)
40964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40965for as_dir in $PATH
40966do
40967  IFS=$as_save_IFS
40968  test -z "$as_dir" && as_dir=.
40969    for ac_exec_ext in '' $ac_executable_extensions; do
40970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40971    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40973    break 2
40974  fi
40975done
40976  done
40977IFS=$as_save_IFS
40978
40979  ;;
40980esac
40981fi
40982JTREGEXE=$ac_cv_path_JTREGEXE
40983if test -n "$JTREGEXE"; then
40984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40985$as_echo "$JTREGEXE" >&6; }
40986else
40987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40988$as_echo "no" >&6; }
40989fi
40990
40991
40992  test -n "$JTREGEXE" && break
40993done
40994
40995  else
40996    # The variable is set, but is it from the command line or the environment?
40997
40998    # Try to remove the string !JTREGEXE! from our list.
40999    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41000    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41001      # If it failed, the variable was not from the command line. Ignore it,
41002      # but warn the user (except for BASH, which is always set by the calling BASH).
41003      if test "xJTREGEXE" != xBASH; then
41004        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41005$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41006      fi
41007      # Try to locate tool using the code snippet
41008      for ac_prog in jtreg
41009do
41010  # Extract the first word of "$ac_prog", so it can be a program name with args.
41011set dummy $ac_prog; ac_word=$2
41012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41013$as_echo_n "checking for $ac_word... " >&6; }
41014if ${ac_cv_path_JTREGEXE+:} false; then :
41015  $as_echo_n "(cached) " >&6
41016else
41017  case $JTREGEXE in
41018  [\\/]* | ?:[\\/]*)
41019  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41020  ;;
41021  *)
41022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41023for as_dir in $PATH
41024do
41025  IFS=$as_save_IFS
41026  test -z "$as_dir" && as_dir=.
41027    for ac_exec_ext in '' $ac_executable_extensions; do
41028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41029    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41031    break 2
41032  fi
41033done
41034  done
41035IFS=$as_save_IFS
41036
41037  ;;
41038esac
41039fi
41040JTREGEXE=$ac_cv_path_JTREGEXE
41041if test -n "$JTREGEXE"; then
41042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41043$as_echo "$JTREGEXE" >&6; }
41044else
41045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41046$as_echo "no" >&6; }
41047fi
41048
41049
41050  test -n "$JTREGEXE" && break
41051done
41052
41053    else
41054      # If it succeeded, then it was overridden by the user. We will use it
41055      # for the tool.
41056
41057      # First remove it from the list of overridden variables, so we can test
41058      # for unknown variables in the end.
41059      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41060
41061      # Check if the provided tool contains a complete path.
41062      tool_specified="$JTREGEXE"
41063      tool_basename="${tool_specified##*/}"
41064      if test "x$tool_basename" = "x$tool_specified"; then
41065        # A command without a complete path is provided, search $PATH.
41066        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41067$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41068        # Extract the first word of "$tool_basename", so it can be a program name with args.
41069set dummy $tool_basename; ac_word=$2
41070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41071$as_echo_n "checking for $ac_word... " >&6; }
41072if ${ac_cv_path_JTREGEXE+:} false; then :
41073  $as_echo_n "(cached) " >&6
41074else
41075  case $JTREGEXE in
41076  [\\/]* | ?:[\\/]*)
41077  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41078  ;;
41079  *)
41080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41081for as_dir in $PATH
41082do
41083  IFS=$as_save_IFS
41084  test -z "$as_dir" && as_dir=.
41085    for ac_exec_ext in '' $ac_executable_extensions; do
41086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41087    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41089    break 2
41090  fi
41091done
41092  done
41093IFS=$as_save_IFS
41094
41095  ;;
41096esac
41097fi
41098JTREGEXE=$ac_cv_path_JTREGEXE
41099if test -n "$JTREGEXE"; then
41100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41101$as_echo "$JTREGEXE" >&6; }
41102else
41103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41104$as_echo "no" >&6; }
41105fi
41106
41107
41108        if test "x$JTREGEXE" = x; then
41109          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41110        fi
41111      else
41112        # Otherwise we believe it is a complete path. Use it as it is.
41113        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41114$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41115        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41116$as_echo_n "checking for JTREGEXE... " >&6; }
41117        if test ! -x "$tool_specified"; then
41118          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41119$as_echo "not found" >&6; }
41120          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41121        fi
41122        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41123$as_echo "$tool_specified" >&6; }
41124      fi
41125    fi
41126  fi
41127
41128
41129
41130  if test "x$JTREGEXE" = x; then
41131    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41132  fi
41133
41134
41135      JT_HOME="`$DIRNAME $JTREGEXE`"
41136    fi
41137  fi
41138
41139
41140
41141
41142
41143
41144  # Option used to tell the compiler whether to create 32- or 64-bit executables
41145  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41146    COMPILER_TARGET_BITS_FLAG="-q"
41147  else
41148    COMPILER_TARGET_BITS_FLAG="-m"
41149  fi
41150
41151
41152  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41153  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41154    ARFLAGS="-r"
41155  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41156    ARFLAGS="-X64"
41157  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41158    # lib.exe is used as AR to create static libraries.
41159    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41160  else
41161    ARFLAGS=""
41162  fi
41163
41164
41165  ## Setup strip.
41166  # FIXME: should this really be per platform, or should it be per toolchain type?
41167  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41168  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41169  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41170    STRIPFLAGS="-g"
41171  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41172    STRIPFLAGS="-x"
41173  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41174    STRIPFLAGS="-S"
41175  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41176    STRIPFLAGS="-X32_64"
41177  fi
41178
41179  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41180    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41181  fi
41182
41183
41184  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41185    # FIXME: break out into MCSFLAGS
41186    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41187  fi
41188
41189
41190  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41191    CC_OUT_OPTION=-Fo
41192    EXE_OUT_OPTION=-out:
41193    LD_OUT_OPTION=-out:
41194    AR_OUT_OPTION=-out:
41195  else
41196    # The option used to specify the target .o,.a or .so file.
41197    # When compiling, how to specify the to be created object file.
41198    CC_OUT_OPTION='-o$(SPACE)'
41199    # When linking, how to specify the to be created executable.
41200    EXE_OUT_OPTION='-o$(SPACE)'
41201    # When linking, how to specify the to be created dynamically linkable library.
41202    LD_OUT_OPTION='-o$(SPACE)'
41203    # When archiving, how to specify the to be create static archive for object files.
41204    AR_OUT_OPTION='rcs$(SPACE)'
41205  fi
41206
41207
41208
41209
41210
41211  # On Windows, we need to set RC flags.
41212  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41213    RC_FLAGS="-nologo -l 0x409 -r"
41214    if test "x$VARIANT" = xOPT; then
41215      RC_FLAGS="$RC_FLAGS -d NDEBUG"
41216    fi
41217
41218    # The version variables used to create RC_FLAGS may be overridden
41219    # in a custom configure script, or possibly the command line.
41220    # Let those variables be expanded at make time in spec.gmk.
41221    # The \$ are escaped to the shell, and the $(...) variables
41222    # are evaluated by make.
41223    RC_FLAGS="$RC_FLAGS \
41224        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41225        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
41226        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41227        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41228        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41229        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41230        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41231  fi
41232
41233
41234  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41235    # silence copyright notice and other headers.
41236    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41237  fi
41238
41239  if test "x$SYSROOT" != "x"; then
41240    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41241      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41242        # Solaris Studio does not have a concept of sysroot. Instead we must
41243        # make sure the default include and lib dirs are appended to each
41244        # compile and link command line.
41245        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41246        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41247            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41248            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41249      fi
41250    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41251      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41252      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41253      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41254    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41255      SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
41256      SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
41257    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41258      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41259      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41260    fi
41261    # Propagate the sysroot args to hotspot
41262    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41263    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41264    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41265  fi
41266
41267  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41268  # set this here so it doesn't have to be peppered throughout the forest
41269  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41270    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41271    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41272  fi
41273
41274
41275
41276
41277
41278# FIXME: Currently we must test this after toolchain but before flags. Fix!
41279
41280# Now we can test some aspects on the target using configure macros.
41281
41282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41283$as_echo_n "checking for ANSI C header files... " >&6; }
41284if ${ac_cv_header_stdc+:} false; then :
41285  $as_echo_n "(cached) " >&6
41286else
41287  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41288/* end confdefs.h.  */
41289#include <stdlib.h>
41290#include <stdarg.h>
41291#include <string.h>
41292#include <float.h>
41293
41294int
41295main ()
41296{
41297
41298  ;
41299  return 0;
41300}
41301_ACEOF
41302if ac_fn_cxx_try_compile "$LINENO"; then :
41303  ac_cv_header_stdc=yes
41304else
41305  ac_cv_header_stdc=no
41306fi
41307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41308
41309if test $ac_cv_header_stdc = yes; then
41310  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41311  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41312/* end confdefs.h.  */
41313#include <string.h>
41314
41315_ACEOF
41316if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41317  $EGREP "memchr" >/dev/null 2>&1; then :
41318
41319else
41320  ac_cv_header_stdc=no
41321fi
41322rm -f conftest*
41323
41324fi
41325
41326if test $ac_cv_header_stdc = yes; then
41327  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41329/* end confdefs.h.  */
41330#include <stdlib.h>
41331
41332_ACEOF
41333if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41334  $EGREP "free" >/dev/null 2>&1; then :
41335
41336else
41337  ac_cv_header_stdc=no
41338fi
41339rm -f conftest*
41340
41341fi
41342
41343if test $ac_cv_header_stdc = yes; then
41344  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41345  if test "$cross_compiling" = yes; then :
41346  :
41347else
41348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41349/* end confdefs.h.  */
41350#include <ctype.h>
41351#include <stdlib.h>
41352#if ((' ' & 0x0FF) == 0x020)
41353# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41354# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41355#else
41356# define ISLOWER(c) \
41357		   (('a' <= (c) && (c) <= 'i') \
41358		     || ('j' <= (c) && (c) <= 'r') \
41359		     || ('s' <= (c) && (c) <= 'z'))
41360# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41361#endif
41362
41363#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41364int
41365main ()
41366{
41367  int i;
41368  for (i = 0; i < 256; i++)
41369    if (XOR (islower (i), ISLOWER (i))
41370	|| toupper (i) != TOUPPER (i))
41371      return 2;
41372  return 0;
41373}
41374_ACEOF
41375if ac_fn_cxx_try_run "$LINENO"; then :
41376
41377else
41378  ac_cv_header_stdc=no
41379fi
41380rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41381  conftest.$ac_objext conftest.beam conftest.$ac_ext
41382fi
41383
41384fi
41385fi
41386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41387$as_echo "$ac_cv_header_stdc" >&6; }
41388if test $ac_cv_header_stdc = yes; then
41389
41390$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41391
41392fi
41393
41394# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41395for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41396		  inttypes.h stdint.h unistd.h
41397do :
41398  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41399ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41400"
41401if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41402  cat >>confdefs.h <<_ACEOF
41403#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41404_ACEOF
41405
41406fi
41407
41408done
41409
41410
41411
41412  ###############################################################################
41413  #
41414  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41415  # (The JVM can use 32 or 64 bit Java pointers but that decision
41416  # is made at runtime.)
41417  #
41418
41419  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41420    # Always specify -m flag on Solaris
41421    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41422
41423  # When we add flags to the "official" CFLAGS etc, we need to
41424  # keep track of these additions in ADDED_CFLAGS etc. These
41425  # will later be checked to make sure only controlled additions
41426  # have been made to CFLAGS etc.
41427  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41428  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41429  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41430
41431  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41432  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41433  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41434
41435  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41436  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41437  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41438
41439  elif test "x$COMPILE_TYPE" = xreduced; then
41440    if test "x$OPENJDK_TARGET_OS" != xwindows; then
41441      # Specify -m if running reduced on other Posix platforms
41442
41443  # When we add flags to the "official" CFLAGS etc, we need to
41444  # keep track of these additions in ADDED_CFLAGS etc. These
41445  # will later be checked to make sure only controlled additions
41446  # have been made to CFLAGS etc.
41447  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41448  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41449  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41450
41451  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41452  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41453  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41454
41455  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41456  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41457  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41458
41459    fi
41460  fi
41461
41462  # Make compilation sanity check
41463  for ac_header in stdio.h
41464do :
41465  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41466if test "x$ac_cv_header_stdio_h" = xyes; then :
41467  cat >>confdefs.h <<_ACEOF
41468#define HAVE_STDIO_H 1
41469_ACEOF
41470
41471else
41472
41473    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41474$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41475    if test "x$COMPILE_TYPE" = xreduced; then
41476      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41477$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41478    elif test "x$COMPILE_TYPE" = xcross; then
41479      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41480$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41481    fi
41482    as_fn_error $? "Cannot continue." "$LINENO" 5
41483
41484fi
41485
41486done
41487
41488
41489  # The cast to long int works around a bug in the HP C Compiler
41490# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41491# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41492# This bug is HP SR number 8606223364.
41493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41494$as_echo_n "checking size of int *... " >&6; }
41495if ${ac_cv_sizeof_int_p+:} false; then :
41496  $as_echo_n "(cached) " >&6
41497else
41498  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41499
41500else
41501  if test "$ac_cv_type_int_p" = yes; then
41502     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41503$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41504as_fn_error 77 "cannot compute sizeof (int *)
41505See \`config.log' for more details" "$LINENO" 5; }
41506   else
41507     ac_cv_sizeof_int_p=0
41508   fi
41509fi
41510
41511fi
41512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41513$as_echo "$ac_cv_sizeof_int_p" >&6; }
41514
41515
41516
41517cat >>confdefs.h <<_ACEOF
41518#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41519_ACEOF
41520
41521
41522
41523  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41524  if test "x$ac_cv_sizeof_int_p" = x; then
41525    # The test failed, lets stick to the assumed value.
41526    { $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
41527$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41528  else
41529    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41530
41531    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41532      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41533      # Let's try to implicitely set the compilers target architecture and retry the test
41534      { $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
41535$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;}
41536      { $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
41537$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;}
41538
41539  # When we add flags to the "official" CFLAGS etc, we need to
41540  # keep track of these additions in ADDED_CFLAGS etc. These
41541  # will later be checked to make sure only controlled additions
41542  # have been made to CFLAGS etc.
41543  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41544  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41545  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41546
41547  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41548  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41549  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41550
41551  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41552  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41553  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41554
41555
41556      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41557      unset ac_cv_sizeof_int_p
41558      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41559      cat >>confdefs.h <<_ACEOF
41560#undef SIZEOF_INT_P
41561_ACEOF
41562
41563      # The cast to long int works around a bug in the HP C Compiler
41564# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41565# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41566# This bug is HP SR number 8606223364.
41567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41568$as_echo_n "checking size of int *... " >&6; }
41569if ${ac_cv_sizeof_int_p+:} false; then :
41570  $as_echo_n "(cached) " >&6
41571else
41572  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41573
41574else
41575  if test "$ac_cv_type_int_p" = yes; then
41576     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41577$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41578as_fn_error 77 "cannot compute sizeof (int *)
41579See \`config.log' for more details" "$LINENO" 5; }
41580   else
41581     ac_cv_sizeof_int_p=0
41582   fi
41583fi
41584
41585fi
41586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41587$as_echo "$ac_cv_sizeof_int_p" >&6; }
41588
41589
41590
41591cat >>confdefs.h <<_ACEOF
41592#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41593_ACEOF
41594
41595
41596
41597      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41598
41599      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41600        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
41601      fi
41602    fi
41603  fi
41604
41605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41606$as_echo_n "checking for target address size... " >&6; }
41607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41608$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41609
41610
41611  ###############################################################################
41612  #
41613  # Is the target little of big endian?
41614  #
41615   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41616$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41617if ${ac_cv_c_bigendian+:} false; then :
41618  $as_echo_n "(cached) " >&6
41619else
41620  ac_cv_c_bigendian=unknown
41621    # See if we're dealing with a universal compiler.
41622    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41623/* end confdefs.h.  */
41624#ifndef __APPLE_CC__
41625	       not a universal capable compiler
41626	     #endif
41627	     typedef int dummy;
41628
41629_ACEOF
41630if ac_fn_cxx_try_compile "$LINENO"; then :
41631
41632	# Check for potential -arch flags.  It is not universal unless
41633	# there are at least two -arch flags with different values.
41634	ac_arch=
41635	ac_prev=
41636	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41637	 if test -n "$ac_prev"; then
41638	   case $ac_word in
41639	     i?86 | x86_64 | ppc | ppc64)
41640	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41641		 ac_arch=$ac_word
41642	       else
41643		 ac_cv_c_bigendian=universal
41644		 break
41645	       fi
41646	       ;;
41647	   esac
41648	   ac_prev=
41649	 elif test "x$ac_word" = "x-arch"; then
41650	   ac_prev=arch
41651	 fi
41652       done
41653fi
41654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41655    if test $ac_cv_c_bigendian = unknown; then
41656      # See if sys/param.h defines the BYTE_ORDER macro.
41657      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41658/* end confdefs.h.  */
41659#include <sys/types.h>
41660	     #include <sys/param.h>
41661
41662int
41663main ()
41664{
41665#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41666		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41667		     && LITTLE_ENDIAN)
41668	      bogus endian macros
41669	     #endif
41670
41671  ;
41672  return 0;
41673}
41674_ACEOF
41675if ac_fn_cxx_try_compile "$LINENO"; then :
41676  # It does; now see whether it defined to BIG_ENDIAN or not.
41677	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41678/* end confdefs.h.  */
41679#include <sys/types.h>
41680		#include <sys/param.h>
41681
41682int
41683main ()
41684{
41685#if BYTE_ORDER != BIG_ENDIAN
41686		 not big endian
41687		#endif
41688
41689  ;
41690  return 0;
41691}
41692_ACEOF
41693if ac_fn_cxx_try_compile "$LINENO"; then :
41694  ac_cv_c_bigendian=yes
41695else
41696  ac_cv_c_bigendian=no
41697fi
41698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41699fi
41700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41701    fi
41702    if test $ac_cv_c_bigendian = unknown; then
41703      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41704      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41705/* end confdefs.h.  */
41706#include <limits.h>
41707
41708int
41709main ()
41710{
41711#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41712	      bogus endian macros
41713	     #endif
41714
41715  ;
41716  return 0;
41717}
41718_ACEOF
41719if ac_fn_cxx_try_compile "$LINENO"; then :
41720  # It does; now see whether it defined to _BIG_ENDIAN or not.
41721	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41722/* end confdefs.h.  */
41723#include <limits.h>
41724
41725int
41726main ()
41727{
41728#ifndef _BIG_ENDIAN
41729		 not big endian
41730		#endif
41731
41732  ;
41733  return 0;
41734}
41735_ACEOF
41736if ac_fn_cxx_try_compile "$LINENO"; then :
41737  ac_cv_c_bigendian=yes
41738else
41739  ac_cv_c_bigendian=no
41740fi
41741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41742fi
41743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41744    fi
41745    if test $ac_cv_c_bigendian = unknown; then
41746      # Compile a test program.
41747      if test "$cross_compiling" = yes; then :
41748  # Try to guess by grepping values from an object file.
41749	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41750/* end confdefs.h.  */
41751short int ascii_mm[] =
41752		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41753		short int ascii_ii[] =
41754		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41755		int use_ascii (int i) {
41756		  return ascii_mm[i] + ascii_ii[i];
41757		}
41758		short int ebcdic_ii[] =
41759		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41760		short int ebcdic_mm[] =
41761		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41762		int use_ebcdic (int i) {
41763		  return ebcdic_mm[i] + ebcdic_ii[i];
41764		}
41765		extern int foo;
41766
41767int
41768main ()
41769{
41770return use_ascii (foo) == use_ebcdic (foo);
41771  ;
41772  return 0;
41773}
41774_ACEOF
41775if ac_fn_cxx_try_compile "$LINENO"; then :
41776  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41777	      ac_cv_c_bigendian=yes
41778	    fi
41779	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41780	      if test "$ac_cv_c_bigendian" = unknown; then
41781		ac_cv_c_bigendian=no
41782	      else
41783		# finding both strings is unlikely to happen, but who knows?
41784		ac_cv_c_bigendian=unknown
41785	      fi
41786	    fi
41787fi
41788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41789else
41790  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41791/* end confdefs.h.  */
41792$ac_includes_default
41793int
41794main ()
41795{
41796
41797	     /* Are we little or big endian?  From Harbison&Steele.  */
41798	     union
41799	     {
41800	       long int l;
41801	       char c[sizeof (long int)];
41802	     } u;
41803	     u.l = 1;
41804	     return u.c[sizeof (long int) - 1] == 1;
41805
41806  ;
41807  return 0;
41808}
41809_ACEOF
41810if ac_fn_cxx_try_run "$LINENO"; then :
41811  ac_cv_c_bigendian=no
41812else
41813  ac_cv_c_bigendian=yes
41814fi
41815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41816  conftest.$ac_objext conftest.beam conftest.$ac_ext
41817fi
41818
41819    fi
41820fi
41821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41822$as_echo "$ac_cv_c_bigendian" >&6; }
41823 case $ac_cv_c_bigendian in #(
41824   yes)
41825     ENDIAN="big";; #(
41826   no)
41827     ENDIAN="little" ;; #(
41828   universal)
41829     ENDIAN="universal_endianness"
41830     ;; #(
41831   *)
41832     ENDIAN="unknown" ;;
41833 esac
41834
41835
41836  if test "x$ENDIAN" = xuniversal_endianness; then
41837    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41838  fi
41839  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41840    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
41841  fi
41842
41843
41844# Configure flags for the tools
41845
41846  ###############################################################################
41847  #
41848  # How to compile shared libraries.
41849  #
41850
41851  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41852    PICFLAG="-fPIC"
41853    C_FLAG_REORDER=''
41854    CXX_FLAG_REORDER=''
41855
41856    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41857      # Linking is different on MacOSX
41858      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41859      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41860      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41861      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41862      SET_SHARED_LIBRARY_MAPFILE=''
41863    else
41864      # Default works for linux, might work on other platforms as well.
41865      SHARED_LIBRARY_FLAGS='-shared'
41866      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41867      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41868      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41869      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41870    fi
41871  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41872    PICFLAG=''
41873    C_FLAG_REORDER=''
41874    CXX_FLAG_REORDER=''
41875
41876    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41877      # Linking is different on MacOSX
41878      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41879      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41880      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41881      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41882      SET_SHARED_LIBRARY_MAPFILE=''
41883    else
41884      # Default works for linux, might work on other platforms as well.
41885      SHARED_LIBRARY_FLAGS='-shared'
41886      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41887      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41888      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41889      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41890    fi
41891  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41892    PICFLAG="-KPIC"
41893    C_FLAG_REORDER='-xF'
41894    CXX_FLAG_REORDER='-xF'
41895    SHARED_LIBRARY_FLAGS="-G"
41896    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41897    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41898    SET_SHARED_LIBRARY_NAME=''
41899    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41900  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41901    PICFLAG="-qpic=large"
41902    C_FLAG_REORDER=''
41903    CXX_FLAG_REORDER=''
41904    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41905    SET_EXECUTABLE_ORIGIN=""
41906    SET_SHARED_LIBRARY_ORIGIN=''
41907    SET_SHARED_LIBRARY_NAME=''
41908    SET_SHARED_LIBRARY_MAPFILE=''
41909  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41910    PICFLAG=""
41911    C_FLAG_REORDER=''
41912    CXX_FLAG_REORDER=''
41913    SHARED_LIBRARY_FLAGS="-LD"
41914    SET_EXECUTABLE_ORIGIN=''
41915    SET_SHARED_LIBRARY_ORIGIN=''
41916    SET_SHARED_LIBRARY_NAME=''
41917    SET_SHARED_LIBRARY_MAPFILE=''
41918  fi
41919
41920
41921
41922
41923
41924
41925
41926
41927
41928  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41929    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41930    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41931    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41932  fi
41933  # The (cross) compiler is now configured, we can now test capabilities
41934  # of the target platform.
41935
41936
41937
41938  ###############################################################################
41939  #
41940  # Setup the opt flags for different compilers
41941  # and different operating systems.
41942  #
41943
41944  # FIXME: this was indirectly the old default, but just inherited.
41945  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41946  #   C_FLAG_DEPS="-MMD -MF"
41947  # fi
41948
41949  # Generate make dependency files
41950  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41951    C_FLAG_DEPS="-MMD -MF"
41952  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41953    C_FLAG_DEPS="-MMD -MF"
41954  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41955    C_FLAG_DEPS="-xMMD -xMF"
41956  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41957    C_FLAG_DEPS="-qmakedep=gcc -MF"
41958  fi
41959  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41960
41961
41962
41963  # Debug symbols
41964  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41965    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41966      # reduce from default "-g2" option to save space
41967      CFLAGS_DEBUG_SYMBOLS="-g1"
41968      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41969    else
41970      CFLAGS_DEBUG_SYMBOLS="-g"
41971      CXXFLAGS_DEBUG_SYMBOLS="-g"
41972    fi
41973  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41974    CFLAGS_DEBUG_SYMBOLS="-g"
41975    CXXFLAGS_DEBUG_SYMBOLS="-g"
41976  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41977    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41978    # FIXME: likely a bug, this disables debug symbols rather than enables them
41979    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41980  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41981    CFLAGS_DEBUG_SYMBOLS="-g"
41982    CXXFLAGS_DEBUG_SYMBOLS="-g"
41983  fi
41984
41985
41986
41987  # bounds, memory and behavior checking options
41988  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41989    case $DEBUG_LEVEL in
41990    release )
41991      # no adjustment
41992      ;;
41993    fastdebug )
41994      # Add compile time bounds checks.
41995      CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
41996      CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
41997      ;;
41998    slowdebug )
41999      # Add runtime bounds checks and symbol info.
42000      CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
42001      CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
42002      if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42003        CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
42004        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
42005      fi
42006      ;;
42007    esac
42008  fi
42009
42010
42011
42012  # Optimization levels
42013  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42014    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42015
42016    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42017      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42018      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42019      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42020      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42021      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42022      C_O_FLAG_NONE="-xregs=no%frameptr"
42023      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42024      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42025      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42026      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42027      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42028      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42029        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42030        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42031      fi
42032    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42033      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42034      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42035      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42036      C_O_FLAG_DEBUG=""
42037      C_O_FLAG_NONE=""
42038      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42039      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42040      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42041      C_O_FLAG_DEBUG=""
42042      CXX_O_FLAG_NONE=""
42043    fi
42044  else
42045    # The remaining toolchains share opt flags between CC and CXX;
42046    # setup for C and duplicate afterwards.
42047    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42048      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42049        # On MacOSX we optimize for size, something
42050        # we should do for all platforms?
42051        C_O_FLAG_HIGHEST="-Os"
42052        C_O_FLAG_HI="-Os"
42053        C_O_FLAG_NORM="-Os"
42054      else
42055        C_O_FLAG_HIGHEST="-O3"
42056        C_O_FLAG_HI="-O3"
42057        C_O_FLAG_NORM="-O2"
42058      fi
42059      C_O_FLAG_DEBUG="-O0"
42060      C_O_FLAG_NONE="-O0"
42061    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42062      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42063        # On MacOSX we optimize for size, something
42064        # we should do for all platforms?
42065        C_O_FLAG_HIGHEST="-Os"
42066        C_O_FLAG_HI="-Os"
42067        C_O_FLAG_NORM="-Os"
42068      else
42069        C_O_FLAG_HIGHEST="-O3"
42070        C_O_FLAG_HI="-O3"
42071        C_O_FLAG_NORM="-O2"
42072      fi
42073      C_O_FLAG_DEBUG="-O0"
42074      C_O_FLAG_NONE="-O0"
42075    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42076      C_O_FLAG_HIGHEST="-O3"
42077      C_O_FLAG_HI="-O3 -qstrict"
42078      C_O_FLAG_NORM="-O2"
42079      C_O_FLAG_DEBUG="-qnoopt"
42080      C_O_FLAG_NONE="-qnoop"
42081    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42082      C_O_FLAG_HIGHEST="-O2"
42083      C_O_FLAG_HI="-O1"
42084      C_O_FLAG_NORM="-O1"
42085      C_O_FLAG_DEBUG="-Od"
42086      C_O_FLAG_NONE="-Od"
42087    fi
42088    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42089    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42090    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42091    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42092    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42093  fi
42094
42095  # Adjust optimization flags according to debug level.
42096  case $DEBUG_LEVEL in
42097    release )
42098      # no adjustment
42099      ;;
42100    fastdebug )
42101      # Not quite so much optimization
42102      C_O_FLAG_HI="$C_O_FLAG_NORM"
42103      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42104      ;;
42105    slowdebug )
42106      # Disable optimization
42107      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42108      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42109      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42110      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42111      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42112      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42113      ;;
42114  esac
42115
42116
42117
42118
42119
42120
42121
42122
42123
42124
42125
42126
42127
42128  # Special extras...
42129  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42130    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42131      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42132      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42133    fi
42134  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42135    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42136    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42137    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42138  fi
42139
42140  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42141    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42142$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42143  fi
42144
42145  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42146    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42147$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42148  fi
42149
42150  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42151    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42152$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42153  fi
42154
42155
42156# Check whether --with-extra-cflags was given.
42157if test "${with_extra_cflags+set}" = set; then :
42158  withval=$with_extra_cflags;
42159fi
42160
42161
42162
42163# Check whether --with-extra-cxxflags was given.
42164if test "${with_extra_cxxflags+set}" = set; then :
42165  withval=$with_extra_cxxflags;
42166fi
42167
42168
42169
42170# Check whether --with-extra-ldflags was given.
42171if test "${with_extra_ldflags+set}" = set; then :
42172  withval=$with_extra_ldflags;
42173fi
42174
42175
42176  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42177  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42178  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42179
42180  # Hotspot needs these set in their legacy form
42181  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42182  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42183  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42184
42185
42186
42187
42188
42189  ###############################################################################
42190  #
42191  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42192  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42193  #
42194
42195  # Setup compiler/platform specific flags into
42196  #    CFLAGS_JDK    - C Compiler flags
42197  #    CXXFLAGS_JDK  - C++ Compiler flags
42198  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42199  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42200    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42201        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42202    case $OPENJDK_TARGET_CPU_ARCH in
42203      arm )
42204        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42205        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42206        ;;
42207      ppc )
42208        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42209        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42210        ;;
42211      * )
42212        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42213        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42214        ;;
42215    esac
42216  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42217    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42218    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42219      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42220      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42221    fi
42222
42223    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42224    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42225  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42226    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42227    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42228  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42229    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42230    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42231    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42232    -DWIN32 -DIAL"
42233    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42234      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42235    else
42236      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42237    fi
42238  fi
42239
42240  ###############################################################################
42241
42242  # Adjust flags according to debug level.
42243  case $DEBUG_LEVEL in
42244    fastdebug | slowdebug )
42245      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42246      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42247      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42248      ;;
42249    release )
42250      ;;
42251    * )
42252      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42253      ;;
42254  esac
42255
42256  # Setup LP64
42257  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42258
42259  # Set some common defines. These works for all compilers, but assume
42260  # -D is universally accepted.
42261
42262  # Setup endianness
42263  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42264    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42265    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42266    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42267    #   Note: -Dmacro         is the same as    #define macro 1
42268    #         -Dmacro=        is the same as    #define macro
42269    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42270      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42271    else
42272      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42273    fi
42274  else
42275    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42276    # are defined in the system?
42277    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42278      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42279    else
42280      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42281    fi
42282  fi
42283
42284  # Setup target OS define. Use OS target name but in upper case.
42285  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42286  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42287
42288  # Setup target CPU
42289  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42290
42291  # Setup debug/release defines
42292  if test "x$DEBUG_LEVEL" = xrelease; then
42293    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42294    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42295      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42296    fi
42297  else
42298    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42299  fi
42300
42301  # Setup release name
42302  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42303
42304
42305  # Set some additional per-OS defines.
42306  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42307    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42308  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42309    # FIXME: PPC64 should not be here.
42310    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42311  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42312    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42313  fi
42314
42315  # Additional macosx handling
42316  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42317    # Setting these parameters makes it an error to link to macosx APIs that are
42318    # newer than the given OS version and makes the linked binaries compatible
42319    # even if built on a newer version of the OS.
42320    # The expected format is X.Y.Z
42321    MACOSX_VERSION_MIN=10.7.0
42322
42323
42324    # The macro takes the version with no dots, ex: 1070
42325    # Let the flags variables get resolved in make for easier override on make
42326    # command line.
42327    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42328    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42329  fi
42330
42331  # Setup some hard coded includes
42332  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42333      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42334      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42335      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_API_DIR/native/include"
42336
42337  # The shared libraries are compiled using the picflag.
42338  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42339  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42340
42341  # Executable flags
42342  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42343  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42344
42345
42346
42347
42348
42349
42350  # Setup LDFLAGS et al.
42351  #
42352
42353  # Now this is odd. The JDK native libraries have to link against libjvm.so
42354  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42355  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42356  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42357  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42358  # libraries will link to whatever is in memory. Yuck.
42359  #
42360  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42361  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42362    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42363    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42364      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42365    fi
42366    # TODO: make -debug optional "--disable-full-debug-symbols"
42367    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42368  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42369    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42370    # We have previously set HAS_GNU_HASH if this is the case
42371    if test -n "$HAS_GNU_HASH"; then
42372      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42373    fi
42374    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42375      # And since we now know that the linker is gnu, then add -z defs, to forbid
42376      # undefined symbols in object files.
42377      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42378      case $DEBUG_LEVEL in
42379        release )
42380          # tell linker to optimize libraries.
42381          # Should this be supplied to the OSS linker as well?
42382          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42383          ;;
42384        slowdebug )
42385          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42386            # do relocations at load
42387            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42388            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42389          fi
42390          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42391            # mark relocations read only
42392            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42393            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42394          fi
42395          ;;
42396        fastdebug )
42397          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42398            # mark relocations read only
42399            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42400            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42401          fi
42402          ;;
42403        * )
42404          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42405          ;;
42406        esac
42407    fi
42408  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42409    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42410    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42411  fi
42412
42413  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
42414    # If undefined behaviour detection is enabled then we need to tell linker.
42415    case $DEBUG_LEVEL in
42416      release | fastdebug )
42417        ;;
42418      slowdebug )
42419        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&5
42420$as_echo "$as_me: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&2;}
42421        if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42422          # enable undefined behaviour checking
42423          LDFLAGS_JDK="$LDFLAGS_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42424          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42425        fi
42426        ;;
42427      * )
42428        as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42429        ;;
42430    esac
42431  fi
42432
42433  # Customize LDFLAGS for executables
42434
42435  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42436
42437  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42438    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42439      LDFLAGS_STACK_SIZE=1048576
42440    else
42441      LDFLAGS_STACK_SIZE=327680
42442    fi
42443    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42444  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42445    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42446  fi
42447
42448  # Customize LDFLAGS for libs
42449  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42450
42451  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42452    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42453    LDFLAGS_JDKLIB_SUFFIX=""
42454  else
42455    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42456        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42457
42458    # On some platforms (mac) the linker warns about non existing -L dirs.
42459    # Add server first if available. Linking aginst client does not always produce the same results.
42460    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42461    # Default to server for other variants.
42462    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42463      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42464    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42465      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42466    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42467      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42468    else
42469      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42470    fi
42471
42472    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42473    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42474      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42475    fi
42476  fi
42477
42478
42479
42480
42481
42482
42483
42484
42485  # Some Zero and Shark settings.
42486  # ZERO_ARCHFLAG tells the compiler which mode to build for
42487  case "${OPENJDK_TARGET_CPU}" in
42488    s390)
42489      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42490      ;;
42491    *)
42492      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42493  esac
42494
42495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42496$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42497  supports=yes
42498
42499  saved_cflags="$CFLAGS"
42500  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42501  ac_ext=c
42502ac_cpp='$CPP $CPPFLAGS'
42503ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42504ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42505ac_compiler_gnu=$ac_cv_c_compiler_gnu
42506
42507  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42508/* end confdefs.h.  */
42509int i;
42510_ACEOF
42511if ac_fn_c_try_compile "$LINENO"; then :
42512
42513else
42514  supports=no
42515fi
42516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42517  ac_ext=cpp
42518ac_cpp='$CXXCPP $CPPFLAGS'
42519ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42520ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42521ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42522
42523  CFLAGS="$saved_cflags"
42524
42525  saved_cxxflags="$CXXFLAGS"
42526  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42527  ac_ext=cpp
42528ac_cpp='$CXXCPP $CPPFLAGS'
42529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42532
42533  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42534/* end confdefs.h.  */
42535int i;
42536_ACEOF
42537if ac_fn_cxx_try_compile "$LINENO"; then :
42538
42539else
42540  supports=no
42541fi
42542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42543  ac_ext=cpp
42544ac_cpp='$CXXCPP $CPPFLAGS'
42545ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42546ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42547ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42548
42549  CXXFLAGS="$saved_cxxflags"
42550
42551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42552$as_echo "$supports" >&6; }
42553  if test "x$supports" = "xyes" ; then
42554    :
42555  else
42556    ZERO_ARCHFLAG=""
42557  fi
42558
42559
42560
42561  # Check that the compiler supports -mX (or -qX on AIX) flags
42562  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42563
42564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42565$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42566  supports=yes
42567
42568  saved_cflags="$CFLAGS"
42569  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42570  ac_ext=c
42571ac_cpp='$CPP $CPPFLAGS'
42572ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42573ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42574ac_compiler_gnu=$ac_cv_c_compiler_gnu
42575
42576  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42577/* end confdefs.h.  */
42578int i;
42579_ACEOF
42580if ac_fn_c_try_compile "$LINENO"; then :
42581
42582else
42583  supports=no
42584fi
42585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42586  ac_ext=cpp
42587ac_cpp='$CXXCPP $CPPFLAGS'
42588ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42589ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42590ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42591
42592  CFLAGS="$saved_cflags"
42593
42594  saved_cxxflags="$CXXFLAGS"
42595  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42596  ac_ext=cpp
42597ac_cpp='$CXXCPP $CPPFLAGS'
42598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42601
42602  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42603/* end confdefs.h.  */
42604int i;
42605_ACEOF
42606if ac_fn_cxx_try_compile "$LINENO"; then :
42607
42608else
42609  supports=no
42610fi
42611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42612  ac_ext=cpp
42613ac_cpp='$CXXCPP $CPPFLAGS'
42614ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42615ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42616ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42617
42618  CXXFLAGS="$saved_cxxflags"
42619
42620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42621$as_echo "$supports" >&6; }
42622  if test "x$supports" = "xyes" ; then
42623    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42624  else
42625    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42626  fi
42627
42628
42629
42630  case "${TOOLCHAIN_TYPE}" in
42631    microsoft)
42632      CFLAGS_WARNINGS_ARE_ERRORS="/WX"
42633      ;;
42634    solstudio)
42635      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42636      ;;
42637    gcc)
42638      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42639      ;;
42640    clang)
42641      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42642      ;;
42643  esac
42644
42645
42646
42647# Setup debug symbols (need objcopy from the toolchain for that)
42648
42649  #
42650  # ENABLE_DEBUG_SYMBOLS
42651  # This must be done after the toolchain is setup, since we're looking at objcopy.
42652  #
42653  # Check whether --enable-debug-symbols was given.
42654if test "${enable_debug_symbols+set}" = set; then :
42655  enableval=$enable_debug_symbols;
42656fi
42657
42658
42659  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42660$as_echo_n "checking if we should generate debug symbols... " >&6; }
42661
42662  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42663    # explicit enabling of enable-debug-symbols and can't find objcopy
42664    #   this is an error
42665    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42666  fi
42667
42668  if test "x$enable_debug_symbols" = "xyes"; then
42669    ENABLE_DEBUG_SYMBOLS=true
42670  elif test "x$enable_debug_symbols" = "xno"; then
42671    ENABLE_DEBUG_SYMBOLS=false
42672  else
42673    # Default is on if objcopy is found
42674    if test "x$OBJCOPY" != x; then
42675      ENABLE_DEBUG_SYMBOLS=true
42676    # MacOS X and Windows don't use objcopy but default is on for those OSes
42677    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42678      ENABLE_DEBUG_SYMBOLS=true
42679    else
42680      ENABLE_DEBUG_SYMBOLS=false
42681    fi
42682  fi
42683
42684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42685$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42686
42687  #
42688  # ZIP_DEBUGINFO_FILES
42689  #
42690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42691$as_echo_n "checking if we should zip debug-info files... " >&6; }
42692  # Check whether --enable-zip-debug-info was given.
42693if test "${enable_zip_debug_info+set}" = set; then :
42694  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42695else
42696  enable_zip_debug_info="yes"
42697fi
42698
42699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42700$as_echo "${enable_zip_debug_info}" >&6; }
42701
42702  if test "x${enable_zip_debug_info}" = "xno"; then
42703    ZIP_DEBUGINFO_FILES=false
42704  else
42705    ZIP_DEBUGINFO_FILES=true
42706  fi
42707
42708
42709
42710
42711
42712###############################################################################
42713#
42714# Check dependencies for external and internal libraries.
42715#
42716###############################################################################
42717
42718# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42719
42720  # When using cygwin or msys, we need a wrapper binary that renames
42721  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42722  # @files and rewrites these too! This wrapper binary is
42723  # called fixpath.
42724  FIXPATH=
42725  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42726    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42727$as_echo_n "checking if fixpath can be created... " >&6; }
42728    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42729    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42730    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42731      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42732      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42733      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42734      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42735    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42736      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42737      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42738
42739      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42740      # @ was chosen as separator to minimize risk of other tools messing around with it
42741      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42742      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42743
42744      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42745    fi
42746    rm -f $OUTPUT_ROOT/fixpath*
42747    cd $OUTPUT_ROOT
42748    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42749    cd $CURDIR
42750
42751    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42753$as_echo "no" >&6; }
42754      cat $OUTPUT_ROOT/fixpath1.log
42755      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42756    fi
42757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42758$as_echo "yes" >&6; }
42759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42760$as_echo_n "checking if fixpath.exe works... " >&6; }
42761    cd $OUTPUT_ROOT
42762    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42763    cd $CURDIR
42764    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42766$as_echo "no" >&6; }
42767      cat $OUTPUT_ROOT/fixpath2.log
42768      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42769    fi
42770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42771$as_echo "yes" >&6; }
42772    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42773  fi
42774
42775
42776
42777
42778
42779
42780  ###############################################################################
42781  #
42782  # OS specific settings that we never will need to probe.
42783  #
42784  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42786$as_echo_n "checking what is not needed on Linux?... " >&6; }
42787    PULSE_NOT_NEEDED=yes
42788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42789$as_echo "pulse" >&6; }
42790  fi
42791
42792  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42794$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42795    ALSA_NOT_NEEDED=yes
42796    PULSE_NOT_NEEDED=yes
42797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42798$as_echo "alsa pulse" >&6; }
42799  fi
42800
42801  if test "x$OPENJDK_TARGET_OS" = xaix; then
42802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42803$as_echo_n "checking what is not needed on AIX?... " >&6; }
42804    ALSA_NOT_NEEDED=yes
42805    PULSE_NOT_NEEDED=yes
42806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42807$as_echo "alsa pulse" >&6; }
42808  fi
42809
42810
42811  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42812    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42813$as_echo_n "checking what is not needed on Windows?... " >&6; }
42814    CUPS_NOT_NEEDED=yes
42815    ALSA_NOT_NEEDED=yes
42816    PULSE_NOT_NEEDED=yes
42817    X11_NOT_NEEDED=yes
42818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42819$as_echo "alsa cups pulse x11" >&6; }
42820  fi
42821
42822  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42823    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42824$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42825    ALSA_NOT_NEEDED=yes
42826    PULSE_NOT_NEEDED=yes
42827    X11_NOT_NEEDED=yes
42828    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42829$as_echo "alsa pulse x11" >&6; }
42830  fi
42831
42832  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42833    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42834$as_echo_n "checking what is not needed on bsd?... " >&6; }
42835    ALSA_NOT_NEEDED=yes
42836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42837$as_echo "alsa" >&6; }
42838  fi
42839
42840  if test "x$OPENJDK" = "xfalse"; then
42841    FREETYPE_NOT_NEEDED=yes
42842  fi
42843
42844  if test "x$SUPPORT_HEADFUL" = xno; then
42845    X11_NOT_NEEDED=yes
42846  fi
42847
42848
42849
42850  ###############################################################################
42851  #
42852  # Check for X Windows
42853  #
42854
42855  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42856  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42857  # --x-libraries for the sysroot, if that seems to be correct.
42858  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42859    if test "x$SYSROOT" != "x"; then
42860      if test "x$x_includes" = xNONE; then
42861        if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42862          x_includes="$SYSROOT/usr/X11R6/include"
42863        elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42864          x_includes="$SYSROOT/usr/include"
42865        fi
42866      fi
42867      if test "x$x_libraries" = xNONE; then
42868        if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42869          x_libraries="$SYSROOT/usr/X11R6/lib"
42870        elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42871          x_libraries="$SYSROOT/usr/lib64"
42872        elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42873          x_libraries="$SYSROOT/usr/lib"
42874        fi
42875      fi
42876    fi
42877  fi
42878
42879  # Now let autoconf do it's magic
42880  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42881$as_echo_n "checking for X... " >&6; }
42882
42883
42884# Check whether --with-x was given.
42885if test "${with_x+set}" = set; then :
42886  withval=$with_x;
42887fi
42888
42889# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42890if test "x$with_x" = xno; then
42891  # The user explicitly disabled X.
42892  have_x=disabled
42893else
42894  case $x_includes,$x_libraries in #(
42895    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42896    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42897  $as_echo_n "(cached) " >&6
42898else
42899  # One or both of the vars are not set, and there is no cached value.
42900ac_x_includes=no ac_x_libraries=no
42901rm -f -r conftest.dir
42902if mkdir conftest.dir; then
42903  cd conftest.dir
42904  cat >Imakefile <<'_ACEOF'
42905incroot:
42906	@echo incroot='${INCROOT}'
42907usrlibdir:
42908	@echo usrlibdir='${USRLIBDIR}'
42909libdir:
42910	@echo libdir='${LIBDIR}'
42911_ACEOF
42912  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42913    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42914    for ac_var in incroot usrlibdir libdir; do
42915      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42916    done
42917    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42918    for ac_extension in a so sl dylib la dll; do
42919      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42920	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42921	ac_im_usrlibdir=$ac_im_libdir; break
42922      fi
42923    done
42924    # Screen out bogus values from the imake configuration.  They are
42925    # bogus both because they are the default anyway, and because
42926    # using them would break gcc on systems where it needs fixed includes.
42927    case $ac_im_incroot in
42928	/usr/include) ac_x_includes= ;;
42929	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42930    esac
42931    case $ac_im_usrlibdir in
42932	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42933	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42934    esac
42935  fi
42936  cd ..
42937  rm -f -r conftest.dir
42938fi
42939
42940# Standard set of common directories for X headers.
42941# Check X11 before X11Rn because it is often a symlink to the current release.
42942ac_x_header_dirs='
42943/usr/X11/include
42944/usr/X11R7/include
42945/usr/X11R6/include
42946/usr/X11R5/include
42947/usr/X11R4/include
42948
42949/usr/include/X11
42950/usr/include/X11R7
42951/usr/include/X11R6
42952/usr/include/X11R5
42953/usr/include/X11R4
42954
42955/usr/local/X11/include
42956/usr/local/X11R7/include
42957/usr/local/X11R6/include
42958/usr/local/X11R5/include
42959/usr/local/X11R4/include
42960
42961/usr/local/include/X11
42962/usr/local/include/X11R7
42963/usr/local/include/X11R6
42964/usr/local/include/X11R5
42965/usr/local/include/X11R4
42966
42967/usr/X386/include
42968/usr/x386/include
42969/usr/XFree86/include/X11
42970
42971/usr/include
42972/usr/local/include
42973/usr/unsupported/include
42974/usr/athena/include
42975/usr/local/x11r5/include
42976/usr/lpp/Xamples/include
42977
42978/usr/openwin/include
42979/usr/openwin/share/include'
42980
42981if test "$ac_x_includes" = no; then
42982  # Guess where to find include files, by looking for Xlib.h.
42983  # First, try using that file with no special directory specified.
42984  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42985/* end confdefs.h.  */
42986#include <X11/Xlib.h>
42987_ACEOF
42988if ac_fn_cxx_try_cpp "$LINENO"; then :
42989  # We can compile using X headers with no special include directory.
42990ac_x_includes=
42991else
42992  for ac_dir in $ac_x_header_dirs; do
42993  if test -r "$ac_dir/X11/Xlib.h"; then
42994    ac_x_includes=$ac_dir
42995    break
42996  fi
42997done
42998fi
42999rm -f conftest.err conftest.i conftest.$ac_ext
43000fi # $ac_x_includes = no
43001
43002if test "$ac_x_libraries" = no; then
43003  # Check for the libraries.
43004  # See if we find them without any special options.
43005  # Don't add to $LIBS permanently.
43006  ac_save_LIBS=$LIBS
43007  LIBS="-lX11 $LIBS"
43008  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43009/* end confdefs.h.  */
43010#include <X11/Xlib.h>
43011int
43012main ()
43013{
43014XrmInitialize ()
43015  ;
43016  return 0;
43017}
43018_ACEOF
43019if ac_fn_cxx_try_link "$LINENO"; then :
43020  LIBS=$ac_save_LIBS
43021# We can link X programs with no special library path.
43022ac_x_libraries=
43023else
43024  LIBS=$ac_save_LIBS
43025for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43026do
43027  # Don't even attempt the hair of trying to link an X program!
43028  for ac_extension in a so sl dylib la dll; do
43029    if test -r "$ac_dir/libX11.$ac_extension"; then
43030      ac_x_libraries=$ac_dir
43031      break 2
43032    fi
43033  done
43034done
43035fi
43036rm -f core conftest.err conftest.$ac_objext \
43037    conftest$ac_exeext conftest.$ac_ext
43038fi # $ac_x_libraries = no
43039
43040case $ac_x_includes,$ac_x_libraries in #(
43041  no,* | *,no | *\'*)
43042    # Didn't find X, or a directory has "'" in its name.
43043    ac_cv_have_x="have_x=no";; #(
43044  *)
43045    # Record where we found X for the cache.
43046    ac_cv_have_x="have_x=yes\
43047	ac_x_includes='$ac_x_includes'\
43048	ac_x_libraries='$ac_x_libraries'"
43049esac
43050fi
43051;; #(
43052    *) have_x=yes;;
43053  esac
43054  eval "$ac_cv_have_x"
43055fi # $with_x != no
43056
43057if test "$have_x" != yes; then
43058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43059$as_echo "$have_x" >&6; }
43060  no_x=yes
43061else
43062  # If each of the values was on the command line, it overrides each guess.
43063  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43064  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43065  # Update the cache value to reflect the command line values.
43066  ac_cv_have_x="have_x=yes\
43067	ac_x_includes='$x_includes'\
43068	ac_x_libraries='$x_libraries'"
43069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43070$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43071fi
43072
43073  if test "$no_x" = yes; then
43074  # Not all programs may use this symbol, but it does not hurt to define it.
43075
43076$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43077
43078  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43079else
43080  if test -n "$x_includes"; then
43081    X_CFLAGS="$X_CFLAGS -I$x_includes"
43082  fi
43083
43084  # It would also be nice to do this for all -L options, not just this one.
43085  if test -n "$x_libraries"; then
43086    X_LIBS="$X_LIBS -L$x_libraries"
43087    # For Solaris; some versions of Sun CC require a space after -R and
43088    # others require no space.  Words are not sufficient . . . .
43089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43090$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43091    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43092    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43093    ac_cxx_werror_flag=yes
43094    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43095/* end confdefs.h.  */
43096
43097int
43098main ()
43099{
43100
43101  ;
43102  return 0;
43103}
43104_ACEOF
43105if ac_fn_cxx_try_link "$LINENO"; then :
43106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43107$as_echo "no" >&6; }
43108       X_LIBS="$X_LIBS -R$x_libraries"
43109else
43110  LIBS="$ac_xsave_LIBS -R $x_libraries"
43111       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43112/* end confdefs.h.  */
43113
43114int
43115main ()
43116{
43117
43118  ;
43119  return 0;
43120}
43121_ACEOF
43122if ac_fn_cxx_try_link "$LINENO"; then :
43123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43124$as_echo "yes" >&6; }
43125	  X_LIBS="$X_LIBS -R $x_libraries"
43126else
43127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43128$as_echo "neither works" >&6; }
43129fi
43130rm -f core conftest.err conftest.$ac_objext \
43131    conftest$ac_exeext conftest.$ac_ext
43132fi
43133rm -f core conftest.err conftest.$ac_objext \
43134    conftest$ac_exeext conftest.$ac_ext
43135    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43136    LIBS=$ac_xsave_LIBS
43137  fi
43138
43139  # Check for system-dependent libraries X programs must link with.
43140  # Do this before checking for the system-independent R6 libraries
43141  # (-lICE), since we may need -lsocket or whatever for X linking.
43142
43143  if test "$ISC" = yes; then
43144    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43145  else
43146    # Martyn Johnson says this is needed for Ultrix, if the X
43147    # libraries were built with DECnet support.  And Karl Berry says
43148    # the Alpha needs dnet_stub (dnet does not exist).
43149    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43150    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43151/* end confdefs.h.  */
43152
43153/* Override any GCC internal prototype to avoid an error.
43154   Use char because int might match the return type of a GCC
43155   builtin and then its argument prototype would still apply.  */
43156#ifdef __cplusplus
43157extern "C"
43158#endif
43159char XOpenDisplay ();
43160int
43161main ()
43162{
43163return XOpenDisplay ();
43164  ;
43165  return 0;
43166}
43167_ACEOF
43168if ac_fn_cxx_try_link "$LINENO"; then :
43169
43170else
43171  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43172$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43173if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43174  $as_echo_n "(cached) " >&6
43175else
43176  ac_check_lib_save_LIBS=$LIBS
43177LIBS="-ldnet  $LIBS"
43178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43179/* end confdefs.h.  */
43180
43181/* Override any GCC internal prototype to avoid an error.
43182   Use char because int might match the return type of a GCC
43183   builtin and then its argument prototype would still apply.  */
43184#ifdef __cplusplus
43185extern "C"
43186#endif
43187char dnet_ntoa ();
43188int
43189main ()
43190{
43191return dnet_ntoa ();
43192  ;
43193  return 0;
43194}
43195_ACEOF
43196if ac_fn_cxx_try_link "$LINENO"; then :
43197  ac_cv_lib_dnet_dnet_ntoa=yes
43198else
43199  ac_cv_lib_dnet_dnet_ntoa=no
43200fi
43201rm -f core conftest.err conftest.$ac_objext \
43202    conftest$ac_exeext conftest.$ac_ext
43203LIBS=$ac_check_lib_save_LIBS
43204fi
43205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43206$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43207if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43208  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43209fi
43210
43211    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43212      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43213$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43214if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43215  $as_echo_n "(cached) " >&6
43216else
43217  ac_check_lib_save_LIBS=$LIBS
43218LIBS="-ldnet_stub  $LIBS"
43219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43220/* end confdefs.h.  */
43221
43222/* Override any GCC internal prototype to avoid an error.
43223   Use char because int might match the return type of a GCC
43224   builtin and then its argument prototype would still apply.  */
43225#ifdef __cplusplus
43226extern "C"
43227#endif
43228char dnet_ntoa ();
43229int
43230main ()
43231{
43232return dnet_ntoa ();
43233  ;
43234  return 0;
43235}
43236_ACEOF
43237if ac_fn_cxx_try_link "$LINENO"; then :
43238  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43239else
43240  ac_cv_lib_dnet_stub_dnet_ntoa=no
43241fi
43242rm -f core conftest.err conftest.$ac_objext \
43243    conftest$ac_exeext conftest.$ac_ext
43244LIBS=$ac_check_lib_save_LIBS
43245fi
43246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43247$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43248if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43249  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43250fi
43251
43252    fi
43253fi
43254rm -f core conftest.err conftest.$ac_objext \
43255    conftest$ac_exeext conftest.$ac_ext
43256    LIBS="$ac_xsave_LIBS"
43257
43258    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43259    # to get the SysV transport functions.
43260    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43261    # needs -lnsl.
43262    # The nsl library prevents programs from opening the X display
43263    # on Irix 5.2, according to T.E. Dickey.
43264    # The functions gethostbyname, getservbyname, and inet_addr are
43265    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43266    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43267if test "x$ac_cv_func_gethostbyname" = xyes; then :
43268
43269fi
43270
43271    if test $ac_cv_func_gethostbyname = no; then
43272      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43273$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43274if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43275  $as_echo_n "(cached) " >&6
43276else
43277  ac_check_lib_save_LIBS=$LIBS
43278LIBS="-lnsl  $LIBS"
43279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43280/* end confdefs.h.  */
43281
43282/* Override any GCC internal prototype to avoid an error.
43283   Use char because int might match the return type of a GCC
43284   builtin and then its argument prototype would still apply.  */
43285#ifdef __cplusplus
43286extern "C"
43287#endif
43288char gethostbyname ();
43289int
43290main ()
43291{
43292return gethostbyname ();
43293  ;
43294  return 0;
43295}
43296_ACEOF
43297if ac_fn_cxx_try_link "$LINENO"; then :
43298  ac_cv_lib_nsl_gethostbyname=yes
43299else
43300  ac_cv_lib_nsl_gethostbyname=no
43301fi
43302rm -f core conftest.err conftest.$ac_objext \
43303    conftest$ac_exeext conftest.$ac_ext
43304LIBS=$ac_check_lib_save_LIBS
43305fi
43306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43307$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43308if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43309  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43310fi
43311
43312      if test $ac_cv_lib_nsl_gethostbyname = no; then
43313	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43314$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43315if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43316  $as_echo_n "(cached) " >&6
43317else
43318  ac_check_lib_save_LIBS=$LIBS
43319LIBS="-lbsd  $LIBS"
43320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43321/* end confdefs.h.  */
43322
43323/* Override any GCC internal prototype to avoid an error.
43324   Use char because int might match the return type of a GCC
43325   builtin and then its argument prototype would still apply.  */
43326#ifdef __cplusplus
43327extern "C"
43328#endif
43329char gethostbyname ();
43330int
43331main ()
43332{
43333return gethostbyname ();
43334  ;
43335  return 0;
43336}
43337_ACEOF
43338if ac_fn_cxx_try_link "$LINENO"; then :
43339  ac_cv_lib_bsd_gethostbyname=yes
43340else
43341  ac_cv_lib_bsd_gethostbyname=no
43342fi
43343rm -f core conftest.err conftest.$ac_objext \
43344    conftest$ac_exeext conftest.$ac_ext
43345LIBS=$ac_check_lib_save_LIBS
43346fi
43347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43348$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43349if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43350  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43351fi
43352
43353      fi
43354    fi
43355
43356    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43357    # socket/setsockopt and other routines are undefined under SCO ODT
43358    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43359    # on later versions), says Simon Leinen: it contains gethostby*
43360    # variants that don't use the name server (or something).  -lsocket
43361    # must be given before -lnsl if both are needed.  We assume that
43362    # if connect needs -lnsl, so does gethostbyname.
43363    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43364if test "x$ac_cv_func_connect" = xyes; then :
43365
43366fi
43367
43368    if test $ac_cv_func_connect = no; then
43369      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43370$as_echo_n "checking for connect in -lsocket... " >&6; }
43371if ${ac_cv_lib_socket_connect+:} false; then :
43372  $as_echo_n "(cached) " >&6
43373else
43374  ac_check_lib_save_LIBS=$LIBS
43375LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43377/* end confdefs.h.  */
43378
43379/* Override any GCC internal prototype to avoid an error.
43380   Use char because int might match the return type of a GCC
43381   builtin and then its argument prototype would still apply.  */
43382#ifdef __cplusplus
43383extern "C"
43384#endif
43385char connect ();
43386int
43387main ()
43388{
43389return connect ();
43390  ;
43391  return 0;
43392}
43393_ACEOF
43394if ac_fn_cxx_try_link "$LINENO"; then :
43395  ac_cv_lib_socket_connect=yes
43396else
43397  ac_cv_lib_socket_connect=no
43398fi
43399rm -f core conftest.err conftest.$ac_objext \
43400    conftest$ac_exeext conftest.$ac_ext
43401LIBS=$ac_check_lib_save_LIBS
43402fi
43403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43404$as_echo "$ac_cv_lib_socket_connect" >&6; }
43405if test "x$ac_cv_lib_socket_connect" = xyes; then :
43406  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43407fi
43408
43409    fi
43410
43411    # Guillermo Gomez says -lposix is necessary on A/UX.
43412    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43413if test "x$ac_cv_func_remove" = xyes; then :
43414
43415fi
43416
43417    if test $ac_cv_func_remove = no; then
43418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43419$as_echo_n "checking for remove in -lposix... " >&6; }
43420if ${ac_cv_lib_posix_remove+:} false; then :
43421  $as_echo_n "(cached) " >&6
43422else
43423  ac_check_lib_save_LIBS=$LIBS
43424LIBS="-lposix  $LIBS"
43425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43426/* end confdefs.h.  */
43427
43428/* Override any GCC internal prototype to avoid an error.
43429   Use char because int might match the return type of a GCC
43430   builtin and then its argument prototype would still apply.  */
43431#ifdef __cplusplus
43432extern "C"
43433#endif
43434char remove ();
43435int
43436main ()
43437{
43438return remove ();
43439  ;
43440  return 0;
43441}
43442_ACEOF
43443if ac_fn_cxx_try_link "$LINENO"; then :
43444  ac_cv_lib_posix_remove=yes
43445else
43446  ac_cv_lib_posix_remove=no
43447fi
43448rm -f core conftest.err conftest.$ac_objext \
43449    conftest$ac_exeext conftest.$ac_ext
43450LIBS=$ac_check_lib_save_LIBS
43451fi
43452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43453$as_echo "$ac_cv_lib_posix_remove" >&6; }
43454if test "x$ac_cv_lib_posix_remove" = xyes; then :
43455  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43456fi
43457
43458    fi
43459
43460    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43461    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43462if test "x$ac_cv_func_shmat" = xyes; then :
43463
43464fi
43465
43466    if test $ac_cv_func_shmat = no; then
43467      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43468$as_echo_n "checking for shmat in -lipc... " >&6; }
43469if ${ac_cv_lib_ipc_shmat+:} false; then :
43470  $as_echo_n "(cached) " >&6
43471else
43472  ac_check_lib_save_LIBS=$LIBS
43473LIBS="-lipc  $LIBS"
43474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43475/* end confdefs.h.  */
43476
43477/* Override any GCC internal prototype to avoid an error.
43478   Use char because int might match the return type of a GCC
43479   builtin and then its argument prototype would still apply.  */
43480#ifdef __cplusplus
43481extern "C"
43482#endif
43483char shmat ();
43484int
43485main ()
43486{
43487return shmat ();
43488  ;
43489  return 0;
43490}
43491_ACEOF
43492if ac_fn_cxx_try_link "$LINENO"; then :
43493  ac_cv_lib_ipc_shmat=yes
43494else
43495  ac_cv_lib_ipc_shmat=no
43496fi
43497rm -f core conftest.err conftest.$ac_objext \
43498    conftest$ac_exeext conftest.$ac_ext
43499LIBS=$ac_check_lib_save_LIBS
43500fi
43501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43502$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43503if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43504  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43505fi
43506
43507    fi
43508  fi
43509
43510  # Check for libraries that X11R6 Xt/Xaw programs need.
43511  ac_save_LDFLAGS=$LDFLAGS
43512  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43513  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43514  # check for ICE first), but we must link in the order -lSM -lICE or
43515  # we get undefined symbols.  So assume we have SM if we have ICE.
43516  # These have to be linked with before -lX11, unlike the other
43517  # libraries we check for below, so use a different variable.
43518  # John Interrante, Karl Berry
43519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43520$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43521if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43522  $as_echo_n "(cached) " >&6
43523else
43524  ac_check_lib_save_LIBS=$LIBS
43525LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43527/* end confdefs.h.  */
43528
43529/* Override any GCC internal prototype to avoid an error.
43530   Use char because int might match the return type of a GCC
43531   builtin and then its argument prototype would still apply.  */
43532#ifdef __cplusplus
43533extern "C"
43534#endif
43535char IceConnectionNumber ();
43536int
43537main ()
43538{
43539return IceConnectionNumber ();
43540  ;
43541  return 0;
43542}
43543_ACEOF
43544if ac_fn_cxx_try_link "$LINENO"; then :
43545  ac_cv_lib_ICE_IceConnectionNumber=yes
43546else
43547  ac_cv_lib_ICE_IceConnectionNumber=no
43548fi
43549rm -f core conftest.err conftest.$ac_objext \
43550    conftest$ac_exeext conftest.$ac_ext
43551LIBS=$ac_check_lib_save_LIBS
43552fi
43553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43554$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43555if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43556  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43557fi
43558
43559  LDFLAGS=$ac_save_LDFLAGS
43560
43561fi
43562
43563
43564  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43565  # this doesn't make sense so we remove it.
43566  if test "x$COMPILE_TYPE" = xcross; then
43567    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43568  fi
43569
43570  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43571
43572  # Print a helpful message on how to acquire the necessary build dependency.
43573  # x11 is the help tag: freetype, cups, pulse, alsa etc
43574  MISSING_DEPENDENCY=x11
43575
43576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43577    cygwin_help $MISSING_DEPENDENCY
43578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43579    msys_help $MISSING_DEPENDENCY
43580  else
43581    PKGHANDLER_COMMAND=
43582
43583    case $PKGHANDLER in
43584      apt-get)
43585        apt_help     $MISSING_DEPENDENCY ;;
43586      yum)
43587        yum_help     $MISSING_DEPENDENCY ;;
43588      port)
43589        port_help    $MISSING_DEPENDENCY ;;
43590      pkgutil)
43591        pkgutil_help $MISSING_DEPENDENCY ;;
43592      pkgadd)
43593        pkgadd_help  $MISSING_DEPENDENCY ;;
43594    esac
43595
43596    if test "x$PKGHANDLER_COMMAND" != x; then
43597      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43598    fi
43599  fi
43600
43601    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43602  fi
43603
43604  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43605    OPENWIN_HOME="/usr/openwin"
43606    X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43607    X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43608        -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43609        -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43610        -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43611  fi
43612
43613  #
43614  # Weird Sol10 something check...TODO change to try compile
43615  #
43616  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43617    if test "`uname -r`" = "5.10"; then
43618      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43619        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43620      fi
43621    fi
43622  fi
43623
43624  ac_ext=c
43625ac_cpp='$CPP $CPPFLAGS'
43626ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43627ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43628ac_compiler_gnu=$ac_cv_c_compiler_gnu
43629
43630  OLD_CFLAGS="$CFLAGS"
43631  CFLAGS="$CFLAGS $X_CFLAGS"
43632
43633  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43634  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43635do :
43636  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43637ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43638        # include <X11/Xlib.h>
43639        # include <X11/Xutil.h>
43640
43641
43642"
43643if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43644  cat >>confdefs.h <<_ACEOF
43645#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43646_ACEOF
43647 X11_A_OK=yes
43648else
43649  X11_A_OK=no; break
43650fi
43651
43652done
43653
43654
43655  CFLAGS="$OLD_CFLAGS"
43656  ac_ext=cpp
43657ac_cpp='$CXXCPP $CPPFLAGS'
43658ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43659ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43660ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43661
43662
43663  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43664
43665  # Print a helpful message on how to acquire the necessary build dependency.
43666  # x11 is the help tag: freetype, cups, pulse, alsa etc
43667  MISSING_DEPENDENCY=x11
43668
43669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43670    cygwin_help $MISSING_DEPENDENCY
43671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43672    msys_help $MISSING_DEPENDENCY
43673  else
43674    PKGHANDLER_COMMAND=
43675
43676    case $PKGHANDLER in
43677      apt-get)
43678        apt_help     $MISSING_DEPENDENCY ;;
43679      yum)
43680        yum_help     $MISSING_DEPENDENCY ;;
43681      port)
43682        port_help    $MISSING_DEPENDENCY ;;
43683      pkgutil)
43684        pkgutil_help $MISSING_DEPENDENCY ;;
43685      pkgadd)
43686        pkgadd_help  $MISSING_DEPENDENCY ;;
43687    esac
43688
43689    if test "x$PKGHANDLER_COMMAND" != x; then
43690      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43691    fi
43692  fi
43693
43694    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43695  fi
43696
43697
43698
43699
43700
43701
43702  ###############################################################################
43703  #
43704  # The common unix printing system cups is used to print from java.
43705  #
43706
43707# Check whether --with-cups was given.
43708if test "${with_cups+set}" = set; then :
43709  withval=$with_cups;
43710fi
43711
43712
43713# Check whether --with-cups-include was given.
43714if test "${with_cups_include+set}" = set; then :
43715  withval=$with_cups_include;
43716fi
43717
43718
43719  if test "x$CUPS_NOT_NEEDED" = xyes; then
43720    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43721      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43722$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43723    fi
43724    CUPS_CFLAGS=
43725  else
43726    CUPS_FOUND=no
43727
43728    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43729      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43730    fi
43731
43732    if test "x${with_cups}" != x; then
43733      CUPS_CFLAGS="-I${with_cups}/include"
43734      CUPS_FOUND=yes
43735    fi
43736    if test "x${with_cups_include}" != x; then
43737      CUPS_CFLAGS="-I${with_cups_include}"
43738      CUPS_FOUND=yes
43739    fi
43740    if test "x$CUPS_FOUND" = xno; then
43741
43742
43743  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43744    # Source the builddeps file again, to make sure it uses the latest variables!
43745    . $builddepsfile
43746    # Look for a target and build machine specific resource!
43747    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43748    if test "x$resource" = x; then
43749      # Ok, lets instead look for a target specific resource
43750      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43751    fi
43752    if test "x$resource" = x; then
43753      # Ok, lets instead look for a build specific resource
43754      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43755    fi
43756    if test "x$resource" = x; then
43757      # Ok, lets instead look for a generic resource
43758      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43759      resource=${builddep_cups}
43760    fi
43761    if test "x$resource" != x; then
43762      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43763$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43764      # If the resource in the builddeps.conf file is an existing directory,
43765      # for example /java/linux/cups
43766      if test -d ${resource}; then
43767        depdir=${resource}
43768      else
43769
43770  # cups is for example mymodule
43771  # $resource is for example libs/general/libmymod_1_2_3.zip
43772  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43773  # $with_builddeps_dir is for example /localhome/builddeps
43774  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43775  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43776  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43777  filename=`basename $resource`
43778  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43779  filebase=${filename%%.*}
43780  extension=${filename#*.}
43781  installdir=$with_builddeps_dir/$filebase
43782  if test ! -f $installdir/$filename.unpacked; then
43783    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43784$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43785    if test ! -d $installdir; then
43786      mkdir -p $installdir
43787    fi
43788    if test ! -d $installdir; then
43789      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43790    fi
43791    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43792    touch $tmpfile
43793    if test ! -f $tmpfile; then
43794      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43795    fi
43796
43797  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43798  # $tmpfile is the local file name for the downloaded file.
43799  VALID_TOOL=no
43800  if test "x$BDEPS_FTP" = xwget; then
43801    VALID_TOOL=yes
43802    wget -O $tmpfile $with_builddeps_server/$resource
43803  fi
43804  if test "x$BDEPS_FTP" = xlftp; then
43805    VALID_TOOL=yes
43806    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43807  fi
43808  if test "x$BDEPS_FTP" = xftp; then
43809    VALID_TOOL=yes
43810    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43811    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43812    FTPUSERPWD=${FTPSERVER%%@*}
43813    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43814      FTPUSER=${userpwd%%:*}
43815      FTPPWD=${userpwd#*@}
43816      FTPSERVER=${FTPSERVER#*@}
43817    else
43818      FTPUSER=ftp
43819      FTPPWD=ftp
43820    fi
43821    # the "pass" command does not work on some
43822    # ftp clients (read ftp.exe) but if it works,
43823    # passive mode is better!
43824    ( \
43825        echo "user $FTPUSER $FTPPWD"        ; \
43826        echo "pass"                         ; \
43827        echo "bin"                          ; \
43828        echo "get $FTPPATH $tmpfile"              ; \
43829    ) | ftp -in $FTPSERVER
43830  fi
43831  if test "x$VALID_TOOL" != xyes; then
43832    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43833  fi
43834
43835    mv $tmpfile $installdir/$filename
43836    if test ! -s $installdir/$filename; then
43837      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43838    fi
43839    case "$extension" in
43840      zip)  echo "Unzipping $installdir/$filename..."
43841        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43842        ;;
43843      tar.gz) echo "Untaring $installdir/$filename..."
43844        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43845        ;;
43846      tgz) echo "Untaring $installdir/$filename..."
43847        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43848        ;;
43849      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43850        ;;
43851    esac
43852  fi
43853  if test -f $installdir/$filename.unpacked; then
43854    depdir=$installdir
43855  fi
43856
43857      fi
43858      # Source the builddeps file again, because in the previous command, the depdir
43859      # was updated to point at the current build dependency install directory.
43860      . $builddepsfile
43861      # Now extract variables from the builddeps.conf files.
43862      theroot=${builddep_cups_ROOT}
43863      thecflags=${builddep_cups_CFLAGS}
43864      thelibs=${builddep_cups_LIBS}
43865      if test "x$depdir" = x; then
43866        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43867      fi
43868      CUPS=$depdir
43869      if test "x$theroot" != x; then
43870        CUPS="$theroot"
43871      fi
43872      if test "x$thecflags" != x; then
43873        CUPS_CFLAGS="$thecflags"
43874      fi
43875      if test "x$thelibs" != x; then
43876        CUPS_LIBS="$thelibs"
43877      fi
43878      CUPS_FOUND=yes
43879
43880    fi
43881
43882  fi
43883
43884    fi
43885    if test "x$CUPS_FOUND" = xno; then
43886      # Are the cups headers installed in the default /usr/include location?
43887      for ac_header in cups/cups.h cups/ppd.h
43888do :
43889  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43890ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43891if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43892  cat >>confdefs.h <<_ACEOF
43893#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43894_ACEOF
43895
43896            CUPS_FOUND=yes
43897            CUPS_CFLAGS=
43898            DEFAULT_CUPS=yes
43899
43900
43901fi
43902
43903done
43904
43905    fi
43906    if test "x$CUPS_FOUND" = xno; then
43907      # Getting nervous now? Lets poke around for standard Solaris third-party
43908      # package installation locations.
43909      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43910$as_echo_n "checking for cups headers... " >&6; }
43911      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43912        # An SFW package seems to be installed!
43913        CUPS_FOUND=yes
43914        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43915      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43916        # A CSW package seems to be installed!
43917        CUPS_FOUND=yes
43918        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43919      fi
43920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43921$as_echo "$CUPS_FOUND" >&6; }
43922    fi
43923    if test "x$CUPS_FOUND" = xno; then
43924
43925  # Print a helpful message on how to acquire the necessary build dependency.
43926  # cups is the help tag: freetype, cups, pulse, alsa etc
43927  MISSING_DEPENDENCY=cups
43928
43929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43930    cygwin_help $MISSING_DEPENDENCY
43931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43932    msys_help $MISSING_DEPENDENCY
43933  else
43934    PKGHANDLER_COMMAND=
43935
43936    case $PKGHANDLER in
43937      apt-get)
43938        apt_help     $MISSING_DEPENDENCY ;;
43939      yum)
43940        yum_help     $MISSING_DEPENDENCY ;;
43941      port)
43942        port_help    $MISSING_DEPENDENCY ;;
43943      pkgutil)
43944        pkgutil_help $MISSING_DEPENDENCY ;;
43945      pkgadd)
43946        pkgadd_help  $MISSING_DEPENDENCY ;;
43947    esac
43948
43949    if test "x$PKGHANDLER_COMMAND" != x; then
43950      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43951    fi
43952  fi
43953
43954      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43955    fi
43956  fi
43957
43958
43959
43960
43961
43962
43963  ###############################################################################
43964  #
43965  # The ubiquitous freetype library is used to render fonts.
43966  #
43967
43968# Check whether --with-freetype was given.
43969if test "${with_freetype+set}" = set; then :
43970  withval=$with_freetype;
43971fi
43972
43973
43974# Check whether --with-freetype-include was given.
43975if test "${with_freetype_include+set}" = set; then :
43976  withval=$with_freetype_include;
43977fi
43978
43979
43980# Check whether --with-freetype-lib was given.
43981if test "${with_freetype_lib+set}" = set; then :
43982  withval=$with_freetype_lib;
43983fi
43984
43985  # Check whether --enable-freetype-bundling was given.
43986if test "${enable_freetype_bundling+set}" = set; then :
43987  enableval=$enable_freetype_bundling;
43988fi
43989
43990
43991  FREETYPE_CFLAGS=
43992  FREETYPE_LIBS=
43993  FREETYPE_BUNDLE_LIB_PATH=
43994
43995  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43996    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43997      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43998$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43999    fi
44000    if test "x$enable_freetype_bundling" != x; then
44001      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44002$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44003    fi
44004  else
44005    # freetype is needed to build; go get it!
44006
44007    BUNDLE_FREETYPE="$enable_freetype_bundling"
44008
44009    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44010      # User has specified settings
44011
44012      if test "x$BUNDLE_FREETYPE" = x; then
44013        # If not specified, default is to bundle freetype
44014        BUNDLE_FREETYPE=yes
44015      fi
44016
44017      if test "x$with_freetype" != x; then
44018        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44019        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44020      fi
44021
44022      # Allow --with-freetype-lib and --with-freetype-include to override
44023      if test "x$with_freetype_include" != x; then
44024        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44025      fi
44026      if test "x$with_freetype_lib" != x; then
44027        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44028      fi
44029
44030      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44031        # Okay, we got it. Check that it works.
44032
44033  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44034  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44035  METHOD="--with-freetype"
44036
44037  # First check if the files exists.
44038  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44039    # We found an arbitrary include file. That's a good sign.
44040    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44041$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44042    FOUND_FREETYPE=yes
44043
44044    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44045    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44046      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44047$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44048      FOUND_FREETYPE=no
44049    else
44050      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44051        # On Windows, we will need both .lib and .dll file.
44052        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44053          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44054$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44055          FOUND_FREETYPE=no
44056        fi
44057      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44058          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44059        # Found lib in isa dir, use that instead.
44060        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44061      fi
44062    fi
44063  fi
44064
44065  if test "x$FOUND_FREETYPE" = xyes; then
44066
44067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44068
44069  # Input might be given as Windows format, start by converting to
44070  # unix format.
44071  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44072  new_path=`$CYGPATH -u "$path"`
44073
44074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44077  # "foo.exe" is OK but "foo" is an error.
44078  #
44079  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44080  # It is also a way to make sure we got the proper file name for the real test later on.
44081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44082  if test "x$test_shortpath" = x; then
44083    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44084$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44085    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44086  fi
44087
44088  # Call helper function which possibly converts this using DOS-style short mode.
44089  # If so, the updated path is stored in $new_path.
44090
44091  input_path="$new_path"
44092  # Check if we need to convert this using DOS-style short mode. If the path
44093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44094  # take no chances and rewrite it.
44095  # Note: m4 eats our [], so we need to use [ and ] instead.
44096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44097  if test "x$has_forbidden_chars" != x; then
44098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44102      # Going to short mode and back again did indeed matter. Since short mode is
44103      # case insensitive, let's make it lowercase to improve readability.
44104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44105      # Now convert it back to Unix-stile (cygpath)
44106      input_path=`$CYGPATH -u "$shortmode_path"`
44107      new_path="$input_path"
44108    fi
44109  fi
44110
44111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44112  if test "x$test_cygdrive_prefix" = x; then
44113    # As a simple fix, exclude /usr/bin since it's not a real path.
44114    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44116      # a path prefixed by /cygdrive for fixpath to work.
44117      new_path="$CYGWIN_ROOT_PATH$input_path"
44118    fi
44119  fi
44120
44121
44122  if test "x$path" != "x$new_path"; then
44123    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44125$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44126  fi
44127
44128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44129
44130  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44131  has_colon=`$ECHO $path | $GREP ^.:`
44132  new_path="$path"
44133  if test "x$has_colon" = x; then
44134    # Not in mixed or Windows style, start by that.
44135    new_path=`cmd //c echo $path`
44136  fi
44137
44138
44139  input_path="$new_path"
44140  # Check if we need to convert this using DOS-style short mode. If the path
44141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44142  # take no chances and rewrite it.
44143  # Note: m4 eats our [], so we need to use [ and ] instead.
44144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44145  if test "x$has_forbidden_chars" != x; then
44146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44147    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44148  fi
44149
44150
44151  windows_path="$new_path"
44152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44153    unix_path=`$CYGPATH -u "$windows_path"`
44154    new_path="$unix_path"
44155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44157    new_path="$unix_path"
44158  fi
44159
44160  if test "x$path" != "x$new_path"; then
44161    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44163$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44164  fi
44165
44166  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44167  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44168
44169  else
44170    # We're on a posix platform. Hooray! :)
44171    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44172    has_space=`$ECHO "$path" | $GREP " "`
44173    if test "x$has_space" != x; then
44174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44175$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44176      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44177    fi
44178
44179    # Use eval to expand a potential ~
44180    eval path="$path"
44181    if test ! -f "$path" && test ! -d "$path"; then
44182      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44183    fi
44184
44185    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44186  fi
44187
44188
44189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44190
44191  # Input might be given as Windows format, start by converting to
44192  # unix format.
44193  path="$POTENTIAL_FREETYPE_LIB_PATH"
44194  new_path=`$CYGPATH -u "$path"`
44195
44196  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44197  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44198  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44199  # "foo.exe" is OK but "foo" is an error.
44200  #
44201  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44202  # It is also a way to make sure we got the proper file name for the real test later on.
44203  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44204  if test "x$test_shortpath" = x; then
44205    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44206$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44207    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44208  fi
44209
44210  # Call helper function which possibly converts this using DOS-style short mode.
44211  # If so, the updated path is stored in $new_path.
44212
44213  input_path="$new_path"
44214  # Check if we need to convert this using DOS-style short mode. If the path
44215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44216  # take no chances and rewrite it.
44217  # Note: m4 eats our [], so we need to use [ and ] instead.
44218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44219  if test "x$has_forbidden_chars" != x; then
44220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44221    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44222    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44223    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44224      # Going to short mode and back again did indeed matter. Since short mode is
44225      # case insensitive, let's make it lowercase to improve readability.
44226      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44227      # Now convert it back to Unix-stile (cygpath)
44228      input_path=`$CYGPATH -u "$shortmode_path"`
44229      new_path="$input_path"
44230    fi
44231  fi
44232
44233  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44234  if test "x$test_cygdrive_prefix" = x; then
44235    # As a simple fix, exclude /usr/bin since it's not a real path.
44236    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44237      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44238      # a path prefixed by /cygdrive for fixpath to work.
44239      new_path="$CYGWIN_ROOT_PATH$input_path"
44240    fi
44241  fi
44242
44243
44244  if test "x$path" != "x$new_path"; then
44245    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44247$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44248  fi
44249
44250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44251
44252  path="$POTENTIAL_FREETYPE_LIB_PATH"
44253  has_colon=`$ECHO $path | $GREP ^.:`
44254  new_path="$path"
44255  if test "x$has_colon" = x; then
44256    # Not in mixed or Windows style, start by that.
44257    new_path=`cmd //c echo $path`
44258  fi
44259
44260
44261  input_path="$new_path"
44262  # Check if we need to convert this using DOS-style short mode. If the path
44263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44264  # take no chances and rewrite it.
44265  # Note: m4 eats our [], so we need to use [ and ] instead.
44266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44267  if test "x$has_forbidden_chars" != x; then
44268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44270  fi
44271
44272
44273  windows_path="$new_path"
44274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44275    unix_path=`$CYGPATH -u "$windows_path"`
44276    new_path="$unix_path"
44277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44279    new_path="$unix_path"
44280  fi
44281
44282  if test "x$path" != "x$new_path"; then
44283    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44285$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44286  fi
44287
44288  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44289  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44290
44291  else
44292    # We're on a posix platform. Hooray! :)
44293    path="$POTENTIAL_FREETYPE_LIB_PATH"
44294    has_space=`$ECHO "$path" | $GREP " "`
44295    if test "x$has_space" != x; then
44296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44297$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44298      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44299    fi
44300
44301    # Use eval to expand a potential ~
44302    eval path="$path"
44303    if test ! -f "$path" && test ! -d "$path"; then
44304      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44305    fi
44306
44307    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44308  fi
44309
44310
44311    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44313$as_echo_n "checking for freetype includes... " >&6; }
44314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44315$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44316    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44318$as_echo_n "checking for freetype libraries... " >&6; }
44319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44320$as_echo "$FREETYPE_LIB_PATH" >&6; }
44321  fi
44322
44323        if test "x$FOUND_FREETYPE" != xyes; then
44324          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44325        fi
44326      else
44327        # User specified only one of lib or include. This is an error.
44328        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44329          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44330$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44331          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44332        else
44333          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44334$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44335          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44336        fi
44337      fi
44338    else
44339      # User did not specify settings, but we need freetype. Try to locate it.
44340
44341      if test "x$BUNDLE_FREETYPE" = x; then
44342        # If not specified, default is to bundle freetype only on windows
44343        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44344          BUNDLE_FREETYPE=yes
44345        else
44346          BUNDLE_FREETYPE=no
44347        fi
44348      fi
44349
44350      if test "x$FOUND_FREETYPE" != xyes; then
44351        # Check builddeps
44352
44353
44354  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44355    # Source the builddeps file again, to make sure it uses the latest variables!
44356    . $builddepsfile
44357    # Look for a target and build machine specific resource!
44358    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44359    if test "x$resource" = x; then
44360      # Ok, lets instead look for a target specific resource
44361      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44362    fi
44363    if test "x$resource" = x; then
44364      # Ok, lets instead look for a build specific resource
44365      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44366    fi
44367    if test "x$resource" = x; then
44368      # Ok, lets instead look for a generic resource
44369      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44370      resource=${builddep_freetype2}
44371    fi
44372    if test "x$resource" != x; then
44373      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44374$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44375      # If the resource in the builddeps.conf file is an existing directory,
44376      # for example /java/linux/cups
44377      if test -d ${resource}; then
44378        depdir=${resource}
44379      else
44380
44381  # freetype2 is for example mymodule
44382  # $resource is for example libs/general/libmymod_1_2_3.zip
44383  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44384  # $with_builddeps_dir is for example /localhome/builddeps
44385  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44386  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44387  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44388  filename=`basename $resource`
44389  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44390  filebase=${filename%%.*}
44391  extension=${filename#*.}
44392  installdir=$with_builddeps_dir/$filebase
44393  if test ! -f $installdir/$filename.unpacked; then
44394    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44395$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44396    if test ! -d $installdir; then
44397      mkdir -p $installdir
44398    fi
44399    if test ! -d $installdir; then
44400      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44401    fi
44402    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44403    touch $tmpfile
44404    if test ! -f $tmpfile; then
44405      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44406    fi
44407
44408  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44409  # $tmpfile is the local file name for the downloaded file.
44410  VALID_TOOL=no
44411  if test "x$BDEPS_FTP" = xwget; then
44412    VALID_TOOL=yes
44413    wget -O $tmpfile $with_builddeps_server/$resource
44414  fi
44415  if test "x$BDEPS_FTP" = xlftp; then
44416    VALID_TOOL=yes
44417    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44418  fi
44419  if test "x$BDEPS_FTP" = xftp; then
44420    VALID_TOOL=yes
44421    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44422    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44423    FTPUSERPWD=${FTPSERVER%%@*}
44424    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44425      FTPUSER=${userpwd%%:*}
44426      FTPPWD=${userpwd#*@}
44427      FTPSERVER=${FTPSERVER#*@}
44428    else
44429      FTPUSER=ftp
44430      FTPPWD=ftp
44431    fi
44432    # the "pass" command does not work on some
44433    # ftp clients (read ftp.exe) but if it works,
44434    # passive mode is better!
44435    ( \
44436        echo "user $FTPUSER $FTPPWD"        ; \
44437        echo "pass"                         ; \
44438        echo "bin"                          ; \
44439        echo "get $FTPPATH $tmpfile"              ; \
44440    ) | ftp -in $FTPSERVER
44441  fi
44442  if test "x$VALID_TOOL" != xyes; then
44443    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44444  fi
44445
44446    mv $tmpfile $installdir/$filename
44447    if test ! -s $installdir/$filename; then
44448      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44449    fi
44450    case "$extension" in
44451      zip)  echo "Unzipping $installdir/$filename..."
44452        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44453        ;;
44454      tar.gz) echo "Untaring $installdir/$filename..."
44455        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44456        ;;
44457      tgz) echo "Untaring $installdir/$filename..."
44458        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44459        ;;
44460      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44461        ;;
44462    esac
44463  fi
44464  if test -f $installdir/$filename.unpacked; then
44465    depdir=$installdir
44466  fi
44467
44468      fi
44469      # Source the builddeps file again, because in the previous command, the depdir
44470      # was updated to point at the current build dependency install directory.
44471      . $builddepsfile
44472      # Now extract variables from the builddeps.conf files.
44473      theroot=${builddep_freetype2_ROOT}
44474      thecflags=${builddep_freetype2_CFLAGS}
44475      thelibs=${builddep_freetype2_LIBS}
44476      if test "x$depdir" = x; then
44477        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
44478      fi
44479      FREETYPE=$depdir
44480      if test "x$theroot" != x; then
44481        FREETYPE="$theroot"
44482      fi
44483      if test "x$thecflags" != x; then
44484        FREETYPE_CFLAGS="$thecflags"
44485      fi
44486      if test "x$thelibs" != x; then
44487        FREETYPE_LIBS="$thelibs"
44488      fi
44489      FOUND_FREETYPE=yes
44490      else FOUND_FREETYPE=no
44491
44492    fi
44493    else FOUND_FREETYPE=no
44494
44495  fi
44496
44497        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44498        if test "x$FOUND_FREETYPE" = xyes; then
44499          if test "x$BUNDLE_FREETYPE" = xyes; then
44500            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
44501$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
44502            FOUND_FREETYPE=no
44503          else
44504            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44505$as_echo_n "checking for freetype... " >&6; }
44506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
44507$as_echo "yes (using builddeps)" >&6; }
44508          fi
44509        fi
44510      fi
44511
44512      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
44513      if test "x$SYSROOT" = x; then
44514        if test "x$FOUND_FREETYPE" != xyes; then
44515          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
44516          if test "x$PKG_CONFIG" != x; then
44517
44518pkg_failed=no
44519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
44520$as_echo_n "checking for FREETYPE... " >&6; }
44521
44522if test -n "$FREETYPE_CFLAGS"; then
44523    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
44524 elif test -n "$PKG_CONFIG"; then
44525    if test -n "$PKG_CONFIG" && \
44526    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44527  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44528  ac_status=$?
44529  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44530  test $ac_status = 0; }; then
44531  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
44532else
44533  pkg_failed=yes
44534fi
44535 else
44536    pkg_failed=untried
44537fi
44538if test -n "$FREETYPE_LIBS"; then
44539    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
44540 elif test -n "$PKG_CONFIG"; then
44541    if test -n "$PKG_CONFIG" && \
44542    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44543  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44544  ac_status=$?
44545  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44546  test $ac_status = 0; }; then
44547  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
44548else
44549  pkg_failed=yes
44550fi
44551 else
44552    pkg_failed=untried
44553fi
44554
44555
44556
44557if test $pkg_failed = yes; then
44558
44559if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44560        _pkg_short_errors_supported=yes
44561else
44562        _pkg_short_errors_supported=no
44563fi
44564        if test $_pkg_short_errors_supported = yes; then
44565	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44566        else
44567	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44568        fi
44569	# Put the nasty error message in config.log where it belongs
44570	echo "$FREETYPE_PKG_ERRORS" >&5
44571
44572	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44573$as_echo "no" >&6; }
44574                FOUND_FREETYPE=no
44575elif test $pkg_failed = untried; then
44576	FOUND_FREETYPE=no
44577else
44578	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44579	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44581$as_echo "yes" >&6; }
44582	FOUND_FREETYPE=yes
44583fi
44584            if test "x$FOUND_FREETYPE" = xyes; then
44585              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44586              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44587              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44588              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44589                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44590              fi
44591              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44592              if test "x$BUNDLE_FREETYPE" = xyes; then
44593                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44594$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44595                FOUND_FREETYPE=no
44596              else
44597                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44598$as_echo_n "checking for freetype... " >&6; }
44599                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44600$as_echo "yes (using pkg-config)" >&6; }
44601              fi
44602            fi
44603          fi
44604        fi
44605      fi
44606
44607      if test "x$FOUND_FREETYPE" != xyes; then
44608        # Check in well-known locations
44609        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44610          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44611
44612  windows_path="$FREETYPE_BASE_DIR"
44613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44614    unix_path=`$CYGPATH -u "$windows_path"`
44615    FREETYPE_BASE_DIR="$unix_path"
44616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44618    FREETYPE_BASE_DIR="$unix_path"
44619  fi
44620
44621
44622  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44623  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44624  METHOD="well-known location"
44625
44626  # First check if the files exists.
44627  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44628    # We found an arbitrary include file. That's a good sign.
44629    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44630$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44631    FOUND_FREETYPE=yes
44632
44633    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44634    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44635      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44636$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44637      FOUND_FREETYPE=no
44638    else
44639      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44640        # On Windows, we will need both .lib and .dll file.
44641        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44642          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44643$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44644          FOUND_FREETYPE=no
44645        fi
44646      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44647          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44648        # Found lib in isa dir, use that instead.
44649        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44650      fi
44651    fi
44652  fi
44653
44654  if test "x$FOUND_FREETYPE" = xyes; then
44655
44656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44657
44658  # Input might be given as Windows format, start by converting to
44659  # unix format.
44660  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44661  new_path=`$CYGPATH -u "$path"`
44662
44663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44666  # "foo.exe" is OK but "foo" is an error.
44667  #
44668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44669  # It is also a way to make sure we got the proper file name for the real test later on.
44670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44671  if test "x$test_shortpath" = x; then
44672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44673$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44674    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44675  fi
44676
44677  # Call helper function which possibly converts this using DOS-style short mode.
44678  # If so, the updated path is stored in $new_path.
44679
44680  input_path="$new_path"
44681  # Check if we need to convert this using DOS-style short mode. If the path
44682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44683  # take no chances and rewrite it.
44684  # Note: m4 eats our [], so we need to use [ and ] instead.
44685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44686  if test "x$has_forbidden_chars" != x; then
44687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44691      # Going to short mode and back again did indeed matter. Since short mode is
44692      # case insensitive, let's make it lowercase to improve readability.
44693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44694      # Now convert it back to Unix-stile (cygpath)
44695      input_path=`$CYGPATH -u "$shortmode_path"`
44696      new_path="$input_path"
44697    fi
44698  fi
44699
44700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44701  if test "x$test_cygdrive_prefix" = x; then
44702    # As a simple fix, exclude /usr/bin since it's not a real path.
44703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44705      # a path prefixed by /cygdrive for fixpath to work.
44706      new_path="$CYGWIN_ROOT_PATH$input_path"
44707    fi
44708  fi
44709
44710
44711  if test "x$path" != "x$new_path"; then
44712    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44714$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44715  fi
44716
44717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44718
44719  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44720  has_colon=`$ECHO $path | $GREP ^.:`
44721  new_path="$path"
44722  if test "x$has_colon" = x; then
44723    # Not in mixed or Windows style, start by that.
44724    new_path=`cmd //c echo $path`
44725  fi
44726
44727
44728  input_path="$new_path"
44729  # Check if we need to convert this using DOS-style short mode. If the path
44730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44731  # take no chances and rewrite it.
44732  # Note: m4 eats our [], so we need to use [ and ] instead.
44733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44734  if test "x$has_forbidden_chars" != x; then
44735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44737  fi
44738
44739
44740  windows_path="$new_path"
44741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44742    unix_path=`$CYGPATH -u "$windows_path"`
44743    new_path="$unix_path"
44744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44746    new_path="$unix_path"
44747  fi
44748
44749  if test "x$path" != "x$new_path"; then
44750    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44752$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44753  fi
44754
44755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44757
44758  else
44759    # We're on a posix platform. Hooray! :)
44760    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44761    has_space=`$ECHO "$path" | $GREP " "`
44762    if test "x$has_space" != x; then
44763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44764$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44765      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44766    fi
44767
44768    # Use eval to expand a potential ~
44769    eval path="$path"
44770    if test ! -f "$path" && test ! -d "$path"; then
44771      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44772    fi
44773
44774    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44775  fi
44776
44777
44778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44779
44780  # Input might be given as Windows format, start by converting to
44781  # unix format.
44782  path="$POTENTIAL_FREETYPE_LIB_PATH"
44783  new_path=`$CYGPATH -u "$path"`
44784
44785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44788  # "foo.exe" is OK but "foo" is an error.
44789  #
44790  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44791  # It is also a way to make sure we got the proper file name for the real test later on.
44792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44793  if test "x$test_shortpath" = x; then
44794    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44795$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44796    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44797  fi
44798
44799  # Call helper function which possibly converts this using DOS-style short mode.
44800  # If so, the updated path is stored in $new_path.
44801
44802  input_path="$new_path"
44803  # Check if we need to convert this using DOS-style short mode. If the path
44804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44805  # take no chances and rewrite it.
44806  # Note: m4 eats our [], so we need to use [ and ] instead.
44807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44808  if test "x$has_forbidden_chars" != x; then
44809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44810    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44811    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44812    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44813      # Going to short mode and back again did indeed matter. Since short mode is
44814      # case insensitive, let's make it lowercase to improve readability.
44815      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44816      # Now convert it back to Unix-stile (cygpath)
44817      input_path=`$CYGPATH -u "$shortmode_path"`
44818      new_path="$input_path"
44819    fi
44820  fi
44821
44822  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44823  if test "x$test_cygdrive_prefix" = x; then
44824    # As a simple fix, exclude /usr/bin since it's not a real path.
44825    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44826      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44827      # a path prefixed by /cygdrive for fixpath to work.
44828      new_path="$CYGWIN_ROOT_PATH$input_path"
44829    fi
44830  fi
44831
44832
44833  if test "x$path" != "x$new_path"; then
44834    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44836$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44837  fi
44838
44839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44840
44841  path="$POTENTIAL_FREETYPE_LIB_PATH"
44842  has_colon=`$ECHO $path | $GREP ^.:`
44843  new_path="$path"
44844  if test "x$has_colon" = x; then
44845    # Not in mixed or Windows style, start by that.
44846    new_path=`cmd //c echo $path`
44847  fi
44848
44849
44850  input_path="$new_path"
44851  # Check if we need to convert this using DOS-style short mode. If the path
44852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44853  # take no chances and rewrite it.
44854  # Note: m4 eats our [], so we need to use [ and ] instead.
44855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44856  if test "x$has_forbidden_chars" != x; then
44857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44859  fi
44860
44861
44862  windows_path="$new_path"
44863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44864    unix_path=`$CYGPATH -u "$windows_path"`
44865    new_path="$unix_path"
44866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44868    new_path="$unix_path"
44869  fi
44870
44871  if test "x$path" != "x$new_path"; then
44872    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44874$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44875  fi
44876
44877  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44878  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44879
44880  else
44881    # We're on a posix platform. Hooray! :)
44882    path="$POTENTIAL_FREETYPE_LIB_PATH"
44883    has_space=`$ECHO "$path" | $GREP " "`
44884    if test "x$has_space" != x; then
44885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44886$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44887      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44888    fi
44889
44890    # Use eval to expand a potential ~
44891    eval path="$path"
44892    if test ! -f "$path" && test ! -d "$path"; then
44893      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44894    fi
44895
44896    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44897  fi
44898
44899
44900    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44901    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44902$as_echo_n "checking for freetype includes... " >&6; }
44903    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44904$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44905    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44906    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44907$as_echo_n "checking for freetype libraries... " >&6; }
44908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44909$as_echo "$FREETYPE_LIB_PATH" >&6; }
44910  fi
44911
44912          if test "x$FOUND_FREETYPE" != xyes; then
44913            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44914
44915  windows_path="$FREETYPE_BASE_DIR"
44916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44917    unix_path=`$CYGPATH -u "$windows_path"`
44918    FREETYPE_BASE_DIR="$unix_path"
44919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44921    FREETYPE_BASE_DIR="$unix_path"
44922  fi
44923
44924
44925  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44926  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44927  METHOD="well-known location"
44928
44929  # First check if the files exists.
44930  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44931    # We found an arbitrary include file. That's a good sign.
44932    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44933$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44934    FOUND_FREETYPE=yes
44935
44936    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44937    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44938      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44939$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44940      FOUND_FREETYPE=no
44941    else
44942      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44943        # On Windows, we will need both .lib and .dll file.
44944        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44945          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44946$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44947          FOUND_FREETYPE=no
44948        fi
44949      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44950          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44951        # Found lib in isa dir, use that instead.
44952        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44953      fi
44954    fi
44955  fi
44956
44957  if test "x$FOUND_FREETYPE" = xyes; then
44958
44959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44960
44961  # Input might be given as Windows format, start by converting to
44962  # unix format.
44963  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44964  new_path=`$CYGPATH -u "$path"`
44965
44966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44969  # "foo.exe" is OK but "foo" is an error.
44970  #
44971  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44972  # It is also a way to make sure we got the proper file name for the real test later on.
44973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44974  if test "x$test_shortpath" = x; then
44975    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44976$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44977    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44978  fi
44979
44980  # Call helper function which possibly converts this using DOS-style short mode.
44981  # If so, the updated path is stored in $new_path.
44982
44983  input_path="$new_path"
44984  # Check if we need to convert this using DOS-style short mode. If the path
44985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44986  # take no chances and rewrite it.
44987  # Note: m4 eats our [], so we need to use [ and ] instead.
44988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44989  if test "x$has_forbidden_chars" != x; then
44990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44994      # Going to short mode and back again did indeed matter. Since short mode is
44995      # case insensitive, let's make it lowercase to improve readability.
44996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44997      # Now convert it back to Unix-stile (cygpath)
44998      input_path=`$CYGPATH -u "$shortmode_path"`
44999      new_path="$input_path"
45000    fi
45001  fi
45002
45003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45004  if test "x$test_cygdrive_prefix" = x; then
45005    # As a simple fix, exclude /usr/bin since it's not a real path.
45006    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45008      # a path prefixed by /cygdrive for fixpath to work.
45009      new_path="$CYGWIN_ROOT_PATH$input_path"
45010    fi
45011  fi
45012
45013
45014  if test "x$path" != "x$new_path"; then
45015    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45017$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45018  fi
45019
45020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45021
45022  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45023  has_colon=`$ECHO $path | $GREP ^.:`
45024  new_path="$path"
45025  if test "x$has_colon" = x; then
45026    # Not in mixed or Windows style, start by that.
45027    new_path=`cmd //c echo $path`
45028  fi
45029
45030
45031  input_path="$new_path"
45032  # Check if we need to convert this using DOS-style short mode. If the path
45033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45034  # take no chances and rewrite it.
45035  # Note: m4 eats our [], so we need to use [ and ] instead.
45036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45037  if test "x$has_forbidden_chars" != x; then
45038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45040  fi
45041
45042
45043  windows_path="$new_path"
45044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45045    unix_path=`$CYGPATH -u "$windows_path"`
45046    new_path="$unix_path"
45047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45049    new_path="$unix_path"
45050  fi
45051
45052  if test "x$path" != "x$new_path"; then
45053    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45055$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45056  fi
45057
45058  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45059  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45060
45061  else
45062    # We're on a posix platform. Hooray! :)
45063    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45064    has_space=`$ECHO "$path" | $GREP " "`
45065    if test "x$has_space" != x; then
45066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45067$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45068      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45069    fi
45070
45071    # Use eval to expand a potential ~
45072    eval path="$path"
45073    if test ! -f "$path" && test ! -d "$path"; then
45074      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45075    fi
45076
45077    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45078  fi
45079
45080
45081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45082
45083  # Input might be given as Windows format, start by converting to
45084  # unix format.
45085  path="$POTENTIAL_FREETYPE_LIB_PATH"
45086  new_path=`$CYGPATH -u "$path"`
45087
45088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45091  # "foo.exe" is OK but "foo" is an error.
45092  #
45093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45094  # It is also a way to make sure we got the proper file name for the real test later on.
45095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45096  if test "x$test_shortpath" = x; then
45097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45098$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45099    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45100  fi
45101
45102  # Call helper function which possibly converts this using DOS-style short mode.
45103  # If so, the updated path is stored in $new_path.
45104
45105  input_path="$new_path"
45106  # Check if we need to convert this using DOS-style short mode. If the path
45107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45108  # take no chances and rewrite it.
45109  # Note: m4 eats our [], so we need to use [ and ] instead.
45110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45111  if test "x$has_forbidden_chars" != x; then
45112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45116      # Going to short mode and back again did indeed matter. Since short mode is
45117      # case insensitive, let's make it lowercase to improve readability.
45118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45119      # Now convert it back to Unix-stile (cygpath)
45120      input_path=`$CYGPATH -u "$shortmode_path"`
45121      new_path="$input_path"
45122    fi
45123  fi
45124
45125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45126  if test "x$test_cygdrive_prefix" = x; then
45127    # As a simple fix, exclude /usr/bin since it's not a real path.
45128    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45130      # a path prefixed by /cygdrive for fixpath to work.
45131      new_path="$CYGWIN_ROOT_PATH$input_path"
45132    fi
45133  fi
45134
45135
45136  if test "x$path" != "x$new_path"; then
45137    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45139$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45140  fi
45141
45142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45143
45144  path="$POTENTIAL_FREETYPE_LIB_PATH"
45145  has_colon=`$ECHO $path | $GREP ^.:`
45146  new_path="$path"
45147  if test "x$has_colon" = x; then
45148    # Not in mixed or Windows style, start by that.
45149    new_path=`cmd //c echo $path`
45150  fi
45151
45152
45153  input_path="$new_path"
45154  # Check if we need to convert this using DOS-style short mode. If the path
45155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45156  # take no chances and rewrite it.
45157  # Note: m4 eats our [], so we need to use [ and ] instead.
45158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45159  if test "x$has_forbidden_chars" != x; then
45160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45162  fi
45163
45164
45165  windows_path="$new_path"
45166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45167    unix_path=`$CYGPATH -u "$windows_path"`
45168    new_path="$unix_path"
45169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45171    new_path="$unix_path"
45172  fi
45173
45174  if test "x$path" != "x$new_path"; then
45175    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45177$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45178  fi
45179
45180  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45181  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45182
45183  else
45184    # We're on a posix platform. Hooray! :)
45185    path="$POTENTIAL_FREETYPE_LIB_PATH"
45186    has_space=`$ECHO "$path" | $GREP " "`
45187    if test "x$has_space" != x; then
45188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45189$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45190      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45191    fi
45192
45193    # Use eval to expand a potential ~
45194    eval path="$path"
45195    if test ! -f "$path" && test ! -d "$path"; then
45196      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45197    fi
45198
45199    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45200  fi
45201
45202
45203    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45204    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45205$as_echo_n "checking for freetype includes... " >&6; }
45206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45207$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45208    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45209    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45210$as_echo_n "checking for freetype libraries... " >&6; }
45211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45212$as_echo "$FREETYPE_LIB_PATH" >&6; }
45213  fi
45214
45215          fi
45216        else
45217          FREETYPE_BASE_DIR="$SYSROOT/usr"
45218
45219  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45220  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45221  METHOD="well-known location"
45222
45223  # First check if the files exists.
45224  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45225    # We found an arbitrary include file. That's a good sign.
45226    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45227$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45228    FOUND_FREETYPE=yes
45229
45230    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45231    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45232      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45233$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45234      FOUND_FREETYPE=no
45235    else
45236      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45237        # On Windows, we will need both .lib and .dll file.
45238        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45239          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45240$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45241          FOUND_FREETYPE=no
45242        fi
45243      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45244          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45245        # Found lib in isa dir, use that instead.
45246        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45247      fi
45248    fi
45249  fi
45250
45251  if test "x$FOUND_FREETYPE" = xyes; then
45252
45253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45254
45255  # Input might be given as Windows format, start by converting to
45256  # unix format.
45257  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45258  new_path=`$CYGPATH -u "$path"`
45259
45260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45263  # "foo.exe" is OK but "foo" is an error.
45264  #
45265  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45266  # It is also a way to make sure we got the proper file name for the real test later on.
45267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45268  if test "x$test_shortpath" = x; then
45269    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45270$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45271    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45272  fi
45273
45274  # Call helper function which possibly converts this using DOS-style short mode.
45275  # If so, the updated path is stored in $new_path.
45276
45277  input_path="$new_path"
45278  # Check if we need to convert this using DOS-style short mode. If the path
45279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45280  # take no chances and rewrite it.
45281  # Note: m4 eats our [], so we need to use [ and ] instead.
45282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45283  if test "x$has_forbidden_chars" != x; then
45284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45288      # Going to short mode and back again did indeed matter. Since short mode is
45289      # case insensitive, let's make it lowercase to improve readability.
45290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45291      # Now convert it back to Unix-stile (cygpath)
45292      input_path=`$CYGPATH -u "$shortmode_path"`
45293      new_path="$input_path"
45294    fi
45295  fi
45296
45297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45298  if test "x$test_cygdrive_prefix" = x; then
45299    # As a simple fix, exclude /usr/bin since it's not a real path.
45300    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45302      # a path prefixed by /cygdrive for fixpath to work.
45303      new_path="$CYGWIN_ROOT_PATH$input_path"
45304    fi
45305  fi
45306
45307
45308  if test "x$path" != "x$new_path"; then
45309    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45311$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45312  fi
45313
45314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45315
45316  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45317  has_colon=`$ECHO $path | $GREP ^.:`
45318  new_path="$path"
45319  if test "x$has_colon" = x; then
45320    # Not in mixed or Windows style, start by that.
45321    new_path=`cmd //c echo $path`
45322  fi
45323
45324
45325  input_path="$new_path"
45326  # Check if we need to convert this using DOS-style short mode. If the path
45327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45328  # take no chances and rewrite it.
45329  # Note: m4 eats our [], so we need to use [ and ] instead.
45330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45331  if test "x$has_forbidden_chars" != x; then
45332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45333    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45334  fi
45335
45336
45337  windows_path="$new_path"
45338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45339    unix_path=`$CYGPATH -u "$windows_path"`
45340    new_path="$unix_path"
45341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45343    new_path="$unix_path"
45344  fi
45345
45346  if test "x$path" != "x$new_path"; then
45347    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45349$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45350  fi
45351
45352  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45353  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45354
45355  else
45356    # We're on a posix platform. Hooray! :)
45357    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45358    has_space=`$ECHO "$path" | $GREP " "`
45359    if test "x$has_space" != x; then
45360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45361$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45362      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45363    fi
45364
45365    # Use eval to expand a potential ~
45366    eval path="$path"
45367    if test ! -f "$path" && test ! -d "$path"; then
45368      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45369    fi
45370
45371    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45372  fi
45373
45374
45375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45376
45377  # Input might be given as Windows format, start by converting to
45378  # unix format.
45379  path="$POTENTIAL_FREETYPE_LIB_PATH"
45380  new_path=`$CYGPATH -u "$path"`
45381
45382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45385  # "foo.exe" is OK but "foo" is an error.
45386  #
45387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45388  # It is also a way to make sure we got the proper file name for the real test later on.
45389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45390  if test "x$test_shortpath" = x; then
45391    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45392$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45393    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45394  fi
45395
45396  # Call helper function which possibly converts this using DOS-style short mode.
45397  # If so, the updated path is stored in $new_path.
45398
45399  input_path="$new_path"
45400  # Check if we need to convert this using DOS-style short mode. If the path
45401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45402  # take no chances and rewrite it.
45403  # Note: m4 eats our [], so we need to use [ and ] instead.
45404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45405  if test "x$has_forbidden_chars" != x; then
45406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45410      # Going to short mode and back again did indeed matter. Since short mode is
45411      # case insensitive, let's make it lowercase to improve readability.
45412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45413      # Now convert it back to Unix-stile (cygpath)
45414      input_path=`$CYGPATH -u "$shortmode_path"`
45415      new_path="$input_path"
45416    fi
45417  fi
45418
45419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45420  if test "x$test_cygdrive_prefix" = x; then
45421    # As a simple fix, exclude /usr/bin since it's not a real path.
45422    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45424      # a path prefixed by /cygdrive for fixpath to work.
45425      new_path="$CYGWIN_ROOT_PATH$input_path"
45426    fi
45427  fi
45428
45429
45430  if test "x$path" != "x$new_path"; then
45431    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45433$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45434  fi
45435
45436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45437
45438  path="$POTENTIAL_FREETYPE_LIB_PATH"
45439  has_colon=`$ECHO $path | $GREP ^.:`
45440  new_path="$path"
45441  if test "x$has_colon" = x; then
45442    # Not in mixed or Windows style, start by that.
45443    new_path=`cmd //c echo $path`
45444  fi
45445
45446
45447  input_path="$new_path"
45448  # Check if we need to convert this using DOS-style short mode. If the path
45449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45450  # take no chances and rewrite it.
45451  # Note: m4 eats our [], so we need to use [ and ] instead.
45452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45453  if test "x$has_forbidden_chars" != x; then
45454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45456  fi
45457
45458
45459  windows_path="$new_path"
45460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45461    unix_path=`$CYGPATH -u "$windows_path"`
45462    new_path="$unix_path"
45463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45465    new_path="$unix_path"
45466  fi
45467
45468  if test "x$path" != "x$new_path"; then
45469    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45471$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45472  fi
45473
45474  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45475  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45476
45477  else
45478    # We're on a posix platform. Hooray! :)
45479    path="$POTENTIAL_FREETYPE_LIB_PATH"
45480    has_space=`$ECHO "$path" | $GREP " "`
45481    if test "x$has_space" != x; then
45482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45483$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45484      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45485    fi
45486
45487    # Use eval to expand a potential ~
45488    eval path="$path"
45489    if test ! -f "$path" && test ! -d "$path"; then
45490      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45491    fi
45492
45493    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45494  fi
45495
45496
45497    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45498    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45499$as_echo_n "checking for freetype includes... " >&6; }
45500    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45501$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45502    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45503    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45504$as_echo_n "checking for freetype libraries... " >&6; }
45505    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45506$as_echo "$FREETYPE_LIB_PATH" >&6; }
45507  fi
45508
45509
45510          if test "x$FOUND_FREETYPE" != xyes; then
45511            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
45512
45513  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45514  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45515  METHOD="well-known location"
45516
45517  # First check if the files exists.
45518  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45519    # We found an arbitrary include file. That's a good sign.
45520    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45521$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45522    FOUND_FREETYPE=yes
45523
45524    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45525    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45526      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45527$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45528      FOUND_FREETYPE=no
45529    else
45530      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45531        # On Windows, we will need both .lib and .dll file.
45532        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45533          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45534$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45535          FOUND_FREETYPE=no
45536        fi
45537      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45538          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45539        # Found lib in isa dir, use that instead.
45540        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45541      fi
45542    fi
45543  fi
45544
45545  if test "x$FOUND_FREETYPE" = xyes; then
45546
45547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45548
45549  # Input might be given as Windows format, start by converting to
45550  # unix format.
45551  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45552  new_path=`$CYGPATH -u "$path"`
45553
45554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45557  # "foo.exe" is OK but "foo" is an error.
45558  #
45559  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45560  # It is also a way to make sure we got the proper file name for the real test later on.
45561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45562  if test "x$test_shortpath" = x; then
45563    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45564$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45565    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45566  fi
45567
45568  # Call helper function which possibly converts this using DOS-style short mode.
45569  # If so, the updated path is stored in $new_path.
45570
45571  input_path="$new_path"
45572  # Check if we need to convert this using DOS-style short mode. If the path
45573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45574  # take no chances and rewrite it.
45575  # Note: m4 eats our [], so we need to use [ and ] instead.
45576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45577  if test "x$has_forbidden_chars" != x; then
45578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45582      # Going to short mode and back again did indeed matter. Since short mode is
45583      # case insensitive, let's make it lowercase to improve readability.
45584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45585      # Now convert it back to Unix-stile (cygpath)
45586      input_path=`$CYGPATH -u "$shortmode_path"`
45587      new_path="$input_path"
45588    fi
45589  fi
45590
45591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45592  if test "x$test_cygdrive_prefix" = x; then
45593    # As a simple fix, exclude /usr/bin since it's not a real path.
45594    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45596      # a path prefixed by /cygdrive for fixpath to work.
45597      new_path="$CYGWIN_ROOT_PATH$input_path"
45598    fi
45599  fi
45600
45601
45602  if test "x$path" != "x$new_path"; then
45603    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45605$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45606  fi
45607
45608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45609
45610  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45611  has_colon=`$ECHO $path | $GREP ^.:`
45612  new_path="$path"
45613  if test "x$has_colon" = x; then
45614    # Not in mixed or Windows style, start by that.
45615    new_path=`cmd //c echo $path`
45616  fi
45617
45618
45619  input_path="$new_path"
45620  # Check if we need to convert this using DOS-style short mode. If the path
45621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45622  # take no chances and rewrite it.
45623  # Note: m4 eats our [], so we need to use [ and ] instead.
45624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45625  if test "x$has_forbidden_chars" != x; then
45626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45628  fi
45629
45630
45631  windows_path="$new_path"
45632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45633    unix_path=`$CYGPATH -u "$windows_path"`
45634    new_path="$unix_path"
45635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45637    new_path="$unix_path"
45638  fi
45639
45640  if test "x$path" != "x$new_path"; then
45641    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45643$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45644  fi
45645
45646  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45647  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45648
45649  else
45650    # We're on a posix platform. Hooray! :)
45651    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45652    has_space=`$ECHO "$path" | $GREP " "`
45653    if test "x$has_space" != x; then
45654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45655$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45656      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45657    fi
45658
45659    # Use eval to expand a potential ~
45660    eval path="$path"
45661    if test ! -f "$path" && test ! -d "$path"; then
45662      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45663    fi
45664
45665    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45666  fi
45667
45668
45669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45670
45671  # Input might be given as Windows format, start by converting to
45672  # unix format.
45673  path="$POTENTIAL_FREETYPE_LIB_PATH"
45674  new_path=`$CYGPATH -u "$path"`
45675
45676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45679  # "foo.exe" is OK but "foo" is an error.
45680  #
45681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45682  # It is also a way to make sure we got the proper file name for the real test later on.
45683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45684  if test "x$test_shortpath" = x; then
45685    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45686$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45687    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45688  fi
45689
45690  # Call helper function which possibly converts this using DOS-style short mode.
45691  # If so, the updated path is stored in $new_path.
45692
45693  input_path="$new_path"
45694  # Check if we need to convert this using DOS-style short mode. If the path
45695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45696  # take no chances and rewrite it.
45697  # Note: m4 eats our [], so we need to use [ and ] instead.
45698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45699  if test "x$has_forbidden_chars" != x; then
45700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45704      # Going to short mode and back again did indeed matter. Since short mode is
45705      # case insensitive, let's make it lowercase to improve readability.
45706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45707      # Now convert it back to Unix-stile (cygpath)
45708      input_path=`$CYGPATH -u "$shortmode_path"`
45709      new_path="$input_path"
45710    fi
45711  fi
45712
45713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45714  if test "x$test_cygdrive_prefix" = x; then
45715    # As a simple fix, exclude /usr/bin since it's not a real path.
45716    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45718      # a path prefixed by /cygdrive for fixpath to work.
45719      new_path="$CYGWIN_ROOT_PATH$input_path"
45720    fi
45721  fi
45722
45723
45724  if test "x$path" != "x$new_path"; then
45725    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45727$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45728  fi
45729
45730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45731
45732  path="$POTENTIAL_FREETYPE_LIB_PATH"
45733  has_colon=`$ECHO $path | $GREP ^.:`
45734  new_path="$path"
45735  if test "x$has_colon" = x; then
45736    # Not in mixed or Windows style, start by that.
45737    new_path=`cmd //c echo $path`
45738  fi
45739
45740
45741  input_path="$new_path"
45742  # Check if we need to convert this using DOS-style short mode. If the path
45743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45744  # take no chances and rewrite it.
45745  # Note: m4 eats our [], so we need to use [ and ] instead.
45746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45747  if test "x$has_forbidden_chars" != x; then
45748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45750  fi
45751
45752
45753  windows_path="$new_path"
45754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45755    unix_path=`$CYGPATH -u "$windows_path"`
45756    new_path="$unix_path"
45757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45759    new_path="$unix_path"
45760  fi
45761
45762  if test "x$path" != "x$new_path"; then
45763    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45765$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45766  fi
45767
45768  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45769  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45770
45771  else
45772    # We're on a posix platform. Hooray! :)
45773    path="$POTENTIAL_FREETYPE_LIB_PATH"
45774    has_space=`$ECHO "$path" | $GREP " "`
45775    if test "x$has_space" != x; then
45776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45777$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45778      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45779    fi
45780
45781    # Use eval to expand a potential ~
45782    eval path="$path"
45783    if test ! -f "$path" && test ! -d "$path"; then
45784      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45785    fi
45786
45787    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45788  fi
45789
45790
45791    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45792    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45793$as_echo_n "checking for freetype includes... " >&6; }
45794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45795$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45796    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45797    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45798$as_echo_n "checking for freetype libraries... " >&6; }
45799    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45800$as_echo "$FREETYPE_LIB_PATH" >&6; }
45801  fi
45802
45803          fi
45804
45805          if test "x$FOUND_FREETYPE" != xyes; then
45806            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
45807
45808  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45809  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45810  METHOD="well-known location"
45811
45812  # First check if the files exists.
45813  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45814    # We found an arbitrary include file. That's a good sign.
45815    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45816$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45817    FOUND_FREETYPE=yes
45818
45819    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45820    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45821      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45822$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45823      FOUND_FREETYPE=no
45824    else
45825      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45826        # On Windows, we will need both .lib and .dll file.
45827        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45828          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45829$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45830          FOUND_FREETYPE=no
45831        fi
45832      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45833          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45834        # Found lib in isa dir, use that instead.
45835        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45836      fi
45837    fi
45838  fi
45839
45840  if test "x$FOUND_FREETYPE" = xyes; then
45841
45842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45843
45844  # Input might be given as Windows format, start by converting to
45845  # unix format.
45846  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45847  new_path=`$CYGPATH -u "$path"`
45848
45849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45852  # "foo.exe" is OK but "foo" is an error.
45853  #
45854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45855  # It is also a way to make sure we got the proper file name for the real test later on.
45856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45857  if test "x$test_shortpath" = x; then
45858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45859$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45860    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45861  fi
45862
45863  # Call helper function which possibly converts this using DOS-style short mode.
45864  # If so, the updated path is stored in $new_path.
45865
45866  input_path="$new_path"
45867  # Check if we need to convert this using DOS-style short mode. If the path
45868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45869  # take no chances and rewrite it.
45870  # Note: m4 eats our [], so we need to use [ and ] instead.
45871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45872  if test "x$has_forbidden_chars" != x; then
45873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45877      # Going to short mode and back again did indeed matter. Since short mode is
45878      # case insensitive, let's make it lowercase to improve readability.
45879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45880      # Now convert it back to Unix-stile (cygpath)
45881      input_path=`$CYGPATH -u "$shortmode_path"`
45882      new_path="$input_path"
45883    fi
45884  fi
45885
45886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45887  if test "x$test_cygdrive_prefix" = x; then
45888    # As a simple fix, exclude /usr/bin since it's not a real path.
45889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45891      # a path prefixed by /cygdrive for fixpath to work.
45892      new_path="$CYGWIN_ROOT_PATH$input_path"
45893    fi
45894  fi
45895
45896
45897  if test "x$path" != "x$new_path"; then
45898    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45900$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45901  fi
45902
45903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45904
45905  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45906  has_colon=`$ECHO $path | $GREP ^.:`
45907  new_path="$path"
45908  if test "x$has_colon" = x; then
45909    # Not in mixed or Windows style, start by that.
45910    new_path=`cmd //c echo $path`
45911  fi
45912
45913
45914  input_path="$new_path"
45915  # Check if we need to convert this using DOS-style short mode. If the path
45916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45917  # take no chances and rewrite it.
45918  # Note: m4 eats our [], so we need to use [ and ] instead.
45919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45920  if test "x$has_forbidden_chars" != x; then
45921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45923  fi
45924
45925
45926  windows_path="$new_path"
45927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45928    unix_path=`$CYGPATH -u "$windows_path"`
45929    new_path="$unix_path"
45930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45932    new_path="$unix_path"
45933  fi
45934
45935  if test "x$path" != "x$new_path"; then
45936    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45938$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45939  fi
45940
45941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45943
45944  else
45945    # We're on a posix platform. Hooray! :)
45946    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45947    has_space=`$ECHO "$path" | $GREP " "`
45948    if test "x$has_space" != x; then
45949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45950$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45951      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45952    fi
45953
45954    # Use eval to expand a potential ~
45955    eval path="$path"
45956    if test ! -f "$path" && test ! -d "$path"; then
45957      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45958    fi
45959
45960    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45961  fi
45962
45963
45964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45965
45966  # Input might be given as Windows format, start by converting to
45967  # unix format.
45968  path="$POTENTIAL_FREETYPE_LIB_PATH"
45969  new_path=`$CYGPATH -u "$path"`
45970
45971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45974  # "foo.exe" is OK but "foo" is an error.
45975  #
45976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45977  # It is also a way to make sure we got the proper file name for the real test later on.
45978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45979  if test "x$test_shortpath" = x; then
45980    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45981$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45982    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45983  fi
45984
45985  # Call helper function which possibly converts this using DOS-style short mode.
45986  # If so, the updated path is stored in $new_path.
45987
45988  input_path="$new_path"
45989  # Check if we need to convert this using DOS-style short mode. If the path
45990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45991  # take no chances and rewrite it.
45992  # Note: m4 eats our [], so we need to use [ and ] instead.
45993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45994  if test "x$has_forbidden_chars" != x; then
45995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45999      # Going to short mode and back again did indeed matter. Since short mode is
46000      # case insensitive, let's make it lowercase to improve readability.
46001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46002      # Now convert it back to Unix-stile (cygpath)
46003      input_path=`$CYGPATH -u "$shortmode_path"`
46004      new_path="$input_path"
46005    fi
46006  fi
46007
46008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46009  if test "x$test_cygdrive_prefix" = x; then
46010    # As a simple fix, exclude /usr/bin since it's not a real path.
46011    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46013      # a path prefixed by /cygdrive for fixpath to work.
46014      new_path="$CYGWIN_ROOT_PATH$input_path"
46015    fi
46016  fi
46017
46018
46019  if test "x$path" != "x$new_path"; then
46020    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46022$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46023  fi
46024
46025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46026
46027  path="$POTENTIAL_FREETYPE_LIB_PATH"
46028  has_colon=`$ECHO $path | $GREP ^.:`
46029  new_path="$path"
46030  if test "x$has_colon" = x; then
46031    # Not in mixed or Windows style, start by that.
46032    new_path=`cmd //c echo $path`
46033  fi
46034
46035
46036  input_path="$new_path"
46037  # Check if we need to convert this using DOS-style short mode. If the path
46038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46039  # take no chances and rewrite it.
46040  # Note: m4 eats our [], so we need to use [ and ] instead.
46041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46042  if test "x$has_forbidden_chars" != x; then
46043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46045  fi
46046
46047
46048  windows_path="$new_path"
46049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46050    unix_path=`$CYGPATH -u "$windows_path"`
46051    new_path="$unix_path"
46052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46054    new_path="$unix_path"
46055  fi
46056
46057  if test "x$path" != "x$new_path"; then
46058    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46060$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46061  fi
46062
46063  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46064  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46065
46066  else
46067    # We're on a posix platform. Hooray! :)
46068    path="$POTENTIAL_FREETYPE_LIB_PATH"
46069    has_space=`$ECHO "$path" | $GREP " "`
46070    if test "x$has_space" != x; then
46071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46072$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46073      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46074    fi
46075
46076    # Use eval to expand a potential ~
46077    eval path="$path"
46078    if test ! -f "$path" && test ! -d "$path"; then
46079      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46080    fi
46081
46082    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46083  fi
46084
46085
46086    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46088$as_echo_n "checking for freetype includes... " >&6; }
46089    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46090$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46091    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46093$as_echo_n "checking for freetype libraries... " >&6; }
46094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46095$as_echo "$FREETYPE_LIB_PATH" >&6; }
46096  fi
46097
46098          fi
46099
46100          if test "x$FOUND_FREETYPE" != xyes; then
46101            FREETYPE_BASE_DIR="$SYSROOT/usr"
46102            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46103
46104  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46105  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46106  METHOD="well-known location"
46107
46108  # First check if the files exists.
46109  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46110    # We found an arbitrary include file. That's a good sign.
46111    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46112$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46113    FOUND_FREETYPE=yes
46114
46115    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46116    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46117      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46118$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46119      FOUND_FREETYPE=no
46120    else
46121      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46122        # On Windows, we will need both .lib and .dll file.
46123        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46124          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46125$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46126          FOUND_FREETYPE=no
46127        fi
46128      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46129          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46130        # Found lib in isa dir, use that instead.
46131        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46132      fi
46133    fi
46134  fi
46135
46136  if test "x$FOUND_FREETYPE" = xyes; then
46137
46138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46139
46140  # Input might be given as Windows format, start by converting to
46141  # unix format.
46142  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46143  new_path=`$CYGPATH -u "$path"`
46144
46145  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46146  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46147  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46148  # "foo.exe" is OK but "foo" is an error.
46149  #
46150  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46151  # It is also a way to make sure we got the proper file name for the real test later on.
46152  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46153  if test "x$test_shortpath" = x; then
46154    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46155$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46156    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46157  fi
46158
46159  # Call helper function which possibly converts this using DOS-style short mode.
46160  # If so, the updated path is stored in $new_path.
46161
46162  input_path="$new_path"
46163  # Check if we need to convert this using DOS-style short mode. If the path
46164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46165  # take no chances and rewrite it.
46166  # Note: m4 eats our [], so we need to use [ and ] instead.
46167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46168  if test "x$has_forbidden_chars" != x; then
46169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46170    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46171    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46172    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46173      # Going to short mode and back again did indeed matter. Since short mode is
46174      # case insensitive, let's make it lowercase to improve readability.
46175      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46176      # Now convert it back to Unix-stile (cygpath)
46177      input_path=`$CYGPATH -u "$shortmode_path"`
46178      new_path="$input_path"
46179    fi
46180  fi
46181
46182  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46183  if test "x$test_cygdrive_prefix" = x; then
46184    # As a simple fix, exclude /usr/bin since it's not a real path.
46185    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46186      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46187      # a path prefixed by /cygdrive for fixpath to work.
46188      new_path="$CYGWIN_ROOT_PATH$input_path"
46189    fi
46190  fi
46191
46192
46193  if test "x$path" != "x$new_path"; then
46194    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46196$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46197  fi
46198
46199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46200
46201  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46202  has_colon=`$ECHO $path | $GREP ^.:`
46203  new_path="$path"
46204  if test "x$has_colon" = x; then
46205    # Not in mixed or Windows style, start by that.
46206    new_path=`cmd //c echo $path`
46207  fi
46208
46209
46210  input_path="$new_path"
46211  # Check if we need to convert this using DOS-style short mode. If the path
46212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46213  # take no chances and rewrite it.
46214  # Note: m4 eats our [], so we need to use [ and ] instead.
46215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46216  if test "x$has_forbidden_chars" != x; then
46217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46219  fi
46220
46221
46222  windows_path="$new_path"
46223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46224    unix_path=`$CYGPATH -u "$windows_path"`
46225    new_path="$unix_path"
46226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46228    new_path="$unix_path"
46229  fi
46230
46231  if test "x$path" != "x$new_path"; then
46232    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46234$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46235  fi
46236
46237  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46238  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46239
46240  else
46241    # We're on a posix platform. Hooray! :)
46242    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46243    has_space=`$ECHO "$path" | $GREP " "`
46244    if test "x$has_space" != x; then
46245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46246$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46247      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46248    fi
46249
46250    # Use eval to expand a potential ~
46251    eval path="$path"
46252    if test ! -f "$path" && test ! -d "$path"; then
46253      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46254    fi
46255
46256    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46257  fi
46258
46259
46260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46261
46262  # Input might be given as Windows format, start by converting to
46263  # unix format.
46264  path="$POTENTIAL_FREETYPE_LIB_PATH"
46265  new_path=`$CYGPATH -u "$path"`
46266
46267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46270  # "foo.exe" is OK but "foo" is an error.
46271  #
46272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46273  # It is also a way to make sure we got the proper file name for the real test later on.
46274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46275  if test "x$test_shortpath" = x; then
46276    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46277$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46278    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46279  fi
46280
46281  # Call helper function which possibly converts this using DOS-style short mode.
46282  # If so, the updated path is stored in $new_path.
46283
46284  input_path="$new_path"
46285  # Check if we need to convert this using DOS-style short mode. If the path
46286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46287  # take no chances and rewrite it.
46288  # Note: m4 eats our [], so we need to use [ and ] instead.
46289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46290  if test "x$has_forbidden_chars" != x; then
46291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46295      # Going to short mode and back again did indeed matter. Since short mode is
46296      # case insensitive, let's make it lowercase to improve readability.
46297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46298      # Now convert it back to Unix-stile (cygpath)
46299      input_path=`$CYGPATH -u "$shortmode_path"`
46300      new_path="$input_path"
46301    fi
46302  fi
46303
46304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46305  if test "x$test_cygdrive_prefix" = x; then
46306    # As a simple fix, exclude /usr/bin since it's not a real path.
46307    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46309      # a path prefixed by /cygdrive for fixpath to work.
46310      new_path="$CYGWIN_ROOT_PATH$input_path"
46311    fi
46312  fi
46313
46314
46315  if test "x$path" != "x$new_path"; then
46316    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46318$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46319  fi
46320
46321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46322
46323  path="$POTENTIAL_FREETYPE_LIB_PATH"
46324  has_colon=`$ECHO $path | $GREP ^.:`
46325  new_path="$path"
46326  if test "x$has_colon" = x; then
46327    # Not in mixed or Windows style, start by that.
46328    new_path=`cmd //c echo $path`
46329  fi
46330
46331
46332  input_path="$new_path"
46333  # Check if we need to convert this using DOS-style short mode. If the path
46334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46335  # take no chances and rewrite it.
46336  # Note: m4 eats our [], so we need to use [ and ] instead.
46337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46338  if test "x$has_forbidden_chars" != x; then
46339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46341  fi
46342
46343
46344  windows_path="$new_path"
46345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46346    unix_path=`$CYGPATH -u "$windows_path"`
46347    new_path="$unix_path"
46348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46350    new_path="$unix_path"
46351  fi
46352
46353  if test "x$path" != "x$new_path"; then
46354    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46356$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46357  fi
46358
46359  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46360  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46361
46362  else
46363    # We're on a posix platform. Hooray! :)
46364    path="$POTENTIAL_FREETYPE_LIB_PATH"
46365    has_space=`$ECHO "$path" | $GREP " "`
46366    if test "x$has_space" != x; then
46367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46368$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46369      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46370    fi
46371
46372    # Use eval to expand a potential ~
46373    eval path="$path"
46374    if test ! -f "$path" && test ! -d "$path"; then
46375      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46376    fi
46377
46378    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46379  fi
46380
46381
46382    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46384$as_echo_n "checking for freetype includes... " >&6; }
46385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46386$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46387    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46389$as_echo_n "checking for freetype libraries... " >&6; }
46390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46391$as_echo "$FREETYPE_LIB_PATH" >&6; }
46392  fi
46393
46394            else
46395
46396  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46397  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
46398  METHOD="well-known location"
46399
46400  # First check if the files exists.
46401  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46402    # We found an arbitrary include file. That's a good sign.
46403    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46404$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46405    FOUND_FREETYPE=yes
46406
46407    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46408    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46409      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46410$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46411      FOUND_FREETYPE=no
46412    else
46413      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46414        # On Windows, we will need both .lib and .dll file.
46415        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46416          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46417$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46418          FOUND_FREETYPE=no
46419        fi
46420      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46421          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46422        # Found lib in isa dir, use that instead.
46423        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46424      fi
46425    fi
46426  fi
46427
46428  if test "x$FOUND_FREETYPE" = xyes; then
46429
46430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46431
46432  # Input might be given as Windows format, start by converting to
46433  # unix format.
46434  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46435  new_path=`$CYGPATH -u "$path"`
46436
46437  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46438  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46439  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46440  # "foo.exe" is OK but "foo" is an error.
46441  #
46442  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46443  # It is also a way to make sure we got the proper file name for the real test later on.
46444  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46445  if test "x$test_shortpath" = x; then
46446    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46447$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46448    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46449  fi
46450
46451  # Call helper function which possibly converts this using DOS-style short mode.
46452  # If so, the updated path is stored in $new_path.
46453
46454  input_path="$new_path"
46455  # Check if we need to convert this using DOS-style short mode. If the path
46456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46457  # take no chances and rewrite it.
46458  # Note: m4 eats our [], so we need to use [ and ] instead.
46459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46460  if test "x$has_forbidden_chars" != x; then
46461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46465      # Going to short mode and back again did indeed matter. Since short mode is
46466      # case insensitive, let's make it lowercase to improve readability.
46467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46468      # Now convert it back to Unix-stile (cygpath)
46469      input_path=`$CYGPATH -u "$shortmode_path"`
46470      new_path="$input_path"
46471    fi
46472  fi
46473
46474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46475  if test "x$test_cygdrive_prefix" = x; then
46476    # As a simple fix, exclude /usr/bin since it's not a real path.
46477    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46479      # a path prefixed by /cygdrive for fixpath to work.
46480      new_path="$CYGWIN_ROOT_PATH$input_path"
46481    fi
46482  fi
46483
46484
46485  if test "x$path" != "x$new_path"; then
46486    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46488$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46489  fi
46490
46491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46492
46493  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46494  has_colon=`$ECHO $path | $GREP ^.:`
46495  new_path="$path"
46496  if test "x$has_colon" = x; then
46497    # Not in mixed or Windows style, start by that.
46498    new_path=`cmd //c echo $path`
46499  fi
46500
46501
46502  input_path="$new_path"
46503  # Check if we need to convert this using DOS-style short mode. If the path
46504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46505  # take no chances and rewrite it.
46506  # Note: m4 eats our [], so we need to use [ and ] instead.
46507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46508  if test "x$has_forbidden_chars" != x; then
46509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46511  fi
46512
46513
46514  windows_path="$new_path"
46515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46516    unix_path=`$CYGPATH -u "$windows_path"`
46517    new_path="$unix_path"
46518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46520    new_path="$unix_path"
46521  fi
46522
46523  if test "x$path" != "x$new_path"; then
46524    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46526$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46527  fi
46528
46529  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46530  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46531
46532  else
46533    # We're on a posix platform. Hooray! :)
46534    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46535    has_space=`$ECHO "$path" | $GREP " "`
46536    if test "x$has_space" != x; then
46537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46538$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46539      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46540    fi
46541
46542    # Use eval to expand a potential ~
46543    eval path="$path"
46544    if test ! -f "$path" && test ! -d "$path"; then
46545      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46546    fi
46547
46548    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46549  fi
46550
46551
46552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46553
46554  # Input might be given as Windows format, start by converting to
46555  # unix format.
46556  path="$POTENTIAL_FREETYPE_LIB_PATH"
46557  new_path=`$CYGPATH -u "$path"`
46558
46559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46562  # "foo.exe" is OK but "foo" is an error.
46563  #
46564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46565  # It is also a way to make sure we got the proper file name for the real test later on.
46566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46567  if test "x$test_shortpath" = x; then
46568    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46569$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46570    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46571  fi
46572
46573  # Call helper function which possibly converts this using DOS-style short mode.
46574  # If so, the updated path is stored in $new_path.
46575
46576  input_path="$new_path"
46577  # Check if we need to convert this using DOS-style short mode. If the path
46578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46579  # take no chances and rewrite it.
46580  # Note: m4 eats our [], so we need to use [ and ] instead.
46581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46582  if test "x$has_forbidden_chars" != x; then
46583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46587      # Going to short mode and back again did indeed matter. Since short mode is
46588      # case insensitive, let's make it lowercase to improve readability.
46589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46590      # Now convert it back to Unix-stile (cygpath)
46591      input_path=`$CYGPATH -u "$shortmode_path"`
46592      new_path="$input_path"
46593    fi
46594  fi
46595
46596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46597  if test "x$test_cygdrive_prefix" = x; then
46598    # As a simple fix, exclude /usr/bin since it's not a real path.
46599    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46601      # a path prefixed by /cygdrive for fixpath to work.
46602      new_path="$CYGWIN_ROOT_PATH$input_path"
46603    fi
46604  fi
46605
46606
46607  if test "x$path" != "x$new_path"; then
46608    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46610$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46611  fi
46612
46613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46614
46615  path="$POTENTIAL_FREETYPE_LIB_PATH"
46616  has_colon=`$ECHO $path | $GREP ^.:`
46617  new_path="$path"
46618  if test "x$has_colon" = x; then
46619    # Not in mixed or Windows style, start by that.
46620    new_path=`cmd //c echo $path`
46621  fi
46622
46623
46624  input_path="$new_path"
46625  # Check if we need to convert this using DOS-style short mode. If the path
46626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46627  # take no chances and rewrite it.
46628  # Note: m4 eats our [], so we need to use [ and ] instead.
46629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46630  if test "x$has_forbidden_chars" != x; then
46631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46633  fi
46634
46635
46636  windows_path="$new_path"
46637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46638    unix_path=`$CYGPATH -u "$windows_path"`
46639    new_path="$unix_path"
46640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46642    new_path="$unix_path"
46643  fi
46644
46645  if test "x$path" != "x$new_path"; then
46646    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46648$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46649  fi
46650
46651  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46652  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46653
46654  else
46655    # We're on a posix platform. Hooray! :)
46656    path="$POTENTIAL_FREETYPE_LIB_PATH"
46657    has_space=`$ECHO "$path" | $GREP " "`
46658    if test "x$has_space" != x; then
46659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46660$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46661      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46662    fi
46663
46664    # Use eval to expand a potential ~
46665    eval path="$path"
46666    if test ! -f "$path" && test ! -d "$path"; then
46667      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46668    fi
46669
46670    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46671  fi
46672
46673
46674    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46675    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46676$as_echo_n "checking for freetype includes... " >&6; }
46677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46678$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46679    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46680    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46681$as_echo_n "checking for freetype libraries... " >&6; }
46682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46683$as_echo "$FREETYPE_LIB_PATH" >&6; }
46684  fi
46685
46686              if test "x$FOUND_FREETYPE" != xyes; then
46687
46688  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46689  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46690  METHOD="well-known location"
46691
46692  # First check if the files exists.
46693  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46694    # We found an arbitrary include file. That's a good sign.
46695    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46696$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46697    FOUND_FREETYPE=yes
46698
46699    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46700    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46701      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46702$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46703      FOUND_FREETYPE=no
46704    else
46705      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46706        # On Windows, we will need both .lib and .dll file.
46707        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46708          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46709$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46710          FOUND_FREETYPE=no
46711        fi
46712      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46713          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46714        # Found lib in isa dir, use that instead.
46715        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46716      fi
46717    fi
46718  fi
46719
46720  if test "x$FOUND_FREETYPE" = xyes; then
46721
46722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46723
46724  # Input might be given as Windows format, start by converting to
46725  # unix format.
46726  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46727  new_path=`$CYGPATH -u "$path"`
46728
46729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46732  # "foo.exe" is OK but "foo" is an error.
46733  #
46734  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46735  # It is also a way to make sure we got the proper file name for the real test later on.
46736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46737  if test "x$test_shortpath" = x; then
46738    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46739$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46740    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46741  fi
46742
46743  # Call helper function which possibly converts this using DOS-style short mode.
46744  # If so, the updated path is stored in $new_path.
46745
46746  input_path="$new_path"
46747  # Check if we need to convert this using DOS-style short mode. If the path
46748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46749  # take no chances and rewrite it.
46750  # Note: m4 eats our [], so we need to use [ and ] instead.
46751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46752  if test "x$has_forbidden_chars" != x; then
46753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46754    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46755    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46756    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46757      # Going to short mode and back again did indeed matter. Since short mode is
46758      # case insensitive, let's make it lowercase to improve readability.
46759      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46760      # Now convert it back to Unix-stile (cygpath)
46761      input_path=`$CYGPATH -u "$shortmode_path"`
46762      new_path="$input_path"
46763    fi
46764  fi
46765
46766  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46767  if test "x$test_cygdrive_prefix" = x; then
46768    # As a simple fix, exclude /usr/bin since it's not a real path.
46769    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46770      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46771      # a path prefixed by /cygdrive for fixpath to work.
46772      new_path="$CYGWIN_ROOT_PATH$input_path"
46773    fi
46774  fi
46775
46776
46777  if test "x$path" != "x$new_path"; then
46778    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46779    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46780$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46781  fi
46782
46783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46784
46785  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46786  has_colon=`$ECHO $path | $GREP ^.:`
46787  new_path="$path"
46788  if test "x$has_colon" = x; then
46789    # Not in mixed or Windows style, start by that.
46790    new_path=`cmd //c echo $path`
46791  fi
46792
46793
46794  input_path="$new_path"
46795  # Check if we need to convert this using DOS-style short mode. If the path
46796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46797  # take no chances and rewrite it.
46798  # Note: m4 eats our [], so we need to use [ and ] instead.
46799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46800  if test "x$has_forbidden_chars" != x; then
46801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46802    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46803  fi
46804
46805
46806  windows_path="$new_path"
46807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46808    unix_path=`$CYGPATH -u "$windows_path"`
46809    new_path="$unix_path"
46810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46812    new_path="$unix_path"
46813  fi
46814
46815  if test "x$path" != "x$new_path"; then
46816    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46818$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46819  fi
46820
46821  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46822  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46823
46824  else
46825    # We're on a posix platform. Hooray! :)
46826    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46827    has_space=`$ECHO "$path" | $GREP " "`
46828    if test "x$has_space" != x; then
46829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46830$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46831      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46832    fi
46833
46834    # Use eval to expand a potential ~
46835    eval path="$path"
46836    if test ! -f "$path" && test ! -d "$path"; then
46837      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46838    fi
46839
46840    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46841  fi
46842
46843
46844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46845
46846  # Input might be given as Windows format, start by converting to
46847  # unix format.
46848  path="$POTENTIAL_FREETYPE_LIB_PATH"
46849  new_path=`$CYGPATH -u "$path"`
46850
46851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46854  # "foo.exe" is OK but "foo" is an error.
46855  #
46856  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46857  # It is also a way to make sure we got the proper file name for the real test later on.
46858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46859  if test "x$test_shortpath" = x; then
46860    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46861$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46862    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46863  fi
46864
46865  # Call helper function which possibly converts this using DOS-style short mode.
46866  # If so, the updated path is stored in $new_path.
46867
46868  input_path="$new_path"
46869  # Check if we need to convert this using DOS-style short mode. If the path
46870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46871  # take no chances and rewrite it.
46872  # Note: m4 eats our [], so we need to use [ and ] instead.
46873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46874  if test "x$has_forbidden_chars" != x; then
46875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46879      # Going to short mode and back again did indeed matter. Since short mode is
46880      # case insensitive, let's make it lowercase to improve readability.
46881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46882      # Now convert it back to Unix-stile (cygpath)
46883      input_path=`$CYGPATH -u "$shortmode_path"`
46884      new_path="$input_path"
46885    fi
46886  fi
46887
46888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46889  if test "x$test_cygdrive_prefix" = x; then
46890    # As a simple fix, exclude /usr/bin since it's not a real path.
46891    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46893      # a path prefixed by /cygdrive for fixpath to work.
46894      new_path="$CYGWIN_ROOT_PATH$input_path"
46895    fi
46896  fi
46897
46898
46899  if test "x$path" != "x$new_path"; then
46900    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46902$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46903  fi
46904
46905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46906
46907  path="$POTENTIAL_FREETYPE_LIB_PATH"
46908  has_colon=`$ECHO $path | $GREP ^.:`
46909  new_path="$path"
46910  if test "x$has_colon" = x; then
46911    # Not in mixed or Windows style, start by that.
46912    new_path=`cmd //c echo $path`
46913  fi
46914
46915
46916  input_path="$new_path"
46917  # Check if we need to convert this using DOS-style short mode. If the path
46918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46919  # take no chances and rewrite it.
46920  # Note: m4 eats our [], so we need to use [ and ] instead.
46921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46922  if test "x$has_forbidden_chars" != x; then
46923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46925  fi
46926
46927
46928  windows_path="$new_path"
46929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46930    unix_path=`$CYGPATH -u "$windows_path"`
46931    new_path="$unix_path"
46932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46934    new_path="$unix_path"
46935  fi
46936
46937  if test "x$path" != "x$new_path"; then
46938    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46940$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46941  fi
46942
46943  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46944  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46945
46946  else
46947    # We're on a posix platform. Hooray! :)
46948    path="$POTENTIAL_FREETYPE_LIB_PATH"
46949    has_space=`$ECHO "$path" | $GREP " "`
46950    if test "x$has_space" != x; then
46951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46952$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46953      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46954    fi
46955
46956    # Use eval to expand a potential ~
46957    eval path="$path"
46958    if test ! -f "$path" && test ! -d "$path"; then
46959      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46960    fi
46961
46962    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46963  fi
46964
46965
46966    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46967    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46968$as_echo_n "checking for freetype includes... " >&6; }
46969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46970$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46971    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46973$as_echo_n "checking for freetype libraries... " >&6; }
46974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46975$as_echo "$FREETYPE_LIB_PATH" >&6; }
46976  fi
46977
46978              fi
46979            fi
46980          fi
46981        fi
46982      fi # end check in well-known locations
46983
46984      if test "x$FOUND_FREETYPE" != xyes; then
46985
46986  # Print a helpful message on how to acquire the necessary build dependency.
46987  # freetype is the help tag: freetype, cups, pulse, alsa etc
46988  MISSING_DEPENDENCY=freetype
46989
46990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46991    cygwin_help $MISSING_DEPENDENCY
46992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46993    msys_help $MISSING_DEPENDENCY
46994  else
46995    PKGHANDLER_COMMAND=
46996
46997    case $PKGHANDLER in
46998      apt-get)
46999        apt_help     $MISSING_DEPENDENCY ;;
47000      yum)
47001        yum_help     $MISSING_DEPENDENCY ;;
47002      port)
47003        port_help    $MISSING_DEPENDENCY ;;
47004      pkgutil)
47005        pkgutil_help $MISSING_DEPENDENCY ;;
47006      pkgadd)
47007        pkgadd_help  $MISSING_DEPENDENCY ;;
47008    esac
47009
47010    if test "x$PKGHANDLER_COMMAND" != x; then
47011      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47012    fi
47013  fi
47014
47015        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47016      fi
47017    fi # end user specified settings
47018
47019    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47020    if test "x$FREETYPE_CFLAGS" = x; then
47021
47022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47023
47024  # Input might be given as Windows format, start by converting to
47025  # unix format.
47026  path="$FREETYPE_INCLUDE_PATH"
47027  new_path=`$CYGPATH -u "$path"`
47028
47029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47032  # "foo.exe" is OK but "foo" is an error.
47033  #
47034  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47035  # It is also a way to make sure we got the proper file name for the real test later on.
47036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47037  if test "x$test_shortpath" = x; then
47038    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47039$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47040    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47041  fi
47042
47043  # Call helper function which possibly converts this using DOS-style short mode.
47044  # If so, the updated path is stored in $new_path.
47045
47046  input_path="$new_path"
47047  # Check if we need to convert this using DOS-style short mode. If the path
47048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47049  # take no chances and rewrite it.
47050  # Note: m4 eats our [], so we need to use [ and ] instead.
47051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47052  if test "x$has_forbidden_chars" != x; then
47053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47057      # Going to short mode and back again did indeed matter. Since short mode is
47058      # case insensitive, let's make it lowercase to improve readability.
47059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47060      # Now convert it back to Unix-stile (cygpath)
47061      input_path=`$CYGPATH -u "$shortmode_path"`
47062      new_path="$input_path"
47063    fi
47064  fi
47065
47066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47067  if test "x$test_cygdrive_prefix" = x; then
47068    # As a simple fix, exclude /usr/bin since it's not a real path.
47069    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47071      # a path prefixed by /cygdrive for fixpath to work.
47072      new_path="$CYGWIN_ROOT_PATH$input_path"
47073    fi
47074  fi
47075
47076
47077  if test "x$path" != "x$new_path"; then
47078    FREETYPE_INCLUDE_PATH="$new_path"
47079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47080$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47081  fi
47082
47083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47084
47085  path="$FREETYPE_INCLUDE_PATH"
47086  has_colon=`$ECHO $path | $GREP ^.:`
47087  new_path="$path"
47088  if test "x$has_colon" = x; then
47089    # Not in mixed or Windows style, start by that.
47090    new_path=`cmd //c echo $path`
47091  fi
47092
47093
47094  input_path="$new_path"
47095  # Check if we need to convert this using DOS-style short mode. If the path
47096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47097  # take no chances and rewrite it.
47098  # Note: m4 eats our [], so we need to use [ and ] instead.
47099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47100  if test "x$has_forbidden_chars" != x; then
47101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47103  fi
47104
47105
47106  windows_path="$new_path"
47107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47108    unix_path=`$CYGPATH -u "$windows_path"`
47109    new_path="$unix_path"
47110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47112    new_path="$unix_path"
47113  fi
47114
47115  if test "x$path" != "x$new_path"; then
47116    FREETYPE_INCLUDE_PATH="$new_path"
47117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47118$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47119  fi
47120
47121  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47122  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47123
47124  else
47125    # We're on a posix platform. Hooray! :)
47126    path="$FREETYPE_INCLUDE_PATH"
47127    has_space=`$ECHO "$path" | $GREP " "`
47128    if test "x$has_space" != x; then
47129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47130$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47131      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47132    fi
47133
47134    # Use eval to expand a potential ~
47135    eval path="$path"
47136    if test ! -f "$path" && test ! -d "$path"; then
47137      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47138    fi
47139
47140    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47141  fi
47142
47143      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47144        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47145      else
47146        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47147      fi
47148    fi
47149
47150    if test "x$FREETYPE_LIBS" = x; then
47151
47152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47153
47154  # Input might be given as Windows format, start by converting to
47155  # unix format.
47156  path="$FREETYPE_LIB_PATH"
47157  new_path=`$CYGPATH -u "$path"`
47158
47159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47162  # "foo.exe" is OK but "foo" is an error.
47163  #
47164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47165  # It is also a way to make sure we got the proper file name for the real test later on.
47166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47167  if test "x$test_shortpath" = x; then
47168    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47169$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47170    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
47171  fi
47172
47173  # Call helper function which possibly converts this using DOS-style short mode.
47174  # If so, the updated path is stored in $new_path.
47175
47176  input_path="$new_path"
47177  # Check if we need to convert this using DOS-style short mode. If the path
47178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47179  # take no chances and rewrite it.
47180  # Note: m4 eats our [], so we need to use [ and ] instead.
47181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47182  if test "x$has_forbidden_chars" != x; then
47183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47187      # Going to short mode and back again did indeed matter. Since short mode is
47188      # case insensitive, let's make it lowercase to improve readability.
47189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47190      # Now convert it back to Unix-stile (cygpath)
47191      input_path=`$CYGPATH -u "$shortmode_path"`
47192      new_path="$input_path"
47193    fi
47194  fi
47195
47196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47197  if test "x$test_cygdrive_prefix" = x; then
47198    # As a simple fix, exclude /usr/bin since it's not a real path.
47199    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47201      # a path prefixed by /cygdrive for fixpath to work.
47202      new_path="$CYGWIN_ROOT_PATH$input_path"
47203    fi
47204  fi
47205
47206
47207  if test "x$path" != "x$new_path"; then
47208    FREETYPE_LIB_PATH="$new_path"
47209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47210$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47211  fi
47212
47213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47214
47215  path="$FREETYPE_LIB_PATH"
47216  has_colon=`$ECHO $path | $GREP ^.:`
47217  new_path="$path"
47218  if test "x$has_colon" = x; then
47219    # Not in mixed or Windows style, start by that.
47220    new_path=`cmd //c echo $path`
47221  fi
47222
47223
47224  input_path="$new_path"
47225  # Check if we need to convert this using DOS-style short mode. If the path
47226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47227  # take no chances and rewrite it.
47228  # Note: m4 eats our [], so we need to use [ and ] instead.
47229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47230  if test "x$has_forbidden_chars" != x; then
47231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47233  fi
47234
47235
47236  windows_path="$new_path"
47237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47238    unix_path=`$CYGPATH -u "$windows_path"`
47239    new_path="$unix_path"
47240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47242    new_path="$unix_path"
47243  fi
47244
47245  if test "x$path" != "x$new_path"; then
47246    FREETYPE_LIB_PATH="$new_path"
47247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47248$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47249  fi
47250
47251  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47252  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47253
47254  else
47255    # We're on a posix platform. Hooray! :)
47256    path="$FREETYPE_LIB_PATH"
47257    has_space=`$ECHO "$path" | $GREP " "`
47258    if test "x$has_space" != x; then
47259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47260$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47261      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47262    fi
47263
47264    # Use eval to expand a potential ~
47265    eval path="$path"
47266    if test ! -f "$path" && test ! -d "$path"; then
47267      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47268    fi
47269
47270    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47271  fi
47272
47273      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47274        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
47275      else
47276        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
47277      fi
47278    fi
47279
47280    # Try to compile it
47281    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
47282$as_echo_n "checking if we can compile and link with freetype... " >&6; }
47283    ac_ext=cpp
47284ac_cpp='$CXXCPP $CPPFLAGS'
47285ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47286ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47287ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47288
47289    PREV_CXXCFLAGS="$CXXFLAGS"
47290    PREV_LIBS="$LIBS"
47291    PREV_CXX="$CXX"
47292    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
47293    LIBS="$LIBS $FREETYPE_LIBS"
47294    CXX="$FIXPATH $CXX"
47295    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47296/* end confdefs.h.  */
47297
47298          #include<ft2build.h>
47299          #include FT_FREETYPE_H
47300          int main () {
47301            FT_Init_FreeType(NULL);
47302            return 0;
47303          }
47304
47305_ACEOF
47306if ac_fn_cxx_try_link "$LINENO"; then :
47307
47308          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47309$as_echo "yes" >&6; }
47310
47311else
47312
47313          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47314$as_echo "no" >&6; }
47315          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
47316$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
47317          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
47318$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
47319
47320
47321  # Print a helpful message on how to acquire the necessary build dependency.
47322  # freetype is the help tag: freetype, cups, pulse, alsa etc
47323  MISSING_DEPENDENCY=freetype
47324
47325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47326    cygwin_help $MISSING_DEPENDENCY
47327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47328    msys_help $MISSING_DEPENDENCY
47329  else
47330    PKGHANDLER_COMMAND=
47331
47332    case $PKGHANDLER in
47333      apt-get)
47334        apt_help     $MISSING_DEPENDENCY ;;
47335      yum)
47336        yum_help     $MISSING_DEPENDENCY ;;
47337      port)
47338        port_help    $MISSING_DEPENDENCY ;;
47339      pkgutil)
47340        pkgutil_help $MISSING_DEPENDENCY ;;
47341      pkgadd)
47342        pkgadd_help  $MISSING_DEPENDENCY ;;
47343    esac
47344
47345    if test "x$PKGHANDLER_COMMAND" != x; then
47346      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47347    fi
47348  fi
47349
47350
47351          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
47352
47353
47354fi
47355rm -f core conftest.err conftest.$ac_objext \
47356    conftest$ac_exeext conftest.$ac_ext
47357    CXXCFLAGS="$PREV_CXXFLAGS"
47358    LIBS="$PREV_LIBS"
47359    CXX="$PREV_CXX"
47360    ac_ext=cpp
47361ac_cpp='$CXXCPP $CPPFLAGS'
47362ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47363ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47364ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47365
47366
47367    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
47368$as_echo_n "checking if we should bundle freetype... " >&6; }
47369    if test "x$BUNDLE_FREETYPE" = xyes; then
47370      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
47371    fi
47372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
47373$as_echo "$BUNDLE_FREETYPE" >&6; }
47374
47375  fi # end freetype needed
47376
47377
47378
47379
47380
47381
47382
47383  ###############################################################################
47384  #
47385  # Check for alsa headers and libraries. Used on Linux/GNU systems.
47386  #
47387
47388# Check whether --with-alsa was given.
47389if test "${with_alsa+set}" = set; then :
47390  withval=$with_alsa;
47391fi
47392
47393
47394# Check whether --with-alsa-include was given.
47395if test "${with_alsa_include+set}" = set; then :
47396  withval=$with_alsa_include;
47397fi
47398
47399
47400# Check whether --with-alsa-lib was given.
47401if test "${with_alsa_lib+set}" = set; then :
47402  withval=$with_alsa_lib;
47403fi
47404
47405
47406  if test "x$ALSA_NOT_NEEDED" = xyes; then
47407    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
47408      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
47409$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
47410    fi
47411    ALSA_CFLAGS=
47412    ALSA_LIBS=
47413  else
47414    ALSA_FOUND=no
47415
47416    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
47417      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
47418    fi
47419
47420    if test "x${with_alsa}" != x; then
47421      ALSA_LIBS="-L${with_alsa}/lib -lasound"
47422      ALSA_CFLAGS="-I${with_alsa}/include"
47423      ALSA_FOUND=yes
47424    fi
47425    if test "x${with_alsa_include}" != x; then
47426      ALSA_CFLAGS="-I${with_alsa_include}"
47427      ALSA_FOUND=yes
47428    fi
47429    if test "x${with_alsa_lib}" != x; then
47430      ALSA_LIBS="-L${with_alsa_lib} -lasound"
47431      ALSA_FOUND=yes
47432    fi
47433    if test "x$ALSA_FOUND" = xno; then
47434
47435
47436  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
47437    # Source the builddeps file again, to make sure it uses the latest variables!
47438    . $builddepsfile
47439    # Look for a target and build machine specific resource!
47440    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
47441    if test "x$resource" = x; then
47442      # Ok, lets instead look for a target specific resource
47443      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
47444    fi
47445    if test "x$resource" = x; then
47446      # Ok, lets instead look for a build specific resource
47447      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
47448    fi
47449    if test "x$resource" = x; then
47450      # Ok, lets instead look for a generic resource
47451      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
47452      resource=${builddep_alsa}
47453    fi
47454    if test "x$resource" != x; then
47455      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
47456$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
47457      # If the resource in the builddeps.conf file is an existing directory,
47458      # for example /java/linux/cups
47459      if test -d ${resource}; then
47460        depdir=${resource}
47461      else
47462
47463  # alsa is for example mymodule
47464  # $resource is for example libs/general/libmymod_1_2_3.zip
47465  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
47466  # $with_builddeps_dir is for example /localhome/builddeps
47467  # depdir is the name of the variable into which we store the depdir, eg MYMOD
47468  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
47469  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
47470  filename=`basename $resource`
47471  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
47472  filebase=${filename%%.*}
47473  extension=${filename#*.}
47474  installdir=$with_builddeps_dir/$filebase
47475  if test ! -f $installdir/$filename.unpacked; then
47476    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
47477$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
47478    if test ! -d $installdir; then
47479      mkdir -p $installdir
47480    fi
47481    if test ! -d $installdir; then
47482      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
47483    fi
47484    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
47485    touch $tmpfile
47486    if test ! -f $tmpfile; then
47487      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
47488    fi
47489
47490  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
47491  # $tmpfile is the local file name for the downloaded file.
47492  VALID_TOOL=no
47493  if test "x$BDEPS_FTP" = xwget; then
47494    VALID_TOOL=yes
47495    wget -O $tmpfile $with_builddeps_server/$resource
47496  fi
47497  if test "x$BDEPS_FTP" = xlftp; then
47498    VALID_TOOL=yes
47499    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
47500  fi
47501  if test "x$BDEPS_FTP" = xftp; then
47502    VALID_TOOL=yes
47503    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
47504    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
47505    FTPUSERPWD=${FTPSERVER%%@*}
47506    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
47507      FTPUSER=${userpwd%%:*}
47508      FTPPWD=${userpwd#*@}
47509      FTPSERVER=${FTPSERVER#*@}
47510    else
47511      FTPUSER=ftp
47512      FTPPWD=ftp
47513    fi
47514    # the "pass" command does not work on some
47515    # ftp clients (read ftp.exe) but if it works,
47516    # passive mode is better!
47517    ( \
47518        echo "user $FTPUSER $FTPPWD"        ; \
47519        echo "pass"                         ; \
47520        echo "bin"                          ; \
47521        echo "get $FTPPATH $tmpfile"              ; \
47522    ) | ftp -in $FTPSERVER
47523  fi
47524  if test "x$VALID_TOOL" != xyes; then
47525    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
47526  fi
47527
47528    mv $tmpfile $installdir/$filename
47529    if test ! -s $installdir/$filename; then
47530      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
47531    fi
47532    case "$extension" in
47533      zip)  echo "Unzipping $installdir/$filename..."
47534        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
47535        ;;
47536      tar.gz) echo "Untaring $installdir/$filename..."
47537        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47538        ;;
47539      tgz) echo "Untaring $installdir/$filename..."
47540        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47541        ;;
47542      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
47543        ;;
47544    esac
47545  fi
47546  if test -f $installdir/$filename.unpacked; then
47547    depdir=$installdir
47548  fi
47549
47550      fi
47551      # Source the builddeps file again, because in the previous command, the depdir
47552      # was updated to point at the current build dependency install directory.
47553      . $builddepsfile
47554      # Now extract variables from the builddeps.conf files.
47555      theroot=${builddep_alsa_ROOT}
47556      thecflags=${builddep_alsa_CFLAGS}
47557      thelibs=${builddep_alsa_LIBS}
47558      if test "x$depdir" = x; then
47559        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
47560      fi
47561      ALSA=$depdir
47562      if test "x$theroot" != x; then
47563        ALSA="$theroot"
47564      fi
47565      if test "x$thecflags" != x; then
47566        ALSA_CFLAGS="$thecflags"
47567      fi
47568      if test "x$thelibs" != x; then
47569        ALSA_LIBS="$thelibs"
47570      fi
47571      ALSA_FOUND=yes
47572      else ALSA_FOUND=no
47573
47574    fi
47575    else ALSA_FOUND=no
47576
47577  fi
47578
47579    fi
47580    # Do not try pkg-config if we have a sysroot set.
47581    if test "x$SYSROOT" = x; then
47582      if test "x$ALSA_FOUND" = xno; then
47583
47584pkg_failed=no
47585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
47586$as_echo_n "checking for ALSA... " >&6; }
47587
47588if test -n "$ALSA_CFLAGS"; then
47589    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
47590 elif test -n "$PKG_CONFIG"; then
47591    if test -n "$PKG_CONFIG" && \
47592    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47593  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47594  ac_status=$?
47595  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47596  test $ac_status = 0; }; then
47597  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
47598else
47599  pkg_failed=yes
47600fi
47601 else
47602    pkg_failed=untried
47603fi
47604if test -n "$ALSA_LIBS"; then
47605    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
47606 elif test -n "$PKG_CONFIG"; then
47607    if test -n "$PKG_CONFIG" && \
47608    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47609  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47610  ac_status=$?
47611  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47612  test $ac_status = 0; }; then
47613  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
47614else
47615  pkg_failed=yes
47616fi
47617 else
47618    pkg_failed=untried
47619fi
47620
47621
47622
47623if test $pkg_failed = yes; then
47624
47625if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47626        _pkg_short_errors_supported=yes
47627else
47628        _pkg_short_errors_supported=no
47629fi
47630        if test $_pkg_short_errors_supported = yes; then
47631	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
47632        else
47633	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
47634        fi
47635	# Put the nasty error message in config.log where it belongs
47636	echo "$ALSA_PKG_ERRORS" >&5
47637
47638	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47639$as_echo "no" >&6; }
47640                ALSA_FOUND=no
47641elif test $pkg_failed = untried; then
47642	ALSA_FOUND=no
47643else
47644	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47645	ALSA_LIBS=$pkg_cv_ALSA_LIBS
47646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47647$as_echo "yes" >&6; }
47648	ALSA_FOUND=yes
47649fi
47650      fi
47651    fi
47652    if test "x$ALSA_FOUND" = xno; then
47653      for ac_header in alsa/asoundlib.h
47654do :
47655  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47656if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47657  cat >>confdefs.h <<_ACEOF
47658#define HAVE_ALSA_ASOUNDLIB_H 1
47659_ACEOF
47660
47661            ALSA_FOUND=yes
47662            ALSA_CFLAGS=-Iignoreme
47663            ALSA_LIBS=-lasound
47664            DEFAULT_ALSA=yes
47665
47666else
47667  ALSA_FOUND=no
47668fi
47669
47670done
47671
47672    fi
47673    if test "x$ALSA_FOUND" = xno; then
47674
47675  # Print a helpful message on how to acquire the necessary build dependency.
47676  # alsa is the help tag: freetype, cups, pulse, alsa etc
47677  MISSING_DEPENDENCY=alsa
47678
47679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47680    cygwin_help $MISSING_DEPENDENCY
47681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47682    msys_help $MISSING_DEPENDENCY
47683  else
47684    PKGHANDLER_COMMAND=
47685
47686    case $PKGHANDLER in
47687      apt-get)
47688        apt_help     $MISSING_DEPENDENCY ;;
47689      yum)
47690        yum_help     $MISSING_DEPENDENCY ;;
47691      port)
47692        port_help    $MISSING_DEPENDENCY ;;
47693      pkgutil)
47694        pkgutil_help $MISSING_DEPENDENCY ;;
47695      pkgadd)
47696        pkgadd_help  $MISSING_DEPENDENCY ;;
47697    esac
47698
47699    if test "x$PKGHANDLER_COMMAND" != x; then
47700      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47701    fi
47702  fi
47703
47704      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47705    fi
47706  fi
47707
47708
47709
47710
47711
47712
47713  ###############################################################################
47714  #
47715  # Check for the jpeg library
47716  #
47717
47718
47719# Check whether --with-libjpeg was given.
47720if test "${with_libjpeg+set}" = set; then :
47721  withval=$with_libjpeg;
47722fi
47723
47724
47725  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
47726$as_echo_n "checking for which libjpeg to use... " >&6; }
47727
47728  # default is bundled
47729  DEFAULT_LIBJPEG=bundled
47730
47731  #
47732  # if user didn't specify, use DEFAULT_LIBJPEG
47733  #
47734  if test "x${with_libjpeg}" = "x"; then
47735    with_libjpeg=${DEFAULT_LIBJPEG}
47736  fi
47737
47738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
47739$as_echo "${with_libjpeg}" >&6; }
47740
47741  if test "x${with_libjpeg}" = "xbundled"; then
47742    USE_EXTERNAL_LIBJPEG=false
47743  elif test "x${with_libjpeg}" = "xsystem"; then
47744    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
47745if test "x$ac_cv_header_jpeglib_h" = xyes; then :
47746
47747else
47748   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
47749fi
47750
47751
47752    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
47753$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
47754if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
47755  $as_echo_n "(cached) " >&6
47756else
47757  ac_check_lib_save_LIBS=$LIBS
47758LIBS="-ljpeg  $LIBS"
47759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47760/* end confdefs.h.  */
47761
47762/* Override any GCC internal prototype to avoid an error.
47763   Use char because int might match the return type of a GCC
47764   builtin and then its argument prototype would still apply.  */
47765#ifdef __cplusplus
47766extern "C"
47767#endif
47768char jpeg_CreateDecompress ();
47769int
47770main ()
47771{
47772return jpeg_CreateDecompress ();
47773  ;
47774  return 0;
47775}
47776_ACEOF
47777if ac_fn_cxx_try_link "$LINENO"; then :
47778  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
47779else
47780  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
47781fi
47782rm -f core conftest.err conftest.$ac_objext \
47783    conftest$ac_exeext conftest.$ac_ext
47784LIBS=$ac_check_lib_save_LIBS
47785fi
47786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
47787$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
47788if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
47789  cat >>confdefs.h <<_ACEOF
47790#define HAVE_LIBJPEG 1
47791_ACEOF
47792
47793  LIBS="-ljpeg $LIBS"
47794
47795else
47796   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
47797fi
47798
47799
47800    USE_EXTERNAL_LIBJPEG=true
47801  else
47802    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
47803  fi
47804
47805
47806
47807  ###############################################################################
47808  #
47809  # Check for the gif library
47810  #
47811
47812
47813# Check whether --with-giflib was given.
47814if test "${with_giflib+set}" = set; then :
47815  withval=$with_giflib;
47816fi
47817
47818
47819
47820  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47821$as_echo_n "checking for which giflib to use... " >&6; }
47822
47823  # default is bundled
47824  DEFAULT_GIFLIB=bundled
47825
47826  #
47827  # if user didn't specify, use DEFAULT_GIFLIB
47828  #
47829  if test "x${with_giflib}" = "x"; then
47830    with_giflib=${DEFAULT_GIFLIB}
47831  fi
47832
47833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47834$as_echo "${with_giflib}" >&6; }
47835
47836  if test "x${with_giflib}" = "xbundled"; then
47837    USE_EXTERNAL_LIBGIF=false
47838  elif test "x${with_giflib}" = "xsystem"; then
47839    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47840if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47841
47842else
47843   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47844fi
47845
47846
47847    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47848$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47849if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47850  $as_echo_n "(cached) " >&6
47851else
47852  ac_check_lib_save_LIBS=$LIBS
47853LIBS="-lgif  $LIBS"
47854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47855/* end confdefs.h.  */
47856
47857/* Override any GCC internal prototype to avoid an error.
47858   Use char because int might match the return type of a GCC
47859   builtin and then its argument prototype would still apply.  */
47860#ifdef __cplusplus
47861extern "C"
47862#endif
47863char DGifGetCode ();
47864int
47865main ()
47866{
47867return DGifGetCode ();
47868  ;
47869  return 0;
47870}
47871_ACEOF
47872if ac_fn_cxx_try_link "$LINENO"; then :
47873  ac_cv_lib_gif_DGifGetCode=yes
47874else
47875  ac_cv_lib_gif_DGifGetCode=no
47876fi
47877rm -f core conftest.err conftest.$ac_objext \
47878    conftest$ac_exeext conftest.$ac_ext
47879LIBS=$ac_check_lib_save_LIBS
47880fi
47881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47882$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47883if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47884  cat >>confdefs.h <<_ACEOF
47885#define HAVE_LIBGIF 1
47886_ACEOF
47887
47888  LIBS="-lgif $LIBS"
47889
47890else
47891   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
47892fi
47893
47894
47895    USE_EXTERNAL_LIBGIF=true
47896  else
47897    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
47898  fi
47899
47900
47901  ###############################################################################
47902  #
47903  # Check for the lcms2 library
47904  #
47905
47906
47907# Check whether --with-lcms was given.
47908if test "${with_lcms+set}" = set; then :
47909  withval=$with_lcms;
47910fi
47911
47912
47913  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
47914$as_echo_n "checking for which lcms to use... " >&6; }
47915
47916  DEFAULT_LCMS=bundled
47917
47918  #
47919  # If user didn't specify, use DEFAULT_LCMS
47920  #
47921  if test "x${with_lcms}" = "x"; then
47922      with_lcms=${DEFAULT_LCMS}
47923  fi
47924
47925  if test "x${with_lcms}" = "xbundled"; then
47926    USE_EXTERNAL_LCMS=false
47927    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47928$as_echo "bundled" >&6; }
47929  elif test "x${with_lcms}" = "xsystem"; then
47930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47931$as_echo "system" >&6; }
47932
47933pkg_failed=no
47934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
47935$as_echo_n "checking for LCMS... " >&6; }
47936
47937if test -n "$LCMS_CFLAGS"; then
47938    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
47939 elif test -n "$PKG_CONFIG"; then
47940    if test -n "$PKG_CONFIG" && \
47941    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
47942  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
47943  ac_status=$?
47944  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47945  test $ac_status = 0; }; then
47946  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
47947else
47948  pkg_failed=yes
47949fi
47950 else
47951    pkg_failed=untried
47952fi
47953if test -n "$LCMS_LIBS"; then
47954    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
47955 elif test -n "$PKG_CONFIG"; then
47956    if test -n "$PKG_CONFIG" && \
47957    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
47958  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
47959  ac_status=$?
47960  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47961  test $ac_status = 0; }; then
47962  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
47963else
47964  pkg_failed=yes
47965fi
47966 else
47967    pkg_failed=untried
47968fi
47969
47970
47971
47972if test $pkg_failed = yes; then
47973
47974if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47975        _pkg_short_errors_supported=yes
47976else
47977        _pkg_short_errors_supported=no
47978fi
47979        if test $_pkg_short_errors_supported = yes; then
47980	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
47981        else
47982	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
47983        fi
47984	# Put the nasty error message in config.log where it belongs
47985	echo "$LCMS_PKG_ERRORS" >&5
47986
47987	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47988$as_echo "no" >&6; }
47989                LCMS_FOUND=no
47990elif test $pkg_failed = untried; then
47991	LCMS_FOUND=no
47992else
47993	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
47994	LCMS_LIBS=$pkg_cv_LCMS_LIBS
47995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47996$as_echo "yes" >&6; }
47997	LCMS_FOUND=yes
47998fi
47999    if test "x${LCMS_FOUND}" = "xyes"; then
48000      USE_EXTERNAL_LCMS=true
48001    else
48002      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48003    fi
48004  else
48005    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48006  fi
48007
48008
48009
48010  ###############################################################################
48011  #
48012  # Check for the png library
48013  #
48014
48015
48016# Check whether --with-libpng was given.
48017if test "${with_libpng+set}" = set; then :
48018  withval=$with_libpng;
48019fi
48020
48021
48022
48023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48024$as_echo_n "checking for which libpng to use... " >&6; }
48025
48026  # default is bundled
48027  DEFAULT_LIBPNG=bundled
48028
48029  #
48030  # if user didn't specify, use DEFAULT_LIBPNG
48031  #
48032  if test "x${with_libpng}" = "x"; then
48033      with_libpng=${DEFAULT_LIBPNG}
48034  fi
48035
48036  if test "x${with_libpng}" = "xbundled"; then
48037      USE_EXTERNAL_LIBPNG=false
48038      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48039$as_echo "bundled" >&6; }
48040  elif test "x${with_libpng}" = "xsystem"; then
48041
48042pkg_failed=no
48043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48044$as_echo_n "checking for PNG... " >&6; }
48045
48046if test -n "$PNG_CFLAGS"; then
48047    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48048 elif test -n "$PKG_CONFIG"; then
48049    if test -n "$PKG_CONFIG" && \
48050    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48051  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48052  ac_status=$?
48053  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48054  test $ac_status = 0; }; then
48055  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48056else
48057  pkg_failed=yes
48058fi
48059 else
48060    pkg_failed=untried
48061fi
48062if test -n "$PNG_LIBS"; then
48063    pkg_cv_PNG_LIBS="$PNG_LIBS"
48064 elif test -n "$PKG_CONFIG"; then
48065    if test -n "$PKG_CONFIG" && \
48066    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48067  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48068  ac_status=$?
48069  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48070  test $ac_status = 0; }; then
48071  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48072else
48073  pkg_failed=yes
48074fi
48075 else
48076    pkg_failed=untried
48077fi
48078
48079
48080
48081if test $pkg_failed = yes; then
48082
48083if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48084        _pkg_short_errors_supported=yes
48085else
48086        _pkg_short_errors_supported=no
48087fi
48088        if test $_pkg_short_errors_supported = yes; then
48089	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48090        else
48091	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48092        fi
48093	# Put the nasty error message in config.log where it belongs
48094	echo "$PNG_PKG_ERRORS" >&5
48095
48096	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48097$as_echo "no" >&6; }
48098                 LIBPNG_FOUND=no
48099elif test $pkg_failed = untried; then
48100	 LIBPNG_FOUND=no
48101else
48102	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48103	PNG_LIBS=$pkg_cv_PNG_LIBS
48104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48105$as_echo "yes" >&6; }
48106	 LIBPNG_FOUND=yes
48107fi
48108      if test "x${LIBPNG_FOUND}" = "xyes"; then
48109          USE_EXTERNAL_LIBPNG=true
48110          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48111$as_echo "system" >&6; }
48112      else
48113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48114$as_echo "system not found" >&6; }
48115          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48116      fi
48117  else
48118      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48119  fi
48120
48121
48122  ###############################################################################
48123  #
48124  # Check for the zlib library
48125  #
48126
48127
48128# Check whether --with-zlib was given.
48129if test "${with_zlib+set}" = set; then :
48130  withval=$with_zlib;
48131fi
48132
48133
48134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48135$as_echo_n "checking for compress in -lz... " >&6; }
48136if ${ac_cv_lib_z_compress+:} false; then :
48137  $as_echo_n "(cached) " >&6
48138else
48139  ac_check_lib_save_LIBS=$LIBS
48140LIBS="-lz  $LIBS"
48141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48142/* end confdefs.h.  */
48143
48144/* Override any GCC internal prototype to avoid an error.
48145   Use char because int might match the return type of a GCC
48146   builtin and then its argument prototype would still apply.  */
48147#ifdef __cplusplus
48148extern "C"
48149#endif
48150char compress ();
48151int
48152main ()
48153{
48154return compress ();
48155  ;
48156  return 0;
48157}
48158_ACEOF
48159if ac_fn_cxx_try_link "$LINENO"; then :
48160  ac_cv_lib_z_compress=yes
48161else
48162  ac_cv_lib_z_compress=no
48163fi
48164rm -f core conftest.err conftest.$ac_objext \
48165    conftest$ac_exeext conftest.$ac_ext
48166LIBS=$ac_check_lib_save_LIBS
48167fi
48168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
48169$as_echo "$ac_cv_lib_z_compress" >&6; }
48170if test "x$ac_cv_lib_z_compress" = xyes; then :
48171   ZLIB_FOUND=yes
48172else
48173   ZLIB_FOUND=no
48174fi
48175
48176
48177  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
48178$as_echo_n "checking for which zlib to use... " >&6; }
48179
48180  DEFAULT_ZLIB=bundled
48181  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48182    #
48183    # On macosx default is system...on others default is
48184    #
48185    DEFAULT_ZLIB=system
48186  fi
48187
48188  if test "x${ZLIB_FOUND}" != "xyes"; then
48189    #
48190    # If we don't find any system...set default to bundled
48191    #
48192    DEFAULT_ZLIB=bundled
48193  fi
48194
48195  #
48196  # If user didn't specify, use DEFAULT_ZLIB
48197  #
48198  if test "x${with_zlib}" = "x"; then
48199    with_zlib=${DEFAULT_ZLIB}
48200  fi
48201
48202  if test "x${with_zlib}" = "xbundled"; then
48203    USE_EXTERNAL_LIBZ=false
48204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48205$as_echo "bundled" >&6; }
48206  elif test "x${with_zlib}" = "xsystem"; then
48207    if test "x${ZLIB_FOUND}" = "xyes"; then
48208      USE_EXTERNAL_LIBZ=true
48209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48210$as_echo "system" >&6; }
48211    else
48212      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48213$as_echo "system not found" >&6; }
48214      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
48215    fi
48216  else
48217    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
48218  fi
48219
48220
48221
48222  ###############################################################################
48223  LIBZIP_CAN_USE_MMAP=true
48224
48225
48226
48227  ###############################################################################
48228  #
48229  # Check if altzone exists in time.h
48230  #
48231
48232  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48233/* end confdefs.h.  */
48234#include <time.h>
48235int
48236main ()
48237{
48238return (int)altzone;
48239  ;
48240  return 0;
48241}
48242_ACEOF
48243if ac_fn_cxx_try_link "$LINENO"; then :
48244  has_altzone=yes
48245else
48246  has_altzone=no
48247fi
48248rm -f core conftest.err conftest.$ac_objext \
48249    conftest$ac_exeext conftest.$ac_ext
48250  if test "x$has_altzone" = xyes; then
48251
48252$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
48253
48254  fi
48255
48256  ###############################################################################
48257  #
48258  # Check the maths library
48259  #
48260
48261  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
48262$as_echo_n "checking for cos in -lm... " >&6; }
48263if ${ac_cv_lib_m_cos+:} false; then :
48264  $as_echo_n "(cached) " >&6
48265else
48266  ac_check_lib_save_LIBS=$LIBS
48267LIBS="-lm  $LIBS"
48268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48269/* end confdefs.h.  */
48270
48271/* Override any GCC internal prototype to avoid an error.
48272   Use char because int might match the return type of a GCC
48273   builtin and then its argument prototype would still apply.  */
48274#ifdef __cplusplus
48275extern "C"
48276#endif
48277char cos ();
48278int
48279main ()
48280{
48281return cos ();
48282  ;
48283  return 0;
48284}
48285_ACEOF
48286if ac_fn_cxx_try_link "$LINENO"; then :
48287  ac_cv_lib_m_cos=yes
48288else
48289  ac_cv_lib_m_cos=no
48290fi
48291rm -f core conftest.err conftest.$ac_objext \
48292    conftest$ac_exeext conftest.$ac_ext
48293LIBS=$ac_check_lib_save_LIBS
48294fi
48295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
48296$as_echo "$ac_cv_lib_m_cos" >&6; }
48297if test "x$ac_cv_lib_m_cos" = xyes; then :
48298  cat >>confdefs.h <<_ACEOF
48299#define HAVE_LIBM 1
48300_ACEOF
48301
48302  LIBS="-lm $LIBS"
48303
48304else
48305
48306        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
48307$as_echo "$as_me: Maths library was not found" >&6;}
48308
48309
48310fi
48311
48312
48313
48314  ###############################################################################
48315  #
48316  # Check for libdl.so
48317
48318  save_LIBS="$LIBS"
48319  LIBS=""
48320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
48321$as_echo_n "checking for dlopen in -ldl... " >&6; }
48322if ${ac_cv_lib_dl_dlopen+:} false; then :
48323  $as_echo_n "(cached) " >&6
48324else
48325  ac_check_lib_save_LIBS=$LIBS
48326LIBS="-ldl  $LIBS"
48327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48328/* end confdefs.h.  */
48329
48330/* Override any GCC internal prototype to avoid an error.
48331   Use char because int might match the return type of a GCC
48332   builtin and then its argument prototype would still apply.  */
48333#ifdef __cplusplus
48334extern "C"
48335#endif
48336char dlopen ();
48337int
48338main ()
48339{
48340return dlopen ();
48341  ;
48342  return 0;
48343}
48344_ACEOF
48345if ac_fn_cxx_try_link "$LINENO"; then :
48346  ac_cv_lib_dl_dlopen=yes
48347else
48348  ac_cv_lib_dl_dlopen=no
48349fi
48350rm -f core conftest.err conftest.$ac_objext \
48351    conftest$ac_exeext conftest.$ac_ext
48352LIBS=$ac_check_lib_save_LIBS
48353fi
48354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
48355$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
48356if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
48357  cat >>confdefs.h <<_ACEOF
48358#define HAVE_LIBDL 1
48359_ACEOF
48360
48361  LIBS="-ldl $LIBS"
48362
48363fi
48364
48365  LIBDL="$LIBS"
48366
48367  LIBS="$save_LIBS"
48368
48369
48370  ###############################################################################
48371  #
48372  # statically link libstdc++ before C++ ABI is stablized on Linux unless
48373  # dynamic build is configured on command line.
48374  #
48375
48376# Check whether --with-stdc++lib was given.
48377if test "${with_stdc__lib+set}" = set; then :
48378  withval=$with_stdc__lib;
48379        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
48380                && test "x$with_stdc__lib" != xdefault; then
48381          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
48382        fi
48383
48384else
48385  with_stdc__lib=default
48386
48387fi
48388
48389
48390  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48391    # Test if -lstdc++ works.
48392    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
48393$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
48394    ac_ext=cpp
48395ac_cpp='$CXXCPP $CPPFLAGS'
48396ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48397ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48398ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48399
48400    OLD_CXXFLAGS="$CXXFLAGS"
48401    CXXFLAGS="$CXXFLAGS -lstdc++"
48402    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48403/* end confdefs.h.  */
48404
48405int
48406main ()
48407{
48408return 0;
48409  ;
48410  return 0;
48411}
48412_ACEOF
48413if ac_fn_cxx_try_link "$LINENO"; then :
48414  has_dynamic_libstdcxx=yes
48415else
48416  has_dynamic_libstdcxx=no
48417fi
48418rm -f core conftest.err conftest.$ac_objext \
48419    conftest$ac_exeext conftest.$ac_ext
48420    CXXFLAGS="$OLD_CXXFLAGS"
48421    ac_ext=cpp
48422ac_cpp='$CXXCPP $CPPFLAGS'
48423ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48424ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48425ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48426
48427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
48428$as_echo "$has_dynamic_libstdcxx" >&6; }
48429
48430    # Test if stdc++ can be linked statically.
48431    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
48432$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
48433    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
48434    ac_ext=cpp
48435ac_cpp='$CXXCPP $CPPFLAGS'
48436ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48437ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48438ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48439
48440    OLD_LIBS="$LIBS"
48441    OLD_CXX="$CXX"
48442    LIBS="$STATIC_STDCXX_FLAGS"
48443    CXX="$CC"
48444    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48445/* end confdefs.h.  */
48446
48447int
48448main ()
48449{
48450return 0;
48451  ;
48452  return 0;
48453}
48454_ACEOF
48455if ac_fn_cxx_try_link "$LINENO"; then :
48456  has_static_libstdcxx=yes
48457else
48458  has_static_libstdcxx=no
48459fi
48460rm -f core conftest.err conftest.$ac_objext \
48461    conftest$ac_exeext conftest.$ac_ext
48462    LIBS="$OLD_LIBS"
48463    CXX="$OLD_CXX"
48464    ac_ext=cpp
48465ac_cpp='$CXXCPP $CPPFLAGS'
48466ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48467ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48468ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48469
48470    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
48471$as_echo "$has_static_libstdcxx" >&6; }
48472
48473    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
48474      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
48475    fi
48476
48477    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
48478      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
48479    fi
48480
48481    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
48482      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
48483    fi
48484
48485    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
48486$as_echo_n "checking how to link with libstdc++... " >&6; }
48487    # If dynamic was requested, it's available since it would fail above otherwise.
48488    # If dynamic wasn't requested, go with static unless it isn't available.
48489    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48490      LIBCXX="$LIBCXX -lstdc++"
48491      LDCXX="$CXX"
48492      STATIC_CXX_SETTING="STATIC_CXX=false"
48493      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
48494$as_echo "dynamic" >&6; }
48495    else
48496      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
48497      LDCXX="$CC"
48498      STATIC_CXX_SETTING="STATIC_CXX=true"
48499      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
48500$as_echo "static" >&6; }
48501    fi
48502  fi
48503
48504
48505  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48506    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
48507
48508pkg_failed=no
48509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
48510$as_echo_n "checking for LIBFFI... " >&6; }
48511
48512if test -n "$LIBFFI_CFLAGS"; then
48513    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
48514 elif test -n "$PKG_CONFIG"; then
48515    if test -n "$PKG_CONFIG" && \
48516    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
48517  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
48518  ac_status=$?
48519  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48520  test $ac_status = 0; }; then
48521  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
48522else
48523  pkg_failed=yes
48524fi
48525 else
48526    pkg_failed=untried
48527fi
48528if test -n "$LIBFFI_LIBS"; then
48529    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
48530 elif test -n "$PKG_CONFIG"; then
48531    if test -n "$PKG_CONFIG" && \
48532    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
48533  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
48534  ac_status=$?
48535  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48536  test $ac_status = 0; }; then
48537  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
48538else
48539  pkg_failed=yes
48540fi
48541 else
48542    pkg_failed=untried
48543fi
48544
48545
48546
48547if test $pkg_failed = yes; then
48548
48549if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48550        _pkg_short_errors_supported=yes
48551else
48552        _pkg_short_errors_supported=no
48553fi
48554        if test $_pkg_short_errors_supported = yes; then
48555	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
48556        else
48557	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
48558        fi
48559	# Put the nasty error message in config.log where it belongs
48560	echo "$LIBFFI_PKG_ERRORS" >&5
48561
48562	as_fn_error $? "Package requirements (libffi) were not met:
48563
48564$LIBFFI_PKG_ERRORS
48565
48566Consider adjusting the PKG_CONFIG_PATH environment variable if you
48567installed software in a non-standard prefix.
48568
48569Alternatively, you may set the environment variables LIBFFI_CFLAGS
48570and LIBFFI_LIBS to avoid the need to call pkg-config.
48571See the pkg-config man page for more details.
48572" "$LINENO" 5
48573elif test $pkg_failed = untried; then
48574	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48575$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48576as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
48577is in your PATH or set the PKG_CONFIG environment variable to the full
48578path to pkg-config.
48579
48580Alternatively, you may set the environment variables LIBFFI_CFLAGS
48581and LIBFFI_LIBS to avoid the need to call pkg-config.
48582See the pkg-config man page for more details.
48583
48584To get pkg-config, see <http://pkg-config.freedesktop.org/>.
48585See \`config.log' for more details" "$LINENO" 5; }
48586else
48587	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
48588	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
48589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48590$as_echo "yes" >&6; }
48591	:
48592fi
48593
48594  fi
48595
48596  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48597    # Extract the first word of "llvm-config", so it can be a program name with args.
48598set dummy llvm-config; ac_word=$2
48599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48600$as_echo_n "checking for $ac_word... " >&6; }
48601if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
48602  $as_echo_n "(cached) " >&6
48603else
48604  if test -n "$LLVM_CONFIG"; then
48605  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
48606else
48607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48608for as_dir in $PATH
48609do
48610  IFS=$as_save_IFS
48611  test -z "$as_dir" && as_dir=.
48612    for ac_exec_ext in '' $ac_executable_extensions; do
48613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48614    ac_cv_prog_LLVM_CONFIG="llvm-config"
48615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48616    break 2
48617  fi
48618done
48619  done
48620IFS=$as_save_IFS
48621
48622fi
48623fi
48624LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
48625if test -n "$LLVM_CONFIG"; then
48626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
48627$as_echo "$LLVM_CONFIG" >&6; }
48628else
48629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48630$as_echo "no" >&6; }
48631fi
48632
48633
48634
48635    if test "x$LLVM_CONFIG" != xllvm-config; then
48636      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
48637    fi
48638
48639    llvm_components="jit mcjit engine nativecodegen native"
48640    unset LLVM_CFLAGS
48641    for flag in $("$LLVM_CONFIG" --cxxflags); do
48642      if echo "${flag}" | grep -q '^-[ID]'; then
48643        if test "${flag}" != "-D_DEBUG" ; then
48644          if test "${LLVM_CFLAGS}" != "" ; then
48645            LLVM_CFLAGS="${LLVM_CFLAGS} "
48646          fi
48647          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
48648        fi
48649      fi
48650    done
48651    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
48652    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
48653
48654    unset LLVM_LDFLAGS
48655    for flag in $("${LLVM_CONFIG}" --ldflags); do
48656      if echo "${flag}" | grep -q '^-L'; then
48657        if test "${LLVM_LDFLAGS}" != ""; then
48658          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
48659        fi
48660        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
48661      fi
48662    done
48663
48664    unset LLVM_LIBS
48665    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
48666      if echo "${flag}" | grep -q '^-l'; then
48667        if test "${LLVM_LIBS}" != ""; then
48668          LLVM_LIBS="${LLVM_LIBS} "
48669        fi
48670        LLVM_LIBS="${LLVM_LIBS}${flag}"
48671      fi
48672    done
48673
48674
48675
48676
48677  fi
48678
48679  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48680  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
48681    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48682  fi
48683
48684  # TODO better (platform agnostic) test
48685  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
48686    LIBCXX="-lstdc++"
48687  fi
48688
48689
48690
48691
48692  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48693
48694
48695# Check whether --with-msvcr-dll was given.
48696if test "${with_msvcr_dll+set}" = set; then :
48697  withval=$with_msvcr_dll;
48698fi
48699
48700
48701  if test "x$with_msvcr_dll" != x; then
48702    # If given explicitely by user, do not probe. If not present, fail directly.
48703
48704  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
48705  METHOD="--with-msvcr-dll"
48706  if test -e "$POSSIBLE_MSVCR_DLL"; then
48707    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48708$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48709
48710    # Need to check if the found msvcr is correct architecture
48711    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48712$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48713    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48714    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48715      CORRECT_MSVCR_ARCH=386
48716    else
48717      CORRECT_MSVCR_ARCH=x86-64
48718    fi
48719    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48720      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48721$as_echo "ok" >&6; }
48722      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48723      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48724$as_echo_n "checking for msvcr100.dll... " >&6; }
48725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48726$as_echo "$MSVCR_DLL" >&6; }
48727    else
48728      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48729$as_echo "incorrect, ignoring" >&6; }
48730      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48731$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48732    fi
48733  fi
48734
48735    if test "x$MSVCR_DLL" = x; then
48736      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
48737    fi
48738  fi
48739
48740  if test "x$MSVCR_DLL" = x; then
48741    # Probe: Using well-known location from Visual Studio 10.0
48742    if test "x$VCINSTALLDIR" != x; then
48743      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48744
48745  windows_path="$CYGWIN_VC_INSTALL_DIR"
48746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48747    unix_path=`$CYGPATH -u "$windows_path"`
48748    CYGWIN_VC_INSTALL_DIR="$unix_path"
48749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48751    CYGWIN_VC_INSTALL_DIR="$unix_path"
48752  fi
48753
48754      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48755        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
48756      else
48757        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
48758      fi
48759
48760  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48761  METHOD="well-known location in VCINSTALLDIR"
48762  if test -e "$POSSIBLE_MSVCR_DLL"; then
48763    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48764$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48765
48766    # Need to check if the found msvcr is correct architecture
48767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48768$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48769    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48770    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48771      CORRECT_MSVCR_ARCH=386
48772    else
48773      CORRECT_MSVCR_ARCH=x86-64
48774    fi
48775    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48776      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48777$as_echo "ok" >&6; }
48778      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48779      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48780$as_echo_n "checking for msvcr100.dll... " >&6; }
48781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48782$as_echo "$MSVCR_DLL" >&6; }
48783    else
48784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48785$as_echo "incorrect, ignoring" >&6; }
48786      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48787$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48788    fi
48789  fi
48790
48791    fi
48792  fi
48793
48794  if test "x$MSVCR_DLL" = x; then
48795    # Probe: Check in the Boot JDK directory.
48796    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
48797
48798  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48799  METHOD="well-known location in Boot JDK"
48800  if test -e "$POSSIBLE_MSVCR_DLL"; then
48801    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48802$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48803
48804    # Need to check if the found msvcr is correct architecture
48805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48806$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48807    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48808    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48809      CORRECT_MSVCR_ARCH=386
48810    else
48811      CORRECT_MSVCR_ARCH=x86-64
48812    fi
48813    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48815$as_echo "ok" >&6; }
48816      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48817      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48818$as_echo_n "checking for msvcr100.dll... " >&6; }
48819      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48820$as_echo "$MSVCR_DLL" >&6; }
48821    else
48822      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48823$as_echo "incorrect, ignoring" >&6; }
48824      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48825$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48826    fi
48827  fi
48828
48829  fi
48830
48831  if test "x$MSVCR_DLL" = x; then
48832    # Probe: Look in the Windows system32 directory
48833    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48834
48835  windows_path="$CYGWIN_SYSTEMROOT"
48836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48837    unix_path=`$CYGPATH -u "$windows_path"`
48838    CYGWIN_SYSTEMROOT="$unix_path"
48839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48841    CYGWIN_SYSTEMROOT="$unix_path"
48842  fi
48843
48844    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
48845
48846  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48847  METHOD="well-known location in SYSTEMROOT"
48848  if test -e "$POSSIBLE_MSVCR_DLL"; then
48849    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48850$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48851
48852    # Need to check if the found msvcr is correct architecture
48853    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48854$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48855    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48856    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48857      CORRECT_MSVCR_ARCH=386
48858    else
48859      CORRECT_MSVCR_ARCH=x86-64
48860    fi
48861    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48862      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48863$as_echo "ok" >&6; }
48864      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48865      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48866$as_echo_n "checking for msvcr100.dll... " >&6; }
48867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48868$as_echo "$MSVCR_DLL" >&6; }
48869    else
48870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48871$as_echo "incorrect, ignoring" >&6; }
48872      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48873$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48874    fi
48875  fi
48876
48877  fi
48878
48879  if test "x$MSVCR_DLL" = x; then
48880    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48881    if test "x$VS100COMNTOOLS" != x; then
48882      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48883
48884  windows_path="$CYGWIN_VS_TOOLS_DIR"
48885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48886    unix_path=`$CYGPATH -u "$windows_path"`
48887    CYGWIN_VS_TOOLS_DIR="$unix_path"
48888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48890    CYGWIN_VS_TOOLS_DIR="$unix_path"
48891  fi
48892
48893      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48894        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
48895      else
48896        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
48897      fi
48898
48899  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48900  METHOD="search of VS100COMNTOOLS"
48901  if test -e "$POSSIBLE_MSVCR_DLL"; then
48902    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48903$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48904
48905    # Need to check if the found msvcr is correct architecture
48906    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48907$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48908    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48909    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48910      CORRECT_MSVCR_ARCH=386
48911    else
48912      CORRECT_MSVCR_ARCH=x86-64
48913    fi
48914    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48916$as_echo "ok" >&6; }
48917      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48918      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48919$as_echo_n "checking for msvcr100.dll... " >&6; }
48920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48921$as_echo "$MSVCR_DLL" >&6; }
48922    else
48923      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48924$as_echo "incorrect, ignoring" >&6; }
48925      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48926$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48927    fi
48928  fi
48929
48930    fi
48931  fi
48932
48933  if test "x$MSVCR_DLL" = x; then
48934    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48935    # (This was the original behaviour; kept since it might turn up something)
48936    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48937      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48938        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
48939      else
48940        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48941        if test "x$POSSIBLE_MSVCR_DLL" = x; then
48942          # We're grasping at straws now...
48943          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
48944        fi
48945      fi
48946
48947
48948  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48949  METHOD="search of VCINSTALLDIR"
48950  if test -e "$POSSIBLE_MSVCR_DLL"; then
48951    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48952$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48953
48954    # Need to check if the found msvcr is correct architecture
48955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48956$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48957    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48958    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48959      CORRECT_MSVCR_ARCH=386
48960    else
48961      CORRECT_MSVCR_ARCH=x86-64
48962    fi
48963    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48964      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48965$as_echo "ok" >&6; }
48966      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48967      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48968$as_echo_n "checking for msvcr100.dll... " >&6; }
48969      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48970$as_echo "$MSVCR_DLL" >&6; }
48971    else
48972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48973$as_echo "incorrect, ignoring" >&6; }
48974      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48975$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48976    fi
48977  fi
48978
48979    fi
48980  fi
48981
48982  if test "x$MSVCR_DLL" = x; then
48983    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48984$as_echo_n "checking for msvcr100.dll... " >&6; }
48985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48986$as_echo "no" >&6; }
48987    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
48988  fi
48989
48990
48991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48992
48993  # Input might be given as Windows format, start by converting to
48994  # unix format.
48995  path="$MSVCR_DLL"
48996  new_path=`$CYGPATH -u "$path"`
48997
48998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49001  # "foo.exe" is OK but "foo" is an error.
49002  #
49003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49004  # It is also a way to make sure we got the proper file name for the real test later on.
49005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49006  if test "x$test_shortpath" = x; then
49007    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49008$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49009    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
49010  fi
49011
49012  # Call helper function which possibly converts this using DOS-style short mode.
49013  # If so, the updated path is stored in $new_path.
49014
49015  input_path="$new_path"
49016  # Check if we need to convert this using DOS-style short mode. If the path
49017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49018  # take no chances and rewrite it.
49019  # Note: m4 eats our [], so we need to use [ and ] instead.
49020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49021  if test "x$has_forbidden_chars" != x; then
49022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49026      # Going to short mode and back again did indeed matter. Since short mode is
49027      # case insensitive, let's make it lowercase to improve readability.
49028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49029      # Now convert it back to Unix-stile (cygpath)
49030      input_path=`$CYGPATH -u "$shortmode_path"`
49031      new_path="$input_path"
49032    fi
49033  fi
49034
49035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49036  if test "x$test_cygdrive_prefix" = x; then
49037    # As a simple fix, exclude /usr/bin since it's not a real path.
49038    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49040      # a path prefixed by /cygdrive for fixpath to work.
49041      new_path="$CYGWIN_ROOT_PATH$input_path"
49042    fi
49043  fi
49044
49045
49046  if test "x$path" != "x$new_path"; then
49047    MSVCR_DLL="$new_path"
49048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49049$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49050  fi
49051
49052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49053
49054  path="$MSVCR_DLL"
49055  has_colon=`$ECHO $path | $GREP ^.:`
49056  new_path="$path"
49057  if test "x$has_colon" = x; then
49058    # Not in mixed or Windows style, start by that.
49059    new_path=`cmd //c echo $path`
49060  fi
49061
49062
49063  input_path="$new_path"
49064  # Check if we need to convert this using DOS-style short mode. If the path
49065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49066  # take no chances and rewrite it.
49067  # Note: m4 eats our [], so we need to use [ and ] instead.
49068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49069  if test "x$has_forbidden_chars" != x; then
49070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49072  fi
49073
49074
49075  windows_path="$new_path"
49076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49077    unix_path=`$CYGPATH -u "$windows_path"`
49078    new_path="$unix_path"
49079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49081    new_path="$unix_path"
49082  fi
49083
49084  if test "x$path" != "x$new_path"; then
49085    MSVCR_DLL="$new_path"
49086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49087$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49088  fi
49089
49090  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49091  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49092
49093  else
49094    # We're on a posix platform. Hooray! :)
49095    path="$MSVCR_DLL"
49096    has_space=`$ECHO "$path" | $GREP " "`
49097    if test "x$has_space" != x; then
49098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49099$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49100      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49101    fi
49102
49103    # Use eval to expand a potential ~
49104    eval path="$path"
49105    if test ! -f "$path" && test ! -d "$path"; then
49106      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49107    fi
49108
49109    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
49110  fi
49111
49112
49113
49114
49115# Check whether --with-dxsdk was given.
49116if test "${with_dxsdk+set}" = set; then :
49117  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
49118$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
49119fi
49120
49121
49122
49123
49124# Check whether --with-dxsdk-lib was given.
49125if test "${with_dxsdk_lib+set}" = set; then :
49126  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
49127$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
49128fi
49129
49130
49131
49132
49133# Check whether --with-dxsdk-include was given.
49134if test "${with_dxsdk_include+set}" = set; then :
49135  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
49136$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
49137fi
49138
49139
49140  fi
49141
49142
49143
49144###############################################################################
49145#
49146# We need to do some final tweaking, when everything else is done.
49147#
49148###############################################################################
49149
49150
49151  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
49152
49153
49154  # The name of the Service Agent jar.
49155  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
49156  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49157    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
49158  fi
49159
49160
49161
49162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
49163$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
49164
49165    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
49166      ENABLE_INTREE_EC=yes
49167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49168$as_echo "yes" >&6; }
49169    else
49170      ENABLE_INTREE_EC=no
49171      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49172$as_echo "no" >&6; }
49173    fi
49174
49175
49176
49177
49178###############################################################################
49179#
49180# Configure parts of the build that only affect the build performance,
49181# not the result.
49182#
49183###############################################################################
49184
49185
49186  # How many cores do we have on this build system?
49187
49188# Check whether --with-num-cores was given.
49189if test "${with_num_cores+set}" = set; then :
49190  withval=$with_num_cores;
49191fi
49192
49193  if test "x$with_num_cores" = x; then
49194    # The number of cores were not specified, try to probe them.
49195
49196  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
49197$as_echo_n "checking for number of cores... " >&6; }
49198  NUM_CORES=1
49199  FOUND_CORES=no
49200
49201  if test -f /proc/cpuinfo; then
49202    # Looks like a Linux (or cygwin) system
49203    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
49204    FOUND_CORES=yes
49205  elif test -x /usr/sbin/psrinfo; then
49206    # Looks like a Solaris system
49207    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
49208    FOUND_CORES=yes
49209  elif test -x /usr/sbin/system_profiler; then
49210    # Looks like a MacOSX system
49211    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
49212    FOUND_CORES=yes
49213  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
49214    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
49215    FOUND_CORES=yes
49216  elif test -n "$NUMBER_OF_PROCESSORS"; then
49217    # On windows, look in the env
49218    NUM_CORES=$NUMBER_OF_PROCESSORS
49219    FOUND_CORES=yes
49220  fi
49221
49222  if test "x$FOUND_CORES" = xyes; then
49223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
49224$as_echo "$NUM_CORES" >&6; }
49225  else
49226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
49227$as_echo "could not detect number of cores, defaulting to 1" >&6; }
49228    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
49229$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
49230  fi
49231
49232  else
49233    NUM_CORES=$with_num_cores
49234  fi
49235
49236
49237
49238  # How much memory do we have on this build system?
49239
49240# Check whether --with-memory-size was given.
49241if test "${with_memory_size+set}" = set; then :
49242  withval=$with_memory_size;
49243fi
49244
49245  if test "x$with_memory_size" = x; then
49246    # The memory size was not specified, try to probe it.
49247
49248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
49249$as_echo_n "checking for memory size... " >&6; }
49250  # Default to 1024 MB
49251  MEMORY_SIZE=1024
49252  FOUND_MEM=no
49253
49254  if test -f /proc/meminfo; then
49255    # Looks like a Linux (or cygwin) system
49256    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
49257    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
49258    FOUND_MEM=yes
49259  elif test -x /usr/sbin/prtconf; then
49260    # Looks like a Solaris or AIX system
49261    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
49262    FOUND_MEM=yes
49263  elif test -x /usr/sbin/system_profiler; then
49264    # Looks like a MacOSX system
49265    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
49266    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
49267    FOUND_MEM=yes
49268  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
49269    # Windows, but without cygwin
49270    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
49271    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
49272    FOUND_MEM=yes
49273  fi
49274
49275  if test "x$FOUND_MEM" = xyes; then
49276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
49277$as_echo "$MEMORY_SIZE MB" >&6; }
49278  else
49279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
49280$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
49281    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
49282$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
49283  fi
49284
49285  else
49286    MEMORY_SIZE=$with_memory_size
49287  fi
49288
49289
49290
49291  # Provide a decent default number of parallel jobs for make depending on
49292  # number of cores, amount of memory and machine architecture.
49293
49294# Check whether --with-jobs was given.
49295if test "${with_jobs+set}" = set; then :
49296  withval=$with_jobs;
49297fi
49298
49299  if test "x$with_jobs" = x; then
49300    # Number of jobs was not specified, calculate.
49301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
49302$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
49303    # Approximate memory in GB, rounding up a bit.
49304    memory_gb=`expr $MEMORY_SIZE / 1100`
49305    # Pick the lowest of memory in gb and number of cores.
49306    if test "$memory_gb" -lt "$NUM_CORES"; then
49307      JOBS="$memory_gb"
49308    else
49309      JOBS="$NUM_CORES"
49310      # On bigger machines, leave some room for other processes to run
49311      if test "$JOBS" -gt "4"; then
49312        JOBS=`expr $JOBS '*' 90 / 100`
49313      fi
49314    fi
49315    # Cap number of jobs to 16
49316    if test "$JOBS" -gt "16"; then
49317      JOBS=16
49318    fi
49319    if test "$JOBS" -eq "0"; then
49320      JOBS=1
49321    fi
49322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
49323$as_echo "$JOBS" >&6; }
49324  else
49325    JOBS=$with_jobs
49326  fi
49327
49328
49329
49330# Setup smart javac (after cores and memory have been setup)
49331
49332
49333# Check whether --with-sjavac-server-java was given.
49334if test "${with_sjavac_server_java+set}" = set; then :
49335  withval=$with_sjavac_server_java;
49336fi
49337
49338
49339  if test "x$with_sjavac_server_java" != x; then
49340    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
49341    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
49342    if test "x$FOUND_VERSION" = x; then
49343      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
49344    fi
49345  else
49346    SJAVAC_SERVER_JAVA=""
49347    # Hotspot specific options.
49348
49349  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
49350  $ECHO "Command: $JAVA -verbosegc -version" >&5
49351  OUTPUT=`$JAVA -verbosegc -version 2>&1`
49352  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49353  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49354  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49355    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
49356    JVM_ARG_OK=true
49357  else
49358    $ECHO "Arg failed:" >&5
49359    $ECHO "$OUTPUT" >&5
49360    JVM_ARG_OK=false
49361  fi
49362
49363    # JRockit specific options.
49364
49365  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
49366  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
49367  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
49368  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49369  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49370  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49371    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
49372    JVM_ARG_OK=true
49373  else
49374    $ECHO "Arg failed:" >&5
49375    $ECHO "$OUTPUT" >&5
49376    JVM_ARG_OK=false
49377  fi
49378
49379    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
49380  fi
49381
49382
49383  if test "$MEMORY_SIZE" -gt "2500"; then
49384
49385  $ECHO "Check if jvm arg is ok: -d64" >&5
49386  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
49387  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
49388  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49389  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49390  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49391    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
49392    JVM_ARG_OK=true
49393  else
49394    $ECHO "Arg failed:" >&5
49395    $ECHO "$OUTPUT" >&5
49396    JVM_ARG_OK=false
49397  fi
49398
49399    if test "$JVM_ARG_OK" = true; then
49400      JVM_64BIT=true
49401      JVM_ARG_OK=false
49402    fi
49403  fi
49404
49405  if test "$JVM_64BIT" = true; then
49406    if test "$MEMORY_SIZE" -gt "17000"; then
49407
49408  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
49409  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
49410  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
49411  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49412  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49413  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49414    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
49415    JVM_ARG_OK=true
49416  else
49417    $ECHO "Arg failed:" >&5
49418    $ECHO "$OUTPUT" >&5
49419    JVM_ARG_OK=false
49420  fi
49421
49422    fi
49423    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
49424
49425  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
49426  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
49427  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
49428  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49429  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49430  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49431    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
49432    JVM_ARG_OK=true
49433  else
49434    $ECHO "Arg failed:" >&5
49435    $ECHO "$OUTPUT" >&5
49436    JVM_ARG_OK=false
49437  fi
49438
49439    fi
49440    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
49441
49442  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
49443  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
49444  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
49445  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49446  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49447  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49448    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
49449    JVM_ARG_OK=true
49450  else
49451    $ECHO "Arg failed:" >&5
49452    $ECHO "$OUTPUT" >&5
49453    JVM_ARG_OK=false
49454  fi
49455
49456    fi
49457    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
49458
49459  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
49460  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
49461  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
49462  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49463  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49464  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49465    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
49466    JVM_ARG_OK=true
49467  else
49468    $ECHO "Arg failed:" >&5
49469    $ECHO "$OUTPUT" >&5
49470    JVM_ARG_OK=false
49471  fi
49472
49473    fi
49474  fi
49475  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
49476
49477  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
49478  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
49479  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
49480  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49481  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49482  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49483    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
49484    JVM_ARG_OK=true
49485  else
49486    $ECHO "Arg failed:" >&5
49487    $ECHO "$OUTPUT" >&5
49488    JVM_ARG_OK=false
49489  fi
49490
49491  fi
49492  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
49493
49494  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
49495  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
49496  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
49497  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49498  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49499  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49500    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
49501    JVM_ARG_OK=true
49502  else
49503    $ECHO "Arg failed:" >&5
49504    $ECHO "$OUTPUT" >&5
49505    JVM_ARG_OK=false
49506  fi
49507
49508  fi
49509  if test "$JVM_ARG_OK" = false; then
49510
49511  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
49512  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
49513  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
49514  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49515  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49516  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49517    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
49518    JVM_ARG_OK=true
49519  else
49520    $ECHO "Arg failed:" >&5
49521    $ECHO "$OUTPUT" >&5
49522    JVM_ARG_OK=false
49523  fi
49524
49525  fi
49526
49527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
49528$as_echo_n "checking whether to use sjavac... " >&6; }
49529  # Check whether --enable-sjavac was given.
49530if test "${enable_sjavac+set}" = set; then :
49531  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
49532else
49533  ENABLE_SJAVAC='no'
49534fi
49535
49536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
49537$as_echo "$ENABLE_SJAVAC" >&6; }
49538
49539
49540  if test "x$ENABLE_SJAVAC" = xyes; then
49541    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
49542  else
49543    SJAVAC_SERVER_DIR=
49544  fi
49545
49546
49547
49548# Can the C/C++ compiler use precompiled headers?
49549
49550
49551  ###############################################################################
49552  #
49553  # Can the C/C++ compiler use precompiled headers?
49554  #
49555  # Check whether --enable-precompiled-headers was given.
49556if test "${enable_precompiled_headers+set}" = set; then :
49557  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
49558else
49559  ENABLE_PRECOMPH=yes
49560fi
49561
49562
49563  USE_PRECOMPILED_HEADER=1
49564  if test "x$ENABLE_PRECOMPH" = xno; then
49565    USE_PRECOMPILED_HEADER=0
49566  fi
49567
49568  if test "x$ENABLE_PRECOMPH" = xyes; then
49569    # Check that the compiler actually supports precomp headers.
49570    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49571      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
49572$as_echo_n "checking that precompiled headers work... " >&6; }
49573      echo "int alfa();" > conftest.h
49574      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
49575      if test ! -f conftest.hpp.gch; then
49576        USE_PRECOMPILED_HEADER=0
49577        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49578$as_echo "no" >&6; }
49579      else
49580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49581$as_echo "yes" >&6; }
49582      fi
49583      rm -f conftest.h conftest.hpp.gch
49584    fi
49585  fi
49586
49587
49588
49589
49590# Setup use of ccache, if available
49591
49592  # Check whether --enable-ccache was given.
49593if test "${enable_ccache+set}" = set; then :
49594  enableval=$enable_ccache;
49595fi
49596
49597
49598  CCACHE=
49599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
49600$as_echo_n "checking is ccache enabled... " >&6; }
49601  ENABLE_CCACHE=$enable_ccache
49602  if test "x$enable_ccache" = xyes; then
49603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49604$as_echo "yes" >&6; }
49605    OLD_PATH="$PATH"
49606    if test "x$TOOLCHAIN_PATH" != x; then
49607      PATH=$TOOLCHAIN_PATH:$PATH
49608    fi
49609
49610
49611
49612  # Publish this variable in the help.
49613
49614
49615  if test "x$CCACHE" = x; then
49616    # The variable is not set by user, try to locate tool using the code snippet
49617    for ac_prog in ccache
49618do
49619  # Extract the first word of "$ac_prog", so it can be a program name with args.
49620set dummy $ac_prog; ac_word=$2
49621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49622$as_echo_n "checking for $ac_word... " >&6; }
49623if ${ac_cv_path_CCACHE+:} false; then :
49624  $as_echo_n "(cached) " >&6
49625else
49626  case $CCACHE in
49627  [\\/]* | ?:[\\/]*)
49628  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49629  ;;
49630  *)
49631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49632for as_dir in $PATH
49633do
49634  IFS=$as_save_IFS
49635  test -z "$as_dir" && as_dir=.
49636    for ac_exec_ext in '' $ac_executable_extensions; do
49637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49638    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49640    break 2
49641  fi
49642done
49643  done
49644IFS=$as_save_IFS
49645
49646  ;;
49647esac
49648fi
49649CCACHE=$ac_cv_path_CCACHE
49650if test -n "$CCACHE"; then
49651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49652$as_echo "$CCACHE" >&6; }
49653else
49654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49655$as_echo "no" >&6; }
49656fi
49657
49658
49659  test -n "$CCACHE" && break
49660done
49661
49662  else
49663    # The variable is set, but is it from the command line or the environment?
49664
49665    # Try to remove the string !CCACHE! from our list.
49666    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
49667    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
49668      # If it failed, the variable was not from the command line. Ignore it,
49669      # but warn the user (except for BASH, which is always set by the calling BASH).
49670      if test "xCCACHE" != xBASH; then
49671        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
49672$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
49673      fi
49674      # Try to locate tool using the code snippet
49675      for ac_prog in ccache
49676do
49677  # Extract the first word of "$ac_prog", so it can be a program name with args.
49678set dummy $ac_prog; ac_word=$2
49679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49680$as_echo_n "checking for $ac_word... " >&6; }
49681if ${ac_cv_path_CCACHE+:} false; then :
49682  $as_echo_n "(cached) " >&6
49683else
49684  case $CCACHE in
49685  [\\/]* | ?:[\\/]*)
49686  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49687  ;;
49688  *)
49689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49690for as_dir in $PATH
49691do
49692  IFS=$as_save_IFS
49693  test -z "$as_dir" && as_dir=.
49694    for ac_exec_ext in '' $ac_executable_extensions; do
49695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49696    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49698    break 2
49699  fi
49700done
49701  done
49702IFS=$as_save_IFS
49703
49704  ;;
49705esac
49706fi
49707CCACHE=$ac_cv_path_CCACHE
49708if test -n "$CCACHE"; then
49709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49710$as_echo "$CCACHE" >&6; }
49711else
49712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49713$as_echo "no" >&6; }
49714fi
49715
49716
49717  test -n "$CCACHE" && break
49718done
49719
49720    else
49721      # If it succeeded, then it was overridden by the user. We will use it
49722      # for the tool.
49723
49724      # First remove it from the list of overridden variables, so we can test
49725      # for unknown variables in the end.
49726      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49727
49728      # Check if the provided tool contains a complete path.
49729      tool_specified="$CCACHE"
49730      tool_basename="${tool_specified##*/}"
49731      if test "x$tool_basename" = "x$tool_specified"; then
49732        # A command without a complete path is provided, search $PATH.
49733        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
49734$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
49735        # Extract the first word of "$tool_basename", so it can be a program name with args.
49736set dummy $tool_basename; ac_word=$2
49737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49738$as_echo_n "checking for $ac_word... " >&6; }
49739if ${ac_cv_path_CCACHE+:} false; then :
49740  $as_echo_n "(cached) " >&6
49741else
49742  case $CCACHE in
49743  [\\/]* | ?:[\\/]*)
49744  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49745  ;;
49746  *)
49747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49748for as_dir in $PATH
49749do
49750  IFS=$as_save_IFS
49751  test -z "$as_dir" && as_dir=.
49752    for ac_exec_ext in '' $ac_executable_extensions; do
49753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49754    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49756    break 2
49757  fi
49758done
49759  done
49760IFS=$as_save_IFS
49761
49762  ;;
49763esac
49764fi
49765CCACHE=$ac_cv_path_CCACHE
49766if test -n "$CCACHE"; then
49767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49768$as_echo "$CCACHE" >&6; }
49769else
49770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49771$as_echo "no" >&6; }
49772fi
49773
49774
49775        if test "x$CCACHE" = x; then
49776          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49777        fi
49778      else
49779        # Otherwise we believe it is a complete path. Use it as it is.
49780        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
49781$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
49782        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
49783$as_echo_n "checking for CCACHE... " >&6; }
49784        if test ! -x "$tool_specified"; then
49785          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49786$as_echo "not found" >&6; }
49787          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
49788        fi
49789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49790$as_echo "$tool_specified" >&6; }
49791      fi
49792    fi
49793  fi
49794
49795
49796
49797  if test "x$CCACHE" = x; then
49798    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
49799  fi
49800
49801
49802    CCACHE_STATUS="enabled"
49803    PATH="$OLD_PATH"
49804  elif test "x$enable_ccache" = xno; then
49805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
49806$as_echo "no, explicitly disabled" >&6; }
49807  elif test "x$enable_ccache" = x; then
49808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49809$as_echo "no" >&6; }
49810  else
49811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
49812$as_echo "unknown" >&6; }
49813    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
49814  fi
49815
49816
49817
49818# Check whether --with-ccache-dir was given.
49819if test "${with_ccache_dir+set}" = set; then :
49820  withval=$with_ccache_dir;
49821fi
49822
49823
49824  if test "x$with_ccache_dir" != x; then
49825    # When using a non home ccache directory, assume the use is to share ccache files
49826    # with other users. Thus change the umask.
49827    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
49828    if test "x$CCACHE" = x; then
49829      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
49830$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
49831    fi
49832  fi
49833
49834  if test "x$CCACHE" != x; then
49835
49836  if test "x$CCACHE" != x; then
49837    # Only use ccache if it is 3.1.4 or later, which supports
49838    # precompiled headers.
49839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
49840$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
49841    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
49842    if test "x$HAS_GOOD_CCACHE" = x; then
49843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
49844$as_echo "no, disabling ccache" >&6; }
49845      CCACHE=
49846      CCACHE_STATUS="disabled"
49847    else
49848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49849$as_echo "yes" >&6; }
49850      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
49851$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
49852      PUSHED_FLAGS="$CXXFLAGS"
49853      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
49854      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49855/* end confdefs.h.  */
49856
49857int
49858main ()
49859{
49860
49861  ;
49862  return 0;
49863}
49864_ACEOF
49865if ac_fn_cxx_try_compile "$LINENO"; then :
49866  CC_KNOWS_CCACHE_TRICK=yes
49867else
49868  CC_KNOWS_CCACHE_TRICK=no
49869fi
49870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49871      CXXFLAGS="$PUSHED_FLAGS"
49872      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
49873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49874$as_echo "yes" >&6; }
49875      else
49876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
49877$as_echo "no, disabling ccaching of precompiled headers" >&6; }
49878        CCACHE=
49879        CCACHE_STATUS="disabled"
49880      fi
49881    fi
49882  fi
49883
49884  if test "x$CCACHE" != x; then
49885    CCACHE_SLOPPINESS=time_macros
49886    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
49887    CCACHE_FLAGS=-fpch-preprocess
49888
49889    if test "x$SET_CCACHE_DIR" != x; then
49890      mkdir -p $CCACHE_DIR > /dev/null 2>&1
49891      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
49892    fi
49893  fi
49894
49895  fi
49896
49897
49898###############################################################################
49899#
49900# And now the finish...
49901#
49902###############################################################################
49903
49904# Check for some common pitfalls
49905
49906  if test x"$OPENJDK_BUILD_OS" = xwindows; then
49907    file_to_test="$SRC_ROOT/LICENSE"
49908    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
49909      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
49910    fi
49911  fi
49912
49913
49914  # Did user specify any unknown variables?
49915
49916  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
49917    # Replace the separating ! with spaces before presenting for end user.
49918    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
49919    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
49920$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
49921  fi
49922
49923
49924  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
49925$as_echo_n "checking if build directory is on local disk... " >&6; }
49926
49927  # df -l lists only local disks; if the given directory is not found then
49928  # a non-zero exit code is given
49929  if test "x$DF" = x; then
49930    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49931      # msys does not have df; use Windows "net use" instead.
49932      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
49933      if test "x$IS_NETWORK_DISK" = x; then
49934        OUTPUT_DIR_IS_LOCAL="yes"
49935      else
49936        OUTPUT_DIR_IS_LOCAL="no"
49937      fi
49938    else
49939      # No df here, say it's local
49940      OUTPUT_DIR_IS_LOCAL="yes"
49941    fi
49942  else
49943    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
49944      OUTPUT_DIR_IS_LOCAL="yes"
49945    else
49946      OUTPUT_DIR_IS_LOCAL="no"
49947    fi
49948  fi
49949
49950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
49951$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
49952
49953
49954
49955  # Check if the user has any old-style ALT_ variables set.
49956  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
49957
49958  # Before generating output files, test if they exist. If they do, this is a reconfigure.
49959  # Since we can't properly handle the dependencies for this, warn the user about the situation
49960  if test -e $OUTPUT_ROOT/spec.gmk; then
49961    IS_RECONFIGURE=yes
49962  else
49963    IS_RECONFIGURE=no
49964  fi
49965
49966
49967# At the end, call the custom hook. (Dummy macro if no custom sources available)
49968
49969
49970# We're messing a bit with internal autoconf variables to put the config.status
49971# in the output directory instead of the current directory.
49972CONFIG_STATUS="$OUTPUT_ROOT/config.status"
49973
49974# Create the actual output files. Now the main work of configure is done.
49975cat >confcache <<\_ACEOF
49976# This file is a shell script that caches the results of configure
49977# tests run on this system so they can be shared between configure
49978# scripts and configure runs, see configure's option --config-cache.
49979# It is not useful on other systems.  If it contains results you don't
49980# want to keep, you may remove or edit it.
49981#
49982# config.status only pays attention to the cache file if you give it
49983# the --recheck option to rerun configure.
49984#
49985# `ac_cv_env_foo' variables (set or unset) will be overridden when
49986# loading this file, other *unset* `ac_cv_foo' will be assigned the
49987# following values.
49988
49989_ACEOF
49990
49991# The following way of writing the cache mishandles newlines in values,
49992# but we know of no workaround that is simple, portable, and efficient.
49993# So, we kill variables containing newlines.
49994# Ultrix sh set writes to stderr and can't be redirected directly,
49995# and sets the high bit in the cache file unless we assign to the vars.
49996(
49997  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
49998    eval ac_val=\$$ac_var
49999    case $ac_val in #(
50000    *${as_nl}*)
50001      case $ac_var in #(
50002      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
50003$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
50004      esac
50005      case $ac_var in #(
50006      _ | IFS | as_nl) ;; #(
50007      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
50008      *) { eval $ac_var=; unset $ac_var;} ;;
50009      esac ;;
50010    esac
50011  done
50012
50013  (set) 2>&1 |
50014    case $as_nl`(ac_space=' '; set) 2>&1` in #(
50015    *${as_nl}ac_space=\ *)
50016      # `set' does not quote correctly, so add quotes: double-quote
50017      # substitution turns \\\\ into \\, and sed turns \\ into \.
50018      sed -n \
50019	"s/'/'\\\\''/g;
50020	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
50021      ;; #(
50022    *)
50023      # `set' quotes correctly as required by POSIX, so do not add quotes.
50024      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
50025      ;;
50026    esac |
50027    sort
50028) |
50029  sed '
50030     /^ac_cv_env_/b end
50031     t clear
50032     :clear
50033     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
50034     t end
50035     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
50036     :end' >>confcache
50037if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
50038  if test -w "$cache_file"; then
50039    if test "x$cache_file" != "x/dev/null"; then
50040      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
50041$as_echo "$as_me: updating cache $cache_file" >&6;}
50042      if test ! -f "$cache_file" || test -h "$cache_file"; then
50043	cat confcache >"$cache_file"
50044      else
50045        case $cache_file in #(
50046        */* | ?:*)
50047	  mv -f confcache "$cache_file"$$ &&
50048	  mv -f "$cache_file"$$ "$cache_file" ;; #(
50049        *)
50050	  mv -f confcache "$cache_file" ;;
50051	esac
50052      fi
50053    fi
50054  else
50055    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
50056$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
50057  fi
50058fi
50059rm -f confcache
50060
50061test "x$prefix" = xNONE && prefix=$ac_default_prefix
50062# Let make expand exec_prefix.
50063test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
50064
50065DEFS=-DHAVE_CONFIG_H
50066
50067ac_libobjs=
50068ac_ltlibobjs=
50069U=
50070for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
50071  # 1. Remove the extension, and $U if already installed.
50072  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
50073  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
50074  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
50075  #    will be set to the directory where LIBOBJS objects are built.
50076  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
50077  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
50078done
50079LIBOBJS=$ac_libobjs
50080
50081LTLIBOBJS=$ac_ltlibobjs
50082
50083
50084
50085: "${CONFIG_STATUS=./config.status}"
50086ac_write_fail=0
50087ac_clean_files_save=$ac_clean_files
50088ac_clean_files="$ac_clean_files $CONFIG_STATUS"
50089{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
50090$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
50091as_write_fail=0
50092cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
50093#! $SHELL
50094# Generated by $as_me.
50095# Run this file to recreate the current configuration.
50096# Compiler output produced by configure, useful for debugging
50097# configure, is in config.log if it exists.
50098
50099debug=false
50100ac_cs_recheck=false
50101ac_cs_silent=false
50102
50103SHELL=\${CONFIG_SHELL-$SHELL}
50104export SHELL
50105_ASEOF
50106cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
50107## -------------------- ##
50108## M4sh Initialization. ##
50109## -------------------- ##
50110
50111# Be more Bourne compatible
50112DUALCASE=1; export DUALCASE # for MKS sh
50113if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
50114  emulate sh
50115  NULLCMD=:
50116  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
50117  # is contrary to our usage.  Disable this feature.
50118  alias -g '${1+"$@"}'='"$@"'
50119  setopt NO_GLOB_SUBST
50120else
50121  case `(set -o) 2>/dev/null` in #(
50122  *posix*) :
50123    set -o posix ;; #(
50124  *) :
50125     ;;
50126esac
50127fi
50128
50129
50130as_nl='
50131'
50132export as_nl
50133# Printing a long string crashes Solaris 7 /usr/bin/printf.
50134as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
50135as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
50136as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
50137# Prefer a ksh shell builtin over an external printf program on Solaris,
50138# but without wasting forks for bash or zsh.
50139if test -z "$BASH_VERSION$ZSH_VERSION" \
50140    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50141  as_echo='print -r --'
50142  as_echo_n='print -rn --'
50143elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50144  as_echo='printf %s\n'
50145  as_echo_n='printf %s'
50146else
50147  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
50148    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
50149    as_echo_n='/usr/ucb/echo -n'
50150  else
50151    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
50152    as_echo_n_body='eval
50153      arg=$1;
50154      case $arg in #(
50155      *"$as_nl"*)
50156	expr "X$arg" : "X\\(.*\\)$as_nl";
50157	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
50158      esac;
50159      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
50160    '
50161    export as_echo_n_body
50162    as_echo_n='sh -c $as_echo_n_body as_echo'
50163  fi
50164  export as_echo_body
50165  as_echo='sh -c $as_echo_body as_echo'
50166fi
50167
50168# The user is always right.
50169if test "${PATH_SEPARATOR+set}" != set; then
50170  PATH_SEPARATOR=:
50171  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
50172    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
50173      PATH_SEPARATOR=';'
50174  }
50175fi
50176
50177
50178# IFS
50179# We need space, tab and new line, in precisely that order.  Quoting is
50180# there to prevent editors from complaining about space-tab.
50181# (If _AS_PATH_WALK were called with IFS unset, it would disable word
50182# splitting by setting IFS to empty value.)
50183IFS=" ""	$as_nl"
50184
50185# Find who we are.  Look in the path if we contain no directory separator.
50186as_myself=
50187case $0 in #((
50188  *[\\/]* ) as_myself=$0 ;;
50189  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50190for as_dir in $PATH
50191do
50192  IFS=$as_save_IFS
50193  test -z "$as_dir" && as_dir=.
50194    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
50195  done
50196IFS=$as_save_IFS
50197
50198     ;;
50199esac
50200# We did not find ourselves, most probably we were run as `sh COMMAND'
50201# in which case we are not to be found in the path.
50202if test "x$as_myself" = x; then
50203  as_myself=$0
50204fi
50205if test ! -f "$as_myself"; then
50206  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
50207  exit 1
50208fi
50209
50210# Unset variables that we do not need and which cause bugs (e.g. in
50211# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
50212# suppresses any "Segmentation fault" message there.  '((' could
50213# trigger a bug in pdksh 5.2.14.
50214for as_var in BASH_ENV ENV MAIL MAILPATH
50215do eval test x\${$as_var+set} = xset \
50216  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
50217done
50218PS1='$ '
50219PS2='> '
50220PS4='+ '
50221
50222# NLS nuisances.
50223LC_ALL=C
50224export LC_ALL
50225LANGUAGE=C
50226export LANGUAGE
50227
50228# CDPATH.
50229(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
50230
50231
50232# as_fn_error STATUS ERROR [LINENO LOG_FD]
50233# ----------------------------------------
50234# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
50235# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
50236# script with STATUS, using 1 if that was 0.
50237as_fn_error ()
50238{
50239  as_status=$1; test $as_status -eq 0 && as_status=1
50240  if test "$4"; then
50241    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
50242    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
50243  fi
50244  $as_echo "$as_me: error: $2" >&2
50245  as_fn_exit $as_status
50246} # as_fn_error
50247
50248
50249# as_fn_set_status STATUS
50250# -----------------------
50251# Set $? to STATUS, without forking.
50252as_fn_set_status ()
50253{
50254  return $1
50255} # as_fn_set_status
50256
50257# as_fn_exit STATUS
50258# -----------------
50259# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
50260as_fn_exit ()
50261{
50262  set +e
50263  as_fn_set_status $1
50264  exit $1
50265} # as_fn_exit
50266
50267# as_fn_unset VAR
50268# ---------------
50269# Portably unset VAR.
50270as_fn_unset ()
50271{
50272  { eval $1=; unset $1;}
50273}
50274as_unset=as_fn_unset
50275# as_fn_append VAR VALUE
50276# ----------------------
50277# Append the text in VALUE to the end of the definition contained in VAR. Take
50278# advantage of any shell optimizations that allow amortized linear growth over
50279# repeated appends, instead of the typical quadratic growth present in naive
50280# implementations.
50281if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
50282  eval 'as_fn_append ()
50283  {
50284    eval $1+=\$2
50285  }'
50286else
50287  as_fn_append ()
50288  {
50289    eval $1=\$$1\$2
50290  }
50291fi # as_fn_append
50292
50293# as_fn_arith ARG...
50294# ------------------
50295# Perform arithmetic evaluation on the ARGs, and store the result in the
50296# global $as_val. Take advantage of shells that can avoid forks. The arguments
50297# must be portable across $(()) and expr.
50298if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
50299  eval 'as_fn_arith ()
50300  {
50301    as_val=$(( $* ))
50302  }'
50303else
50304  as_fn_arith ()
50305  {
50306    as_val=`expr "$@" || test $? -eq 1`
50307  }
50308fi # as_fn_arith
50309
50310
50311if expr a : '\(a\)' >/dev/null 2>&1 &&
50312   test "X`expr 00001 : '.*\(...\)'`" = X001; then
50313  as_expr=expr
50314else
50315  as_expr=false
50316fi
50317
50318if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
50319  as_basename=basename
50320else
50321  as_basename=false
50322fi
50323
50324if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
50325  as_dirname=dirname
50326else
50327  as_dirname=false
50328fi
50329
50330as_me=`$as_basename -- "$0" ||
50331$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
50332	 X"$0" : 'X\(//\)$' \| \
50333	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
50334$as_echo X/"$0" |
50335    sed '/^.*\/\([^/][^/]*\)\/*$/{
50336	    s//\1/
50337	    q
50338	  }
50339	  /^X\/\(\/\/\)$/{
50340	    s//\1/
50341	    q
50342	  }
50343	  /^X\/\(\/\).*/{
50344	    s//\1/
50345	    q
50346	  }
50347	  s/.*/./; q'`
50348
50349# Avoid depending upon Character Ranges.
50350as_cr_letters='abcdefghijklmnopqrstuvwxyz'
50351as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
50352as_cr_Letters=$as_cr_letters$as_cr_LETTERS
50353as_cr_digits='0123456789'
50354as_cr_alnum=$as_cr_Letters$as_cr_digits
50355
50356ECHO_C= ECHO_N= ECHO_T=
50357case `echo -n x` in #(((((
50358-n*)
50359  case `echo 'xy\c'` in
50360  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
50361  xy)  ECHO_C='\c';;
50362  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
50363       ECHO_T='	';;
50364  esac;;
50365*)
50366  ECHO_N='-n';;
50367esac
50368
50369rm -f conf$$ conf$$.exe conf$$.file
50370if test -d conf$$.dir; then
50371  rm -f conf$$.dir/conf$$.file
50372else
50373  rm -f conf$$.dir
50374  mkdir conf$$.dir 2>/dev/null
50375fi
50376if (echo >conf$$.file) 2>/dev/null; then
50377  if ln -s conf$$.file conf$$ 2>/dev/null; then
50378    as_ln_s='ln -s'
50379    # ... but there are two gotchas:
50380    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
50381    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
50382    # In both cases, we have to default to `cp -pR'.
50383    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
50384      as_ln_s='cp -pR'
50385  elif ln conf$$.file conf$$ 2>/dev/null; then
50386    as_ln_s=ln
50387  else
50388    as_ln_s='cp -pR'
50389  fi
50390else
50391  as_ln_s='cp -pR'
50392fi
50393rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
50394rmdir conf$$.dir 2>/dev/null
50395
50396
50397# as_fn_mkdir_p
50398# -------------
50399# Create "$as_dir" as a directory, including parents if necessary.
50400as_fn_mkdir_p ()
50401{
50402
50403  case $as_dir in #(
50404  -*) as_dir=./$as_dir;;
50405  esac
50406  test -d "$as_dir" || eval $as_mkdir_p || {
50407    as_dirs=
50408    while :; do
50409      case $as_dir in #(
50410      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
50411      *) as_qdir=$as_dir;;
50412      esac
50413      as_dirs="'$as_qdir' $as_dirs"
50414      as_dir=`$as_dirname -- "$as_dir" ||
50415$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50416	 X"$as_dir" : 'X\(//\)[^/]' \| \
50417	 X"$as_dir" : 'X\(//\)$' \| \
50418	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
50419$as_echo X"$as_dir" |
50420    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50421	    s//\1/
50422	    q
50423	  }
50424	  /^X\(\/\/\)[^/].*/{
50425	    s//\1/
50426	    q
50427	  }
50428	  /^X\(\/\/\)$/{
50429	    s//\1/
50430	    q
50431	  }
50432	  /^X\(\/\).*/{
50433	    s//\1/
50434	    q
50435	  }
50436	  s/.*/./; q'`
50437      test -d "$as_dir" && break
50438    done
50439    test -z "$as_dirs" || eval "mkdir $as_dirs"
50440  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
50441
50442
50443} # as_fn_mkdir_p
50444if mkdir -p . 2>/dev/null; then
50445  as_mkdir_p='mkdir -p "$as_dir"'
50446else
50447  test -d ./-p && rmdir ./-p
50448  as_mkdir_p=false
50449fi
50450
50451
50452# as_fn_executable_p FILE
50453# -----------------------
50454# Test if FILE is an executable regular file.
50455as_fn_executable_p ()
50456{
50457  test -f "$1" && test -x "$1"
50458} # as_fn_executable_p
50459as_test_x='test -x'
50460as_executable_p=as_fn_executable_p
50461
50462# Sed expression to map a string onto a valid CPP name.
50463as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
50464
50465# Sed expression to map a string onto a valid variable name.
50466as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
50467
50468
50469exec 6>&1
50470## ----------------------------------- ##
50471## Main body of $CONFIG_STATUS script. ##
50472## ----------------------------------- ##
50473_ASEOF
50474test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
50475
50476cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50477# Save the log message, to keep $0 and so on meaningful, and to
50478# report actual input values of CONFIG_FILES etc. instead of their
50479# values after options handling.
50480ac_log="
50481This file was extended by OpenJDK $as_me jdk9, which was
50482generated by GNU Autoconf 2.69.  Invocation command line was
50483
50484  CONFIG_FILES    = $CONFIG_FILES
50485  CONFIG_HEADERS  = $CONFIG_HEADERS
50486  CONFIG_LINKS    = $CONFIG_LINKS
50487  CONFIG_COMMANDS = $CONFIG_COMMANDS
50488  $ $0 $@
50489
50490on `(hostname || uname -n) 2>/dev/null | sed 1q`
50491"
50492
50493_ACEOF
50494
50495case $ac_config_files in *"
50496"*) set x $ac_config_files; shift; ac_config_files=$*;;
50497esac
50498
50499case $ac_config_headers in *"
50500"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
50501esac
50502
50503
50504cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50505# Files that config.status was made for.
50506config_files="$ac_config_files"
50507config_headers="$ac_config_headers"
50508
50509_ACEOF
50510
50511cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50512ac_cs_usage="\
50513\`$as_me' instantiates files and other configuration actions
50514from templates according to the current configuration.  Unless the files
50515and actions are specified as TAGs, all are instantiated by default.
50516
50517Usage: $0 [OPTION]... [TAG]...
50518
50519  -h, --help       print this help, then exit
50520  -V, --version    print version number and configuration settings, then exit
50521      --config     print configuration, then exit
50522  -q, --quiet, --silent
50523                   do not print progress messages
50524  -d, --debug      don't remove temporary files
50525      --recheck    update $as_me by reconfiguring in the same conditions
50526      --file=FILE[:TEMPLATE]
50527                   instantiate the configuration file FILE
50528      --header=FILE[:TEMPLATE]
50529                   instantiate the configuration header FILE
50530
50531Configuration files:
50532$config_files
50533
50534Configuration headers:
50535$config_headers
50536
50537Report bugs to <build-dev@openjdk.java.net>.
50538OpenJDK home page: <http://openjdk.java.net>."
50539
50540_ACEOF
50541cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50542ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
50543ac_cs_version="\\
50544OpenJDK config.status jdk9
50545configured by $0, generated by GNU Autoconf 2.69,
50546  with options \\"\$ac_cs_config\\"
50547
50548Copyright (C) 2012 Free Software Foundation, Inc.
50549This config.status script is free software; the Free Software Foundation
50550gives unlimited permission to copy, distribute and modify it."
50551
50552ac_pwd='$ac_pwd'
50553srcdir='$srcdir'
50554AWK='$AWK'
50555test -n "\$AWK" || AWK=awk
50556_ACEOF
50557
50558cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50559# The default lists apply if the user does not specify any file.
50560ac_need_defaults=:
50561while test $# != 0
50562do
50563  case $1 in
50564  --*=?*)
50565    ac_option=`expr "X$1" : 'X\([^=]*\)='`
50566    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
50567    ac_shift=:
50568    ;;
50569  --*=)
50570    ac_option=`expr "X$1" : 'X\([^=]*\)='`
50571    ac_optarg=
50572    ac_shift=:
50573    ;;
50574  *)
50575    ac_option=$1
50576    ac_optarg=$2
50577    ac_shift=shift
50578    ;;
50579  esac
50580
50581  case $ac_option in
50582  # Handling of the options.
50583  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
50584    ac_cs_recheck=: ;;
50585  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
50586    $as_echo "$ac_cs_version"; exit ;;
50587  --config | --confi | --conf | --con | --co | --c )
50588    $as_echo "$ac_cs_config"; exit ;;
50589  --debug | --debu | --deb | --de | --d | -d )
50590    debug=: ;;
50591  --file | --fil | --fi | --f )
50592    $ac_shift
50593    case $ac_optarg in
50594    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
50595    '') as_fn_error $? "missing file argument" ;;
50596    esac
50597    as_fn_append CONFIG_FILES " '$ac_optarg'"
50598    ac_need_defaults=false;;
50599  --header | --heade | --head | --hea )
50600    $ac_shift
50601    case $ac_optarg in
50602    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
50603    esac
50604    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
50605    ac_need_defaults=false;;
50606  --he | --h)
50607    # Conflict between --help and --header
50608    as_fn_error $? "ambiguous option: \`$1'
50609Try \`$0 --help' for more information.";;
50610  --help | --hel | -h )
50611    $as_echo "$ac_cs_usage"; exit ;;
50612  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
50613  | -silent | --silent | --silen | --sile | --sil | --si | --s)
50614    ac_cs_silent=: ;;
50615
50616  # This is an error.
50617  -*) as_fn_error $? "unrecognized option: \`$1'
50618Try \`$0 --help' for more information." ;;
50619
50620  *) as_fn_append ac_config_targets " $1"
50621     ac_need_defaults=false ;;
50622
50623  esac
50624  shift
50625done
50626
50627ac_configure_extra_args=
50628
50629if $ac_cs_silent; then
50630  exec 6>/dev/null
50631  ac_configure_extra_args="$ac_configure_extra_args --silent"
50632fi
50633
50634_ACEOF
50635cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50636if \$ac_cs_recheck; then
50637  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
50638  shift
50639  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
50640  CONFIG_SHELL='$SHELL'
50641  export CONFIG_SHELL
50642  exec "\$@"
50643fi
50644
50645_ACEOF
50646cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50647exec 5>>config.log
50648{
50649  echo
50650  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
50651## Running $as_me. ##
50652_ASBOX
50653  $as_echo "$ac_log"
50654} >&5
50655
50656_ACEOF
50657cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50658_ACEOF
50659
50660cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50661
50662# Handling of arguments.
50663for ac_config_target in $ac_config_targets
50664do
50665  case $ac_config_target in
50666    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
50667    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
50668    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
50669    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
50670    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
50671    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
50672    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
50673
50674  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
50675  esac
50676done
50677
50678
50679# If the user did not use the arguments to specify the items to instantiate,
50680# then the envvar interface is used.  Set only those that are not.
50681# We use the long form for the default assignment because of an extremely
50682# bizarre bug on SunOS 4.1.3.
50683if $ac_need_defaults; then
50684  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
50685  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
50686fi
50687
50688# Have a temporary directory for convenience.  Make it in the build tree
50689# simply because there is no reason against having it here, and in addition,
50690# creating and moving files from /tmp can sometimes cause problems.
50691# Hook for its removal unless debugging.
50692# Note that there is a small window in which the directory will not be cleaned:
50693# after its creation but before its name has been assigned to `$tmp'.
50694$debug ||
50695{
50696  tmp= ac_tmp=
50697  trap 'exit_status=$?
50698  : "${ac_tmp:=$tmp}"
50699  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
50700' 0
50701  trap 'as_fn_exit 1' 1 2 13 15
50702}
50703# Create a (secure) tmp directory for tmp files.
50704
50705{
50706  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
50707  test -d "$tmp"
50708}  ||
50709{
50710  tmp=./conf$$-$RANDOM
50711  (umask 077 && mkdir "$tmp")
50712} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
50713ac_tmp=$tmp
50714
50715# Set up the scripts for CONFIG_FILES section.
50716# No need to generate them if there are no CONFIG_FILES.
50717# This happens for instance with `./config.status config.h'.
50718if test -n "$CONFIG_FILES"; then
50719
50720
50721ac_cr=`echo X | tr X '\015'`
50722# On cygwin, bash can eat \r inside `` if the user requested igncr.
50723# But we know of no other shell where ac_cr would be empty at this
50724# point, so we can use a bashism as a fallback.
50725if test "x$ac_cr" = x; then
50726  eval ac_cr=\$\'\\r\'
50727fi
50728ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
50729if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
50730  ac_cs_awk_cr='\\r'
50731else
50732  ac_cs_awk_cr=$ac_cr
50733fi
50734
50735echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
50736_ACEOF
50737
50738
50739{
50740  echo "cat >conf$$subs.awk <<_ACEOF" &&
50741  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
50742  echo "_ACEOF"
50743} >conf$$subs.sh ||
50744  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50745ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
50746ac_delim='%!_!# '
50747for ac_last_try in false false false false false :; do
50748  . ./conf$$subs.sh ||
50749    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50750
50751  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
50752  if test $ac_delim_n = $ac_delim_num; then
50753    break
50754  elif $ac_last_try; then
50755    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50756  else
50757    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50758  fi
50759done
50760rm -f conf$$subs.sh
50761
50762cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50763cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
50764_ACEOF
50765sed -n '
50766h
50767s/^/S["/; s/!.*/"]=/
50768p
50769g
50770s/^[^!]*!//
50771:repl
50772t repl
50773s/'"$ac_delim"'$//
50774t delim
50775:nl
50776h
50777s/\(.\{148\}\)..*/\1/
50778t more1
50779s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
50780p
50781n
50782b repl
50783:more1
50784s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50785p
50786g
50787s/.\{148\}//
50788t nl
50789:delim
50790h
50791s/\(.\{148\}\)..*/\1/
50792t more2
50793s/["\\]/\\&/g; s/^/"/; s/$/"/
50794p
50795b
50796:more2
50797s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50798p
50799g
50800s/.\{148\}//
50801t delim
50802' <conf$$subs.awk | sed '
50803/^[^""]/{
50804  N
50805  s/\n//
50806}
50807' >>$CONFIG_STATUS || ac_write_fail=1
50808rm -f conf$$subs.awk
50809cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50810_ACAWK
50811cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
50812  for (key in S) S_is_set[key] = 1
50813  FS = ""
50814
50815}
50816{
50817  line = $ 0
50818  nfields = split(line, field, "@")
50819  substed = 0
50820  len = length(field[1])
50821  for (i = 2; i < nfields; i++) {
50822    key = field[i]
50823    keylen = length(key)
50824    if (S_is_set[key]) {
50825      value = S[key]
50826      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
50827      len += length(value) + length(field[++i])
50828      substed = 1
50829    } else
50830      len += 1 + keylen
50831  }
50832
50833  print line
50834}
50835
50836_ACAWK
50837_ACEOF
50838cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50839if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
50840  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
50841else
50842  cat
50843fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
50844  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
50845_ACEOF
50846
50847# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
50848# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
50849# trailing colons and then remove the whole line if VPATH becomes empty
50850# (actually we leave an empty line to preserve line numbers).
50851if test "x$srcdir" = x.; then
50852  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
50853h
50854s///
50855s/^/:/
50856s/[	 ]*$/:/
50857s/:\$(srcdir):/:/g
50858s/:\${srcdir}:/:/g
50859s/:@srcdir@:/:/g
50860s/^:*//
50861s/:*$//
50862x
50863s/\(=[	 ]*\).*/\1/
50864G
50865s/\n//
50866s/^[^=]*=[	 ]*$//
50867}'
50868fi
50869
50870cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50871fi # test -n "$CONFIG_FILES"
50872
50873# Set up the scripts for CONFIG_HEADERS section.
50874# No need to generate them if there are no CONFIG_HEADERS.
50875# This happens for instance with `./config.status Makefile'.
50876if test -n "$CONFIG_HEADERS"; then
50877cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
50878BEGIN {
50879_ACEOF
50880
50881# Transform confdefs.h into an awk script `defines.awk', embedded as
50882# here-document in config.status, that substitutes the proper values into
50883# config.h.in to produce config.h.
50884
50885# Create a delimiter string that does not exist in confdefs.h, to ease
50886# handling of long lines.
50887ac_delim='%!_!# '
50888for ac_last_try in false false :; do
50889  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
50890  if test -z "$ac_tt"; then
50891    break
50892  elif $ac_last_try; then
50893    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
50894  else
50895    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50896  fi
50897done
50898
50899# For the awk script, D is an array of macro values keyed by name,
50900# likewise P contains macro parameters if any.  Preserve backslash
50901# newline sequences.
50902
50903ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
50904sed -n '
50905s/.\{148\}/&'"$ac_delim"'/g
50906t rset
50907:rset
50908s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
50909t def
50910d
50911:def
50912s/\\$//
50913t bsnl
50914s/["\\]/\\&/g
50915s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
50916D["\1"]=" \3"/p
50917s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
50918d
50919:bsnl
50920s/["\\]/\\&/g
50921s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
50922D["\1"]=" \3\\\\\\n"\\/p
50923t cont
50924s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
50925t cont
50926d
50927:cont
50928n
50929s/.\{148\}/&'"$ac_delim"'/g
50930t clear
50931:clear
50932s/\\$//
50933t bsnlc
50934s/["\\]/\\&/g; s/^/"/; s/$/"/p
50935d
50936:bsnlc
50937s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
50938b cont
50939' <confdefs.h | sed '
50940s/'"$ac_delim"'/"\\\
50941"/g' >>$CONFIG_STATUS || ac_write_fail=1
50942
50943cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50944  for (key in D) D_is_set[key] = 1
50945  FS = ""
50946}
50947/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
50948  line = \$ 0
50949  split(line, arg, " ")
50950  if (arg[1] == "#") {
50951    defundef = arg[2]
50952    mac1 = arg[3]
50953  } else {
50954    defundef = substr(arg[1], 2)
50955    mac1 = arg[2]
50956  }
50957  split(mac1, mac2, "(") #)
50958  macro = mac2[1]
50959  prefix = substr(line, 1, index(line, defundef) - 1)
50960  if (D_is_set[macro]) {
50961    # Preserve the white space surrounding the "#".
50962    print prefix "define", macro P[macro] D[macro]
50963    next
50964  } else {
50965    # Replace #undef with comments.  This is necessary, for example,
50966    # in the case of _POSIX_SOURCE, which is predefined and required
50967    # on some systems where configure will not decide to define it.
50968    if (defundef == "undef") {
50969      print "/*", prefix defundef, macro, "*/"
50970      next
50971    }
50972  }
50973}
50974{ print }
50975_ACAWK
50976_ACEOF
50977cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50978  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
50979fi # test -n "$CONFIG_HEADERS"
50980
50981
50982eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
50983shift
50984for ac_tag
50985do
50986  case $ac_tag in
50987  :[FHLC]) ac_mode=$ac_tag; continue;;
50988  esac
50989  case $ac_mode$ac_tag in
50990  :[FHL]*:*);;
50991  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
50992  :[FH]-) ac_tag=-:-;;
50993  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
50994  esac
50995  ac_save_IFS=$IFS
50996  IFS=:
50997  set x $ac_tag
50998  IFS=$ac_save_IFS
50999  shift
51000  ac_file=$1
51001  shift
51002
51003  case $ac_mode in
51004  :L) ac_source=$1;;
51005  :[FH])
51006    ac_file_inputs=
51007    for ac_f
51008    do
51009      case $ac_f in
51010      -) ac_f="$ac_tmp/stdin";;
51011      *) # Look for the file first in the build tree, then in the source tree
51012	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
51013	 # because $ac_f cannot contain `:'.
51014	 test -f "$ac_f" ||
51015	   case $ac_f in
51016	   [\\/$]*) false;;
51017	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
51018	   esac ||
51019	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
51020      esac
51021      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
51022      as_fn_append ac_file_inputs " '$ac_f'"
51023    done
51024
51025    # Let's still pretend it is `configure' which instantiates (i.e., don't
51026    # use $as_me), people would be surprised to read:
51027    #    /* config.h.  Generated by config.status.  */
51028    configure_input='Generated from '`
51029	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
51030	`' by configure.'
51031    if test x"$ac_file" != x-; then
51032      configure_input="$ac_file.  $configure_input"
51033      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
51034$as_echo "$as_me: creating $ac_file" >&6;}
51035    fi
51036    # Neutralize special characters interpreted by sed in replacement strings.
51037    case $configure_input in #(
51038    *\&* | *\|* | *\\* )
51039       ac_sed_conf_input=`$as_echo "$configure_input" |
51040       sed 's/[\\\\&|]/\\\\&/g'`;; #(
51041    *) ac_sed_conf_input=$configure_input;;
51042    esac
51043
51044    case $ac_tag in
51045    *:-:* | *:-) cat >"$ac_tmp/stdin" \
51046      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
51047    esac
51048    ;;
51049  esac
51050
51051  ac_dir=`$as_dirname -- "$ac_file" ||
51052$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51053	 X"$ac_file" : 'X\(//\)[^/]' \| \
51054	 X"$ac_file" : 'X\(//\)$' \| \
51055	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
51056$as_echo X"$ac_file" |
51057    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51058	    s//\1/
51059	    q
51060	  }
51061	  /^X\(\/\/\)[^/].*/{
51062	    s//\1/
51063	    q
51064	  }
51065	  /^X\(\/\/\)$/{
51066	    s//\1/
51067	    q
51068	  }
51069	  /^X\(\/\).*/{
51070	    s//\1/
51071	    q
51072	  }
51073	  s/.*/./; q'`
51074  as_dir="$ac_dir"; as_fn_mkdir_p
51075  ac_builddir=.
51076
51077case "$ac_dir" in
51078.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
51079*)
51080  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
51081  # A ".." for each directory in $ac_dir_suffix.
51082  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
51083  case $ac_top_builddir_sub in
51084  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
51085  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
51086  esac ;;
51087esac
51088ac_abs_top_builddir=$ac_pwd
51089ac_abs_builddir=$ac_pwd$ac_dir_suffix
51090# for backward compatibility:
51091ac_top_builddir=$ac_top_build_prefix
51092
51093case $srcdir in
51094  .)  # We are building in place.
51095    ac_srcdir=.
51096    ac_top_srcdir=$ac_top_builddir_sub
51097    ac_abs_top_srcdir=$ac_pwd ;;
51098  [\\/]* | ?:[\\/]* )  # Absolute name.
51099    ac_srcdir=$srcdir$ac_dir_suffix;
51100    ac_top_srcdir=$srcdir
51101    ac_abs_top_srcdir=$srcdir ;;
51102  *) # Relative name.
51103    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
51104    ac_top_srcdir=$ac_top_build_prefix$srcdir
51105    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
51106esac
51107ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
51108
51109
51110  case $ac_mode in
51111  :F)
51112  #
51113  # CONFIG_FILE
51114  #
51115
51116_ACEOF
51117
51118cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51119# If the template does not know about datarootdir, expand it.
51120# FIXME: This hack should be removed a few years after 2.60.
51121ac_datarootdir_hack=; ac_datarootdir_seen=
51122ac_sed_dataroot='
51123/datarootdir/ {
51124  p
51125  q
51126}
51127/@datadir@/p
51128/@docdir@/p
51129/@infodir@/p
51130/@localedir@/p
51131/@mandir@/p'
51132case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
51133*datarootdir*) ac_datarootdir_seen=yes;;
51134*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
51135  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
51136$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
51137_ACEOF
51138cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51139  ac_datarootdir_hack='
51140  s&@datadir@&$datadir&g
51141  s&@docdir@&$docdir&g
51142  s&@infodir@&$infodir&g
51143  s&@localedir@&$localedir&g
51144  s&@mandir@&$mandir&g
51145  s&\\\${datarootdir}&$datarootdir&g' ;;
51146esac
51147_ACEOF
51148
51149# Neutralize VPATH when `$srcdir' = `.'.
51150# Shell code in configure.ac might set extrasub.
51151# FIXME: do we really want to maintain this feature?
51152cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51153ac_sed_extra="$ac_vpsub
51154$extrasub
51155_ACEOF
51156cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51157:t
51158/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
51159s|@configure_input@|$ac_sed_conf_input|;t t
51160s&@top_builddir@&$ac_top_builddir_sub&;t t
51161s&@top_build_prefix@&$ac_top_build_prefix&;t t
51162s&@srcdir@&$ac_srcdir&;t t
51163s&@abs_srcdir@&$ac_abs_srcdir&;t t
51164s&@top_srcdir@&$ac_top_srcdir&;t t
51165s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
51166s&@builddir@&$ac_builddir&;t t
51167s&@abs_builddir@&$ac_abs_builddir&;t t
51168s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
51169$ac_datarootdir_hack
51170"
51171eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
51172  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51173
51174test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
51175  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
51176  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
51177      "$ac_tmp/out"`; test -z "$ac_out"; } &&
51178  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
51179which seems to be undefined.  Please make sure it is defined" >&5
51180$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
51181which seems to be undefined.  Please make sure it is defined" >&2;}
51182
51183  rm -f "$ac_tmp/stdin"
51184  case $ac_file in
51185  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
51186  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
51187  esac \
51188  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51189 ;;
51190  :H)
51191  #
51192  # CONFIG_HEADER
51193  #
51194  if test x"$ac_file" != x-; then
51195    {
51196      $as_echo "/* $configure_input  */" \
51197      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
51198    } >"$ac_tmp/config.h" \
51199      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51200    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
51201      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
51202$as_echo "$as_me: $ac_file is unchanged" >&6;}
51203    else
51204      rm -f "$ac_file"
51205      mv "$ac_tmp/config.h" "$ac_file" \
51206	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
51207    fi
51208  else
51209    $as_echo "/* $configure_input  */" \
51210      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
51211      || as_fn_error $? "could not create -" "$LINENO" 5
51212  fi
51213 ;;
51214
51215
51216  esac
51217
51218done # for ac_tag
51219
51220
51221as_fn_exit 0
51222_ACEOF
51223ac_clean_files=$ac_clean_files_save
51224
51225test $ac_write_fail = 0 ||
51226  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
51227
51228
51229# configure is writing to config.log, and then calls config.status.
51230# config.status does its own redirection, appending to config.log.
51231# Unfortunately, on DOS this fails, as config.log is still kept open
51232# by configure, so config.status won't be able to write to it; its
51233# output is simply discarded.  So we exec the FD to /dev/null,
51234# effectively closing config.log, so it can be properly (re)opened and
51235# appended to by config.status.  When coming back to configure, we
51236# need to make the FD available again.
51237if test "$no_create" != yes; then
51238  ac_cs_success=:
51239  ac_config_status_args=
51240  test "$silent" = yes &&
51241    ac_config_status_args="$ac_config_status_args --quiet"
51242  exec 5>/dev/null
51243  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
51244  exec 5>>config.log
51245  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
51246  # would make configure fail if this is the last instruction.
51247  $ac_cs_success || as_fn_exit 1
51248fi
51249if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
51250  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
51251$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
51252fi
51253
51254
51255# Try to move the config.log file to the output directory.
51256if test -e ./config.log; then
51257  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
51258fi
51259
51260# Make the compare script executable
51261$CHMOD +x $OUTPUT_ROOT/compare.sh
51262
51263# Finally output some useful information to the user
51264
51265  # Finally output some useful information to the user
51266
51267  printf "\n"
51268  printf "====================================================\n"
51269  if test "x$no_create" != "xyes"; then
51270    if test "x$IS_RECONFIGURE" != "xyes"; then
51271      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
51272    else
51273      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
51274    fi
51275  else
51276    if test "x$IS_RECONFIGURE" != "xyes"; then
51277      printf "A configuration has been successfully checked but not created\n"
51278    else
51279      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
51280    fi
51281  fi
51282  if test "x$CONFIGURE_COMMAND_LINE" != x; then
51283    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
51284  else
51285    printf "using default settings.\n"
51286  fi
51287
51288  printf "\n"
51289  printf "Configuration summary:\n"
51290  printf "* Debug level:    $DEBUG_LEVEL\n"
51291  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
51292  printf "* JDK variant:    $JDK_VARIANT\n"
51293  printf "* JVM variants:   $with_jvm_variants\n"
51294  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
51295
51296  printf "\n"
51297  printf "Tools summary:\n"
51298  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
51299    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
51300  fi
51301  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
51302  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
51303  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
51304  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
51305
51306  printf "\n"
51307  printf "Build performance summary:\n"
51308  printf "* Cores to use:   $JOBS\n"
51309  printf "* Memory limit:   $MEMORY_SIZE MB\n"
51310  if test "x$CCACHE_STATUS" != "x"; then
51311    printf "* ccache status:  $CCACHE_STATUS\n"
51312  fi
51313  printf "\n"
51314
51315  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
51316    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
51317    printf "will result in longer build times.\n"
51318    printf "\n"
51319  fi
51320
51321  if test "x$FOUND_ALT_VARIABLES" != "x"; then
51322    printf "WARNING: You have old-style ALT_ environment variables set.\n"
51323    printf "These are not respected, and will be ignored. It is recommended\n"
51324    printf "that you clean your environment. The following variables are set:\n"
51325    printf "$FOUND_ALT_VARIABLES\n"
51326    printf "\n"
51327  fi
51328
51329  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
51330    printf "WARNING: Your build output directory is not on a local disk.\n"
51331    printf "This will severely degrade build performance!\n"
51332    printf "It is recommended that you create an output directory on a local disk,\n"
51333    printf "and run the configure script again from that directory.\n"
51334    printf "\n"
51335  fi
51336
51337  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
51338    printf "WARNING: The result of this configuration has overridden an older\n"
51339    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
51340    printf "proper build. Failure to do so might result in strange build problems.\n"
51341    printf "\n"
51342  fi
51343
51344  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
51345    printf "WARNING: The result of this configuration was not saved.\n"
51346    printf "You should run without '--no-create | -n' to create the configuration.\n"
51347    printf "\n"
51348  fi
51349
51350